• Resolved kyle-tully

    (@kyle-tully)


    Hey guys I’m seeing PHP errors in our logs:

    PHP Notice: Undefined variable: order in /plugins/WooCommerce_Afterpay/woocommerce-afterpay.php on line 846

    PHP Notice: Trying to get property ‘id’ of non-object in /plugins/WooCommerce_Afterpay/woocommerce-afterpay.php on line 846

    That line in the plugin is:

    $payment_method = get_post_meta( $order->id, ‘_payment_method’, true );

    Any ideas?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Afterpay

    (@afterpayit)

    Hi @kyle-tully,

    Thank you for your message and for providing detailed information.

    The files referenced in these PHP notices do not match any files in the current version of the Afterpay Gateway for WooCommerce plugin. It’s possible that an outdated or unofficial copy of the plugin is being used. Further information may be required to confirm this preliminary conclusion.

    The team would be happy to assist with further investigation, and assistance with updating or reinstalling the plugin if required. Please submit a dedicated support request from the Afterpay Help Centre here:

    A team member will then reach out to you within 1 business day.

    Thank you.

    Thread Starter kyle-tully

    (@kyle-tully)

    I just checked and it’s definitely an outdated version – 1.3.1 !!

    The weird thing is for both this plugin and a couple of other Woocommerce addons there is no message in WP about an updated version being available.

    I’ve only just taken over maintenance of this website so not sure if there was a notice earlier that was never acted upon and now it’s so far gone that an automated update is not possible?

    Is there anything special I should know about upgrading from this old version to the current one?

    Thanks!

    Plugin Author Afterpay

    (@afterpayit)

    Hi @kyle-tully,

    Version 1.3.1 was the latest version of the “WooCommerce Afterpay Gateway” plugin. This iteration of the plugin was never published on the WordPress SVN. For the purposes of following naming conventions for all WordPress plugins, the Afterpay plugin was renamed to “Afterpay Gateway for WooCommerce”, and version 2.0.0 was published via the SVN on Friday, 13 July 2018.

    Due to the different name, there is no prompt to upgrade for versions prior to 2.0.0. The recommended practice is therefore to deactivate and remove the old plugin, then install and activate the new plugin by following the steps documented here: https://developers.afterpay.com/afterpay-online/docs/woocommerce-install-plugin

    Plugin configuration settings will not be removed when the plugin is uninstalled. It is considered best practice to complete these steps in a staging environment prior to making any changes in the production environment.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Undefined variable on line 846’ is closed to new replies.