cocart-headless / cocart-get-cart-enhanced

This free add-on enhances the cart response by returning additional data for both the cart and the items added to it.
https://wordpress.org/plugins/cocart-get-cart-enhanced/
GNU General Public License v3.0
6 stars 2 forks source link

Load plugin after CoCart via `plugins_loaded` hook #49

Open seb86 opened 1 year ago

seb86 commented 1 year ago

To improve performance and to ensure the plugin loads once CoCart has been loaded, this plugin must load via the plugins_loaded hook with a priority of 11.

The reason behind this is v5.0 of CoCart has been restructured to improve performance and compatibility with WooCommerce and since WordPress loads all plugins in alphabetical order. It ensures that this add-on for CoCart is loading in the right order and not at the same time of all plugins which can be 50/50 hit or miss when connecting to another plugin.

This change is only for the main plugin file that contains the plugin header information. Not the load-package.php file.