• Resolved nalleg

    (@nalleg)


    Hi, when I cancel an order via the admin interface – i get the following error message in my wp-errors.log file with debugging enabled.

    It seems that my payment gateway plugin (may) be throwing an error about unsupported used of is_internal_meta_key for internal meta data. Suggesting to use “getters and setters” instead – possibly related?

    Backtrace: edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Admin_Meta_Boxes->save_meta_boxes, do_action(‘woocommerce_process_shop_order_meta’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Meta_Box_Order_Data::save, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_changed’), WP_Hook->do_action, WP_Hook->apply_filters, Reepay\Checkout\OrderFlow\OrderStatuses->order_status_changed, Reepay\Checkout\Gateways\ReepayGateway->cancel_payment, Reepay\Checkout\Api->cancel_payment, WC_Data->update_meta_data, WC_Data->is_internal_meta_key, wc_doing_it_wrong Se venligst Fejlfinding i WordPress for mere information. (denne meddelelse blev tilf??jet i version 3.2.0). in /var/www/*****-com,/wp-includes/functions.php on line 6031
    [01-Mar-2024 00:32:41 UTC] PHP Warning: Undefined array key 0 in /var/www/******-com/wp-content/plugins/shopmagic-for-woocommerce/src/Workflow/Automation/Automation.php on line 135



    I’m running the latest version of the plugin. Please see attached Woocommerce status file.

    Your help is greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support dominikl65

    (@dominikl65)

    Hi,

    May I ask you to export the automation and submit it?
    To perform a ShopMagic automation export, go to WordPress → Tools → Export → ShopMagic automation.

    This error is not related to the payment gateway – it looks like the automation doesn’t have the action it was supposed to perform, or it has been deleted. The exported automation in JSON format will tell us everything.

    Thread Starter nalleg

    (@nalleg)

    Hello Dominik,

    Thank you for your swift response!

    I do have an automation linked to canceled orders which appears to have provide the error, but I don’t immediately recognize any errors in it.

    Please find the requested file here: https://templehair.dk/templehair.WordPress.2024-03-01.xml

    Thanks again!

    Plugin Support dominikl65

    (@dominikl65)

    Hi,

    Sorry for the long wait, however, I am getting back to you.

    As for the solution, it is very simple and you can do it:

    • Remove the only action that is available in the automation and then save the automation and later add the action again.

    If that doesn’t help, then you can do the following step:

    • Remove the automation completely, and you have to create it from scratch again (you can’t duplicate the automation, it has to be created from scratch)

    Such solutions should help and everything should work properly.

    Thread Starter nalleg

    (@nalleg)

    Thank you for your kind feedback.

    I have recreated the automation and action. While I struggle to decipher the root cause related to your suggestion I think the issue could have been that I used raw HTML in a TinyMCE-supported e-mail action? either way it appears to work now and does not generate any errors after recreating the action as a raw HTML e-mail action.

    Edit: I’m not sure if raw HTML was supported as an action previously. So others might be hit with this error for older automatios/actions when they update he plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warning: Undefined array key 0 in Automation.php on line 135’ is closed to new replies.