From 99d0dbe698d87bc02c47313751529b327345ccc4 Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Tue, 25 Jul 2023 10:25:35 +0100 Subject: [PATCH] Changes on PR review --- assets/js/debug-script.js | 2 +- includes/class-wcpdf-settings-debug.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/js/debug-script.js b/assets/js/debug-script.js index ba795d256..ae0536e79 100644 --- a/assets/js/debug-script.js +++ b/assets/js/debug-script.js @@ -18,7 +18,7 @@ jQuery( function( $ ) { } ); let reset = false; - if ( 'reset-settings' == tool ) { + if ( 'reset-settings' === tool ) { reset = window.confirm( wpo_wcpdf_debug.confirm_reset ); } else { reset = true; diff --git a/includes/class-wcpdf-settings-debug.php b/includes/class-wcpdf-settings-debug.php index c13c0e433..ad0f880e4 100644 --- a/includes/class-wcpdf-settings-debug.php +++ b/includes/class-wcpdf-settings-debug.php @@ -165,7 +165,7 @@ public function debug_tools( $tab, $section ) { get_setting_types() as $type => $name ) { ?> - + @@ -201,7 +201,7 @@ public function debug_tools( $tab, $section ) { get_setting_types() as $type => $name ) { ?> - + @@ -418,7 +418,7 @@ public function reset_settings( $data ) { $message = sprintf( /* translators: settings type */ __( '%s settings reset successfully!', 'woocommerce-pdf-invoices-packing-slips' ), - $setting_types[$type] + $type ); wcpdf_log_error( $message, 'info' ); wp_send_json_success( compact( 'type', 'message' ) ); @@ -426,7 +426,7 @@ public function reset_settings( $data ) { $message = sprintf( /* translators: settings type */ __( 'An error occurred when trying to reset the %s settings.', 'woocommerce-pdf-invoices-packing-slips' ), - $setting_types[$type] + $type ); wcpdf_log_error( $message ); wp_send_json_error( compact( 'message' ) );