• Resolved agupte

    (@agupte)


    Some items are showing as Out of Stock. I have gone into the Edit Product both individually and in Bulk and changed the status, but when I go back to the All Products list it is still showing as Out of Stock.

    I have tried turning off Inventory Control in WooCommerce->Settings->Products->Enable stock management (off) and now it doesn’t show out of stock in the list. However if I browse to the Product Page it says “This product is currently out of stock and unavailable.” and it will not give me the Add to Cart button.

    I found this in the logs:

    2021-05-28T10:49:40+00:00 CRITICAL Uncaught Error: Call to a member function is_in_stock() on bool in /public_html/example.com/wp-content/plugins/xxhidenxx-core/inc/plugins/woocommerce/shortcodes/product-preview/product-preview.php:206
    Stack trace:
    #0 /public_html/example.com/wp-content/plugins/xxhidenxx-core/inc/plugins/woocommerce/shortcodes/product-preview/product-preview.php(154): xxhidenxxCoreProductPreviewShortcode->get_item_add_to_cart_html(Array)
    #1 /public_html/example.com/wp-content/plugins/qode-framework/inc/shortcodes/translators/elementor/class-qodeframeworkelementor-translator.php(502): xxhidenxxCoreProductPreviewShortcode->render(Array)
    #2 /public_html/example.com/wp-content/plugins/xxhidenxx-core/inc/plugins/elementor/elementor-widget-base.php(55): QodeFrameworkElementor_Translator->create_render(Object(xxhidenxxCoreProductPreviewShortcode), Array)
    #3 /public_html/example.com/wp-content/plugins/elementor/includes/base/c in /public_html/example.com/wp-content/plugins/xxhidenxx-core/inc/plugins/woocommerce/shortcodes/product-preview/product-preview.php on line 206`

Viewing 5 replies - 1 through 5 (of 5 total)
  • mother.of.code

    (@imazed)

    The Mother of Code

    Hi there!

    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.

    The fatal error is coming from a plugin directory called “xxhidenxx-core” but the actual name seems to be obfuscated. You would need to deactivate or update that plugin. Specifically it’s whatever plugin has this file /xxhidenxx-core/inc/plugins/woocommerce/shortcodes/product-preview/product-preview.php and the is_in_stock function there is bad.

    That is not core WooCommerce. It may be a plugin that your theme relies on that may have bugs. Further in the stack trace it looks like it could be qode-framework for Elementor. It may have updates available, but I would first search for product-preview.php to determine the plugin it’s actually in.

    Thread Starter agupte

    (@agupte)

    I know which plugin it is in, but their support says they don’t have a bug. I didn’t want to publicly disclose the plugins I am using, but…

    • This reply was modified 3 years, 5 months ago by agupte.

    Hey @agupte,

    You can prove to the developers of the plugin that there is a bug by setting up a staging site, that’s a copy of the live site for testing. Then disable all plugins on the site except for WooCommerce and their plugin. Also, switch to the Storefront theme.

    If the issue is still there, that confirms it’s a bug. You can then show this to the developers as proof.

    Hi @agupte

    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 any other questions, please feel free to open a new topic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to change stock status in woocomerce’ is closed to new replies.