WC_Gateway_COD::init_form_fields
Initialise Gateway Settings Form Fields.
Метод класса: WC_Gateway_COD{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WC_Gateway_COD = new WC_Gateway_COD(); $WC_Gateway_COD->init_form_fields();
Код WC_Gateway_COD::init_form_fields() WC Gateway COD::init form fields WC 11.3.0
public function init_form_fields() {
$this->form_fields = array_merge(
array(
'enabled' => array(
'title' => __( 'Enable/Disable', 'woocommerce' ),
'label' => __( 'Enable cash on delivery', 'woocommerce' ),
'type' => 'checkbox',
'description' => '',
'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
'type' => 'safe_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,
),
),
$this->get_shipping_method_restrictions_form_fields()
);
}