• Resolved user9876789

    (@user9876789)


    Hello, we are encountering an issue at the moment where occasional orders are not being created correctly. This is causing a fatal error in the sequential order plugin, e.g:

    Uncaught Error: Call to a member function get_id() on bool in /var/www/html/public_html/wp-content/plugins/wt-woocommerce-sequential-order-numbers/includes/class-wt-advanced-order-number.php:688 Additional context{ “error”: { “type”: 1, “file”: “/var/www/html/public_html/wp-content/plugins/wt-woocommerce-sequential-order-numbers/includes/class-wt-advanced-order-number.php”, “line”: 688 }, “remote-logging”: true, “backtrace”: [ “”, “#0 /var/www/html/public_html/wp-includes/class-wp-hook.php(326): Wt_Advanced_Order_Number->set_sequential_number()”, “#1 /var/www/html/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”, “#2 /var/www/html/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()”, “#3 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php(113): do_action()”, “#4 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(186): WC_Order_Data_Store_CPT->create()”, “#5 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(224): WC_Data_Store->create()”, “#6 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(271): WC_Abstract_Order->save()”, “#7 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(471): WC_Order->save()”, “#8 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1301): WC_Checkout->create_order()”, “#9 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(524): WC_Checkout->process_checkout()”, “#10 /var/www/html/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::checkout()”, “#11 /var/www/html/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”, “#12 /var/www/html/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()”, “#13 /var/www/html/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(100): do_action()”, “#14 /var/www/html/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()”, “#15 /var/www/html/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”, “#16 /var/www/html/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()”, “#17 /var/www/html/public_html/wp-includes/template-loader.php(13): do_action()”, “#18 /var/www/html/public_html/wp-blog-header.php(19): require_once(‘/var/www/html/p…’)”, “#19 /var/www/html/public_html/index.php(17): require(‘/var/www/html/p…’)”, “#20 {main}”, “thrown” ]

    would you be able to add a line to your plugin for I think around here

    /plugins/wt-woocommerce-sequential-order-numbers/includes/class-wt-advanced-order-number.php, around line 688:

    if ( ! $order || ! is_object( $order ) ) { return; // or log and return safely }

    so we don’t get the fatal error?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Issue if order is not corrected made’ is closed to new replies.