mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not update button links if response is not successful
This commit is contained in:
parent
24280dda3a
commit
4b85831f52
1 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,11 @@ const ppcp_onboarding = {
|
|||
}).then((res)=>{
|
||||
return res.json();
|
||||
}).then((data)=>{
|
||||
if (!data.success) {
|
||||
console.error(data);
|
||||
return;
|
||||
}
|
||||
|
||||
buttons.forEach((element) => {
|
||||
for (let [key, value] of Object.entries(data.data.signup_links)) {
|
||||
key = 'connect-to' + key.replace(/-/g, '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue