• Resolved Jose

    (@giuse)


    Hello,

    I’m the author of Freesoul Deactivate Plugins, a plugin that gives the possibility to selectively disable the other plugins and keep them active only on the pages where they are needed.
    I have seen a conflict with Jetpack and WooCommerce.

    if on a website you have Jetpack and WooCommerce active, WooCommerce loads the file /wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php on all the pages even on pages where Jetpack is disabled (but globally active).

    Steps to reproduce the problem:

    • Install Jetpack, WooCommerce, and Freesoul Deactivate Plugins
    • Disable Jetpack with Freesoul Deactivate Plugins on a certain page, let’s call it sample-page. Keep active WooCommece on sample-page.
    • Enable the debug in wp-config.php
    • Add this line of code to the main file of Jetpack:
      error_log( ‘Jetpack main file called’ . PHP_EOL . ‘URI: ‘ . $_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’] );
    • Add this line of code to the file /wp-content/addons/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php:
      error_log( ‘class-php-autoloader.php called’ . PHP_EOL . ‘URI: ‘ . $_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’] );
    • Visit sample-page

    In the file wp-content/debug.log you will find only “class-php-autoloader.php called….” but not ‘Jetpack main file called…”. Hence, Freesoul Deactivate Plugins disables Jetpack, but one of its files is called by WooCommerce which is another plugin.

    When the users of Freesoul Deactivate Plugins disable Jetpack they expect to don’t see any traces of Jetpack, but they see one of its files that runs.

    Is it possible to solve this conflict? Do you provide any filter that I can use in the code of Freesoul Deactivate Plugins to prevent WooCommerce from calling wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php when Jetpack is disabled by FDP?

    Thank you in advance

    Have a great day!

    Jose

    • This topic was modified 1 year, 1 month ago by Jose.
    • This topic was modified 1 year, 1 month ago by Jose.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP file of Jetpack loaded by WooCommerce’ is closed to new replies.