Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2220-2222 (lines=3) @@
2217
		check_ajax_referer( 'load-variations', 'security' );
2218
2219
		// Check permissions again and make sure we have what we need
2220
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2221
			die( -1 );
2222
		}
2223
2224
		global $post;
2225
@@ 2375-2377 (lines=3) @@
2372
		check_ajax_referer( 'save-variations', 'security' );
2373
2374
		// Check permissions again and make sure we have what we need
2375
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2376
			die( -1 );
2377
		}
2378
2379
		// Remove previous meta box errors
2380
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2788-2790 (lines=3) @@
2785
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2786
2787
		// Check permissions again and make sure we have what we need
2788
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2789
			die( -1 );
2790
		}
2791
2792
		$product_id  = absint( $_POST['product_id'] );
2793
		$bulk_action = wc_clean( $_POST['bulk_action'] );