WordPress at Your Fingertips
function is not described

ActionScheduler_WPCommentCleaner::init() public WC 1.0

Initialize the class and attach callbacks.

{} It's a method of the class: ActionScheduler_WPCommentCleaner{}

No Hooks.

Return

null. Nothing.

Usage

$result = ActionScheduler_WPCommentCleaner::init();

Code of ActionScheduler_WPCommentCleaner::init() WC 6.1.0

public static function init() {
	if ( empty( self::$wp_comment_logger ) ) {
		self::$wp_comment_logger = new ActionScheduler_wpCommentLogger();
	}

	add_action( self::$cleanup_hook, array( __CLASS__, 'delete_all_action_comments' ) );

	// While there are orphaned logs left in the comments table, we need to attach the callbacks which filter comment counts.
	add_action( 'pre_get_comments', array( self::$wp_comment_logger, 'filter_comment_queries' ), 10, 1 );
	add_action( 'wp_count_comments', array( self::$wp_comment_logger, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs
	add_action( 'comment_feed_where', array( self::$wp_comment_logger, 'filter_comment_feed' ), 10, 2 );

	// Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen
	add_action( 'load-tools_page_action-scheduler', array( __CLASS__, 'register_admin_notice' ) );
	add_action( 'load-woocommerce_page_wc-status', array( __CLASS__, 'register_admin_notice' ) );
}