| 1 |
<?php |
| 2 |
/** |
| 3 |
* Trait WcCustomerTrait. |
| 4 |
* |
| 5 |
* @package Packetery |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace Packetery\Module\Framework; |
| 11 |
|
| 12 |
/** |
| 13 |
* Trait WcCustomerTrait. |
| 14 |
* |
| 15 |
* @package Packetery |
| 16 |
*/ |
| 17 |
trait WcCustomerTrait { |
| 18 |
/** |
| 19 |
* Gets customer shipping country. |
| 20 |
* |
| 21 |
* @return string|null |
| 22 |
*/ |
| 23 |
public function customerGetShippingCountry(): ?string { |
| 24 |
return WC()->customer->get_shipping_country(); |
| 25 |
} |
| 26 |
|
| 27 |
/** |
| 28 |
* Gets customer billing country. |
| 29 |
* |
| 30 |
* @return string|null |
| 31 |
*/ |
| 32 |
public function customerGetBillingCountry(): ?string { |
| 33 |
return WC()->customer->get_billing_country(); |
| 34 |
} |
| 35 |
} |
| 36 |
|