public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/cart.php
/**
	 * Check cart coupons for errors.
	 *
	 * @since 4.5.0
	 */
Check cart coupons for errors.
Check cart coupons for errors .
public function check_cart_coupons() {
		foreach ( $this->get_applied_coupons() as $code ) {
			$coupon = wpcw_get_coupon_by_code( $code );
			if ( ! $coupon->is_valid() ) {
				$coupon->add_coupon_error( Coupon::E_COUPON_INVALID_REMOVED );
				$this->remove_coupon( $code );
			}
		}
	}
public function check_cart_coupons ( ) { foreach ( $ this -> get_applied_coupons ( ) as $ code ) { $ coupon = wpcw_get_coupon_by_code ( $ code ) ; if ( ! $ coupon -> is_valid ( ) ) { $ coupon -> add_coupon_error ( Coupon :: E_COUPON_INVALID_REMOVED ) ; $ this -> remove_coupon ( $ code ) ; } } }
Check cart coupons for errors.
Check cart coupons for errors .