mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #2935 from woocommerce/PCP-4035-standard-card-button-not-disaplayed-in-standalone-gateway-when-free-trial-subscription-is-in-the-cart
Standard Card Button not disaplayed in standalone gateway when free trial subscription is in the cart
This commit is contained in:
commit
50b3a58106
1 changed files with 15 additions and 0 deletions
|
@ -362,4 +362,19 @@ class CardButtonGateway extends \WC_Payment_Gateway {
|
|||
protected function settings_renderer(): SettingsRenderer {
|
||||
return $this->settings_renderer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the Gateway is available for use.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_available(): bool {
|
||||
$is_available = parent::is_available();
|
||||
|
||||
if ( $is_available && $this->is_free_trial_cart() ) {
|
||||
$is_available = false;
|
||||
}
|
||||
|
||||
return $is_available;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue