• Please help!!

    I get this ” Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid order.” when I click on product’s edit.

    it’s come up with this :

    Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid order.’ in /home3/mdhamdi5/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:86 Stack trace: #0 /home3/mdhamdi5/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(143): Abstract_WC_Order_Data_Store_CPT->read(Object(WC_Order)) #1 /home3/mdhamdi5/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(109): WC_Data_Store->read(Object(WC_Order)) #2 /home3/mdhamdi5/public_html/wp-content/plugins/canada-post-woocommerce-shipping 2/includes/class-wf-shipping-canada-post-admin.php(289): WC_Abstract_Order->__construct(‘769’) #3 /home3/mdhamdi5/public_html/wp-content/plugins/canada-post-woocommerce-shipping 2/includes/class-wf-shipping-canada-post-admin.php(1036): wf_shipping_canada_post_admin->wf_load_order(‘769’) #4 [internal function]: wf_shipping_canada_post_admin->wf_add_canada_post_metabox(‘product’) #5 /home3/mdhamdi5/public_html/wp-includes/class-wp-hook.p in /home3/mdhamdi5/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php on line 86

    how can I fix it ??

Viewing 2 replies - 16 through 17 (of 17 total)
  • HI just i have solve issue

    if ( ! $order->get_id() || ! ( $post_object = get_post( $order->get_id() ) ) || ! in_array( $post_object->post_type, wc_get_order_types() ) ) { 
    			throw new Exception( __( 'Invalid order.', 'woocommerce' ) );			
                         }

    to

       if ( ! $product->get_id() || ! ( $post_object = get_post( $product->get_id() ) ) || 'product' !== $post_object->post_type ) {
                            return false;
    			throw new Exception( __( 'Invalid product.', 'woocommerce' ) );
    		}

    return false; is new added
    Line #143

    • This reply was modified 7 years, 5 months ago by hossainshakil.

    I updated all of the plug-ins and still getting this message:

    Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid order.’ in /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:89 Stack trace: #0 /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(147): Abstract_WC_Order_Data_Store_CPT->read(Object(WC_Order)) #1 /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(109): WC_Data_Store->read(Object(WC_Order)) #2 /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/ups-woocommerce-shipping/includes/class-wf-shipping-ups-tracking.php(38): WC_Abstract_Order->__construct(‘2438’) #3 /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/ups-woocommerce-shipping/includes/class-wf-shipping-ups-tracking.php(179): WF_Shipping_UPS_Tracking->wf_load_order(‘2438’) #4 [internal function]: WF_Shipping_UPS_Tracking->wf_add_admin_metabox(‘product’) #5 /homepages/8/d617609289/ht in /homepages/8/d617609289/htdocs/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php on line 89

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid order.’ is closed to new replies.