urlencode coupon Closes #7572

This commit is contained in:
Mike Jolley 2015-03-02 12:03:31 +00:00
parent 154e289b08
commit 9865e5f11e
2 changed files with 3 additions and 2 deletions

View File

@ -218,8 +218,7 @@ function wc_cart_totals_coupon_html( $coupon ) {
// get rid of empty array elements
$value = array_filter( $value );
$value = implode( ', ', $value ) . ' <a href="' . esc_url( add_query_arg( 'remove_coupon', $coupon->code, defined( 'WOOCOMMERCE_CHECKOUT' ) ? WC()->cart->get_checkout_url() : WC()->cart->get_cart_url() ) ) . '" class="woocommerce-remove-coupon" data-coupon="' . esc_attr( $coupon->code ) . '">' . __( '[Remove]', 'woocommerce' ) . '</a>';
$value = implode( ', ', $value ) . ' <a href="' . esc_url( add_query_arg( 'remove_coupon', urlencode( $coupon->code ), defined( 'WOOCOMMERCE_CHECKOUT' ) ? WC()->cart->get_checkout_url() : WC()->cart->get_cart_url() ) ) . '" class="woocommerce-remove-coupon" data-coupon="' . esc_attr( $coupon->code ) . '">' . __( '[Remove]', 'woocommerce' ) . '</a>';
echo apply_filters( 'woocommerce_cart_totals_coupon_html', $value, $coupon );
}

View File

@ -138,6 +138,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== Changelog ==
* Fix - Removal of coupons containing spaces.
* Fix - Unclosed div in profile page.
* Fix - Export report CSV.
* Fix - Settings API - allow multiselect fields to be emptied.
* Fix - Saving an order needs to save the discount amount ex. tax like the cart.