Title: Error
Last modified: October 27, 2016

---

# Error

 *  [Bonaldi](https://wordpress.org/support/users/bonaldi/)
 * (@bonaldi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-712/)
 * Hi,
 * I set a minimal order amount to place an order.
 * The code in function.php:
 *     ```
       function theme_minimum_order(){
           global $woocommerce;
       // Modify $minorder to change amount min order value.
       	$minorder = 20;
       	$cart = $woocommerce->cart->subtotal;
           if( $cart < 20 ){
               wc_add_notice( sprintf(__("Sorry, to place an order online, the amount of your cart must be greater than <strong>", "theme") . $minorder . __("</strong>&euro;. <br /><a href= »%s »>Back to Shop &rarr;</a><br />", "theme"), get_permalink( woocommerce_get_page_id("shop") )), 'error' );
           }
       }
       ```
   
 * I use the translation plugin Transposh for French and English (French is the 
   main language).
    The notice appeared in both languages with previous version 
   of Woocommerce.
 * With last version 2.6.7, when I place an order in English with a cart amount 
   under 20€, I get this message:
 * SyntaxError: JSON.parse: bad escaped character at line 1 column 188 of the JSON
   data
 * But it is still working in French.
 * What’s the matter ?
    Any help would be appreciated. Regards.
 * P.S.: I test it on localhost with PHP7

Viewing 1 replies (of 1 total)

 *  Thread Starter [Bonaldi](https://wordpress.org/support/users/bonaldi/)
 * (@bonaldi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-712/#post-8363838)
 * Of course, I placed before the code:
    `add_action('woocommerce_before_checkout_process','
   theme_minimum_order');`
    -  This reply was modified 9 years, 6 months ago by [Bonaldi](https://wordpress.org/support/users/bonaldi/).

Viewing 1 replies (of 1 total)

The topic ‘Error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [syntaxerror](https://wordpress.org/support/topic-tag/syntaxerror/)

 * 1 reply
 * 1 participant
 * Last reply from: [Bonaldi](https://wordpress.org/support/users/bonaldi/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/error-712/#post-8363838)
 * Status: not resolved