Commit graph

1224 commits

Author SHA1 Message Date
Danae Millan
2ddd8518ca Add missing 'use' of the RuntimeException class 2021-11-23 17:51:59 -03:00
Alex P
27d71e14c3 Merge branch 'trunk' into pcp-254-improve-status-report 2021-11-23 16:51:47 +02:00
Emili Castells
2638486331
Merge pull request #373 from woocommerce/pcp-333-fix-tax-mismatch
Use subtotal_tax instead of adding taxes ourselves
2021-11-23 12:33:46 +01:00
Alex P
6e6b4c4b40 Merge branch 'trunk' into pcp-401-custom-order-id 2021-11-23 12:51:26 +02:00
Emili Castells
035cbe5957
Merge pull request #361 from woocommerce/pcp-125-fix-duplicated-button
Fix duplicated button and saved cards in Pay Now
2021-11-23 11:07:21 +01:00
Emili Castells
3e21c4d7d7
Merge pull request #359 from woocommerce/PCP-419-do-not-display-saved-payments-on
Do not pass `customer_id` if vaulting is disabled
2021-11-23 11:06:26 +01:00
Alex P
b8b4766fba Show if PPEC was used in status report 2021-11-22 18:21:01 +02:00
Alex P
195474ad6e Check currency support for status report 2021-11-22 18:20:00 +02: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
Emili Castells
5469a9352f
Merge pull request #371 from woocommerce/PCP-423-when-paying-for-a-subscrition-an
Add retry counter meta to order to avoid duplicate invoice error on c…
2021-11-22 11:25:22 +01:00
dinamiko
64e166b51c Add variable subscription to cart contains subscription method 2021-11-22 10:11:04 +01: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
Alex P
9ba675d1f5 Add logging status to status report 2021-11-19 17:25:47 +02:00
Alex P
77d3a5c19c Refactor Yes/No output 2021-11-19 17:25:08 +02:00
Alex P
ff6f821fdf Add type 2021-11-19 12:44:06 +02:00
dinamiko
199d40e2d5 Do not display save credit card if subscription in the cart 2021-11-19 11:06:16 +01:00
Alex P
a6a25232e3 Use subtotal_tax instead of adding taxes ourselves 2021-11-19 10:29:44 +02:00
dinamiko
c072e8550a Add retry counter meta to order to avoid duplicate invoice error on consequent tries 2021-11-18 14:45:34 +01:00
Alex P
6d905d01c8 Remove prefix from custom id 2021-11-16 17:28:11 +02:00
Alex P
f23df0b91c Make sanitize_custom_id more correct 2021-11-16 17:28:11 +02:00
Alex P
3b98d8300b Use order ID instead of "number" for PayPal custom field
Otherwise we cannot find the order in webhook handlers
if order number is not order ID
2021-11-16 12:06:38 +02:00
Alex P
326775371f Merge branch 'trunk' into pcp-125-fix-duplicated-button 2021-11-15 17:59:38 +02:00
Alex P
01942b6699 Check that PPEC settings is not null 2021-11-15 16:12:54 +02:00
dinamiko
fe962c8cf3 Do not display PayPal payments page if vault option is disabled 2021-11-15 11:50:34 +01:00
dinamiko
4e4fc38077 Improve conditional format 2021-11-15 09:53:50 +01:00
Alex P
1f8b449e38 Fix change payment check to not conflict with Pay Now 2021-11-12 18:29:30 +02:00
Alex P
ebe1e84907 Fix and refactor PayNow checkout UI too
Inherit PayNowBootstrap from CheckoutBootstap, they are almost the same
2021-11-12 18:27:47 +02:00
Alex P
9c7859bf35 Use MutationObserver to detect order button visibility changes
Such as for the old PayPal plugin,
which shows it on click + with some animation,
or Conditional WooCommerce Checkout Field,
which shows the button after loading some data
2021-11-12 18:26:42 +02:00
dinamiko
6609759c9d Do not pass client_id if vaulting is disabled 2021-11-12 16:55:55 +01:00
Alex P
3dc9b48e1b Hide button with !important to override !important from some themes 2021-11-11 18:00:31 +02:00
Alex P
c97dc9530b Add float: right to dcc order button like in WC styles 2021-11-11 17:58:08 +02:00
Alex P
b9ae2483ad Add CSS class to dcc order button 2021-11-11 17:57:23 +02:00
Alex P
9ad48d5f13 Optimize checkout elements hiding
Remove duplicated calls like hidden -> show() -> hide() during some updates
and make code more clear
2021-11-11 15:20:21 +02:00
Alex P
c2b77b3cff Unselect saved card only on page load
If we do it on every form update/method switch, 
then e.g. if the user first selected a card, 
but then entered/edited the address, 
they may lose the selection 
(and maybe it could cause issues in other cases,
if something else triggers update_checkout)
2021-11-11 15:19:09 +02:00
Alex P
2e59248bf9 Extract saved card selection check 2021-11-10 17:10:07 +02:00
Alex P
9624c85a6c Extract currentPaymentMethod 2021-11-10 16:27:00 +02:00
Alex P
51517f1196 Extract selector to a variable 2021-11-10 12:56:53 +02: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
support
cda885d528 introduce woocommerce_paypal_payments_product_supports_prb filter 2021-11-08 14:58:25 -05: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