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

WC_Settings_Shipping::get_settings() protected WC 1.0

Is WC_INSTALLING constant defined? This method exists to ease unit testing.

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

Возвращает

true|false. True is the WC_INSTALLING constant is defined.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->wc_is_installing();

Код WC_Settings_Shipping::get_settings() WC 5.5.2

<?php
protected function wc_is_installing() {
	return Constants::is_defined( 'WC_INSTALLING' );
}

/**
 * Get the currently available shipping methods.
 * This method exists to ease unit testing.
 *
 * @return array Currently available shipping methods.
 */
protected function get_shipping_methods() {
	return WC()->shipping()->get_shipping_methods();
}

/**
 * Get settings for the default section.
 *
 * The original implementation of 'get_settings' was returning the settings for the "Options" section
 * when the supplied value for $current_section was ''.
 *
 * @return array
 */
protected function get_settings_for_default_section() {
	return $this->get_settings_for_options_section();
}

/**
 * Get settings for the options section.
 *
 * @return array
 */
protected function get_settings_for_options_section() {
	$settings =
		array(
			array(
				'title' => __( 'Shipping options', 'woocommerce' ),
				'type'  => 'title',
				'id'    => 'shipping_options',
			),

			array(
				'title'         => __( 'Calculations', 'woocommerce' ),
				'desc'          => __( 'Enable the shipping calculator on the cart page', 'woocommerce' ),
				'id'            => 'woocommerce_enable_shipping_calc',
				'default'       => 'yes',
				'type'          => 'checkbox',
				'checkboxgroup' => 'start',
				'autoload'      => false,
			),

			array(
				'desc'          => __( 'Hide shipping costs until an address is entered', 'woocommerce' ),
				'id'            => 'woocommerce_shipping_cost_requires_address',
				'default'       => 'no',
				'type'          => 'checkbox',
				'checkboxgroup' => 'end',
			),

			array(
				'title'           => __( 'Shipping destination', 'woocommerce' ),
				'desc'            => __( 'This controls which shipping address is used by default.', 'woocommerce' ),
				'id'              => 'woocommerce_ship_to_destination',
				'default'         => 'billing',
				'type'            => 'radio',
				'options'         => array(
					'shipping'     => __( 'Default to customer shipping address', 'woocommerce' ),
					'billing'      => __( 'Default to customer billing address', 'woocommerce' ),