Hi,
I experience the same issue after updating to the latest version of the plugin: “Uncaught Error: Call to undefined method YITH_WooCommerce_Gift_Cards::order_cancelled_action()”. It happens on line 537 in the file “/plugins/yith-woocommerce-gift-cards/includes/admin/class-yith-ywgc-backend.php”
I experience this fatal error both when I delete an order in the back-end, and also when customers themselves delete the order in the check-out process.
So this seems like a general issue with the plugin after laste update – I really hope you can help with this issue. Thanks 🙂
Best regards
Hello there,
we hope we are doing well!
We have tried to delete an order from the backend (with and without a gift card) and we have not had any problems.
Does it happen with any type of order? Or with someone who has something special?
Do you have the latest version 2.11 installed? Do you have the latest WP/WC updates installed?
We will be attentive to your answers.
Have a nice day!
Dear Juan,
Thank you for the response. I have the following versions installed-
Yith Woocommerce Gift Cards – 2.11.0
Woocommerce – 6.6.1
Yith Multivendor Premium – 3.17.0
Because I have Multi-vendor installed, when an order is created – 2 versions of the order are created. The Parent and the child. If I activate the Gift Card Plugin, and delete the child order first, and then the Parent order second, there is no error. If I delete the Parent order first before deleting the child order, I get the error as described above.
Please let me know if this is a good explanation?
All my best
Eunice
Hello, I have the same problem, the error.log shows me:
2022-07-11T02:23:00+00:00 CRITICAL Uncaught Error: Call to undefined method YITH_WooCommerce_Gift_Cards::order_cancelled_action() in /home/…/public_html/wp-content/plugins/yith-woocommerce-gift-cards /includes/admin/class-yith-ywgc-backend.php:537
Stacktrace:
#0 /home/…./public_html/wp-includes/class-wp-hook.php(309): YITH_YWGC_Backend->order_status_changed(Object(Automattic\WooCommerce\Admin\Overrides\Order), ‘on-hold’ , ‘cancelled’)
#1 /home/…./public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
#2 /home/…./public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/…./public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(374): do_action(‘woocommerce_ord…’, 48775, ‘on-hold’, ‘cancelled’, Object(Automatic\WooCommerce\Admin\Overrides\Order))
It happens with orders without any gift card added too(48775 for example)
-
This reply was modified 3 years, 11 months ago by
danielbmxd.
Hi,
I see it happens (when orders are cancelled) no matter if it has a gift card or not. Besides this, the error log shows this critical error also happens every hour exactly.
I have WP/WC in latest version and also yith gift cards plugin in 2.11 version
-
This reply was modified 3 years, 11 months ago by
jesperh95.
Hola! al parecer he tenido el mismo error; ayer actualicé el plugin y aunque mi sitio no se ha roto, las gift card no funcionan correctamente, ahora solo se ve 1 imagen (son 5 para cada gift card), por favor su ayuda urgente. Dejo un enlace con una gift card de mi tienda: https://nenufar.cl/tienda/gift-card-dia-del-padre/
Además me enviaron un correo desde wordpress con la siguiente información, espero sirva de ayuda:
”
¡Hola!
Desde WordPress 5.2 hay una caracterÃstica incorporada que detecta cuándo un plugin o un tema causa un error fatal en tu sitio y te avisa mediante este correo electrónico automático.
En este caso, WordPress ha detectado un error con uno de tus plugins, YITH WooCommerce Gift Cards.
Primero, visita tu web (https://nenufar.cl/) y comprueba si hay algún problema visible. A continuación, visita la página donde ha sido detectado el error (https://nenufar.cl/wp-admin/post.php) y comprueba si hay algún problema visible.
Por favor, ponte en contacto con tu alojamiento para que te ayude a investigar más a fondo este problema.
Si tu sitio parece roto y no puedes acceder a tu escritorio con normalidad, ahora WordPress tiene un «modo de recuperación» especial. Este te permite acceder de forma segura a tu escritorio e investigar más a fondo.
Para mantener tu sitio seguro, este enlace caducará en 1 dÃa. Sin embargo, no te preocupes por esto: recibirás por correo electrónico un nuevo enlace si el error ocurre de nuevo después de que caduque.
Cuando busques ayuda para este problema, es posible que se te pida la siguiente información:
WordPress versión 6.0
Tema activo: Divi (versión 4.17.4)
Plugin actual: YITH WooCommerce Gift Cards (versión 2.11.0)
PHP versión 7.4.30
Detalles del error
==================
Se ha producido un error del tipo E_ERROR en la lÃnea 537 del archivo /home/dzysdnvd/public_html/wp-content/plugins/yith-woocommerce-gift-cards/includes/admin/class-yith-ywgc-backend.php. Mensaje de error: Uncaught Error: Call to undefined method YITH_WooCommerce_Gift_Cards::order_cancelled_action() in /home/dzysdnvd/public_html/wp-content/plugins/yith-woocommerce-gift-cards/includes/admin/class-yith-ywgc-backend.php:537
Stack trace:
#0 /home/dzysdnvd/public_html/wp-includes/class-wp-hook.php(309): YITH_YWGC_Backend->order_status_changed(Object(Automattic\WooCommerce\Admin\Overrides\Order), 'pending', 'cancelled')
#1 /home/dzysdnvd/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/dzysdnvd/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/dzysdnvd/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(374): do_action('woocommerce_ord...', 253405, 'pending', 'cancelled', Object(Automattic\WooCommerce\Admin\Overrides\Order))
#4 /home/dzysdnvd/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(222): WC_Order->status_transition()
#5 /home/dzysdnvd/public_html/wp-content/plugins/woocommerce/includes/admin/meta-bo
“
Hello,
Exactly the same problem, when i cancel an order, i’ve got critical error.
Wordpress 6.0
Woocommerce 6.6.1
YITH WooCommerce Gift Cards 2.11.0
Do you have an issue ?
Best regards.
Une erreur de type E_ERROR a été causée dans la ligne 537 du fichier /home/XXX/public_html/wp-content/plugins/yith-woocommerce-gift-cards/includes/admin/class-yith-ywgc-backend.php. Message d’erreur : Uncaught Error: Call to undefined method YITH_WooCommerce_Gift_Cards::order_cancelled_action() in /home/XXX/public_html/wp-content/plugins/yith-woocommerce-gift-cards/includes/admin/class-yith-ywgc-backend.php:537
Stack trace:
#0 /home/XXX/public_html/wp-includes/class-wp-hook.php(309): YITH_YWGC_Backend->order_status_changed(Object(Automattic\WooCommerce\Admin\Overrides\Order), 'completed', 'cancelled')
#1 /home/XXX/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/XXX/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/XXX/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(374): do_action('woocommerce_ord...', 31369, 'completed', 'cancelled', Object(Automattic\WooCommerce\Admin\Overrides\Order))
#4 /home/XXX/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(222): WC_Order->status_transition()
#5 /home/XXX/public_html/wp-content/plugins/woo
-
This reply was modified 3 years, 11 months ago by
needdesign02.
Hello everyone,
we hope you are doing well!
We have managed to find the bug, and we have already released a new version (2.11.1) with its respective correction.
We recommend you update the plugin and let us know of any news, please.
We’re sorry for the inconvenience and thank you very much for your reports 🙂
Have a good day!
Dear Juan,
Thank you so much for your attention. I have applied all the updates and will keep an eye out the next time I need to delete an order from the back-end!
Once again – thank you for the outstanding service – you are the BEST!
kind regards
Eunice
Muchas gracias por arreglar el problema. En mi caso actualicé el plugin, pero seguÃa apareciendo solo 1 imagen en cada gift card; luego se me ocurrió editar y actualizar el producto…y funcionó! ahora aparecen las 5 imágenes disponibles en cada gift card.
Muchas gracias!!
Hello everyone!
you’re welcome 🙂
We are glad that everything is going well now! Thank you very much for your comments ^^
Have a nice day!