Commit graph

1669 commits

Author SHA1 Message Date
Danae Millan
a4846b64fe Fix wrong prefix for a newly added class for disabled checkbox
The prefix for the plugin is 'ppcp', not 'ppc' as it mistakenly was. Updating this for a checkbox class.
2021-11-23 22:12:32 -03:00
Danae Millan
2ddd8518ca Add missing 'use' of the RuntimeException class 2021-11-23 17:51:59 -03:00
Danae Millan
9da36095e7 Fix phpcs warning 2021-11-22 13:17:54 -03:00
Danae Millan
b42e3d5623 Disable the Vaulting checkbox on page load before handling the UI
Otherwise the Pay Later options would stay disabled when vaulting was disabled from the PayPal account.
2021-11-22 12:53:00 -03:00
Danae Millan
3d03097110 Uncheck the Pay Later checkboxes before disabling them when enabling vaulting
This way the children settings of Pay Later get hidden, keeping the interface consistent.
2021-11-22 12:29:52 -03:00
Danae Millan
004c7f7d58 Remove admin notice saying that Pay Later is disabled because of vaulting
We're now displaying this message on each Pay Later label when vaulting is enabled. Also, this message persists when vaulting is toggled, while the labels are updated dynamically. Removing this notice because of these.
2021-11-20 14:42:09 -03:00
Danae Millan
a338e727fd Switch Pay Later labels when vaulting is toggled
This way we'd display the 'Enable' label when Pay Later can be enabled, and the reason why it can't be enabled when vaulting is enabled.
2021-11-20 14:38:36 -03:00
Danae Millan
0f63be18de Don't display the admin notice saying that vaulting is disabled because of Pay Later
We're not disabling vaulting checkboxes when Pay Later is enabled anymore so this admin notice is innacurate.
2021-11-20 13:23:05 -03:00
Danae Millan
e4c39fc2e3 Remove unused localized variable and class property
Because we're not checking whether vaulting is in the account's scope in the client side, we don't need to localize this variable and the class SettingsPageAssets doesn't need the  property anymore, thus removing these.
2021-11-20 13:10:37 -03:00
Danae Millan
1d089cbfa5 Add a description to the vaulting checkbox
Enabling vaulting will disable Pay Later features. The description should make merchants aware of that.
2021-11-20 13:01:13 -03:00
Danae Millan
abe4de252b Mention enabling vaulting from the PayPal account only when it was disabled there
We were always displaying the text 'To use vaulting features, you must enable vaulting on your account' next to the checkbox for enabling vaulting. This message is irrelevant if vaulting is already enabled in the account. This commit makes that message to be displayed only when vaulting is disabled in the account.
2021-11-20 12:58:56 -03:00
Danae Millan
587d3eef53 Disable the vaulting checkbox only when vaulting isn't in the scope
Now, as long as vaulting is in the PayPal account's scope, the checkbox would always be enabled. Independently from the Pay Later settings.
2021-11-20 12:51:11 -03:00
Emili Castells
355bac28f9
Merge pull request #364 from woocommerce/pcp-421-fix-ppec-error
Check that PPEC settings is not null
2021-11-15 15:47:23 +01:00
Alex P
01942b6699 Check that PPEC settings is not null 2021-11-15 16:12:54 +02:00
Emili Castells
d31b3719e3
Merge pull request #355 from woocommerce/release/1.6.2
Release 1.6.2
2021-11-09 16:52:03 +01:00
dinamiko
df316afbe4 Create release branch 2021-11-09 16:46:52 +01:00
Emili Castells
688a94cb28
Merge pull request #352 from woocommerce/PCP-371-payment-not-possible-in-pay-for-
Check if terms checkbox is available
2021-11-09 09:27:47 +01:00
Emili Castells
1a5e5d88fc
Merge pull request #351 from woocommerce/PCP-390-paypal-payments-page-empty-after
Add option for flushing rewrite rules
2021-11-08 15:14:29 +01:00
dinamiko
902d6bb0cf Check if terms checkbox is available 2021-11-08 15:09:22 +01:00
Emili Castells
cb8c12383c
Merge pull request #348 from woocommerce/ppcp-376-fix-logging-error
Handle WP_Error when logging response
2021-11-08 11:49:09 +01:00
dinamiko
1f9a0f8a39 Rename version option 2021-11-08 11:43:44 +01:00
dinamiko
5bb7c80622 Add stubs for psalm 2021-11-08 11:37:18 +01:00
dinamiko
dddc8d6cf6 Add init inside migrate action 2021-11-08 11:23:49 +01:00
dinamiko
2c8d0fcf8a Add upgrading event on plugins loaded 2021-11-08 11:07:37 +01:00
Alex P
a341d427fc Handle WP_Error when logging response 2021-11-08 11:08:09 +02:00
dinamiko
f746c41a83 Add option for flushing rewrite rules 2021-11-05 14:38:04 +01:00
Emili Castells
984019cb2b
Merge pull request #343 from woocommerce/PCP-305-enable-save-card-for-guest-users
Disable PayPal gateways if subscription product in cart and customer not logged in
2021-11-04 15:58:52 +01:00
dinamiko
85b8179307 Add space after if 2021-11-04 15:48:19 +01:00
Emili Castells
a969ba9064
Merge pull request #341 from woocommerce/PCP-375-order-of-woocommerce-checkout-ac
Do not validate checkout form when creating PayPal order
2021-11-04 12:15:12 +01:00
dinamiko
02519b7f35 Merge branch 'trunk' of github.com:woocommerce/woocommerce-paypal-payments into PCP-375-order-of-woocommerce-checkout-ac 2021-11-04 12:12:13 +01:00
Emili Castells
e640eae060
Merge pull request #345 from woocommerce/pcp-352-fix-rounding-check
Fix/refactor rounding check
2021-11-04 11:10:50 +01:00
dinamiko
78fe636e65 Merge branch 'trunk' into PCP-305-enable-save-card-for-guest-users 2021-11-04 11:01:33 +01:00
Emili Castells
5de222c19c
Merge pull request #346 from woocommerce/fix-psalm
Fix psalm
2021-11-04 11:00:04 +01:00
Alex P
74e4daa9b3 Fix patching check 2021-11-03 10:24:23 +02:00
Alex P
edd441f5da Improve type check 2021-11-03 10:20:39 +02:00
Alex P
38ee07e547 Remove non-nullable null check 2021-11-03 10:19:29 +02:00
Alex P
b783a55d3f Remove unneeded check, it throws already 2021-11-03 10:19:04 +02:00
Alex P
ed3cc49856 Fix phpdoc type 2021-11-03 10:16:33 +02:00
dinamiko
4593f060ec Do not add message under subscriptions no available gateways notice 2021-11-02 12:01:29 +01:00
dinamiko
19464b56ad Merge branch 'trunk' into PCP-305-enable-save-card-for-guest-users 2021-11-02 11:50:23 +01:00
Emili Castells
57549e445b
Merge pull request #336 from woocommerce/pcp-204-fix-auto-registration-loop
Check if registration is needed
2021-11-02 09:25:55 +01:00
Alex P
fdbbfd8dec Check null instead of float cast 2021-10-29 09:20:39 +03:00
Alex P
ea462af3bf Fix psalm errors 2021-10-28 18:25:42 +03:00
Alex P
b7f628c8c7 Simplify null breakdown check
If it is null, we would return false either way.
Also why suddenly use $this->amount() if it is passed as parameter.
2021-10-28 17:39:33 +03:00
dinamiko
31572b747e Merge PCP-204 2021-10-28 15:51:29 +02:00
dinamiko
990c9f946e Add user needs to be logged in message when subscription in the cart 2021-10-28 12:43:02 +02:00
dinamiko
47d79bb9f6 Fix phpcs error 2021-10-27 15:33:57 +02:00
dinamiko
0bfda54855 Refactor checkout PayPal order creation 2021-10-27 15:22:24 +02:00
dinamiko
9b6b0e2769 Do not validate WC checkout form when creating PayPal order 2021-10-27 12:29:11 +02:00
dinamiko
3c237b6315 Do not display gateways if subscription in cart and user is not logged in 2021-10-25 16:27:05 +02:00