• Resolved Tom

    (@zenimot)


    We are getting a packing slip with the following error notice in it.

    Notice: ID werd verkeerd aangeroepen. Order properties should not be accessed directly. 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_completed'), WP_Hook->do_action, WP_Hook- >apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_completed_notification'), WP_Hook->do_action, WP_Hook- >apply_filters, WC_Email_PDF_Order_Notification->trigger, WC_Email->get_attachments, apply_filters('woocommerce_email_attachments'), WP_Hook->apply_filters, WPO\WC\PDF_Invoices\Main- >attach_pdf_to_email, WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf, WPO\WC\PDF_Invoices\Documents\Order_Document->get_html, WPO\WC\PDF_Invoices\Documents\Order_Document->render_ in /home/website/domains/website.nl/public_html/wp-includes/functions.php on line 5313

    The pdf looks fine except for this notice. Is there a way to hide this?

    • This topic was modified 3 years, 4 months ago by Tom.
    • This topic was modified 3 years, 4 months ago by Tom.
    • This topic was modified 3 years, 4 months ago by Tom.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Tom

    (@zenimot)

    I have no clue as where to look to fix this… Please help.

    Plugin Contributor alexmigf

    (@alexmigf)

    Hello @zenimot

    Do you have any related code snippet in your theme functions.php file? Do you have other third party plugin printing data in the document?

    Thread Starter Tom

    (@zenimot)

    It looks like we have a custom packing-slip.php where an order note is inserted (via selection in the order).

    I changed:
    $order_note = get_field( 'packing_slip_text', $this->order->ID );

    to this:
    $order_note = get_field( 'packing_slip_text', $this->order );

    But this does not seem to change anything.

    Plugin Contributor kluver

    (@kluver)

    Hi @zenimot,

    Please change that line into:

    $order_note = get_field( 'packing_slip_text', $order->get_id() );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Notice: ID werd verkeerd aangeroepen’ is closed to new replies.