Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wc-ajax.php 2 locations

@@ 2083-2085 (lines=3) @@
2080
		check_ajax_referer( 'save-variations', 'security' );
2081
2082
		// Check permissions again and make sure we have what we need.
2083
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST ) || empty( $_POST['product_id'] ) ) {
2084
			wp_die( -1 );
2085
		}
2086
2087
		$product_id                           = absint( $_POST['product_id'] );
2088
		WC_Admin_Meta_Boxes::$meta_box_errors = array();
@@ 2502-2504 (lines=3) @@
2499
		check_ajax_referer( 'bulk-edit-variations', 'security' );
2500
2501
		// Check permissions again and make sure we have what we need.
2502
		if ( ! current_user_can( 'edit_products' ) || empty( $_POST['product_id'] ) || empty( $_POST['bulk_action'] ) ) {
2503
			wp_die( -1 );
2504
		}
2505
2506
		$product_id  = absint( $_POST['product_id'] );
2507
		$bulk_action = wc_clean( wp_unslash( $_POST['bulk_action'] ) );