Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace MoSfSyncSalesforce\Handler; use MoSfSyncSalesforce\Helper\Instance..

Decoded Output download

<?php 
 
 
namespace MoSfSyncSalesforce\Handler; 
 
use MoSfSyncSalesforce\Helper\Instance; 
use MoSfSyncSalesforce\Services\DBUtils; 
use MoSfSyncSalesforce\API\Salesforce; 
use MoSfSyncSalesforce\Customer; 
use MoSfSyncSalesforce\Services\Utils; 
use MoSfSyncSalesforce\Handler\Object_Sync_Sf_WordPress; 
use MoSfSyncSalesforce\Helper\PluginConstants; 
use MoSfSyncSalesforce\Services\AuditDB; 
use MoSfSyncSalesforce\Helper\view\PaidMemberShipProIntegration; 
use MoSfSyncSalesforce\Handler\CustomTablesHandler; 
class ScheduledSyncHandler 
{ 
    use Instance; 
    private $Salesforce; 
    private $db; 
    private $Object_Sync_Sf_WordPress; 
    private $audit; 
    private $enable_audit_logs; 
    public static function instance() 
    { 
        if (!is_null(self::$_instance)) { 
            goto Mp; 
        } 
        self::$_instance = new self(); 
        self::$_instance->Salesforce = new Salesforce(); 
        self::$_instance->db = new DBUtils(); 
        self::$_instance->Object_Sync_Sf_WordPress = new object_Sync_Sf_WordPress(); 
        self::$_instance->audit = AuditDB::instance(); 
        self::$_instance->enable_audit_logs = get_site_option("mo_sf_sync_enable_audit_logs"); 
        self::$_instance->custom_table_handler = new CustomTablesHandler(); 
        Mp: 
        return self::$_instance; 
    } 
    public static function mo_sf_sync_manage_schedule_sync($Mh) 
    { 
        if ($Mh) { 
            goto k2; 
        } 
        wp_unschedule_event(wp_next_scheduled("mo_sf_sync_scheduled_sync"), "mo_sf_sync_scheduled_sync"); 
        goto ju; 
        k2: 
        if (wp_next_scheduled("mo_sf_sync_scheduled_sync")) { 
            goto AH; 
        } 
        wp_schedule_event(time(), "hourly", "mo_sf_sync_scheduled_sync"); 
        AH: 
        ju: 
    } 
    public function mo_sf_sync_manage_one_time_sync($hi, $TW) 
    { 
        if (empty($hi)) { 
            goto T4; 
        } 
        if ($TW == "PULL") { 
            goto Io; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi, '')); 
        goto fs; 
        Io: 
        if (!wp_next_scheduled("mo_sf_sync_one_time_sync")) { 
            goto yY; 
        } 
        wp_send_json_error("Please wait while one pull operation is ongoing"); 
        goto Ps; 
        yY: 
        wp_schedule_single_event(time(), "mo_sf_sync_one_time_sync", array($hi, '')); 
        Ps: 
        fs: 
        T4: 
    } 
    public function mo_sf_sync_unschedule_job($US, $u1) 
    { 
        $oO = wp_unschedule_event(wp_next_scheduled($US, $u1), $US, $u1); 
    } 
    public function mo_sf_sync_one_time_sync($hi, $B4 = '') 
    { 
        if (!empty($hi)) { 
            goto qP; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi)); 
        return; 
        qP: 
        $AS = 0; 
        $R2 = date("Y-m-d H:i:s", current_time("timestamp", 1)); 
        $fX = new DBUtils(); 
        $Y2 = $fX->mo_sf_sync_get_object_mapping($hi); 
        if (!(empty($Y2) || !is_array($Y2))) { 
            goto Gc; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi)); 
        return; 
        Gc: 
        $zz = $Y2[0]; 
        if (!empty($zz)) { 
            goto fk; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi)); 
        return; 
        fk: 
        $m6 = ini_get("max_execution_time"); 
        set_time_limit($AS); 
        $SE = $zz->nomenclature; 
        $We = $zz->salesforce_object; 
        $PY = $zz->wordpress_object; 
        $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY); 
        $g9 = $this->db->mo_sf_sync_get_column_names($VF["content_table"]); 
        $uW = maybe_unserialize($zz->fields); 
        $aO = implode(",", array_keys($uW["field_mapping"])); 
        $bx = "SELECT Id,{$aO} FROM {$We} ORDER BY SystemModstamp ASC"; 
        if (empty($B4)) { 
            goto Pk; 
        } 
        $YJ = (new Salesforce())->mo_Sf_sync_get_next_records($B4); 
        error_log("SOQL response" . print_r($YJ, true)); 
        $bj = count($YJ["records"]); 
        $XQ = 70; 
        $this->mo_sf_sync_start_slave_cron($bj, $XQ, $YJ, $hi); 
        goto j4; 
        Pk: 
        $YJ = (new Salesforce())->mo_sf_sync_execute_soql($bx); 
        error_log("SOQL response" . print_r($YJ, true)); 
        $bj = count($YJ["records"]); 
        $XQ = 70; 
        $this->mo_sf_sync_start_slave_cron($bj, $XQ, $YJ, $hi); 
        j4: 
        set_time_limit($m6); 
        $R2 = date("Y-m-d H:i:s", current_time("timestamp", 1)); 
        $F4 = Utils::mo_sf_sync_get_site_specific_settings("mo_sf_sync_one_time_pull"); 
        $F4[$hi] = "Last Run: " . $R2; 
        Utils::mo_sf_sync_save_site_specific_settings("mo_sf_sync_one_time_pull", $F4); 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi)); 
    } 
    public function mo_sf_sync_start_slave_cron($bj, $XQ, $mF, $hi) 
    { 
        $X1 = $bj > $XQ ? ceil($bj / $XQ) : 1; 
        $lD = array_chunk($mF["records"], $X1); 
        foreach ($lD as $Ac => $mT) { 
            wp_schedule_single_event(time(), "mo_sf_sync_start_multiple_crons", array($mT, $hi)); 
            GM: 
        } 
        f_: 
        if (!(isset($mF["nextRecordsUrl"]) && !empty($mF["nextRecordsUrl"]))) { 
            goto Rs; 
        } 
        wp_schedule_single_event(time(), "mo_sf_sync_one_time_sync", array($hi, $mF["nextRecordsUrl"])); 
        Rs: 
        if (!(isset($mF["done"]) && !empty($mF["done"]))) { 
            goto AN; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_one_time_sync", array($hi)); 
        AN: 
    } 
    public function mo_sf_sync_start_multiple_crons($mF, $hi) 
    { 
        if (!empty($hi)) { 
            goto u7; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_start_multiple_crons", array($mF, $hi)); 
        return; 
        u7: 
        $AS = 0; 
        $R2 = date("Y-m-d H:i:s", current_time("timestamp", 1)); 
        $fX = new DBUtils(); 
        $Y2 = $fX->mo_sf_sync_get_object_mapping($hi); 
        if (!(empty($Y2) || !is_array($Y2))) { 
            goto yy; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_start_multiple_crons", array($mF, $hi)); 
        return; 
        yy: 
        $zz = $Y2[0]; 
        if (!empty($zz)) { 
            goto Yk; 
        } 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_start_multiple_crons", array($mF, $hi)); 
        return; 
        Yk: 
        $m6 = ini_get("max_execution_time"); 
        set_time_limit($AS); 
        $SE = $zz->nomenclature; 
        $We = $zz->salesforce_object; 
        $PY = $zz->wordpress_object; 
        $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY); 
        $g9 = $this->db->mo_sf_sync_get_column_names($VF["content_table"]); 
        $uW = maybe_unserialize($zz->fields); 
        $oO = $this->mo_sf_sync_save_wp_records($mF, $PY, $We, $uW, $VF, $g9, $SE, null, null, "bulk_pull"); 
        $this->mo_sf_sync_unschedule_job("mo_sf_sync_start_multiple_crons", array($mF, $hi)); 
    } 
    public function mo_sf_sync_scheduled_sync() 
    { 
        $AS = 0; 
        $fX = new DBUtils(); 
        $Y2 = $fX->mo_sf_sync_get_all_sf_to_wp_mappings(); 
        if (!(empty($Y2) || !is_array($Y2))) { 
            goto kL; 
        } 
        return; 
        kL: 
        $m6 = ini_get("max_execution_time"); 
        set_time_limit($AS); 
        foreach ($Y2 as $zz) { 
            if (!(empty($zz) || (!isset($zz->scheduled_sync_enabled) || !$zz->scheduled_sync_enabled))) { 
                goto dz; 
            } 
            goto E7; 
            dz: 
            $WX = isset($zz->last_scheduled_sync_timestamp) ? $zz->last_scheduled_sync_timestamp : false; 
            $qu = date("Y-m-d H:i:s", current_time("timestamp", 1)); 
            if (empty($WX)) { 
                goto o2; 
            } 
            $R3 = round((strtotime(substr($WX, 0, -11)) - strtotime($qu)) / 3600, 1); 
            if ($zz->sync_interval === "twicedaily") { 
                goto gy; 
            } 
            if ($zz->sync_interval === "daily") { 
                goto KF; 
            } 
            goto E7; 
            goto UZ; 
            KF: 
            if (!($R3 < 23)) { 
                goto J0; 
            } 
            goto E7; 
            J0: 
            UZ: 
            goto CE; 
            gy: 
            if (!($R3 < 11)) { 
                goto vd; 
            } 
            goto E7; 
            vd: 
            CE: 
            o2: 
            $SE = $zz->nomenclature; 
            $We = $zz->salesforce_object; 
            $PY = $zz->wordpress_object; 
            $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY); 
            $g9 = $this->db->mo_sf_sync_get_column_names($VF["content_table"]); 
            $uW = maybe_unserialize($zz->fields); 
            $aO = implode(",", array_keys($uW["field_mapping"])); 
            $Yk = ''; 
            if (empty($WX)) { 
                goto v5; 
            } 
            $Yk = "WHERE SystemModstamp >= " . $WX; 
            v5: 
            $bx = "SELECT Id,{$aO} FROM {$We} {$Yk} ORDER BY SystemModstamp ASC"; 
            $YJ = (new Salesforce())->mo_sf_sync_execute_soql($bx); 
            if (!(is_wp_error($YJ) || empty($YJ) || isset($YJ[0]) && isset($YJ[0]["errorCode"]))) { 
                goto Fm; 
            } 
            $ly = isset($YJ[0]["errorCode"]) ? $YJ[0]["errorCode"] : ''; 
            goto E7; 
            Fm: 
            $oO = $this->mo_sf_sync_save_wp_records($YJ["records"], $PY, $We, $uW, $VF, $g9, $SE); 
            if (!(empty($oO) || is_wp_error($oO))) { 
                goto wH; 
            } 
            goto E7; 
            wH: 
            $q6 = false; 
            if (!(isset($YJ["done"]) && !empty($YJ["done"]))) { 
                goto Wl; 
            } 
            $q6 = true; 
            Wl: 
            Et: 
            if ($q6) { 
                goto HA; 
            } 
            $B4 = $YJ["nextRecordsUrl"]; 
            $YJ = (new Salesforce())->mo_Sf_sync_get_next_records($B4); 
            if (!(isset($YJ["done"]) && !empty($YJ["done"]))) { 
                goto wU; 
            } 
            $q6 = true; 
            wU: 
            if (!(is_wp_error($YJ) || empty($YJ) || isset($YJ[0]) && isset($YJ[0]["errorCode"]))) { 
                goto ZU; 
            } 
            $ly = isset($YJ[0]["errorCode"]) ? $YJ[0]["errorCode"] : ''; 
            $q6 = true; 
            goto Et; 
            ZU: 
            $oO = $this->mo_sf_sync_save_wp_records($YJ["records"], $PY, $We, $uW, $VF, $g9, $SE); 
            if (!(empty($oO) || is_wp_error($oO))) { 
                goto fw; 
            } 
            $q6 = true; 
            goto Et; 
            fw: 
            goto Et; 
            HA: 
            if (is_wp_error($YJ)) { 
                goto K0; 
            } 
            goto ok; 
            K0: 
            ok: 
            $R2 = str_replace("Z", ".000%2B0000", gmdate("Y-m-d\TH:i:s\Z", time())); 
            $fX->mo_sf_sync_update_scheduled_sync_details($zz->id, true, $zz->sync_interval, $R2); 
            E7: 
        } 
        Pf: 
        set_time_limit($m6); 
    } 
    public function mo_sf_sync_is_check_if_received_data_is_updated($Un, $Sr, $SU, $Fn, $g9) 
    { 
        $AW = ''; 
        foreach ($SU as $Ac => $mT) { 
            if (in_array($Ac, $g9)) { 
                goto qL; 
            } 
            $AW .= "'" . $Ac . "',"; 
            goto qk; 
            qL: 
            if (!(!isset($Sr[$Ac]) || wp_strip_all_tags($Sr[$Ac]) != wp_strip_all_tags($SU[$Ac]))) { 
                goto jU; 
            } 
            return true; 
            jU: 
            unset($SU[$Ac]); 
            qk: 
            sV: 
        } 
        ja: 
        if (!empty($AW)) { 
            goto Wn; 
        } 
        return false; 
        Wn: 
        $AW = substr($AW, 0, -1); 
        $lI = $Sr["ID"]; 
        $Zv = "SELECT meta_key, meta_value FROM {$Fn} where {$Un}={$lI} and meta_key in ({$AW})"; 
        global $wpdb; 
        $in = $wpdb->get_results($Zv); 
        foreach ($in as $KT) { 
            if (!(wp_strip_all_tags($KT->meta_value) != wp_strip_all_tags($SU[$KT->meta_key]))) { 
                goto dt; 
            } 
            return true; 
            dt: 
            unset($SU[$KT->meta_key]); 
            Vq: 
        } 
        tz: 
        if (empty($SU)) { 
            goto sk; 
        } 
        return true; 
        sk: 
        return false; 
    } 
    public function mo_sf_sync_save_wp_records($mF, $PY, $We, $r5, $VF, $g9, $SE, $CS = null, $ud = null) 
    { 
        if (!$this->custom_table_handler->mo_sf_sync_get_all_fields_custom_table($PY)) { 
            goto yF; 
        } 
        $this->custom_table_handler->mo_sf_sync_save_data_in_custom_table($mF, $PY, $r5, $SE); 
        goto BU; 
        yF: 
        foreach ($mF as $jr) { 
            $na = false; 
            $SU = $this->mo_sf_sync_build_data_to_save($r5, $jr); 
            $O8 = $jr["Id"]; 
            $Sr = $this->mo_sf_sync_get_record_if_already_synced($SE, $O8, $PY); 
            $O6 = false; 
            if (!empty($Sr)) { 
                goto RS; 
            } 
            $SU[$SE] = $O8; 
            $na = $this->mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, false); 
            if (!(!empty($na) && isset($r5["taxonomy_fields"]) && !empty($r5["taxonomy_fields"]))) { 
                goto Vo; 
            } 
            $this->mo_sf_sync_map_taxonomies($na, $r5["taxonomy_fields"], $jr); 
            Vo: 
            goto zI; 
            RS: 
            $O6 = $Sr[$VF["id_field"]]; 
            $SU[$VF["id_field"]] = $O6; 
            $na = $this->mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, $O6); 
            if (!(!empty($na) && isset($r5["taxonomy_fields"]) && !empty($r5["taxonomy_fields"]))) { 
                goto rL; 
            } 
            $this->mo_sf_sync_map_taxonomies($na, $r5["taxonomy_fields"], $jr); 
            rL: 
            zI: 
            if (empty($na)) { 
                goto hz; 
            } 
            do_action("mo_sf_sync_after_object_upsert", $PY, $na, $We, $O8); 
            hz: 
            if (!$this->enable_audit_logs) { 
                goto FU; 
            } 
            if (!empty($Sr)) { 
                goto xJ; 
            } 
            if ($na) { 
                goto Qe; 
            } 
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, "Creation Failed", "Create", "Failed", "Pull failed Cannot save data to WordPress object", $PY); 
            goto AG; 
            Qe: 
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $na, "Create", "Success", "Pull Successful with " . $We, $PY); 
            AG: 
            goto vG; 
            xJ: 
            if ($na) { 
                goto Vc; 
            } 
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $O6, "Update", "Failed", "Pull failed Cannot save data to WordPress object", $PY); 
            goto x0; 
            Vc: 
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $O6, "Update", "Success", "Pull Successful with " . $We, $PY); 
            x0: 
            vG: 
            FU: 
            NA: 
        } 
        bC: 
        return true; 
        BU: 
        return false; 
    } 
    private function mo_sf_sync_build_data_to_save($r5, $Qy) 
    { 
        $r5 = array_flip($r5["field_mapping"]); 
        $WO = array(); 
        foreach ($r5 as $Ac => $mT) { 
            if (!isset($Qy[$mT])) { 
                goto ev; 
            } 
            $WO[$Ac] = $Qy[$mT]; 
            ev: 
            Dw: 
        } 
        pV: 
        $WO = isset($r5["custom_field_mapping"]) ? array_merge($WO, $r5["custom_field_mapping"]) : $WO; 
        $WO = apply_filters("mo_sf_sync_pre_data_send", $WO); 
        return $WO; 
    } 
    public function mo_sf_sync_is_record_already_synced($O8, $We, $PY, $SE) 
    { 
        $El = array("method_match" => "WP_Query"); 
        $oO = $this->Object_Sync_Sf_WordPress->object_upsert($PY, $SE, $O8, array(), false, $El, true); 
        return $oO; 
    } 
    public static function mo_sf_sync_get_record_if_already_synced($SE, $O8, $PY) 
    { 
        $ST = "WP_Query"; 
        $uP = "get_results"; 
        $u1 = array(); 
        switch ($PY) { 
            case "user": 
                $ST = "WP_User_Query"; 
                goto s9; 
            case "category": 
                $ST = "WP_Term_Query"; 
                goto s9; 
            case "category": 
            case "tag": 
            case "post_tag": 
                $ST = "WP_Term_Query"; 
                $uP = "get_terms"; 
                goto s9; 
            case "comment": 
                $ST = "WP_Comment_Query"; 
                $uP = "get_comments"; 
                goto s9; 
            default: 
                $u1["post_type"] = $PY; 
                $uP = "get_posts"; 
        } 
        JG: 
        s9: 
        $in = false; 
        if (!class_exists($ST)) { 
            goto IY; 
        } 
        $u1["meta_query"] = array(array("key" => $SE, "value" => $O8)); 
        $De = new $ST($u1); 
        $in = $De->{$uP}(); 
        if (!empty($in)) { 
            goto O2; 
        } 
        return false; 
        O2: 
        if ($PY === "user") { 
            goto CK; 
        } 
        $in = (array) $in[0]; 
        goto YP; 
        CK: 
        $in = (array) $in[0]->data; 
        YP: 
        IY: 
        return $in; 
    } 
    private function mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, $tX = false) 
    { 
        $OZ = array(); 
        foreach ($SU as $Ac => $mT) { 
            if (!in_array($Ac, $g9)) { 
                goto j5; 
            } 
            $OZ[$Ac] = $mT; 
            unset($Ac); 
            j5: 
            bw: 
        } 
        P0: 
        if (!($VF["object_name"] == "post")) { 
            goto uA; 
        } 
        $OZ["post_type"] = $PY; 
        if (!empty($tX)) { 
            goto uT; 
        } 
        $OZ["post_status"] = "publish"; 
        uT: 
        uA: 
        $uP = $VF["content_methods"]["create"]; 
        if (empty($tX)) { 
            goto Sy; 
        } 
        $uP = $VF["content_methods"]["update"]; 
        Sy: 
        if (file_exists(plugin_dir_path(__DIR__) . "Helper/view/PaidMemberShipProIntegration.php") && $PY == "pmpro_orders") { 
            goto eE; 
        } 
        $tX = $uP($OZ); 
        goto vt; 
        eE: 
        $tX = PaidMemberShipProIntegration::$uP($OZ); 
        vt: 
        if (!(empty($tX) || is_wp_error($tX))) { 
            goto tN; 
        } 
        return false; 
        tN: 
        $md = $VF["meta_methods"]["update"]; 
        $this->mo_sf_sync_inset_meta($SU, $tX, $md); 
        return $tX; 
    } 
    private function mo_sf_sync_inset_meta($GE, $O6, $uP) 
    { 
        foreach ($GE as $Ac => $mT) { 
            if (strpos($mT, "-") != false) { 
                goto o8; 
            } 
            if (!(strpos($mT, ";") != false)) { 
                goto yq; 
            } 
            $mT = array_values(explode(";", $mT)); 
            yq: 
            goto Lr; 
            o8: 
            $oU = \DateTime::createFromFormat("Y-m-d", $mT); 
            if (!($oU && $oU->format("Y-m-d") === $mT)) { 
                goto Cl; 
            } 
            $mT = str_replace("-", '', $mT); 
            Cl: 
            Lr: 
            $uP($O6, $Ac, $mT); 
            yS: 
        } 
        g1: 
        return true; 
    } 
    private function mo_sf_sync_map_taxonomies($BM, $AV, $jr) 
    { 
        foreach ($AV as $Y8 => $e1) { 
            $mT = array(); 
            if (strpos($jr[$Y8], ";") != false) { 
                goto GY; 
            } 
            array_push($mT, $jr[$Y8]); 
            goto mn; 
            GY: 
            $mT = array_values(explode(";", $jr[$Y8])); 
            mn: 
            $LA = array(); 
            foreach ($mT as $sa) { 
                $Yx = get_term_by("name", $sa, $e1); 
                array_push($LA, $Yx->term_id); 
                oJ: 
            } 
            g6: 
            wp_set_post_terms($BM, $LA, $e1); 
            JE: 
        } 
        kF: 
    } 
} ?>

