Code Duplication    Length = 3-3 lines in 3 locations

includes/class-wc-ajax.php 3 locations

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