Automattic\WooCommerce\Internal\RestApi\Routes\V4\Settings\PaymentGateways\Schema
CodGatewaySettingsSchema::get_field_options
Get options for specific COD gateway fields.
Method of the class: CodGatewaySettingsSchema{}
No Hooks.
Returns
Array. Field options.
Usage
// protected - for code of main (parent) or child class $result = $this->get_field_options( $field_id ): array;
- $field_id(string) (required)
- Field ID.
CodGatewaySettingsSchema::get_field_options() CodGatewaySettingsSchema::get field options code WC 10.4.3
protected function get_field_options( string $field_id ): array {
switch ( $field_id ) {
case 'enable_for_methods':
return $this->load_shipping_method_options();
default:
return array();
}
}