• Resolved mookie4a4

    (@mookie4a4)


    [Thu Jun 29 14:52:00.161450 2017] [:error] [pid 28390] [client *.*.*.*:51164] id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_generate_wpo_wcpdf’), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce_PDF_Invoices_Export->generate_pdf_ajax, WooCommerce_PDF_Invoices_Export->build_filename, WC_Order->get_order_number, apply_filters(‘woocommerce_order_number’), WP_Hook->apply_filters, webendev_woocommerce_order_number, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: /wp-admin/post.php?post=12199&action=edit

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! This error is actually triggered by a custom function attached to the woocommerce_order_number filter, which is at the end of the stack trace you posted: webendev_woocommerce_order_number. You will probably see this error pop up in multiple other instances.
    You can fix this by changing your webendev_woocommerce_order_number function by changing $order->id to $order->get_id().

    Hope that helps!
    Ewout

    Thread Starter mookie4a4

    (@mookie4a4)

    Hello

    Yes it was another function exactly what you said.

    Thanks! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php warning’ is closed to new replies.