Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

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