• Resolved dmitrydzh

    (@dmitrydzh)


    Hello! When trying to update the plugin, a conflict occurs with the Woodmart theme. Causes a fatal error

    Fatal error: Uncaught Error: Call to undefined function XTS\Modules\Out_Of_Stock_Manager\is_woocommerce() in /var/www/www-root/data/www/napitkistore.ru/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/out-of-stock-manager/class-main.php:57 Stack trace: #0 /var/www/www-root/data/www/napitkistore.ru/wp-includes/class-wp-hook.php(324): XTS\Modules\Out_Of_Stock_Manager\Main->change_main_products_loop_query(Array, Object(WP_Query)) #1 /var/www/www-root/data/www/napitkistore.ru/wp-includes/plugin.php(256): WP_Hook->apply_filters(Array, Array) #2 /var/www/www-root/data/www/napitkistore.ru/wp-includes/class-wp-query.php(2955): apply_filters_ref_array(‘posts_clauses’, Array) #3 /var/www/www-root/data/www/napitkistore.ru/wp-includes/class-wp-query.php(3852): WP_Query->get_posts() #4 /var/www/www-root/data/www/napitkistore.ru/wp-includes/post.php(6249): WP_Query->query(Array) #5 /var/www/www-root/data/www/napitkistore.ru/wp-content/themes/woodmart/inc/helpers.php(747): get_pages(Array) #6 /var/www/www-root/data/www/na in /var/www/www-root/data/www/napitkistore.ru/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/out-of-stock-manager/class-main.php on line 57

Viewing 4 replies - 1 through 4 (of 4 total)
  • The error you’re encountering indicates that the Woodmart theme’s “Out of Stock Manager” module is calling the is_woocommerce() function before WooCommerce has been fully loaded, which results in a fatal error.

    1. Update the Woodmart Theme
    2. Temporarily Disable the “Out of Stock Manager” Module
    3. If you’re familiar with editing PHP files, you can temporarily modify the file causing the issue (/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/out-of-stock-manager/class-main.php) by wrapping the call to is_woocommerce() in a conditional check to ensure WooCommerce is loaded before executing it
    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi dmitrydzh,

    Thank you for reaching out.

    I understand you’re facing an issue when trying to update your WooCommerce plugin.

    Based on the error message, it indicates that there’s a conflict between the Woodmart theme and the WooCommerce plugin. The error seems to be caused by the theme calling a function that doesn’t exist in the current version of the WooCommerce plugin. In this case, the function XTS\Modules\Out_Of_Stock_Manager\is_woocommerce() seems to be missing.

    To troubleshoot the issue further, I recommend you try the following steps:

    1. Update the Woodmart theme to the latest version.
    2. If the issue persists, try to temporarily switch to a default WordPress theme (like Storefront or Twenty Twenty-Four) and see if the error still occurs. This can help determine if the issue is specifically with the Woodmart theme.
    3. If the error is indeed with the theme, I would recommend reaching out to the theme developer for further assistance. They should be able to provide a fix or workaround for this issue.

    Let us know how this goes.

    Thread Starter dmitrydzh

    (@dmitrydzh)

    Hello! Latest version of the theme. I did as you said, but I only work with ready-made scripts.
    How can I remove “out of stock” items down and out of the widgets and move out of stock items to the bottom of the catalog?
    This built-in theme plugin took them down.
    All scripts from open sources cause an error when working with new versions of Woo

    • This reply was modified 2 months, 1 week ago by dmitrydzh.
    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @dmitrydzh,

    Helping out with custom coding of this nature is outside our support scope, although I would recommend the following:

    1. Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations/changes to your code;
    2. Checking whether there are existing plugins in the WordPress plugin repository that might be doing that already.
    3. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    Hope it helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.