Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2388-2390 (lines=3) @@
2385
		check_ajax_referer( 'load-variations', 'security' );
2386
2387
		// Check permissions again and make sure we have what we need
2388
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2389
			die( -1 );
2390
		}
2391
2392
		global $post;
2393
@@ 2547-2549 (lines=3) @@
2544
		check_ajax_referer( 'save-variations', 'security' );
2545
2546
		// Check permissions again and make sure we have what we need
2547
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2548
			die( -1 );
2549
		}
2550
2551
		// Remove previous meta box errors
2552
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2920-2922 (lines=3) @@
2917
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2918
2919
		// Check permissions again and make sure we have what we need
2920
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2921
			die( -1 );
2922
		}
2923
2924
		$product_id  = absint( $_POST['product_id'] );
2925
		$bulk_action = wc_clean( $_POST['bulk_action'] );