• The latest version of this plugin enforces define( ‘FS_METHOD’, ‘direct’ ); but we install our plugins using composer and don’t have write access to the plugin folder once the container is deployed to prevent end users updating plugins and breaking sites etc.

    The plugin throws an exception error without define( ‘FS_METHOD’, ‘direct’ ); which breaks wp-admin.

    If the plugin does not actually need to write to the plugin folder can this be removed?

    This plugin does not work on our hosting setup because this check is enforced. Why does this plugin need to write to the plugin directory?

    We also test all plugins in a dev environment before deploying so we never update directly on live.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @danhrpr

    We’ve added a new setting under the Advanced tab that allows you to select the filesystem method. Could you test this version and let us know your feedback?

    Thread Starter Daniel Harper

    (@danhrpr)

    Hi @alexmigf ,

    Unfortunately that hasn’t worked, I get the following message when the FS_METHOD option is removed from the config file with the file setting set to PHP

    Fatal error: Uncaught Error: Call to undefined function WPO\IPS\Compatibility\wcpdf_log_error() in /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/includes/Compatibility/FileSystem.php:94 Stack trace:
    #0 /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/includes/Compatibility/FileSystem.php(62): WPO\IPS\Compatibility\FileSystem->initialize_wp_filesystem()
    #1 /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/includes/Compatibility/FileSystem.php(46): WPO\IPS\Compatibility\FileSystem->__construct()
    #2 /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/woocommerce-pdf-invoices-packingslips.php(150): WPO\IPS\Compatibility\FileSystem::instance()
    #3 /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/woocommerce-pdf-invoices-packingslips.php(185): WPO_WCPDF->includes()
    #4 /app/web/wp/wp-includes/class-wp-hook.php(324): WPO_WCPDF->load_classes('')
    #5 /app/web/wp/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #6 /app/web/wp/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #7 /app/web/wp/wp-settings.php(704): do_action('init')
    #8 /app/web/wp-config.php(9): require_once('/app/web/wp/wp-...')
    #9 /app/web/wp/wp-load.php(55): require_once('/app/web/wp-con...')
    #10 /app/web/wp/wp-admin/admin.php(34): require_once('/app/web/wp/wp-...')
    #11 /app/web/wp/wp-admin/plugins.php(10): require_once('/app/web/wp/wp-...')
    #12 {main} thrown in /app/web/app/plugins/woocommerce-pdf-invoices-packing-slips/includes/Compatibility/FileSystem.php on line 94

    If I have “FS_METHOD=direct” in the config file I can go in and change the setting to PHP file system in the plugin but as soon as I remove the FS_METHOD i get the issue again.

    Seemingly if I have “FS_METHOD=direct” in the config everything seems work and if I try to update plugins through the UI they just fail which is what I want.

    Cheers Dan

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @danhrpr

    Apologies for the bug! Could you give this version a try instead?

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