Did this file decode correctly?

Original Code

<?php


namespace MoSfSyncSalesforce\Handler;

use MoSfSyncSalesforce\Helper\Instance;
use MoSfSyncSalesforce\Services\DBUtils;
use MoSfSyncSalesforce\API\Salesforce;
use MoSfSyncSalesforce\Customer;
use MoSfSyncSalesforce\Services\Utils;
use MoSfSyncSalesforce\Handler\Object_Sync_Sf_WordPress;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\Services\AuditDB;
use MoSfSyncSalesforce\Helper\view\PaidMemberShipProIntegration;
use MoSfSyncSalesforce\Handler\CustomTablesHandler;
class ScheduledSyncHandler
{
    use Instance;
    private $Salesforce;
    private $db;
    private $Object_Sync_Sf_WordPress;
    private $audit;
    private $enable_audit_logs;
    public static function instance()
    {
        if (!is_null(self::$_instance)) {
            goto Mp;
        }
        self::$_instance = new self();
        self::$_instance->Salesforce = new Salesforce();
        self::$_instance->db = new DBUtils();
        self::$_instance->Object_Sync_Sf_WordPress = new object_Sync_Sf_WordPress();
        self::$_instance->audit = AuditDB::instance();
        self::$_instance->enable_audit_logs = get_site_option("\155\x6f\x5f\x73\x66\x5f\163\171\156\143\137\145\x6e\x61\x62\x6c\145\137\141\165\144\151\164\137\x6c\157\147\163");
        self::$_instance->custom_table_handler = new CustomTablesHandler();
        Mp:
        return self::$_instance;
    }
    public static function mo_sf_sync_manage_schedule_sync($Mh)
    {
        if ($Mh) {
            goto k2;
        }
        wp_unschedule_event(wp_next_scheduled("\x6d\157\x5f\x73\146\137\163\171\156\143\x5f\163\143\150\145\144\x75\x6c\145\x64\137\163\171\x6e\143"), "\x6d\x6f\137\x73\146\x5f\163\171\156\143\x5f\163\143\x68\145\x64\165\154\145\144\137\x73\171\x6e\143");
        goto ju;
        k2:
        if (wp_next_scheduled("\x6d\x6f\137\163\146\x5f\x73\171\156\x63\137\163\x63\x68\x65\x64\x75\x6c\x65\144\137\163\171\156\143")) {
            goto AH;
        }
        wp_schedule_event(time(), "\x68\x6f\165\x72\x6c\171", "\155\x6f\137\x73\146\137\x73\x79\156\x63\137\163\x63\150\x65\144\165\154\145\144\x5f\163\171\156\143");
        AH:
        ju:
    }
    public function mo_sf_sync_manage_one_time_sync($hi, $TW)
    {
        if (empty($hi)) {
            goto T4;
        }
        if ($TW == "\x50\125\114\114") {
            goto Io;
        }
        $this->mo_sf_sync_unschedule_job("\x6d\x6f\137\x73\x66\x5f\163\x79\156\143\137\x6f\156\145\137\164\151\155\x65\137\x73\171\156\143", array($hi, ''));
        goto fs;
        Io:
        if (!wp_next_scheduled("\155\x6f\x5f\x73\x66\x5f\x73\171\156\143\x5f\157\x6e\145\x5f\164\151\x6d\x65\x5f\163\x79\156\143")) {
            goto yY;
        }
        wp_send_json_error("\x50\x6c\145\141\x73\145\x20\x77\x61\151\x74\x20\x77\150\x69\x6c\x65\x20\x6f\x6e\145\40\x70\165\x6c\154\40\x6f\x70\145\162\141\164\151\157\156\x20\151\163\x20\157\156\147\157\x69\156\x67");
        goto Ps;
        yY:
        wp_schedule_single_event(time(), "\x6d\157\137\163\146\x5f\x73\171\156\x63\x5f\x6f\x6e\x65\x5f\164\151\155\x65\137\x73\171\x6e\143", array($hi, ''));
        Ps:
        fs:
        T4:
    }
    public function mo_sf_sync_unschedule_job($US, $u1)
    {
        $oO = wp_unschedule_event(wp_next_scheduled($US, $u1), $US, $u1);
    }
    public function mo_sf_sync_one_time_sync($hi, $B4 = '')
    {
        if (!empty($hi)) {
            goto qP;
        }
        $this->mo_sf_sync_unschedule_job("\155\x6f\137\163\146\x5f\x73\x79\156\x63\137\157\x6e\x65\137\x74\151\155\x65\x5f\x73\x79\156\x63", array($hi));
        return;
        qP:
        $AS = 0;
        $R2 = date("\x59\55\x6d\55\144\x20\x48\72\151\72\x73", current_time("\x74\151\155\x65\163\164\x61\155\160", 1));
        $fX = new DBUtils();
        $Y2 = $fX->mo_sf_sync_get_object_mapping($hi);
        if (!(empty($Y2) || !is_array($Y2))) {
            goto Gc;
        }
        $this->mo_sf_sync_unschedule_job("\155\x6f\x5f\163\x66\137\163\171\x6e\x63\137\157\156\145\x5f\164\151\x6d\145\x5f\x73\x79\x6e\143", array($hi));
        return;
        Gc:
        $zz = $Y2[0];
        if (!empty($zz)) {
            goto fk;
        }
        $this->mo_sf_sync_unschedule_job("\x6d\x6f\137\163\146\x5f\x73\x79\156\143\137\157\x6e\145\x5f\164\x69\155\145\x5f\163\x79\156\x63", array($hi));
        return;
        fk:
        $m6 = ini_get("\x6d\x61\170\137\x65\x78\x65\x63\165\164\x69\x6f\x6e\x5f\x74\151\x6d\145");
        set_time_limit($AS);
        $SE = $zz->nomenclature;
        $We = $zz->salesforce_object;
        $PY = $zz->wordpress_object;
        $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY);
        $g9 = $this->db->mo_sf_sync_get_column_names($VF["\x63\x6f\156\164\x65\x6e\164\137\x74\x61\142\x6c\x65"]);
        $uW = maybe_unserialize($zz->fields);
        $aO = implode("\x2c", array_keys($uW["\x66\151\145\154\x64\137\155\141\x70\x70\x69\x6e\147"]));
        $bx = "\123\105\114\x45\x43\x54\40\x49\x64\54{$aO}\40\x46\122\117\x4d\x20{$We}\40\117\122\x44\105\x52\x20\x42\131\x20\x53\x79\x73\164\x65\x6d\x4d\157\x64\163\164\x61\x6d\160\x20\x41\123\x43";
        if (empty($B4)) {
            goto Pk;
        }
        $YJ = (new Salesforce())->mo_Sf_sync_get_next_records($B4);
        error_log("\123\x4f\x51\114\40\x72\x65\163\x70\x6f\156\163\x65" . print_r($YJ, true));
        $bj = count($YJ["\162\145\x63\x6f\162\x64\x73"]);
        $XQ = 70;
        $this->mo_sf_sync_start_slave_cron($bj, $XQ, $YJ, $hi);
        goto j4;
        Pk:
        $YJ = (new Salesforce())->mo_sf_sync_execute_soql($bx);
        error_log("\x53\x4f\121\114\40\162\145\163\160\157\156\163\x65" . print_r($YJ, true));
        $bj = count($YJ["\x72\x65\143\157\x72\x64\163"]);
        $XQ = 70;
        $this->mo_sf_sync_start_slave_cron($bj, $XQ, $YJ, $hi);
        j4:
        set_time_limit($m6);
        $R2 = date("\131\55\155\55\x64\x20\110\x3a\x69\72\x73", current_time("\164\x69\155\x65\x73\164\141\x6d\160", 1));
        $F4 = Utils::mo_sf_sync_get_site_specific_settings("\x6d\x6f\x5f\163\x66\x5f\163\171\156\x63\x5f\157\156\x65\x5f\x74\x69\x6d\145\137\160\x75\154\154");
        $F4[$hi] = "\x4c\x61\x73\x74\x20\122\165\x6e\72\x20" . $R2;
        Utils::mo_sf_sync_save_site_specific_settings("\155\157\x5f\x73\x66\x5f\x73\171\x6e\143\x5f\x6f\x6e\x65\x5f\x74\151\155\145\x5f\x70\x75\x6c\154", $F4);
        $this->mo_sf_sync_unschedule_job("\x6d\x6f\137\x73\146\x5f\x73\171\x6e\143\137\x6f\156\x65\x5f\164\151\x6d\x65\137\x73\x79\x6e\143", array($hi));
    }
    public function mo_sf_sync_start_slave_cron($bj, $XQ, $mF, $hi)
    {
        $X1 = $bj > $XQ ? ceil($bj / $XQ) : 1;
        $lD = array_chunk($mF["\x72\x65\143\157\162\144\x73"], $X1);
        foreach ($lD as $Ac => $mT) {
            wp_schedule_single_event(time(), "\x6d\157\x5f\163\x66\x5f\x73\171\x6e\143\137\x73\164\141\162\164\x5f\x6d\x75\x6c\164\x69\160\154\145\x5f\x63\162\157\x6e\x73", array($mT, $hi));
            GM:
        }
        f_:
        if (!(isset($mF["\156\145\170\x74\122\x65\143\157\x72\144\163\x55\162\x6c"]) && !empty($mF["\x6e\145\x78\164\122\x65\143\x6f\x72\x64\x73\125\x72\x6c"]))) {
            goto Rs;
        }
        wp_schedule_single_event(time(), "\x6d\157\137\163\146\x5f\163\171\x6e\143\x5f\157\x6e\x65\137\x74\x69\x6d\x65\137\163\x79\156\143", array($hi, $mF["\x6e\145\170\x74\122\145\143\157\162\x64\163\x55\162\x6c"]));
        Rs:
        if (!(isset($mF["\144\157\156\x65"]) && !empty($mF["\144\x6f\x6e\145"]))) {
            goto AN;
        }
        $this->mo_sf_sync_unschedule_job("\155\x6f\x5f\163\x66\x5f\163\171\x6e\x63\x5f\157\x6e\145\137\164\x69\x6d\145\137\163\x79\x6e\x63", array($hi));
        AN:
    }
    public function mo_sf_sync_start_multiple_crons($mF, $hi)
    {
        if (!empty($hi)) {
            goto u7;
        }
        $this->mo_sf_sync_unschedule_job("\155\157\137\x73\146\137\163\x79\x6e\143\x5f\163\x74\141\x72\x74\x5f\x6d\165\154\164\151\x70\154\x65\x5f\x63\162\x6f\x6e\163", array($mF, $hi));
        return;
        u7:
        $AS = 0;
        $R2 = date("\x59\x2d\155\55\144\x20\x48\x3a\x69\x3a\163", current_time("\x74\x69\155\x65\163\x74\x61\155\160", 1));
        $fX = new DBUtils();
        $Y2 = $fX->mo_sf_sync_get_object_mapping($hi);
        if (!(empty($Y2) || !is_array($Y2))) {
            goto yy;
        }
        $this->mo_sf_sync_unschedule_job("\155\x6f\x5f\x73\x66\137\x73\x79\x6e\x63\x5f\163\x74\141\x72\x74\137\155\x75\x6c\164\x69\160\x6c\x65\x5f\x63\162\157\x6e\163", array($mF, $hi));
        return;
        yy:
        $zz = $Y2[0];
        if (!empty($zz)) {
            goto Yk;
        }
        $this->mo_sf_sync_unschedule_job("\155\x6f\x5f\163\x66\137\163\171\156\x63\x5f\163\x74\141\162\164\137\155\x75\154\x74\x69\x70\x6c\145\137\143\162\157\156\x73", array($mF, $hi));
        return;
        Yk:
        $m6 = ini_get("\x6d\x61\170\x5f\x65\170\145\143\165\164\x69\x6f\x6e\137\164\x69\155\145");
        set_time_limit($AS);
        $SE = $zz->nomenclature;
        $We = $zz->salesforce_object;
        $PY = $zz->wordpress_object;
        $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY);
        $g9 = $this->db->mo_sf_sync_get_column_names($VF["\x63\x6f\x6e\164\145\156\164\137\164\141\x62\154\145"]);
        $uW = maybe_unserialize($zz->fields);
        $oO = $this->mo_sf_sync_save_wp_records($mF, $PY, $We, $uW, $VF, $g9, $SE, null, null, "\x62\x75\x6c\153\137\x70\x75\154\x6c");
        $this->mo_sf_sync_unschedule_job("\x6d\157\137\163\146\x5f\163\x79\156\x63\x5f\x73\x74\x61\162\164\137\x6d\165\x6c\164\x69\160\x6c\145\137\x63\162\x6f\156\x73", array($mF, $hi));
    }
    public function mo_sf_sync_scheduled_sync()
    {
        $AS = 0;
        $fX = new DBUtils();
        $Y2 = $fX->mo_sf_sync_get_all_sf_to_wp_mappings();
        if (!(empty($Y2) || !is_array($Y2))) {
            goto kL;
        }
        return;
        kL:
        $m6 = ini_get("\x6d\x61\170\137\x65\x78\x65\143\165\164\x69\157\156\x5f\164\151\155\x65");
        set_time_limit($AS);
        foreach ($Y2 as $zz) {
            if (!(empty($zz) || (!isset($zz->scheduled_sync_enabled) || !$zz->scheduled_sync_enabled))) {
                goto dz;
            }
            goto E7;
            dz:
            $WX = isset($zz->last_scheduled_sync_timestamp) ? $zz->last_scheduled_sync_timestamp : false;
            $qu = date("\131\55\x6d\x2d\x64\40\x48\x3a\151\72\x73", current_time("\164\151\155\145\x73\x74\141\155\160", 1));
            if (empty($WX)) {
                goto o2;
            }
            $R3 = round((strtotime(substr($WX, 0, -11)) - strtotime($qu)) / 3600, 1);
            if ($zz->sync_interval === "\164\x77\x69\x63\145\x64\141\x69\x6c\171") {
                goto gy;
            }
            if ($zz->sync_interval === "\x64\x61\151\x6c\x79") {
                goto KF;
            }
            goto E7;
            goto UZ;
            KF:
            if (!($R3 < 23)) {
                goto J0;
            }
            goto E7;
            J0:
            UZ:
            goto CE;
            gy:
            if (!($R3 < 11)) {
                goto vd;
            }
            goto E7;
            vd:
            CE:
            o2:
            $SE = $zz->nomenclature;
            $We = $zz->salesforce_object;
            $PY = $zz->wordpress_object;
            $VF = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($PY);
            $g9 = $this->db->mo_sf_sync_get_column_names($VF["\x63\x6f\156\164\145\156\164\x5f\x74\x61\142\x6c\x65"]);
            $uW = maybe_unserialize($zz->fields);
            $aO = implode("\x2c", array_keys($uW["\146\x69\x65\x6c\x64\137\155\x61\160\160\x69\156\147"]));
            $Yk = '';
            if (empty($WX)) {
                goto v5;
            }
            $Yk = "\x57\110\x45\122\x45\x20\123\171\163\x74\145\x6d\115\157\144\x73\x74\141\155\160\x20\76\75\x20" . $WX;
            v5:
            $bx = "\x53\105\x4c\x45\103\124\x20\x49\x64\x2c{$aO}\40\x46\x52\117\115\40{$We}\x20{$Yk}\40\x4f\122\x44\x45\122\40\x42\131\40\x53\171\x73\x74\x65\x6d\115\157\144\x73\164\x61\x6d\160\x20\x41\123\103";
            $YJ = (new Salesforce())->mo_sf_sync_execute_soql($bx);
            if (!(is_wp_error($YJ) || empty($YJ) || isset($YJ[0]) && isset($YJ[0]["\x65\162\162\x6f\x72\103\x6f\144\x65"]))) {
                goto Fm;
            }
            $ly = isset($YJ[0]["\145\162\x72\x6f\x72\103\x6f\144\145"]) ? $YJ[0]["\145\162\x72\157\162\103\157\x64\145"] : '';
            goto E7;
            Fm:
            $oO = $this->mo_sf_sync_save_wp_records($YJ["\x72\x65\143\157\x72\x64\x73"], $PY, $We, $uW, $VF, $g9, $SE);
            if (!(empty($oO) || is_wp_error($oO))) {
                goto wH;
            }
            goto E7;
            wH:
            $q6 = false;
            if (!(isset($YJ["\x64\157\x6e\x65"]) && !empty($YJ["\x64\x6f\156\145"]))) {
                goto Wl;
            }
            $q6 = true;
            Wl:
            Et:
            if ($q6) {
                goto HA;
            }
            $B4 = $YJ["\156\145\x78\164\122\145\x63\x6f\162\x64\163\125\162\154"];
            $YJ = (new Salesforce())->mo_Sf_sync_get_next_records($B4);
            if (!(isset($YJ["\144\157\156\x65"]) && !empty($YJ["\144\157\156\x65"]))) {
                goto wU;
            }
            $q6 = true;
            wU:
            if (!(is_wp_error($YJ) || empty($YJ) || isset($YJ[0]) && isset($YJ[0]["\145\162\162\x6f\162\103\x6f\144\x65"]))) {
                goto ZU;
            }
            $ly = isset($YJ[0]["\145\x72\x72\x6f\x72\103\157\x64\x65"]) ? $YJ[0]["\x65\x72\x72\157\x72\x43\x6f\144\145"] : '';
            $q6 = true;
            goto Et;
            ZU:
            $oO = $this->mo_sf_sync_save_wp_records($YJ["\162\x65\x63\x6f\162\144\x73"], $PY, $We, $uW, $VF, $g9, $SE);
            if (!(empty($oO) || is_wp_error($oO))) {
                goto fw;
            }
            $q6 = true;
            goto Et;
            fw:
            goto Et;
            HA:
            if (is_wp_error($YJ)) {
                goto K0;
            }
            goto ok;
            K0:
            ok:
            $R2 = str_replace("\x5a", "\56\60\60\60\x25\x32\102\x30\x30\x30\60", gmdate("\131\55\x6d\55\x64\134\x54\110\x3a\x69\72\x73\x5c\132", time()));
            $fX->mo_sf_sync_update_scheduled_sync_details($zz->id, true, $zz->sync_interval, $R2);
            E7:
        }
        Pf:
        set_time_limit($m6);
    }
    public function mo_sf_sync_is_check_if_received_data_is_updated($Un, $Sr, $SU, $Fn, $g9)
    {
        $AW = '';
        foreach ($SU as $Ac => $mT) {
            if (in_array($Ac, $g9)) {
                goto qL;
            }
            $AW .= "\47" . $Ac . "\x27\54";
            goto qk;
            qL:
            if (!(!isset($Sr[$Ac]) || wp_strip_all_tags($Sr[$Ac]) != wp_strip_all_tags($SU[$Ac]))) {
                goto jU;
            }
            return true;
            jU:
            unset($SU[$Ac]);
            qk:
            sV:
        }
        ja:
        if (!empty($AW)) {
            goto Wn;
        }
        return false;
        Wn:
        $AW = substr($AW, 0, -1);
        $lI = $Sr["\x49\x44"];
        $Zv = "\123\105\x4c\x45\x43\124\x20\155\145\164\141\x5f\x6b\x65\x79\x2c\x20\x6d\145\x74\x61\137\166\141\154\x75\x65\40\106\122\117\x4d\x20{$Fn}\40\x77\x68\x65\x72\x65\40{$Un}\75{$lI}\x20\x61\156\x64\40\x6d\145\164\141\x5f\x6b\145\x79\x20\151\x6e\x20\x28{$AW}\51";
        global $wpdb;
        $in = $wpdb->get_results($Zv);
        foreach ($in as $KT) {
            if (!(wp_strip_all_tags($KT->meta_value) != wp_strip_all_tags($SU[$KT->meta_key]))) {
                goto dt;
            }
            return true;
            dt:
            unset($SU[$KT->meta_key]);
            Vq:
        }
        tz:
        if (empty($SU)) {
            goto sk;
        }
        return true;
        sk:
        return false;
    }
    public function mo_sf_sync_save_wp_records($mF, $PY, $We, $r5, $VF, $g9, $SE, $CS = null, $ud = null)
    {
        if (!$this->custom_table_handler->mo_sf_sync_get_all_fields_custom_table($PY)) {
            goto yF;
        }
        $this->custom_table_handler->mo_sf_sync_save_data_in_custom_table($mF, $PY, $r5, $SE);
        goto BU;
        yF:
        foreach ($mF as $jr) {
            $na = false;
            $SU = $this->mo_sf_sync_build_data_to_save($r5, $jr);
            $O8 = $jr["\111\144"];
            $Sr = $this->mo_sf_sync_get_record_if_already_synced($SE, $O8, $PY);
            $O6 = false;
            if (!empty($Sr)) {
                goto RS;
            }
            $SU[$SE] = $O8;
            $na = $this->mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, false);
            if (!(!empty($na) && isset($r5["\164\141\170\157\x6e\157\155\171\137\146\151\x65\x6c\144\163"]) && !empty($r5["\x74\x61\170\x6f\x6e\x6f\155\171\x5f\146\151\x65\x6c\144\x73"]))) {
                goto Vo;
            }
            $this->mo_sf_sync_map_taxonomies($na, $r5["\x74\x61\x78\x6f\156\157\155\171\x5f\146\x69\x65\x6c\144\163"], $jr);
            Vo:
            goto zI;
            RS:
            $O6 = $Sr[$VF["\x69\144\x5f\146\151\x65\154\144"]];
            $SU[$VF["\x69\x64\x5f\x66\x69\145\154\144"]] = $O6;
            $na = $this->mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, $O6);
            if (!(!empty($na) && isset($r5["\164\141\170\x6f\156\x6f\155\171\x5f\146\x69\x65\x6c\144\x73"]) && !empty($r5["\x74\141\x78\157\156\157\155\171\137\x66\x69\x65\x6c\144\x73"]))) {
                goto rL;
            }
            $this->mo_sf_sync_map_taxonomies($na, $r5["\x74\x61\170\x6f\x6e\157\x6d\171\137\146\x69\145\x6c\x64\163"], $jr);
            rL:
            zI:
            if (empty($na)) {
                goto hz;
            }
            do_action("\155\x6f\137\163\x66\137\x73\171\156\x63\137\x61\146\x74\x65\162\x5f\157\x62\152\x65\x63\x74\137\165\160\163\x65\x72\x74", $PY, $na, $We, $O8);
            hz:
            if (!$this->enable_audit_logs) {
                goto FU;
            }
            if (!empty($Sr)) {
                goto xJ;
            }
            if ($na) {
                goto Qe;
            }
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, "\103\x72\145\141\x74\x69\x6f\x6e\x20\106\x61\151\x6c\145\x64", "\103\x72\x65\141\164\x65", "\106\x61\151\154\145\x64", "\x50\x75\154\154\x20\146\x61\x69\154\x65\144\x20\103\141\x6e\156\157\x74\x20\x73\141\166\145\40\144\x61\x74\141\x20\x74\157\x20\x57\x6f\162\144\120\x72\x65\x73\x73\40\157\x62\152\145\x63\164", $PY);
            goto AG;
            Qe:
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $na, "\x43\x72\x65\x61\x74\145", "\123\x75\143\143\x65\x73\163", "\x50\x75\x6c\x6c\40\123\x75\x63\x63\145\163\163\x66\x75\x6c\x20\x77\151\164\x68\40" . $We, $PY);
            AG:
            goto vG;
            xJ:
            if ($na) {
                goto Vc;
            }
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $O6, "\x55\160\x64\x61\164\x65", "\106\x61\151\x6c\x65\x64", "\x50\165\x6c\154\x20\146\141\x69\154\x65\x64\40\x43\x61\x6e\156\157\164\40\163\141\x76\145\x20\144\x61\164\141\40\x74\157\x20\127\x6f\x72\144\x50\x72\x65\163\163\x20\x6f\142\x6a\145\143\164", $PY);
            goto x0;
            Vc:
            $this->audit->mo_sf_sync_add_log(PluginConstants::SFTOWP, $O8, $O6, "\125\160\x64\x61\x74\x65", "\123\165\143\143\x65\x73\163", "\120\x75\154\x6c\40\x53\165\x63\x63\145\x73\163\x66\x75\154\40\x77\151\x74\150\x20" . $We, $PY);
            x0:
            vG:
            FU:
            NA:
        }
        bC:
        return true;
        BU:
        return false;
    }
    private function mo_sf_sync_build_data_to_save($r5, $Qy)
    {
        $r5 = array_flip($r5["\x66\151\x65\154\x64\x5f\x6d\x61\160\160\151\x6e\147"]);
        $WO = array();
        foreach ($r5 as $Ac => $mT) {
            if (!isset($Qy[$mT])) {
                goto ev;
            }
            $WO[$Ac] = $Qy[$mT];
            ev:
            Dw:
        }
        pV:
        $WO = isset($r5["\143\165\x73\x74\x6f\155\137\x66\x69\145\154\x64\x5f\x6d\x61\x70\160\x69\156\x67"]) ? array_merge($WO, $r5["\x63\165\163\164\x6f\x6d\x5f\x66\151\x65\154\x64\x5f\x6d\141\x70\x70\151\156\147"]) : $WO;
        $WO = apply_filters("\x6d\157\137\163\146\137\x73\x79\156\x63\x5f\160\162\x65\137\x64\141\x74\141\137\163\145\x6e\x64", $WO);
        return $WO;
    }
    public function mo_sf_sync_is_record_already_synced($O8, $We, $PY, $SE)
    {
        $El = array("\155\145\164\x68\157\x64\137\155\141\164\143\150" => "\x57\x50\137\121\x75\x65\x72\171");
        $oO = $this->Object_Sync_Sf_WordPress->object_upsert($PY, $SE, $O8, array(), false, $El, true);
        return $oO;
    }
    public static function mo_sf_sync_get_record_if_already_synced($SE, $O8, $PY)
    {
        $ST = "\127\x50\x5f\x51\165\x65\162\171";
        $uP = "\147\145\x74\x5f\x72\x65\163\165\x6c\164\163";
        $u1 = array();
        switch ($PY) {
            case "\165\x73\145\162":
                $ST = "\x57\x50\x5f\x55\163\x65\x72\137\x51\165\145\162\x79";
                goto s9;
            case "\143\141\x74\145\147\x6f\x72\x79":
                $ST = "\x57\x50\x5f\124\145\x72\x6d\137\x51\x75\145\x72\171";
                goto s9;
            case "\143\x61\x74\x65\147\157\162\171":
            case "\164\141\x67":
            case "\x70\157\163\x74\137\164\141\x67":
                $ST = "\x57\x50\x5f\x54\145\x72\155\x5f\x51\x75\x65\x72\x79";
                $uP = "\x67\145\x74\137\164\x65\162\155\x73";
                goto s9;
            case "\x63\157\x6d\x6d\x65\x6e\164":
                $ST = "\127\x50\137\103\157\x6d\155\145\x6e\x74\x5f\121\165\145\x72\171";
                $uP = "\147\145\164\x5f\x63\157\155\x6d\145\x6e\x74\163";
                goto s9;
            default:
                $u1["\160\157\163\x74\x5f\x74\171\x70\x65"] = $PY;
                $uP = "\147\145\164\137\160\x6f\163\164\163";
        }
        JG:
        s9:
        $in = false;
        if (!class_exists($ST)) {
            goto IY;
        }
        $u1["\x6d\145\164\x61\x5f\161\x75\x65\x72\171"] = array(array("\x6b\x65\171" => $SE, "\166\x61\x6c\x75\145" => $O8));
        $De = new $ST($u1);
        $in = $De->{$uP}();
        if (!empty($in)) {
            goto O2;
        }
        return false;
        O2:
        if ($PY === "\x75\163\145\162") {
            goto CK;
        }
        $in = (array) $in[0];
        goto YP;
        CK:
        $in = (array) $in[0]->data;
        YP:
        IY:
        return $in;
    }
    private function mo_sf_sync_upsert_wp_object($PY, $SU, $VF, $g9, $tX = false)
    {
        $OZ = array();
        foreach ($SU as $Ac => $mT) {
            if (!in_array($Ac, $g9)) {
                goto j5;
            }
            $OZ[$Ac] = $mT;
            unset($Ac);
            j5:
            bw:
        }
        P0:
        if (!($VF["\x6f\x62\x6a\x65\x63\164\137\x6e\141\x6d\145"] == "\x70\x6f\163\164")) {
            goto uA;
        }
        $OZ["\x70\157\163\164\137\x74\171\x70\145"] = $PY;
        if (!empty($tX)) {
            goto uT;
        }
        $OZ["\x70\x6f\163\x74\137\163\x74\x61\x74\x75\163"] = "\160\165\142\x6c\x69\163\x68";
        uT:
        uA:
        $uP = $VF["\x63\157\x6e\x74\x65\x6e\x74\x5f\155\x65\164\150\x6f\144\163"]["\143\162\x65\x61\164\x65"];
        if (empty($tX)) {
            goto Sy;
        }
        $uP = $VF["\x63\x6f\156\x74\x65\x6e\x74\x5f\x6d\145\164\x68\157\144\163"]["\165\160\x64\x61\164\145"];
        Sy:
        if (file_exists(plugin_dir_path(__DIR__) . "\110\x65\x6c\x70\x65\162\57\x76\151\x65\167\x2f\120\x61\151\x64\115\x65\155\142\145\x72\123\150\151\x70\x50\x72\x6f\x49\x6e\x74\x65\x67\x72\x61\x74\x69\x6f\156\56\160\x68\x70") && $PY == "\x70\155\160\162\157\137\157\162\x64\x65\162\x73") {
            goto eE;
        }
        $tX = $uP($OZ);
        goto vt;
        eE:
        $tX = PaidMemberShipProIntegration::$uP($OZ);
        vt:
        if (!(empty($tX) || is_wp_error($tX))) {
            goto tN;
        }
        return false;
        tN:
        $md = $VF["\155\x65\164\141\137\x6d\145\x74\150\157\x64\x73"]["\165\160\144\141\x74\145"];
        $this->mo_sf_sync_inset_meta($SU, $tX, $md);
        return $tX;
    }
    private function mo_sf_sync_inset_meta($GE, $O6, $uP)
    {
        foreach ($GE as $Ac => $mT) {
            if (strpos($mT, "\x2d") != false) {
                goto o8;
            }
            if (!(strpos($mT, "\73") != false)) {
                goto yq;
            }
            $mT = array_values(explode("\x3b", $mT));
            yq:
            goto Lr;
            o8:
            $oU = \DateTime::createFromFormat("\x59\55\x6d\x2d\144", $mT);
            if (!($oU && $oU->format("\131\55\x6d\55\x64") === $mT)) {
                goto Cl;
            }
            $mT = str_replace("\55", '', $mT);
            Cl:
            Lr:
            $uP($O6, $Ac, $mT);
            yS:
        }
        g1:
        return true;
    }
    private function mo_sf_sync_map_taxonomies($BM, $AV, $jr)
    {
        foreach ($AV as $Y8 => $e1) {
            $mT = array();
            if (strpos($jr[$Y8], "\x3b") != false) {
                goto GY;
            }
            array_push($mT, $jr[$Y8]);
            goto mn;
            GY:
            $mT = array_values(explode("\73", $jr[$Y8]));
            mn:
            $LA = array();
            foreach ($mT as $sa) {
                $Yx = get_term_by("\156\141\155\145", $sa, $e1);
                array_push($LA, $Yx->term_id);
                oJ:
            }
            g6:
            wp_set_post_terms($BM, $LA, $e1);
            JE:
        }
        kF:
    }
}

Function Calls

None

Variables

None

Stats

MD5 83bcae99894c4a5becafa8206e461687
Eval Count 0
Decode Time 62 ms