ActionScheduler_WPCommentCleaner::print_admin_notice
Prints details about the orphaned action logs and includes information on where to learn more.
Метод класса: ActionScheduler_WPCommentCleaner{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = ActionScheduler_WPCommentCleaner::print_admin_notice();
Код ActionScheduler_WPCommentCleaner::print_admin_notice() ActionScheduler WPCommentCleaner::print admin notice WC 11.2.2
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'
);
wp_admin_notice(
$notice,
array(
'type' => 'warning',
'paragraph_wrap' => true,
)
);
}