Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2380-2382 (lines=3) @@
2377
		check_ajax_referer( 'load-variations', 'security' );
2378
2379
		// Check permissions again and make sure we have what we need
2380
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2381
			die( -1 );
2382
		}
2383
2384
		global $post;
2385
@@ 2535-2537 (lines=3) @@
2532
		check_ajax_referer( 'save-variations', 'security' );
2533
2534
		// Check permissions again and make sure we have what we need
2535
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2536
			die( -1 );
2537
		}
2538
2539
		// Remove previous meta box errors
2540
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2948-2950 (lines=3) @@
2945
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2946
2947
		// Check permissions again and make sure we have what we need
2948
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2949
			die( -1 );
2950
		}
2951
2952
		$product_id  = absint( $_POST['product_id'] );
2953
		$bulk_action = wc_clean( $_POST['bulk_action'] );