• Resolved cecowe

    (@cecowe)


    After updating woocommerce, I got this

    
    Fatal error: Uncaught WC_Data_Exception: The admin note status prop ({}) is not one of the supported statuses. in /home/REDACTED/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:810 Stack trace: #0 /home/REDACTED/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Note.php(469): WC_Data->error('admin_note_inva...', 'The admin note ...') #1 /home/REDACTED/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/DataStore.php(109): Automattic\WooCommerce\Admin\Notes\WC_Admin_Note->set_status('{}') #2 /home/REDACTED/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): Automattic\WooCommerce\Admin\Notes\DataStore->read(Object(Automattic\WooCommerce\Admin\Notes\WC_Admin_Note)) #3 /home/REDACTED/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Note.php(87): WC_Data_Store->read(Object(Automattic\WooCommerce\Admin\Notes\WC_Admin_Note)) #4 /home/REDACTED/public_html/wp-c in /home/REDACTED/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 810
    There has been a critical error on your website. Please check your site admin email inbox for instructions.
    
    Learn more about debugging in WordPress.
    

    I can’t access the admin section. Please help me.

    • This topic was modified 4 years, 4 months ago by Yui. Reason: please use CODE button for code formatting
Viewing 6 replies - 1 through 6 (of 6 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @cecowe!

    Are you using any code snippets or plugins to modify your order statuses, or the order notes?

    I would recommend accessing your site over FTP, then renaming your plugins folder, to regain access to your site. Once in, disable any plugins or code you might be using to change the order statuses and see if the same issue still persists.

    Additionally, please send us your status report once you’ve regained access so we can take a closer look. You can find the status report under “WooCommerce > Status” page.

    Cheers!

    Thread Starter cecowe

    (@cecowe)

    I got this snippet running:

    
    /**
     * @snippet       Save "Terms and Conditions" Acceptance Upon Checkout - WooCommerce
     * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
     * @source        https://businessbloomer.com/?p=74053
     * @author        Rodolfo Melogli
     * @compatible    Woo 3.3.4
     */
     
    // 1. Save T&C as Order Meta
     
    add_action( 'woocommerce_checkout_update_order_meta', 'bbloomer_save_terms_conditions_acceptance' );
     
    function bbloomer_save_terms_conditions_acceptance( $order_id ) {
        if ( $_POST['terms'] ) update_post_meta( $order_id, 'terms', esc_attr( $_POST['terms'] ) );
    }
     
    // 2. Display T&C @ Single Order Page 
     
    add_action( 'woocommerce_admin_order_data_after_billing_address', 'bbloomer_display_terms_conditions_acceptance' );
      
    function bbloomer_display_terms_conditions_acceptance( $order ) {
        if ( get_post_meta( $order->get_id(), 'terms', true ) == 'on' ) {
            echo '<p><strong>Декларирал съгласие за обработка на личните му данни: </strong>ДА</p>';
        } else echo '<p><strong>Декларирал съгласие за обработка на личните му данни: </strong>N/A</p>';
    }
    
    • This reply was modified 4 years, 4 months ago by cecowe.
    • This reply was modified 4 years, 4 months ago by Yui. Reason: please use CODE button for proper formatting
    • This reply was modified 4 years, 4 months ago by cecowe.
    Thread Starter cecowe

    (@cecowe)

    I’m using Softaculous staging.
    On the test subdomain everything is fine, but after pushing to live the fatal error appears.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @cecowe. Are you running a multisite? There was a bug previously in WooCommerce Admin causing this issue. Please try updating WooCommerce or WooCommerce Admin if you have it installed separately. Alternatively, if you have a multisite and don’t mind WooCommerce Admin being active on all of your sites, network activating it should stop the PHP Fatal.

    I hope that helps!

    Thread Starter cecowe

    (@cecowe)

    Nope. Just fixed it. I think the problem is that I have changed the admin password in the test version and then pushed to live.

    I’ve tried to do the updates without changing the admin password in the second try. Everything was fine.

    I almost did the same steps, don’t know how is that possible. Same steps – different results… Mark it as solved

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @cecowe. Thank you for letting me know what the fix was! I’ve gone ahead and marked this post as resolved now. If you have any other questions, please start a new post.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HELP FATAL ERROR’ is closed to new replies.