mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
🚧 Enqueue missing script for billing data logic
When PayLater is disabled and we're in "continuation" context, then the new billing data logic is not working: The relevant JS script is not enqueued.
This commit is contained in:
parent
010f5fbdf1
commit
3e0a44ca1f
1 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,12 @@ class GooglepayModule implements ModuleInterface {
|
||||||
static function () use ( $c, $button ) {
|
static function () use ( $c, $button ) {
|
||||||
$smart_button = $c->get( 'button.smart-button' );
|
$smart_button = $c->get( 'button.smart-button' );
|
||||||
assert( $smart_button instanceof SmartButtonInterface );
|
assert( $smart_button instanceof SmartButtonInterface );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: When PayLater is disabled and we're in "continuation" context, then no JS is enqueued.
|
||||||
|
* Find a solution to enqueue the CheckoutBootstrap module in that situation.
|
||||||
|
*/
|
||||||
|
|
||||||
if ( $smart_button->should_load_ppcp_script() ) {
|
if ( $smart_button->should_load_ppcp_script() ) {
|
||||||
$button->enqueue();
|
$button->enqueue();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue