WC_Shipping_Legacy_Free_Shipping::init()publicWC 1.0

Init function.

Метод класса: WC_Shipping_Legacy_Free_Shipping{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$WC_Shipping_Legacy_Free_Shipping = new WC_Shipping_Legacy_Free_Shipping();
$WC_Shipping_Legacy_Free_Shipping->init();

Код WC_Shipping_Legacy_Free_Shipping::init() WC 8.7.0

public function init() {

	// Load the settings.
	$this->init_form_fields();
	$this->init_settings();

	// Define user set variables.
	$this->enabled      = $this->get_option( 'enabled' );
	$this->title        = $this->get_option( 'title' );
	$this->min_amount   = $this->get_option( 'min_amount', 0 );
	$this->availability = $this->get_option( 'availability' );
	$this->countries    = $this->get_option( 'countries' );
	$this->requires     = $this->get_option( 'requires' );

	// Actions.
	add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
}