ActionScheduler_WPCommentCleaner::print_admin_notice()
Prints details about the orphaned action logs and includes information on where to learn more.
Method of the class: ActionScheduler_WPCommentCleaner{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = ActionScheduler_WPCommentCleaner::print_admin_notice();
ActionScheduler_WPCommentCleaner::print_admin_notice() ActionScheduler WPCommentCleaner::print admin notice code WC 9.6.1
public static function print_admin_notice() { $next_cleanup_message = ''; $next_scheduled_cleanup_hook = as_next_scheduled_action( self::$cleanup_hook ); if ( $next_scheduled_cleanup_hook ) { /* translators: %s: date interval */ $next_cleanup_message = sprintf( __( 'This data will be deleted in %s.', 'woocommerce' ), human_time_diff( gmdate( 'U' ), $next_scheduled_cleanup_hook ) ); } $notice = sprintf( /* translators: 1: next cleanup message 2: github issue URL */ __( 'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s <a href="%2$s">Learn more »</a>', 'woocommerce' ), $next_cleanup_message, 'https://github.com/woocommerce/action-scheduler/issues/368' ); echo '<div class="notice notice-warning"><p>' . wp_kses_post( $notice ) . '</p></div>'; }