Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

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