Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2430-2432 (lines=3) @@
2427
		check_ajax_referer( 'load-variations', 'security' );
2428
2429
		// Check permissions again and make sure we have what we need
2430
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2431
			die( -1 );
2432
		}
2433
2434
		global $post;
2435
@@ 2585-2587 (lines=3) @@
2582
		check_ajax_referer( 'save-variations', 'security' );
2583
2584
		// Check permissions again and make sure we have what we need
2585
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2586
			die( -1 );
2587
		}
2588
2589
		// Remove previous meta box errors
2590
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2958-2960 (lines=3) @@
2955
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2956
2957
		// Check permissions again and make sure we have what we need
2958
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2959
			die( -1 );
2960
		}
2961
2962
		$product_id  = absint( $_POST['product_id'] );
2963
		$bulk_action = wc_clean( $_POST['bulk_action'] );