diff --git a/assets/js/admin/system-status.js b/assets/js/admin/system-status.js index ee4d8ef4f89..12efd043065 100644 --- a/assets/js/admin/system-status.js +++ b/assets/js/admin/system-status.js @@ -114,8 +114,8 @@ jQuery( function ( $ ) { wcSystemStatus.init(); - $( '#log-viewer-select' ).on( 'click', ' h2 a.page-title-action', function( e ) { - e.stopImmediatePropagation(); - return confirm( woocommerce_admin_system_status.delete_log_confirmation ); + $( '#log-viewer-select' ).on( 'click', 'h2 a.page-title-action', function( evt ) { + evt.stopImmediatePropagation(); + return window.confirm( woocommerce_admin_system_status.delete_log_confirmation ); }); }); diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index 8823b68fb97..b72cba282d9 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -349,7 +349,7 @@ class WC_Admin_Assets { 'wc-admin-system-status', 'woocommerce_admin_system_status', array( - 'delete_log_confirmation' => esc_html__( 'Are you sure you want to delete this log?', 'woocommerce' ), + 'delete_log_confirmation' => esc_js( __( 'Are you sure you want to delete this log?', 'woocommerce' ) ), ) ); }