pronamic / wp-pronamic-pay-adyen

Adyen driver for the WordPress payment processing library.
https://www.wp-pay.org/gateways/adyen/
6 stars 2 forks source link

Plugin Dependencies problem "Pronamic Pay" or "Pronamic Pay Premium" #25

Closed remcotolsma closed 4 months ago

remcotolsma commented 4 months ago

@remcotolsma this prevents the plugin from being activated with https://github.com/pronamic/pronamic-pay-premium, is that correct?

Scherm­afbeelding 2024-05-15 om 16 59 01

Originally posted by @rvdsteege in https://github.com/pronamic/wp-pronamic-pay-adyen/commit/b8b2fd05efca0f1685fca3e1b7e89bd0b8cab71a#commitcomment-142048382

Currently this plugin requires https://wordpress.org/plugins/pronamic-ideal/, but this add-on also works fine with the Pronamic Pay Premium plugin.

The "Requires Plugins" header is limited, we cannot use 'or' conditions. https://make.wordpress.org/core/2024/03/15/wordpress-6-5-field-guide/

Shall we remove this header?

https://github.com/pronamic/wp-pronamic-pay-adyen/blob/839b42e58d4d3a676703b0a28b14a583ccce0766/pronamic-pay-adyen.php#L19

rvdsteege commented 4 months ago

Seems there is a filter for this specific case:

The wp_plugin_dependencies_slug filter hook has been introduced to allow for alterations to dependency slugs. For example, if a dependent plugin declares my-plugin as a dependency, and a premium version of my-plugin exists, the premium version can filter the slug and convert it to my-plugin-pro so that it can be detected by Plugin Dependencies.

https://make.wordpress.org/core/2024/03/05/introducing-plugin-dependencies-in-wordpress-6-5/

remcotolsma commented 4 months ago

Improved in https://github.com/pronamic/pronamic-pay-premium/commit/bbbad6d0771f320087f47acfd03f05adb47a4a68.

Scherm­afbeelding 2024-05-16 om 12 27 42