From d26222fb7abaa71b434a524a74ec87d6889ac0d0 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Fri, 13 Dec 2024 12:36:21 +0000 Subject: [PATCH] Remove unused legacy notice code: `check_auto_increment_increment()` --- includes/Settings.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/includes/Settings.php b/includes/Settings.php index 600688855..869b75aea 100644 --- a/includes/Settings.php +++ b/includes/Settings.php @@ -62,9 +62,6 @@ public function __construct() { // settings capabilities add_filter( 'option_page_capability_wpo_wcpdf_general_settings', array( $this, 'user_settings_capability' ) ); - // admin notice for auto_increment_increment - // add_action( 'admin_notices', array( $this, 'check_auto_increment_increment') ); - // AJAX set number store add_action( 'wp_ajax_wpo_wcpdf_set_next_number', array( $this, 'set_number_store' ) ); @@ -157,17 +154,6 @@ public function user_can_manage_settings() { return current_user_can( $this->user_settings_capability() ); } - function check_auto_increment_increment() { - global $wpdb; - $row = $wpdb->get_row( "SHOW VARIABLES LIKE 'auto_increment_increment'" ); - if ( ! empty( $row ) && ! empty( $row->Value ) && $row->Value != 1 ) { - /* translators: database row value */ - $error = wp_kses_post( sprintf( __( "Warning! Your database has an AUTO_INCREMENT step size of %d, your invoice numbers may not be sequential. Enable the 'Calculate document numbers (slow)' setting in the Advanced tab to use an alternate method." , 'woocommerce-pdf-invoices-packing-slips' ), intval( $row->Value ) ) ); - printf( '

%s

', $error ); - } - } - - public function settings_page() { // feedback on settings save settings_errors();