Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

@@ 2400-2402 (lines=3) @@
2397
		check_ajax_referer( 'load-variations', 'security' );
2398
2399
		// Check permissions again and make sure we have what we need
2400
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['attributes'] ) ) {
2401
			die( -1 );
2402
		}
2403
2404
		global $post;
2405
@@ 2559-2561 (lines=3) @@
2556
		check_ajax_referer( 'save-variations', 'security' );
2557
2558
		// Check permissions again and make sure we have what we need
2559
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2560
			die( -1 );
2561
		}
2562
2563
		// Remove previous meta box errors
2564
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2932-2934 (lines=3) @@
2929
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2930
2931
		// Check permissions again and make sure we have what we need
2932
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2933
			die( -1 );
2934
		}
2935
2936
		$product_id  = absint( $_POST['product_id'] );
2937
		$bulk_action = wc_clean( $_POST['bulk_action'] );