diff --git a/assets/js/debug-script.js b/assets/js/debug-script.js
index 59759d906..5c7bfc2c7 100644
--- a/assets/js/debug-script.js
+++ b/assets/js/debug-script.js
@@ -93,6 +93,12 @@ jQuery( function( $ ) {
}
} ).trigger( 'change' );
+ // danger zone enabled notice
+ if ( true === wpo_wcpdf_debug.danger_zone['enabled'] ) {
+ let notice = '
' + wpo_wcpdf_debug.danger_zone['message'] + '
';
+ $( "input#enable_danger_zone_tools" ).closest( 'td' ).find( '.description' ).append( notice );
+ }
+
// number search
$( document.body ).on( 'click', '#wpo-wcpdf-settings a.number-search-button', function( e ) {
e.preventDefault();
diff --git a/includes/class-wcpdf-assets.php b/includes/class-wcpdf-assets.php
index 0c475710b..89eae0dcb 100644
--- a/includes/class-wcpdf-assets.php
+++ b/includes/class-wcpdf-assets.php
@@ -249,6 +249,15 @@ public function backend_scripts_styles ( $hook ) {
'download_label' => __( 'Download', 'woocommerce-pdf-invoices-packing-slips' ),
'confirm_reset' => __( 'Are you sure you want to reset this settings? This cannot be undone.', 'woocommerce-pdf-invoices-packing-slips' ),
'select_document_type' => __( 'Please select a document type', 'woocommerce-pdf-invoices-packing-slips' ),
+ 'danger_zone' => array(
+ 'enabled' => isset( WPO_WCPDF()->settings->debug_settings['enable_danger_zone_tools'] ) ? true : false,
+ 'message' => sprintf(
+ /* translators: tags */
+ __( 'Enabled: %sclick here%s to start using the tools.', 'woocommerce-pdf-invoices-packing-slips' ),
+ '',
+ ''
+ ),
+ ),
)
);
diff --git a/includes/settings/class-wcpdf-settings-debug.php b/includes/settings/class-wcpdf-settings-debug.php
index fbb4f9d63..66a15c98f 100644
--- a/includes/settings/class-wcpdf-settings-debug.php
+++ b/includes/settings/class-wcpdf-settings-debug.php
@@ -733,12 +733,7 @@ public function init_settings() {
'args' => array(
'option_name' => $option_name,
'id' => 'enable_danger_zone_tools',
- 'description' => sprintf(
- /* translators: tags */
- __( 'Enables the danger zone tools %shere%s. The actions performed by these tools are irreversible!', 'woocommerce-pdf-invoices-packing-slips' ),
- '',
- ''
- ),
+ 'description' => __( 'Enables the danger zone tools. The actions performed by these tools are irreversible!', 'woocommerce-pdf-invoices-packing-slips' ),
)
),
);