WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Gateway_COD::init_form_fields() public WC 1.0

Initialise Gateway Settings Form Fields.

{} Это метод класса: WC_Gateway_COD{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$WC_Gateway_COD = new WC_Gateway_COD();
$WC_Gateway_COD->init_form_fields();

Код WC_Gateway_COD::init_form_fields() WC 5.6.0

public function init_form_fields() {
	$this->form_fields = array(
		'enabled'            => array(
			'title'       => __( 'Enable/Disable', 'woocommerce' ),
			'label'       => __( 'Enable cash on delivery', 'woocommerce' ),
			'type'        => 'checkbox',
			'description' => '',
			'default'     => 'no',
		),
		'title'              => array(
			'title'       => __( 'Title', 'woocommerce' ),
			'type'        => 'text',
			'description' => __( 'Payment method description that the customer will see on your checkout.', 'woocommerce' ),
			'default'     => __( 'Cash on delivery', 'woocommerce' ),
			'desc_tip'    => true,
		),
		'description'        => array(
			'title'       => __( 'Description', 'woocommerce' ),
			'type'        => 'textarea',
			'description' => __( 'Payment method description that the customer will see on your website.', 'woocommerce' ),
			'default'     => __( 'Pay with cash upon delivery.', 'woocommerce' ),
			'desc_tip'    => true,
		),
		'instructions'       => array(
			'title'       => __( 'Instructions', 'woocommerce' ),
			'type'        => 'textarea',
			'description' => __( 'Instructions that will be added to the thank you page.', 'woocommerce' ),
			'default'     => __( 'Pay with cash upon delivery.', 'woocommerce' ),
			'desc_tip'    => true,
		),
		'enable_for_methods' => array(
			'title'             => __( 'Enable for shipping methods', 'woocommerce' ),
			'type'              => 'multiselect',
			'class'             => 'wc-enhanced-select',
			'css'               => 'width: 400px;',
			'default'           => '',
			'description'       => __( 'If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.', 'woocommerce' ),
			'options'           => $this->load_shipping_method_options(),
			'desc_tip'          => true,
			'custom_attributes' => array(
				'data-placeholder' => __( 'Select shipping methods', 'woocommerce' ),
			),
		),
		'enable_for_virtual' => array(
			'title'   => __( 'Accept for virtual orders', 'woocommerce' ),
			'label'   => __( 'Accept COD if the order is virtual', 'woocommerce' ),
			'type'    => 'checkbox',
			'default' => 'yes',
		),
	);
}