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

You’ve just installed the Pronamic Pay plugin #186

Open rvdsteege opened 1 month ago

rvdsteege commented 1 month ago

The admin tour — suggesting the Pronamic Pay plugin has just been installed — always starts for a user if there is no pronamic_pay_ignore_tour user meta. This happens even a year after the plugin has been installed and a new user is created. I think we can improve this.

remcotolsma commented 1 month ago

Should we add something like this in the installation routine:

$installation_date = (string) \get_option( 'pronamic_pay_installation_date', '' );

if ( '' === $installation_date ) {
    \update_option( 'pronamic_pay_installation_date', \current_time( 'mysql', true ) );
}

https://github.com/pronamic/wp-pay-core/blob/bd197f4b1d3ddd2947c8d0a210171c2e7482bac7/src/Admin/Install.php#L84-L104

We can use the installation date to determine if we should still display the admin tour?

https://github.com/pronamic/wp-pay-core/blob/bd197f4b1d3ddd2947c8d0a210171c2e7482bac7/src/Admin/AdminTour.php#L46-L57