pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

"We just need to update your install to the latest version" on fresh install #91

Closed knit-pay closed 1 year ago

knit-pay commented 1 year ago

Issue

Getting We just need to update your install to the latest version notice even on fresh WordPress install.

Expected Behaviour

This notice should appear only after plugin upgrade, not on fresh WordPress instance.

Steps to replicate

  1. install "Pronamic Pay" on Newly installed WordPress website.
  2. Install WooCommerce.
  3. You will see notice on the top
rvdsteege commented 1 year ago

This is a known issue with the current upgrade scripts implementation, but should be fixed indeed. We'll look into it to see how we can improve this. Thank you for your feedback!

remcotolsma commented 1 year ago

Related code:

https://github.com/pronamic/wp-pay-core/blob/10b78655eea7c641ee33b0fb0cccc26037074067/src/Admin/Install.php#L307-L344

https://github.com/pronamic/wp-pay-core/blob/10b78655eea7c641ee33b0fb0cccc26037074067/src/AbstractIntegration.php#L282-L293

https://github.com/pronamic/wp-pay-core/blob/10b78655eea7c641ee33b0fb0cccc26037074067/src/Admin/Install.php#L346-L398

remcotolsma commented 1 year ago

Thanks, this is fixed in https://github.com/pronamic/wp-pay-core/pull/94, will improve/simplify this further: