WC_Shipping_Free_Shipping::init_form_fields()
Init form fields.
Description Description
Source Source
File: includes/shipping/free-shipping/class-wc-shipping-free-shipping.php
public function init_form_fields() { $this->instance_form_fields = array( 'title' => array( 'title' => __( 'Title', 'woocommerce' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ), 'default' => $this->method_title, 'desc_tip' => true, ), 'requires' => array( 'title' => __( 'Free shipping requires...', 'woocommerce' ), 'type' => 'select', 'class' => 'wc-enhanced-select', 'default' => '', 'options' => array( '' => __( 'N/A', 'woocommerce' ), 'coupon' => __( 'A valid free shipping coupon', 'woocommerce' ), 'min_amount' => __( 'A minimum order amount', 'woocommerce' ), 'either' => __( 'A minimum order amount OR a coupon', 'woocommerce' ), 'both' => __( 'A minimum order amount AND a coupon', 'woocommerce' ), ), ), 'min_amount' => array( 'title' => __( 'Minimum order amount', 'woocommerce' ), 'type' => 'price', 'placeholder' => wc_format_localized_price( 0 ), 'description' => __( 'Users will need to spend this amount to get free shipping (if enabled above).', 'woocommerce' ), 'default' => '0', 'desc_tip' => true, ), 'ignore_discounts' => array( 'title' => __( 'Coupons discounts', 'woocommerce' ), 'label' => __( 'Apply minimum order rule before coupon discount', 'woocommerce' ), 'type' => 'checkbox', 'description' => __( 'If checked, free shipping would be available based on pre-discount order amount.', 'woocommerce' ), 'default' => 'no', 'desc_tip' => true, ), ); }