PHP message: payment_method was called incorrectly. Order properties should not
-
stderr: PHP message: payment_method was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_woocommerce_mark_order_status’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::mark_order_status, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_processing_to_completed’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Paylike->maybe_capture_warning, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: https://www.tartaruguita.pt/wp-admin(…..)
I’ve already fix the code on my side, but could you please fix all the references?
payment-gateway-via-paylike-for-woocommerce\woocommerce-gateway-paylike.php
Line 471: if ( ‘paylike’ != $order->payment_method ) {
Line 533: if ( ‘paylike’ != $order->payment_method ) {The page I need help with: [log in to see the link]
- The topic ‘PHP message: payment_method was called incorrectly. Order properties should not’ is closed to new replies.