Undefined index: gfp_v_id
-
PHP Notice: Undefined index: gfp_v_id in /path/to/wp-content/plugins/goaffpro/goaffpro.php on line 114
Updated from line 102:
/** * Add goaffpro referral cookie in woocommerce order metadata if referral cookie is available. * This helps in tagging the orders received with the unique ID of the affiliate who sent the customer */ add_action('woocommerce_checkout_update_order_meta',function( $order_id, $posted ) { if( isset( $_COOKIE['ref'] ) ) { $referral_code = sanitize_text_field( $_COOKIE['ref'] ); if ( $referral_code ) { update_post_meta( $order_id, 'ref', $referral_code ); } } if( isset( $_COOKIE['gfp_v_id'] ) ) { $visit_id = sanitize_text_field( $_COOKIE['gfp_v_id'] ); if ( $visit_id ) { update_post_meta( $order_id, 'gfp_v_id', $visit_id ); } } } , 10, 2);
- The topic ‘Undefined index: gfp_v_id’ is closed to new replies.