You appear to be a bot. Output may be restricted
Description
Initialize the class and attach callbacks.
Usage
ActionScheduler_WPCommentCleaner::init();
Parameters
Returns
void
Source
File name: woocommerce/packages/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php
Lines:
1 to 16 of 16
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' ) ); }