Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2407-2409 (lines=3) @@
2404
		check_ajax_referer( 'load-variations', 'security' );
2405
2406
		// Check permissions again and make sure we have what we need
2407
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2408
			die( -1 );
2409
		}
2410
2411
		global $post;
2412
@@ 2562-2564 (lines=3) @@
2559
		check_ajax_referer( 'save-variations', 'security' );
2560
2561
		// Check permissions again and make sure we have what we need
2562
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2563
			die( -1 );
2564
		}
2565
2566
		// Remove previous meta box errors
2567
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2935-2937 (lines=3) @@
2932
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2933
2934
		// Check permissions again and make sure we have what we need
2935
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2936
			die( -1 );
2937
		}
2938
2939
		$product_id  = absint( $_POST['product_id'] );
2940
		$bulk_action = wc_clean( $_POST['bulk_action'] );