When you install the action scheduler inside your plugin or theme via composer installer, for example:

  "require": {
    "php": ">=5.6",
    "composer/installers": "1.7.0",
     "woocommerce/action-scheduler": "^3.1.6"
  },

If you run composer install, Action Scheduler creates a wp-content folder inside the plugin folder. So, the path would be: wp-content/plugins/your-plugin/wp-content/plugins/action-scheduler.


The path is certainly confusing. and end-users might think the wp-content folder inside the plugin is duplicate and redundant.


What to do?

To change the path, you can add the installer path in composer.json

   "extra": {
    "installer-paths": {
      "vendor/{$vendor}/{$name}/": ["woocommerce/action-scheduler"]
    }
  },

So, that when you run composer install, the path would be wp-content/plugins/your-plugin/vendor/woocommerce/action-scheduler. After all, Action Scheduler is a vendor.


That’s all. Check out the basic usage of Action Scheduler.

Action Scheduler installed inside “wp-content” folder
Tagged on:

Sanjeev Aryal

Don't bury your thoughts, put your vision into reality ~ Bob Marley.

One thought on “Action Scheduler installed inside “wp-content” folder

  • January 14, 2023 at 11:27 am
    Permalink

    Thank you man. You saved my time.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

× WhatsApp