Support » Developing with WordPress » CRITICAL Uncaught Error: function get_attributes()

  • We are using the API and getting an error thrown by REST-API many times that states:

    2021-01-12T20:13:45+00:00 CRITICAL Uncaught Error: Call to a member function get_attributes() on bool in /var/web/site/public_html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php:398
    Stack trace:
    #0 /var/web/site/public_html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php(163): WC_REST_Product_Variations_V2_Controller->prepare_object_for_database(Object(WP_REST_Request), true)
    #1 /var/web/site/public_html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-crud-controller.php(191): WC_REST_CRUD_Controller->save_object(Object(WP_REST_Request), true)
    #2 /var/web/site/public_html/wp-includes/rest-api/class-wp-rest-server.php(1050): WC_REST_CRUD_Controller->create_item(Object(WP_REST_Request))
    #3 /var/web/site/public_html/wp-includes/rest-api/class-wp-rest-server.php(376): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #4 /var/web/site/public_html/wp-includes/rest-api.php(339): WP_REST_ in /var/web/site/public_html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php on line 398

    Here is status of WooCommerce on the site:

    WooCommerce version: 4.7.1
    WooCommerce REST API package: 4.7.1 /var/web/site/public_html/wp-content/plugins/woocommerce/includes
    WooCommerce Blocks package: 3.6.0 /var/web/site/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/
    Action Scheduler package: 3.1.6 /var/web/site/public_html/wp-content/plugins/woocommerce/packages/action-scheduler
    WooCommerce Admin package: 1.6.3 /var/web/site/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin
    Log directory writable: /var/web/site/public_html/wp-content/uploads/wc-logs/
    WordPress version: 5.5.3 – There is a newer version of WordPress available (5.6)
    WordPress multisite: –
    WordPress memory limit: 256 MB
    WordPress debug mode: –
    WordPress cron:
    Language: en_GB
    External object cache:

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CRITICAL Uncaught Error: function get_attributes()’ is closed to new replies.