Automattic\WooCommerce\Internal\Admin\Settings
PaymentsProviders::get_payment_gateway_details
Get the payment gateways details.
Method of the class: PaymentsProviders{}
No Hooks.
Returns
Array. The payment gateway details.
Usage
$PaymentsProviders = new PaymentsProviders(); $PaymentsProviders->get_payment_gateway_details( $payment_gateway, $payment_gateway_order, $country_code ): array;
- $payment_gateway(WC_Payment_Gateway) (required)
- The payment gateway object.
- $payment_gateway_order(int) (required)
- The order of the payment gateway.
- $country_code(string)
- The country code for which the details are being gathered. This should be an ISO 3166-1 alpha-2 country code.
Default:''
PaymentsProviders::get_payment_gateway_details() PaymentsProviders::get payment gateway details code WC 10.7.0
public function get_payment_gateway_details( WC_Payment_Gateway $payment_gateway, int $payment_gateway_order, string $country_code = '' ): array {
// Normalize the country code to uppercase.
$country_code = strtoupper( $country_code );
return $this->enhance_payment_gateway_details(
$this->get_payment_gateway_base_details( $payment_gateway, $payment_gateway_order, $country_code ),
$payment_gateway,
$country_code
);
}