Automattic\WooCommerce\Internal\Features
FeaturesController::start_listening_for_option_changes
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.
Returns
null. Nothing (null).
Usage
$FeaturesController = new FeaturesController(); $FeaturesController->start_listening_for_option_changes(): void;
FeaturesController::start_listening_for_option_changes() FeaturesController::start listening for option changes code WC 10.5.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 );
}