WordPress at Your Fingertips
function is not described

WC_Register_WP_Admin_Settings::__construct() public WC 3.0.0

Hooks into the settings API and starts registering our settings.

{} It's a method of the class: WC_Register_WP_Admin_Settings{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Register_WP_Admin_Settings = new WC_Register_WP_Admin_Settings();
$WC_Register_WP_Admin_Settings->__construct( $object, $type );
$object(WC_Email|WC_Settings_Page) (required)
The object that contains the settings to register.
$type(string) (required)
Type of settings to register (email or page).

Changelog

Since 3.0.0 Introduced.

Code of WC_Register_WP_Admin_Settings::__construct() WC 5.7.1

public function __construct( $object, $type ) {
	if ( ! is_object( $object ) ) {
		return;
	}

	$this->object = $object;

	if ( 'page' === $type ) {
		add_filter( 'woocommerce_settings_groups', array( $this, 'register_page_group' ) );
		add_filter( 'woocommerce_settings-' . $this->object->get_id(), array( $this, 'register_page_settings' ) );
	} elseif ( 'email' === $type ) {
		add_filter( 'woocommerce_settings_groups', array( $this, 'register_email_group' ) );
		add_filter( 'woocommerce_settings-email_' . $this->object->id, array( $this, 'register_email_settings' ) );
	}
}