Code Duplication    Length = 3-3 lines in 5 locations

includes/admin/class-wc-admin-webhooks.php 2 locations

@@ 127-129 (lines=3) @@
124
	 * Save method.
125
	 */
126
	private function save() {
127
		if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) {
128
			wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
129
		}
130
131
		$webhook_id = absint( $_POST['webhook_id'] );
132
@@ 264-266 (lines=3) @@
261
	 * Bulk actions.
262
	 */
263
	private function bulk_actions() {
264
		if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) {
265
			wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
266
		}
267
268
		if ( ! current_user_can( 'edit_shop_webhooks' ) ) {
269
			wp_die( __( 'You don\'t have permissions to edit Webhooks!', 'woocommerce' ) );

includes/admin/class-wc-admin-settings.php 1 location

@@ 74-76 (lines=3) @@
71
	public static function save() {
72
		global $current_tab;
73
74
		if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) {
75
			die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
76
		}
77
78
		// Trigger actions
79
		do_action( 'woocommerce_settings_save_' . $current_tab );

includes/admin/class-wc-admin-api-keys.php 1 location

@@ 155-157 (lines=3) @@
152
	 * Bulk actions.
153
	 */
154
	private function bulk_actions() {
155
		if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-settings' ) ) {
156
			wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
157
		}
158
159
		$keys = array_map( 'absint', (array) $_GET['key'] );
160

includes/admin/class-wc-admin-status.php 1 location

@@ 247-249 (lines=3) @@
244
	 * Remove/delete the chosen file.
245
	 */
246
	public static function remove_log() {
247
		if ( empty( $_REQUEST[ '_wpnonce' ] ) || ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'remove_log' ) ) {
248
			wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
249
		}
250
251
		if ( ! empty( $_REQUEST[ 'handle' ] ) ) {
252
			$logger = wc_get_logger();