Automattic\WooCommerce\Internal\RestApi\Routes\V4\Settings\Account

Controller::get_settings_account_instanceprivateWC 1.0

Get the WC_Settings_Accounts instance.

Method of the class: Controller{}

No Hooks.

Returns

WC_Settings_Accounts.

Usage

// private - for code of main (parent) class only
$result = $this->get_settings_account_instance();

Controller::get_settings_account_instance() code WC 10.4.3

private function get_settings_account_instance() {
	if ( is_null( $this->settings_account_instance ) ) {
		// We need to mock the admin environment to get the settings.
		if ( ! class_exists( 'WC_Admin_Settings' ) ) {
			require_once WC_ABSPATH . 'includes/admin/class-wc-admin-settings.php';
		}
		$this->settings_account_instance = new WC_Settings_Accounts();
	}
	return $this->settings_account_instance;
}