• Resolved James

    (@james-feaver)


    Great plugin which does a lot for performance; however, I am encountering an issue. I fully appreciate at least 4 plugins get a mention here as I am not fully clear on where the issue lies. Apologies if it is not yours and for the long and garbled explanation.

    On the home page of my staging site, I have (for testing) got every plugin enabled in Freesoul. When I search using the Relevanssi plugin or with it deactivated and using the native WP search (e.g. “cheese”), I get message at top of the page:

    WooCommerce plugin must be active for Address Validation & Google Address Auto Complete Plugin for WooCommerce(Basic) to work.

    Debug.log gives the below:

    [13-May-2026 11:11:48 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function is_checkout() in /home/sites/9b/e/e41a592f33/staging_html/wp-content/plugins/free-shipping-notification-woocommerce/public/class-cart-checkout-progress.php:254

    Stack trace:
    #0 /home/sites/......./staging_html/wp-includes/class-wp-hook.php(341): pisol_fsnw_cart_checkout_progress_bar->paymentScript('')
    #1 /home/sites/......./staging_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #2 /home/sites/......./staging_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #3 /home/sites/......./staging_html/wp-includes/script-loader.php(2311): do_action('wp_enqueue_scri...')
    #4 /home/sites/......./staging_html/wp-includes/class-wp-hook.php(341): wp_enqueue_scripts('')
    #5 /home/sites/......./staging_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #6 /home/sites/......./staging_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #7 /home/sites/......./staging_html/wp-includes/general-template.php(3197): do_action('wp_head')
    #8 /home/sites/......./staging_html/wp-includes/template-canvas.php(17): wp_head()
    #9 /home/sites/......./staging_html/wp-includes/template-loader.php(132): include('/home/sites/9b/...')
    #10 /home/sites/......./staging_html/wp-blog-header.php(19): require_once('/home/sites/9b/...')
    #11 /home/sites/......./staging_html/index.php(17): require('/home/sites/9b/...')
    #12 {main}

    thrown in /home/sites/......./staging_html/wp-content/plugins/free-shipping-notification-woocommerce/public/class-cart-checkout-progress.php on line 254

    The PHP error is suggesting that the free-shipping-notification-woocommerce plugin is looking for WooCommerce – but it is deactivated with your plugin.

    If I deactivate the free-shipping-notification-woocommerce plugin I don’t get a PHP error but still get the WooCommerce plugin must be active for Address Validation & Google Address Auto Complete Plugin for WooCommerce(Basic) to work message. If I re-activate it and deactivate your plugin, all is well.

    Any ideas please?

    James

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jose Mortellaro

    (@giuse)

    Hi James,

    thank you for reporting this issue.

    Relevanssi  doesn’t check if the function is_checkout exists before using it.
    When a function is defined in another plugin you should always check if it exist before using that function. Unfortunately, some plugins don’t check it.

    Probably, you deactivated WooCommerce somewhere, and those rules are applied also during the searching process. Maybe Relevanssi calls the homepage, or another URL where that plugin is disabled. I don’t know. I should investigate it deeper to find out the main cause of this issue.

    Anyway, I suggest update Freesoul Deactivate Plugins to the latest version v. 2.6.2 and let me know if you still have the same issue.

    Now FDP provides the function is_checkout when WooCommerce is disabled and you should not have any more the issue. But if you still ahve problems with version 2.6.2, don’t hesitate to reply.

    Best regards

    Jose

    Thread Starter James

    (@james-feaver)

    Hi Jose,

    Thanks for the swift action and response. I have updated your plugin on my staging site and still get exactly the same error – the Debug.log error is identical. I know I mentioned several different plugins including Relevanssi but note the plugin specifically mentioned in the error is the free-shipping-notification-woocommerce plugin (https://en-gb.wordpress.org/plugins/free-shipping-notification-woocommerce/).

    [14-May-2026 12:56:50 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function is_cart() in /home/sites/9b/e/e41a592f33/staging_html/wp-content/plugins/free-shipping-notification-woocommerce/public/class-cart-checkout-progress.php:254
    ..
    ..

    WooCommerce is enabled on every page of the site (so users can use it’s minicart from anywhere).

    Thanks,

    James

    Plugin Author Jose Mortellaro

    (@giuse)

    Hi James,

    you are welcome! Before the fatal error was caused byt the missing function is_checkout. Now it’s caused by the missing function is_cart.
    Sorry, I didn’t check carefully the code of free-shipping-notification-woocommerce.
    I suggest download and test version 2.6.3 from this link: https://downloads.wordpress.org/plugin/freesoul-deactivate-plugins.2.6.3.zip.

    If the issue is solve with v. 2.6.3 I will publish it.

    Best regards

    Jose

    Thread Starter James

    (@james-feaver)

    Hi Jose,

    A different error:

    Uncaught Error: Call to undefined function WC()

    in /home/sites/9b/e/e41a592f33/staging_html/wp-content/plugins/free-shipping-notification-woocommerce/includes/class-pisol-fsnw-shippingzone.php on line 62

    Thanks,

    James

    Plugin Author Jose Mortellaro

    (@giuse)

    Hi James,

    Unfortunately, FDP can’t replicate the function WC().

    It looks like free-shipping-notification-woocommerce doesn’t check whether a function exists before using it.

    If you have the PRO version of FDP, you can solve this using the Plugin Dependencies settings. You can read more details here:
    https://freesoul-deactivate-plugins.com/how-deactivate-plugins-on-specific-pages/keeping-plugins-always-active-when-another-plugin-is-active/

    If you only have the free version, I see three possible options:

    1. Contact the authors of free-shipping-notification-woocommerce and report this issue. You could tell them that when using a function that isn’t defined in their code and isn’t a native PHP function, they should first check whether the function exists.
    2. Carefully review your FDP settings. Try to identify where WooCommerce may be disabled while free-shipping-notification-woocommerce is still active. You mentioned that all plugins are enabled, but that might not actually be the case. To be sure, I suggest resetting the FDP settings.
      Be aware that you will lose all the FDP setttings.
      More details here:
      https://freesoul-deactivate-plugins.com/how-deactivate-plugins-on-specific-pages/reset-fdp-settings/
    3. Wait until I test Relevanssi and Free Shipping Bar for WooCommerce in my testing installation. At the moment, I can’t say how long this will take.

    Best regards

    Jose

    Thread Starter James

    (@james-feaver)

    Hi Jose,

    Thanks very much for the suggestions and your help. I reset the FDP settings, re-added the settings afresh and … all working as expected – no error when searching!

    I’ll give you a 5* review after lunch.

    Thanks,

    James

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.