Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2354-2356 (lines=3) @@
2351
		check_ajax_referer( 'load-variations', 'security' );
2352
2353
		// Check permissions again and make sure we have what we need
2354
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2355
			die( -1 );
2356
		}
2357
2358
		global $post;
2359
@@ 2509-2511 (lines=3) @@
2506
		check_ajax_referer( 'save-variations', 'security' );
2507
2508
		// Check permissions again and make sure we have what we need
2509
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2510
			die( -1 );
2511
		}
2512
2513
		// Remove previous meta box errors
2514
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2922-2924 (lines=3) @@
2919
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2920
2921
		// Check permissions again and make sure we have what we need
2922
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2923
			die( -1 );
2924
		}
2925
2926
		$product_id  = absint( $_POST['product_id'] );
2927
		$bulk_action = wc_clean( $_POST['bulk_action'] );