Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments
WooPaymentsRestController::get_woopay_eligibility
Get WooPay eligibility status.
Метод класса: WooPaymentsRestController{}
Хуков нет.
Возвращает
WP_REST_Response. The response.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_woopay_eligibility();
Код WooPaymentsRestController::get_woopay_eligibility() WooPaymentsRestController::get woopay eligibility WC 10.8.1
protected function get_woopay_eligibility() {
// We use the Payments Settings stored business location to determine the eligibility.
$location = $this->payments->get_country();
$woopay_eligible_countries = array( 'US' );
$is_eligible = in_array( $location, $woopay_eligible_countries, true );
return rest_ensure_response(
array(
'is_eligible' => $is_eligible,
)
);
}