Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
mailcontact

Fatal error – undefined method get_coupon_codes in CouponsUsed.php

Hello,

I have just updated to ACP 4.7.2 and it seems all is fine afterwards. Next, I tried updating the WooCommerce addon plugin from v3.3.2 to v3.3.6, which resulted in:

[07-Oct-2019...] PHP Fatal error:  Uncaught Error: Call to undefined method WC_Order::get_coupon_codes() in ...public_html/live/wp-content/plugins/ac-addon-woocommerce/classes/Column/ShopOrder/CouponsUsed.php:53
Stack trace:
#0 ...public_html/live/wp-content/plugins/ac-addon-woocommerce/classes/Column/ShopOrder/CouponsUsed.php(32): ACA\WC\Column\ShopOrder\CouponsUsed->get_raw_value(11228)
#1 ...public_html/live/wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen.php(892): ACA\WC\Column\ShopOrder\CouponsUsed->get_value(11228)
#2 ...public_html/live/wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen/Post.php(63): AC\ListScreen->get_display_value_by_column_name('5a9aaf4697c25', 11228)
#3 ...public_html/live/wp-includes/class-wp-hook.php(286): AC\ListScreen\Post->manage_value('5a9aaf4697c25', 11228)
#4 ...public_html/live/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#5 ...public_html/live/wp-includes/p in ...public_html/live/wp-content/plugins/ac-addon-woocommerce/classes/Column/ShopOrder/CouponsUsed.php on line 53

I the admin, only one list item is shown nad all the others are not displayed, probably because that is when the fatal error occures.

Running WordPress 5.1.1, WooCommerce 3.5.8 and Admin Columns Pro 4.7.2.

Please advise,
NG

4 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Hello,

It seems that we change the method in the 3.3.5. version since this method was removed in WooCommrce 3.7.
So in order to use our latest version, you’ll need to upgrade WooCommerce to at least version 3.7.
Otherwise, you could downgrade our WooCommerce integration to 3.3.4.

4 years, 6 months ago
mailcontact

Hello,

Thank you for the quick reply. Based on the error message I was also thinking that something like that must be the issue, I was just hoping that you support the previous version of WooCommerce too. I find it unusual that a plugin author only supports the current version.

You see, normally I update all plugins, then comes WooCommerce and the last one is WordPress to update. If I did it the other way round, I would run into more issues than anticipated.

Regards,
NG

4 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

We believe that every site should be up-to-date, so that’s why we update most of our logic to the latest version.
We normally don’t keep the old methods working, but instead, we disable the plugin if it is not compatible.
In this case, it would be better to disable just the column until you have the latest version instead of disabling the plugin. The fatal error should not happen in any circumstance so that’s a fault on our side so sorry for that.

I’ll make sure that there will be a graceful message that you need to update in order to keep using the column so that you can update the plugin.

4 years, 6 months ago

You must be logged in to reply to this topic.