Forum Replies Created

Viewing 1 replies (of 1 total)
  • To temporarily fix this you need to open public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php
    and according to dustingrice go to line # 86<br />
    Now replace

    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' ) );
    }

    with

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

    This will save your product.

Viewing 1 replies (of 1 total)