mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
move module.local to module
This commit is contained in:
parent
c443e4053c
commit
f8e82bdfaf
217 changed files with 8 additions and 2 deletions
37
modules/ppcp-button/src/Helper/class-messagesapply.php
Normal file
37
modules/ppcp-button/src/Helper/class-messagesapply.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
/**
|
||||
* Helper class to determine if credit messaging should be displayed.
|
||||
*
|
||||
* @package Inpsyde\PayPalCommerce\Button\Helper
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Inpsyde\PayPalCommerce\Button\Helper;
|
||||
|
||||
/**
|
||||
* Class MessagesApply
|
||||
*/
|
||||
class MessagesApply {
|
||||
|
||||
|
||||
/**
|
||||
* In which countries credit messaging is available.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $countries = array(
|
||||
'US',
|
||||
);
|
||||
|
||||
/**
|
||||
* Determines whether a credit messaging is enabled for the shops location country.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function for_country(): bool {
|
||||
$region = wc_get_base_location();
|
||||
$country = $region['country'];
|
||||
return in_array( $country, $this->countries, true );
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue