WC_Admin_Permalink_Settings::settings_init()publicWC 1.0

Init our settings.

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

Хуков нет.

Возвращает

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

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

$WC_Admin_Permalink_Settings = new WC_Admin_Permalink_Settings();
$WC_Admin_Permalink_Settings->settings_init();

Код WC_Admin_Permalink_Settings::settings_init() WC 9.4.2

public function settings_init() {
	add_settings_section( 'woocommerce-permalink', __( 'Product permalinks', 'woocommerce' ), array( $this, 'settings' ), 'permalink' );

	add_settings_field(
		'woocommerce_product_category_slug',
		__( 'Product category base', 'woocommerce' ),
		array( $this, 'product_category_slug_input' ),
		'permalink',
		'optional'
	);
	add_settings_field(
		'woocommerce_product_tag_slug',
		__( 'Product tag base', 'woocommerce' ),
		array( $this, 'product_tag_slug_input' ),
		'permalink',
		'optional'
	);
	add_settings_field(
		'woocommerce_product_attribute_slug',
		__( 'Product attribute base', 'woocommerce' ),
		array( $this, 'product_attribute_slug_input' ),
		'permalink',
		'optional'
	);

	$this->permalinks = wc_get_permalink_structure();
}