Commit graph

573 commits

Author SHA1 Message Date
Narek Zakarian
b96c87597a
Do not consider needShipping from single page 2024-07-26 18:06:09 +04:00
Emili Castells Guasch
9f18f2e899 Refactor: extract logic to corresponding modules 2024-07-26 15:39:25 +02:00
Daniel Dudzic
f25140b51d
Merge branch 'trunk' of github.com:woocommerce/woocommerce-paypal-payments into PCP-3374-google-pay-button-not-displayed-in-the-word-press-editor 2024-07-26 13:24:21 +02:00
Daniel Dudzic
09ff65aba4
Refactor script loading to allow for adding custom namespaces 2024-07-26 12:39:38 +02:00
Narek Zakarian
4a72743d0f
Merge branch 'trunk' into PCP-3384-shipping-method-visible-in-pay-pal-popup-for-zone-that-has-no-shipping-defined-when-shipping-callback-enabled 2024-07-25 18:30:38 +04:00
Emili Castells Guasch
c4232e3957 Add card payment for guest free trial (WIP) 2024-07-25 12:08:59 +02:00
Philipp Stracker
9f39a58f07
🔀 Merge branch 'trunk'
# Conflicts:
#	modules/ppcp-button/resources/js/modules/ContextBootstrap/CheckoutBootstap.js
#	modules/ppcp-button/resources/js/modules/Helper/CheckoutMethodState.js
2024-07-24 18:49:41 +02:00
Emili Castells Guasch
29e195e7f3 Ensure saved card payment use default payment flow for free trial subscriptions 2024-07-24 17:00:58 +02:00
Emili Castells Guasch
efbd36025d Add card payment token for free trial subscriptions (WIP) 2024-07-24 16:00:55 +02:00
Narek Zakarian
5d5dd761f8
Merge branch 'trunk' into PCP-3395-when-there-isnt-any-shipping-option-for-the-address-the-order-is-still-created-from-classic-cart 2024-07-24 16:04:32 +04:00
Philipp Stracker
eb216425fb
🚧 New Gateway for Apple Pay 2024-07-23 15:59:54 +02:00
Emili Castells
8df5b56d8a
Merge pull request #2420 from woocommerce/PCP-2958-multiple-smart-buttons-on-the-product-page-when-using-variable-product-with-pay-pal-subscriptions-mode
Prevent displaying smart button multiple times on variable product page (2958)
2024-07-23 14:29:58 +02:00
Narek Zakarian
15250e5a83
Redirect to continuation when error happens 2024-07-18 20:15:39 +04:00
Narek Zakarian
af286c8f82
Add needs shipping to classic cart 2024-07-17 16:43:51 +04:00
Emili Castells Guasch
49064da0c8 Run eslint autofix 2024-07-17 11:08:49 +02:00
Emili Castells Guasch
74f319dd82 Merge branch 'trunk' into PCP-3320-separate-google-pay-button-for-classic-checkout 2024-07-16 17:22:10 +02:00
Emili Castells Guasch
c941430b7d Show googlepay button conditionally 2024-07-16 16:45:32 +02:00
Narek Zakarian
f9aa2b565d
Return the callback to fix the shipping options update process 2024-07-15 19:20:24 +04:00
Emili Castells Guasch
e52939200f Hide wc place order button when applepay payment method is selected 2024-07-15 14:54:10 +02:00
George Burduli
397acdd2bf
Prevent displaying smart button multiple times on variable product page 2024-07-15 16:45:10 +04:00
Philipp Stracker
a4a4f80a99
🐛 Isolate preview changes to relevant sections
Before this, any style change updated all preview buttons on the current page. Now, most changes are limited to the current section.

