proudcity / wp-proudcity

The ProudCity WordPress platform
https://proudcity.com
Other
21 stars 9 forks source link

Provide custom links to Payments and Accounts #2559

Closed curtismchale closed 1 month ago

curtismchale commented 1 month ago

Builds

Source CM

Currently our new Dashboard (#2360) links to user Accounts and Payments from the widgets but does not send the users directly to the spot in their Dashboard at my.proudcity.com instead sending them to the main Dashboard.

If we use getenv( 'WORDPRESS_DB_NAME' ) in the url we can send users to the full proper pages for their site.

Accounts

$account_url = 'https://my.proudcity.com/sites/' . esc_attr( getenv( 'WORDPRESS_DB_NAME' ) ) . '/users';

Payments

We'll need to detect if the user has payments as sending them directly to /payments does not do any URL switching to send them to different pages if they don't use ProudCity payments. We should be able to use a value like getenv( 'PROUDCITY_PAYMENTS_SECRET' ) which is present means that the customer is using ProudCity payments.

$no_payments = 'https://my.proudcity.com/sites/' . esc_attr( getenv( 'WORDPRESS_DB_NAME' ) ) . '/payments/about';
$has_payments = 'https://my.proudcity.com/sites/' . esc_attr( getenv( 'WORDPRESS_DB_NAME' ) ) . '/payments/overview';
curtismchale commented 1 month ago

Deployed:

Composer: https://github.com/proudcity/wp-proudcity/releases/tag/2024.05.29.1446 Builds: https://github.com/proudcity/proud-recipes/releases/tag/2024.05.29.1446