Support » Plugin: WooCommerce 'Email Money Transfer' Payment Gateway » Woocommerce 3.0 Errors

  • Resolved bgillington

    (@bgillington)


    Hey there,

    Getting the following errors in my log.

    [22-Aug-2017 14:40:25 UTC] payment_method was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_emt->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_pending_to_on-hold’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails::send_transactional_email, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_content, WC_Email_Customer_On_Hold_Order->get_content_html, wc_get_template_html, wc_get_template, include(‘/plugins/woocommerce/templates/emails/customer-on-hold-order.php’), do_action(‘woocommerce_email_order_details’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails->order_details, wc_get_template, include(‘/plugins/woocommerce/templates/emails/email-order-details.php’), do_action(‘woocommerce_email_before_order_table’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Gateway_emt->email_instructions, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [22-Aug-2017 14:40:25 UTC] id was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_emt->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_pending_to_on-hold’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails::send_transactional_email, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_content, WC_Email_Customer_On_Hold_Order->get_content_html, wc_get_template_html, wc_get_template, include(‘/plugins/woocommerce/templates/emails/customer-on-hold-order.php’), do_action(‘woocommerce_email_order_details’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails->order_details, wc_get_template, include(‘/plugins/woocommerce/templates/emails/email-order-details.php’), do_action(‘woocommerce_email_before_order_table’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Gateway_emt->email_instructions, WC_Gateway_emt->get_instructions, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [22-Aug-2017 14:40:25 UTC] id was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_emt->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_pending_to_on-hold’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails::send_transactional_email, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_content, WC_Email_Customer_On_Hold_Order->get_content_html, wc_get_template_html, wc_get_template, include(‘/plugins/woocommerce/templates/emails/customer-on-hold-order.php’), do_action(‘woocommerce_email_order_details’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails->order_details, wc_get_template, include(‘/plugins/woocommerce/templates/emails/email-order-details.php’), do_action(‘woocommerce_email_before_order_table’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Gateway_emt->email_instructions, WC_Gateway_emt->get_instructions, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Errors seem to be fixed by:

    Find and replace:

    1)
    $order->reduce_order_stock(); TO wc_reduce_stock_levels( $order_id );
    2)
    $order->payment_method TO $order->get_payment_method()
    3)
    $order->id TO $order->get_order_number()

    Hi astroids,

    What file did you do this to? I’m having the same issue.

    So this is in the gateway-interac.php file inside the woocommerce-email-money-transfer-gateway folder. Just in case anyone else looks.

    Note: the “$order->get_order_number()” appears twice, lines: 314 and 337

    • This reply was modified 3 years, 7 months ago by katzw.

    Thank you! This was bugging me for a while. This should really be fixed in the plugin itself. Other than that, I’ve had no issues with this plugin.

    Plugin Contributor Massoud Shakeri

    (@massoudshakeri)

    @astroids,
    thanks, I applied these changes in the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce 3.0 Errors’ is closed to new replies.