wpovernight / woocommerce-pdf-invoices-packing-slips

Create, print & automatically email PDF invoices & packing slips for WooCommerce orders.
https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
Other
100 stars 45 forks source link

Adding plugin dependency #761

Closed MohamadNateqi closed 3 months ago

MohamadNateqi commented 3 months ago

WordPress recently introduced Plugin Dependencies "to make the process of installing/activating add-ons (dependents) and the plugins they rely on (dependencies) consistent and easy to use."

This is also mentioned in the article that: "The feature does not intend to replace the need for defensive coding within dependent plugins, or ensure version compatibility with their dependencies; nor does it seek to mitigate the vast array of potential plugin interactions.".

"A plugin’s dependencies can be declared by the use of a new Requires Plugins header in the dependent plugin’s main file. This must contain a comma-separated list of WordPress.org slugs for its dependencies, such as jetpack (jetpack/jetpack.php is not supported)."

"Defining plugins not hosted on WordPress.org as dependencies will enforce and display the dependencies to the user. However, there will be no ability to install the missing plugins through the UI changes, and these will need to be installed manually."


Declaring a plugin dependency for the Bridge plugin, dependent on Foo and Bar, places the following requirements:


This is how it'll appear in the plugin repository:

image

This is how it'll appear in "Installed plugins":

image