• Resolved bret.miller

    (@bretmiller)


    We are getting an error when we try to update a particular page in our website. It appears to be an issue with the WooCommerce plugin:

    Error Details
    =============
    An error of type E_ERROR was caused in line 516 of the file /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductSchema.php. Error message: Uncaught TypeError: Argument 1 passed to Automattic\WooCommerce\StoreApi\Schemas\V1\ProductSchema::get_low_stock_remaining() must be an instance of WC_Product, instance of WC_Product_Course given, called in /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartItemSchema.php on line 347 and defined in /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/ProductSchema.php:516
    Stack trace:
    #0 /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartItemSchema.php(347): Automattic\WooCommerce\StoreApi\Schemas\V1\ProductSchema->get_low_stock_remaining()
    #1 [internal function]: Automattic\WooCommerce\StoreApi\Schemas\V1\CartItemSchema->get_item_response()
    #2 /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php(261): array_map()
    #3 /home/jared/gcs.edu/wp-content/plugins/woocommerce/packages/woocom`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Joao D – a11n

    (@johnlud)

    Hi @bretmiller

    This kind of problem is usually caused by a conflict with your theme or with another plugin.
     
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Site crashing trying to update a page’ is closed to new replies.