🔥 Minor cleanup

This commit is contained in:
Philipp Stracker 2024-08-07 14:45:08 +02:00
parent 4b30449ddb
commit 429568fbd9
No known key found for this signature in database
3 changed files with 1 additions and 8 deletions

View file

@ -503,9 +503,5 @@ export default class PaymentButton {
this.#button.remove(); this.#button.remove();
} }
this.#button = null; this.#button = null;
const wrapper = this.wrapperElement;
wrapper.innerHTML = '';
} }
} }

View file

@ -50,8 +50,6 @@ class GooglepayButton extends PaymentButton {
'ppc-button-ppcp-googlepay' 'ppc-button-ppcp-googlepay'
); );
console.log( ppcpConfig.button, buttonConfig.button );
const styles = combineStyles( ppcpConfig.button, buttonConfig.button ); const styles = combineStyles( ppcpConfig.button, buttonConfig.button );
if ( 'buy' === styles.MiniCart.type ) { if ( 'buy' === styles.MiniCart.type ) {

View file

@ -339,13 +339,12 @@ class Button implements ButtonInterface {
/** /**
* Outputs an inline CSS style that hides the Google Pay gateway (on Classic Checkout). * Outputs an inline CSS style that hides the Google Pay gateway (on Classic Checkout).
* The style is removed by `GooglepayButton.js` once the eligibility of the payment method * The style is removed by `PaymentButton.js` once the eligibility of the payment method
* is confirmed. * is confirmed.
* *
* @return void * @return void
*/ */
protected function hide_gateway_until_eligible() : void { protected function hide_gateway_until_eligible() : void {
?> ?>
<style data-hide-gateway='<?php echo esc_attr( GooglePayGateway::ID ); ?>'> <style data-hide-gateway='<?php echo esc_attr( GooglePayGateway::ID ); ?>'>
.wc_payment_method.payment_method_ppcp-googlepay { .wc_payment_method.payment_method_ppcp-googlepay {