♻️ Move most of the display logic to base class

The PaymentButton base class now handles display logic that is shared between different APMs
This commit is contained in:
Philipp Stracker 2024-08-06 17:45:53 +02:00
parent b85a16abda
commit fc805a4369
No known key found for this signature in database
4 changed files with 539 additions and 414 deletions

View file

@ -345,9 +345,12 @@ class Button implements ButtonInterface {
* @return void
*/
protected function hide_gateway_until_eligible() : void {
?>
<style id="ppcp-hide-google-pay">
.wc_payment_method.payment_method_ppcp-googlepay { : none}
<style data-hide-gateway='<?php echo esc_attr( GooglePayGateway::ID ); ?>'>
.wc_payment_method.payment_method_ppcp-googlepay {
display: none;
}
</style>
<?php
}