WC_Gateway_Paypal_Request::get_paypal_state( string $cc, string $state )
Get the state to send to paypal.
Description Description
Parameters Parameters
- $cc
-
(Required) Country two letter code.
- $state
-
(Required) State code.
Return Return
(string)
Source Source
File: includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php
protected function get_paypal_state( $cc, $state ) { if ( 'US' === $cc ) { return $state; } $states = WC()->countries->get_states( $cc ); if ( isset( $states[ $state ] ) ) { return $states[ $state ]; } return $state; }