Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2424-2426 (lines=3) @@
2421
		check_ajax_referer( 'load-variations', 'security' );
2422
2423
		// Check permissions again and make sure we have what we need
2424
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2425
			die( -1 );
2426
		}
2427
2428
		global $post;
2429
@@ 2579-2581 (lines=3) @@
2576
		check_ajax_referer( 'save-variations', 'security' );
2577
2578
		// Check permissions again and make sure we have what we need
2579
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2580
			die( -1 );
2581
		}
2582
2583
		// Remove previous meta box errors
2584
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2952-2954 (lines=3) @@
2949
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2950
2951
		// Check permissions again and make sure we have what we need
2952
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2953
			die( -1 );
2954
		}
2955
2956
		$product_id  = absint( $_POST['product_id'] );
2957
		$bulk_action = wc_clean( $_POST['bulk_action'] );