Apply a coupon depending on cart subtotal 

add_action( 'woocommerce_before_cart', 'snipjar_apply_coupon_cart_subtotal' );

function snipjar_apply_coupon_cart_subtotal() {
	$coupon_code = 'snipdeal';
	// if cart subtotal is more than 10,000
	if( 10000 < WC()->cart->get_subtotal() ) {
		if( ! WC()->cart->has_discount( $coupon_code ) ) {
			WC()->cart->apply_coupon( $coupon_code );
		}
	} else {
		WC()->cart->remove_coupon( $coupon_code );
		WC()->cart->calculate_totals();
	}
}