Thank you for quickly providing a resolution! We just released an update to the PW WooCommerce Gift Cards plugin that takes advantage of the fix.
I am in the process of evaluating the Gift Cards plugin running on a local staging server that has error messages being displayed. I am using the Advanced Dynamic Pricing plugin and unless I disable it I see the error message:
“Notice: Undefined variable: redeem_hook_priority …htdocs\wp-content\plugins\pw-woocommerce-gift-cards\includes\pw-gift-cards-redeeming.php on line 41
and the checkout hangs.
I believe that you may have a mistake in your fix, shouldn’t:
add_filter( ‘wdp_calculate_totals_hook_priority’, function( $priority ) { return $redeem_hook_priority – 1; });
be:
add_filter( ‘wdp_calculate_totals_hook_priority’, function( $priority ) { return $priority – 1; });
Note: $priority not $redeem_hook_priority
-
This reply was modified 1 year, 11 months ago by
brookerrj.
Hello
I think they missed “use($redeem_hook_priority)”.
We just released v1.132 which fixes this warning message. To get the update:
1. Log into your WordPress Admin area.
2. Click on Plugins -> Installed plugins.
3. Scroll down to PW WooCommerce Gift Cards and click “Check for updates.”
4. The page will refresh, then scroll back down and click on “Update.”
Let us know if you have any other issues!
Hello
you have variable $redeem_hook_priority = 40;
in file pw-gift-cards-redeeming.php
so I think correct code should be
add_filter( ‘wdp_calculate_totals_hook_priority’, function( $priority ) use($redeem_hook_priority) { return $redeem_hook_priority - 1; });
-
This reply was modified 1 year, 11 months ago by
algol.plus.
-
This reply was modified 1 year, 11 months ago by
algol.plus.
Ah, good catch! We have just verified the change and released an update.
My evaluation is continuing now, the issue appears to be resolved with the latest Version 1.134. Many thanks.
It seems this hook is gone in v3.0.1 and is causing problems again, can you check?
ops, we’ll re-add it asap
hi @pimwick
Could you install development version and check if the bug was fixed?
Visit https://wordpress.org/plugins/advanced-dynamic-pricing-for-woocommerce/advanced/ , scroll to bottom and download it.
I just confiremd that the development version (3.0.2) does work, thanks
ok, thank you for testing
this problem has been fixed in version 3.0.2