Philipp Stracker
00e2959700
✨ Get payee details without shipping callback
2024-08-16 18:14:35 +02:00
Philipp Stracker
2944ecc786
🐛 Fix issue with missing button in checkout
...
When the separate “Google Pay gateway” is disabled, the Google Pay button should be rendered inside the “PayPal gateway” container.
2024-08-13 12:26:44 +02:00
Philipp Stracker
d9a0c6e19a
💡 Add comments to context options
2024-08-13 12:24:32 +02:00
Philipp Stracker
5a870de4f4
🔥 Remove unused getter
2024-08-12 18:51:37 +02:00
Philipp Stracker
966b76102c
🐛 Fix init errors “No API configuration...”
...
Caused by calling `reinit()` before the invoking `init()` first. New condition in `reinit()` ensures that the button configuration is present.
2024-08-12 18:50:17 +02:00
Philipp Stracker
bfeaefd45a
🐛 Fix remaining issue on classic checkout page
2024-08-11 13:11:04 +02:00
Philipp Stracker
c382b5cee1
🐛 Fix incorrect event listeners
2024-08-08 20:36:16 +02:00
Philipp Stracker
dada95520e
🐛 Fix incorrect preview update on settings page
2024-08-08 18:52:53 +02:00
Philipp Stracker
722289a545
✨ Provide means to update styling of a button
...
Before this, we needed to create a new button instance to display changes in button style. This allows updating an existing button instance
2024-08-08 17:53:59 +02:00
Philipp Stracker
3538a69402
⚡ ️ Only recreate payment button when needed
...
Check if the button is still in DOM before recreating it
2024-08-08 14:42:01 +02:00
Philipp Stracker
934441fdeb
🐛 Fix initial visibility of payment button
2024-08-08 14:41:09 +02:00
Philipp Stracker
844cafd9cb
💡 Use ConsoleLogger for PreviewButtonManager
...
Also add some comments and additional log output
2024-08-08 14:08:20 +02:00
Philipp Stracker
7729007774
♻️ Unify constructor arguments of PaymentButton
...
Factory method and constuctor have same arguments in the same order
2024-08-08 14:05:57 +02:00
Philipp Stracker
9ac4300995
🐛 Address some errors in preview (Settings page)
2024-08-08 13:10:26 +02:00
Philipp Stracker
7f3636348b
🐛 Fix button insertion logic in block checkout
...
The Google Pay button was inserted into the wrong DOM wrapper
2024-08-07 23:07:04 +02:00
Philipp Stracker
e9c557a361
🐛 Fix issue with duplicate button instances
...
On Block Checkout pages, there were multiple PaymentButton instances for the same context.
2024-08-07 22:36:35 +02:00
Philipp Stracker
95c7d4f7bc
♻️ Simplify PaymentButton creation code
2024-08-07 18:26:02 +02:00
Philipp Stracker
429568fbd9
🔥 Minor cleanup
2024-08-07 14:48:36 +02:00
Philipp Stracker
31867b17d6
🔀 Merge branch 'trunk'
...
# Conflicts:
# modules/ppcp-googlepay/resources/js/GooglepayButton.js
2024-08-07 14:30:12 +02:00
Philipp Stracker
fc805a4369
♻️ Move most of the display logic to base class
...
The PaymentButton base class now handles display logic that is shared between different APMs
2024-08-06 17:45:53 +02:00
Philipp Stracker
b85a16abda
♻️ Move button event dispatcher to helper file
2024-08-06 17:13:51 +02:00
Emili Castells Guasch
b42e9436ae
Add id token cache key for each user
2024-08-06 15:30:50 +02:00
Philipp Stracker
3c200e408a
🚚 Move ConsoleLogger to wc-gateway module
2024-08-05 12:54:24 +02:00
Philipp Stracker
f69209b91c
✨ New PaymentButton base class for APM buttons
...
This class is used to render buttons in the front end, and encapsulates logic that is shared between ApplePay and GooglePay buttons
2024-08-02 17:12:07 +02:00
Philipp Stracker
f1f243505c
✨ Introduce a new ConsoleLogger JS class
...
Extract debug logic to separate component
2024-08-02 16:32:27 +02:00
Philipp Stracker
0888c696ff
✨ Sync gateway visibility via custom event
2024-07-30 14:48:47 +02:00
Philipp Stracker
490cd1958b
♻️ Move config object to appropriate file
2024-07-30 13:51:16 +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
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
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
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
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