For exaple, changing the height of “Mini Cart Buttons” only updates the mini cart button preview, and no other preview sections.
2024-07-15 13:58:58 +02:00
Philipp Stracker
6081b9ddf9
🩹 Adjust the height of the Dummy preview-button
Dummy button now better aligns with the button settings
2024-07-15 13:19:37 +02:00
Philipp Stracker
4cde024320
♻️ Consolidate the preview button’s CSS classes
Class names are now generated by the base class. This allows to remove a method from all derived classes
2024-07-15 13:18:07 +02:00
Philipp Stracker
7f9cbd6f58
🐛 Fix general preview button shape 2024-07-15 13:16:08 +02:00
Philipp Stracker
2da8b516ff
♻️ Code organization and cleanup
- Move base classes for the preview buttons into “Preview” folder
- Remove jQuery use inside those base classes
- Extract dummy button to own class
2024-07-12 19:02:21 +02:00
Philipp Stracker
534e412524
♻️ Extract preview classes to own files 2024-07-12 17:32:59 +02:00
Emili Castells Guasch
11105d913b Run eslint autofix 2024-07-12 12:58:34 +02:00
Philipp Stracker
964b9ac606
🔀 Merge branch 'trunk' 2024-07-03 11:05:43 +02:00
Emili Castells
6785ca9b06
Merge pull request #2372 from woocommerce/PCP-3250-apple-pay-and-google-pay-buttons-dont-appear-in-pay-pal-button-stack-on-multi-step-checkout
Apple Pay and Google Pay buttons don't appear in PayPal Button stack on multi-step Checkout (3250)
2024-07-02 11:05:09 +02:00
Philipp Stracker
0197896500
🥅 Catch several JS/API related preview issues 2024-07-01 15:25:06 +02:00
Philipp Stracker
d1318d7247
Add preview button eligibility check 2024-06-27 18:32:31 +02:00
Philipp Stracker
dcd8307118
♻️ Optional init value for trigger selector 2024-06-26 18:54:09 +02:00
Philipp Stracker
4c10c37782
♻️ Extract button-refresh logic to own helper file
- Exrtract repeat event-init logic to new helper file
- Remove the jQuery dependency
2024-06-26 18:16:54 +02:00
Philipp Stracker
25c5ef2e9e
New helper to monitor multistep checkout forms
The new script adds an interval to monitor the visibility of the “woocommerce-checkout-payment” element to initialize payment buttons with a delay, if needed.
2024-06-26 17:56:48 +02:00
Philipp Stracker
0e6e079e40
💄 Fix Google Pay button style
Make the outline of the payment button visible
2024-06-25 12:52:33 +02:00
Philipp Stracker
f759ca4573
🐛 Force-display the preview button after render()
Some tests indicate, that the `ppcp-hidden` and `ppcp-enabled` events are not always triggered on some sites. As the preview button is refreshed during those events, it would stay hidden on those sites.

Adding a delayed DOM show() call solves the issue in a slightly less-elegant way.
2024-06-14 19:19:55 +02:00
Philipp Stracker
c0c4d8d514
🐛 Fix hidden preview buttons in Standard Payments
Addresses an issue when toggling the “Customize per location” checkbox multiple times.
2024-06-14 15:50:17 +02:00
Philipp Stracker
e748ef74ba
🩹 Fix incorrect usage of #-prefix
Only properties can be declared as private using `#`. For functions, this is not supported yet, using the private-prefix here is unreliable.
2024-06-13 14:03:21 +02:00
Philipp Stracker
f5e67c4810
🐛 Refresh all preview buttons on the screen
When multiple preview-button-blocks for the same button were present on the page, not all of them did update the button.
2024-06-13 14:01:47 +02:00
Philipp Stracker
f3f6765ac3
🐛 Hide disabled APM buttons in Standard Payments 2024-06-12 15:45:54 +02:00
Philipp Stracker
874ebbc7a0
🎨 Minor: Apply WP Code Style
- Consistent quote-style
- Insert missing semicolons in JS
- Fix some whitespaces
2024-06-12 15:31:33 +02:00
Philipp Stracker
bc57fdcd6a
🦺 Add new console error to help us debug issues
This new console error should help us identify cache-related issues faster
2024-06-12 11:31:16 +02:00
Philipp Stracker
cea292684b
🎨 Minor code structure changes 2024-06-12 11:27:59 +02:00
Philipp Stracker
aa9c02a786
♻️ Improve SDK loading in PreviewButtonManager 2024-06-11 15:58:43 +02:00
Philipp Stracker
c75d9ce56f
🐛 Improve error logging and dependency detection 2024-06-11 15:23:06 +02:00
Philipp Stracker
6f73e82d3e
Preview buttons can be static
When the current page does not contain any edit-fields for the current APM preview button, it enters “static” mode. Static buttons ignore most update requests, and render as they were defined during page load
2024-06-07 21:14:12 +02:00
Philipp Stracker
33c6c06e85
🐛 Fix button specific config-preparation 2024-06-07 15:42:16 +02:00
Philipp Stracker
180afaad89
♻️ Fix logic in preview button base classes
- Promise-based initialization is executed in correct order
- Support to redraw single APM type of button
- Fix the button style
- Simplify the PreviewButton code
2024-06-07 12:19:39 +02:00
Philipp Stracker
202f308850
🔀 Merge branch 'trunk' into PCP-3179-apple-pay-google-pay-buttons-no-longer-visible-in-standard-payments-button-previews-after-moving-them-to-advanced-card-processing-tab 2024-06-05 18:43:47 +02:00
Philipp Stracker
ebb1f6962f
♻️ Create generic base classes for preview buttons 2024-06-05 17:58:54 +02:00