Plugin Directory

Changeset 2856990


Ignore:
Timestamp:
01/30/2023 10:17:16 AM (3 years ago)
Author:
webmaxy
Message:

update user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • webmaxycdp/trunk/includes/class-webmaxycdp.php

    r2856952 r2856990  
    132132    );
    133133    $base64_encoded = base64_encode(json_encode($atc_data));
    134     $url = "https://performanceapi.webmaxy.co/api/woocommerce/$action?data=" . $base64_encoded;
     134    $url = "https://performanceapi.webmaxy.co/api/woocommerce/$action?data=" . $base64_encoded .'&admin='.is_admin();
    135135    $response = wp_remote_get($url);
    136136    if($event == 'SESSION' || $event == 'LOGIN'  || $event == 'PLACE_ORDER' || $event == 'USER_REGISTER' ){
     
    198198        add_action('woocommerce_checkout_order_processed', array($this,'wmxA_checkout_order_event'), 10, 1);
    199199        add_action('woocommerce_order_status_cancelled',array($this, 'wmxA_cancel_order_event'),  21, 1 );
    200         add_action('woocommerce_order_status_changed', 'wmxA_order_status_event', 10, 3);
     200        add_action('woocommerce_order_status_changed', 'wmxA_order_status_event', 10, 1);
    201201        add_action( 'woocommerce_update_product',array($this, 'wmxA_price_change_event') ,10, 1 );
    202202        add_action( 'updated_post_meta', array($this, 'mp_sync_on_product_save'), 10, 4 );
    203203        add_action('wp_footer',array($this, 'wpb_hook_javascript_footer'), 10, 1);
    204        
     204
    205205        add_action('rest_api_init', function () {
    206206            register_rest_route( 'api/v1', 'users',array(
     
    308308    public  function wmxA_order_status_event($order_id)
    309309    {
    310 
    311310        $is_admin = is_admin();
    312 
    313311        if ( $is_admin ) {
    314312            $order = wc_get_order( $order_id );
     
    502500    public  function pageLoaded() {
    503501       
     502        $is_admin = is_admin();
     503
     504        if ( $is_admin ) {
     505            return;
     506        }
    504507        if (!session_id()) {
    505508            session_start();
Note: See TracChangeset for help on using the changeset viewer.