Changeset 2856990
- Timestamp:
- 01/30/2023 10:17:16 AM (3 years ago)
- File:
-
- 1 edited
-
webmaxycdp/trunk/includes/class-webmaxycdp.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webmaxycdp/trunk/includes/class-webmaxycdp.php
r2856952 r2856990 132 132 ); 133 133 $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(); 135 135 $response = wp_remote_get($url); 136 136 if($event == 'SESSION' || $event == 'LOGIN' || $event == 'PLACE_ORDER' || $event == 'USER_REGISTER' ){ … … 198 198 add_action('woocommerce_checkout_order_processed', array($this,'wmxA_checkout_order_event'), 10, 1); 199 199 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); 201 201 add_action( 'woocommerce_update_product',array($this, 'wmxA_price_change_event') ,10, 1 ); 202 202 add_action( 'updated_post_meta', array($this, 'mp_sync_on_product_save'), 10, 4 ); 203 203 add_action('wp_footer',array($this, 'wpb_hook_javascript_footer'), 10, 1); 204 204 205 205 add_action('rest_api_init', function () { 206 206 register_rest_route( 'api/v1', 'users',array( … … 308 308 public function wmxA_order_status_event($order_id) 309 309 { 310 311 310 $is_admin = is_admin(); 312 313 311 if ( $is_admin ) { 314 312 $order = wc_get_order( $order_id ); … … 502 500 public function pageLoaded() { 503 501 502 $is_admin = is_admin(); 503 504 if ( $is_admin ) { 505 return; 506 } 504 507 if (!session_id()) { 505 508 session_start();
Note: See TracChangeset
for help on using the changeset viewer.