Automattic\WooCommerce\Internal\Admin\Settings
PaymentsRestController::set_country
Set the country for the payment providers.
Method of the class: PaymentsRestController{}
No Hooks.
Returns
WP_Error|WP_REST_Response
.
Usage
// protected - for code of main (parent) or child class $result = $this->set_country( $request );
- $request(WP_REST_Request) (required)
- The request object.
PaymentsRestController::set_country() PaymentsRestController::set country code WC 9.9.3
protected function set_country( WP_REST_Request $request ) { $location = $request->get_param( 'location' ); $result = $this->payments->set_country( $location ); return rest_ensure_response( array( 'success' => $result ) ); }