Automattic\WooCommerce\Internal\StockNotifications\Admin

SettingsController::__constructpublicWC 1.0

Constructor.

Method of the class: SettingsController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$SettingsController = new SettingsController();
$SettingsController->__construct();

SettingsController::__construct() code WC 10.3.6

public function __construct() {

	// Add a 'Customer stock notifications' section to Products settings.
	add_filter( 'woocommerce_get_sections_products', array( $this, 'add_customer_stock_notifications_section' ), 100, 1 );

	// Add the Customer Stock Notifications settings.
	add_filter( 'woocommerce_get_settings_products', array( $this, 'add_customer_stock_notifications_settings' ), 100, 2 );

	// Display admin notices about incompatible settings combinations.
	add_action( 'admin_notices', array( $this, 'output_admin_notices' ) );

	// Display and save product-level stock notifications option.
	add_action( 'woocommerce_product_options_stock_status', array( $this, 'add_disable_stock_notifications_checkbox' ), 20 );
	add_action( 'woocommerce_admin_process_product_object', array( $this, 'process_product_object' ) );
}