We hold coupons when payment is failed if the setting "hold stock for checkout" is enabled for some minutes. This is to allow the customers to try again if they want, and to give time to complete payment for gateways where it could take some time.
Unfortunately this cause for some bad UX user retries by starting the order from scratch again, and then if they apply the coupon, usage limit gets hit because the earlier coupon is still held and is counted towards the usage. This commit improves the error message in these cases when usage is applied per customer and is hit, by stating to go to my account to complete/cancel payment (in case of logged in user) or to wait for some time in case of guest users.
This commit adds again the Travis function `travis_retry` (https://docs.travis-ci.com/user/common-build-problems/#travis_retry) to all the commands used to execute the E2E tests as they sometimes fail due to factors outside our control and they pass if we retry them manually. See for example this issue for an instance where often times the E2E tests fail, the issue describes a problem that happened in a local environment, but we see the same error happening on Travis as well: https://github.com/woocommerce/woocommerce/issues/27846. I actually just saw it and had to restart a Travis build job manually and that is what prompted me to create this commit. Having Travis retry the command automatically should save us some time when we review PRs as there is a chance the command will pass on a subsequent run and we won't have to retry it manually and wait for it to finish.
We have used this function in the past (see 67b5b270f3), but it got removed in 1658dd3962. But after some conversation about it a couple of weeks ago, we decided to use it again.
This commit adds the 'Select a country / region...' text as a placeholder text displayed in the country select field indicating to the user that they need to select a country. This is only needed when the option ¨Default customer location" is set to "No location by default".
This commit removes the setting "Page style" from WooCommerce -> Settings -> Payments -> PayPal Standard. This setting was used to define the value of the parameter "page_style" passed to the PayPal Standard API, but PayPal deprecated this parameter and ignores it. According to PayPal in https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/Appx-websitestandard-htmlvariables/?mark=page_style#deprecated-variables: "Deprecated variables are ignored when you pass them to PayPal". In the same link, you can see that "page_style" is included in the list of deprecated parameters.