Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2176-2178 (lines=3) @@
2173
		check_ajax_referer( 'load-variations', 'security' );
2174
2175
		// Check permissions again and make sure we have what we need
2176
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2177
			die( -1 );
2178
		}
2179
2180
		global $post;
2181
@@ 2331-2333 (lines=3) @@
2328
		check_ajax_referer( 'save-variations', 'security' );
2329
2330
		// Check permissions again and make sure we have what we need
2331
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2332
			die( -1 );
2333
		}
2334
2335
		// Remove previous meta box errors
2336
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2744-2746 (lines=3) @@
2741
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2742
2743
		// Check permissions again and make sure we have what we need
2744
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2745
			die( -1 );
2746
		}
2747
2748
		$product_id  = absint( $_POST['product_id'] );
2749
		$bulk_action = wc_clean( $_POST['bulk_action'] );