mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Revert rendering of GooglePay button to wp action.
This commit is contained in:
parent
46b47dc97b
commit
4fbc47f1cf
2 changed files with 10 additions and 4 deletions
|
@ -199,7 +199,7 @@ class DataToAppleButtonScripts {
|
|||
'totalLabel' => $total_label,
|
||||
),
|
||||
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'buttonMarkup' => $button_markup,
|
||||
'buttonMarkup' => $button_markup, // Is this being used?
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,9 +76,15 @@ class GooglepayModule implements ModuleInterface {
|
|||
}
|
||||
|
||||
// Initializes button rendering.
|
||||
if ( ! is_admin() ) {
|
||||
$button->render();
|
||||
}
|
||||
add_action(
|
||||
'wp',
|
||||
static function () use ( $c, $button ) {
|
||||
if ( is_admin() ) {
|
||||
return;
|
||||
}
|
||||
$button->render();
|
||||
}
|
||||
);
|
||||
|
||||
// Enqueue frontend scripts.
|
||||
add_action(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue