Is it possible to integrate your plugin if our payment method is connected with Patreon? Our website is IceGirlsAi – https://icegirls.ai/ would be awesome if we could solve this because your plugin is very good.
]]>Logs are now full of messages like:
PHP Notice: Function discount_total was called <strong>incorrectly</strong>. Order properties should not be accessed directly. ...
Please stop releasing crap software.
]]>Lots of logs saying:
PHP Notice: Undefined index: variations in /path/to/wp-content/plugins/goaffpro/goaffpro.php on line 233
Please scan your code with PhpStan to catch these problems during development:
https://github.com/szepeviktor/phpstan-wordpress
When an affiliate uses the domain/?coupon_code=vnbnbej the coupon is not added to the cart. I tried enabling debugging, but no error appeared.
]]>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);
]]>
PHP Notice: Undefined index: discount_code in /path/to/wp-content/plugins/goaffpro/goaffpro.php on line 140
Change to.
$coupon_code = isset( $_COOKIE['discount_code'] ) ? sanitize_text_field( $_COOKIE['discount_code'] ) : '';
Use PHPStan or other static analysis tool to highlight these errors.
]]>v2.2
PHP Notice: Undefined index: ref in /path/to/wp-content/plugins/goaffpro/goaffpro.php on line 95
In:
/**
* 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 ) {
$referral_code = sanitize_text_field($_COOKIE['ref']);
if($referral_code){
update_post_meta($order_id, 'ref', $referral_code);
}
} , 10, 2);
Fix with:
add_action('woocommerce_checkout_update_order_meta',function( $order_id, $posted ) {
if( ! isset( $_COOKIE['ref'] ) ) {
return;
}
$referral_code = sanitize_text_field($_COOKIE['ref']);
if($referral_code){
update_post_meta($order_id, 'ref', $referral_code);
}
} , 10, 2);
]]>
Does this WP Plugin support Goaffpro’s Affiliate Page Builder feature? I would like to use this feature, but I do not use a Shopify Store.
]]>Bonjour, je n’arrive plus à aller sur ma plateforme marchand depuis mon tableau de bord de mon site woocommerce. C’est extrêmement embêtant. Pouvez vous m’aider?
Me donner un lien vers la plateforme marchand par exemple sans passer par le site ce serait parfait.
Hello, I can no longer go to my merchant platform from my dashboard on my woocommerce site. This is extremely annoying. Can you help me?
If you can give a link to the trading platform for example without going through the site it would be perfect
]]>