Automattic\WooCommerce\Internal\StockNotifications

DataRetentionController::__constructpublicWC 1.0

Constructor to set up hooks for managing data retention tasks.

Method of the class: DataRetentionController{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

DataRetentionController::__construct() code WC 10.3.6

public function __construct() {
	add_action( self::DAILY_TASK_HOOK, array( $this, 'do_wc_customer_stock_notifications_daily' ) );
	add_action( 'update_option_woocommerce_customer_stock_notifications_unverified_deletions_days_threshold', array( $this, 'schedule_or_unschedule_daily_task' ), 10, 2 );
	add_action( 'add_option_woocommerce_customer_stock_notifications_unverified_deletions_days_threshold', array( $this, 'schedule_or_unschedule_daily_task' ), 10, 2 );
	register_deactivation_hook( WC_PLUGIN_FILE, array( $this, 'clear_daily_task' ) );
}