Automattic\WooCommerce\Internal\RestApi\Routes\V4\Settings\PaymentGateways\Schema
BacsGatewaySettingsSchema::get_special_field_schemas
Get field schemas for BACS-specific special fields.
Method of the class: BacsGatewaySettingsSchema{}
No Hooks.
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_special_field_schemas( $gateway ): array;
- $gateway(WC_Payment_Gateway) (required)
- Gateway instance.
BacsGatewaySettingsSchema::get_special_field_schemas() BacsGatewaySettingsSchema::get special field schemas code WC 10.4.3
protected function get_special_field_schemas( WC_Payment_Gateway $gateway ): array {
$gateway->init_form_fields();
// Start with information from the gateway's form_fields if available.
$field = $gateway->form_fields['account_details'] ?? array();
return array(
array(
'id' => 'account_details',
'label' => $field['title'] ?? __( 'Account details', 'woocommerce' ),
'type' => 'array',
'desc' => $field['description'] ?? __( 'Bank account details for direct bank transfer.', 'woocommerce' ),
),
);
}