Add button to reload feature eligibility status from Connection tab (2426) #1902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
This PR implements the
RefreshFeatureStatusEndpoint
endpoint and respective frontend UI logic.The product status is refreshed via a call to the
woocommerce_paypal_payments_clear_apm_product_status
action.A cache was used to enforce a timeout of 60 seconds between refresh attempts.
Issue Description
As a user with an already-connected PayPal account
I sign up for ACDC/Apple Pay/Google Pay/PUI after my account was connected
And expect that the plugin reflects the status of the new feature availability
To ensure a smooth setup for advanced features like Apple Pay, users need a way to update the feature eligibility status from the Connection tab without reconnecting their account.
Above the buttons for Advanced Card Processing, PUI, Google Pay, & Apple Pay, a new button should refresh the eligibility status by performing a
merchant-integrations
call.After the call, the page should reload and display an updated status.
There should be a 1-minute timeout on this button before it can be clicked again.
Acceptance
Given I connected a new PayPal merchant to the plugin
And signed up for ACDC, Apple Pay, Google Pay after already being connected
When clicking the button to refresh the feature availability status
Then a merchant-integrations call can be observed in the logs
And the page refreshes with an updated status for the available features