Automattic\WooCommerce\Internal\Features

FeaturesController::start_listening_for_option_changes()publicWC 1.0

Adds our callbacks for the updated_option added_option hooks.

We delay adding these hooks until init, because both callbacks need to load our list of feature definitions, and building that list requires translating various strings (which should not be done earlier than init).

Method of the class: FeaturesController{}

No Hooks.

Return

null. Nothing (null).

Usage

$FeaturesController = new FeaturesController();
$FeaturesController->start_listening_for_option_changes(): void;

FeaturesController::start_listening_for_option_changes() code WC 9.6.0

public function start_listening_for_option_changes(): void {
	add_filter( 'updated_option', array( $this, 'process_updated_option' ), 999, 3 );
	add_filter( 'added_option', array( $this, 'process_added_option' ), 999, 3 );
}