Title: SyntaxError when using Weglot
Last modified: July 29, 2021

---

# SyntaxError when using Weglot

 *  [modularte](https://wordpress.org/support/users/modularte/)
 * (@modularte)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntaxerror-when-using-weglot/)
 * Hello,
 * We love to Product Configurator but it turns out when we have the plugin Weglot
   enabled, the Product Configurator breaks completely on the translated pages. 
   On the German page (main language) it works flawlessly, but on the English page
   we get this JavaScript error:
 * SyntaxError: Unexpected token ‘<‘

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntaxerror-when-using-weglot/#post-14721764)
 * HI there,
 * Could you try adding the following code, which should prevent Weglot from translating
   the data:
 *     ```
       add_filter( 'weglot_ajax_no_translate', function( $actions ) {
       	$actions[] = 'pc_get_data';
       	return $actions;
       } );
       ```
   
 * Marc
 *  Thread Starter [modularte](https://wordpress.org/support/users/modularte/)
 * (@modularte)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/syntaxerror-when-using-weglot/#post-14725920)
 * Hi Marc,
 * Thanks for your quick reply. Sadly, the solution provided by you didn’t appear
   to change anything, were you able to reproduce the issue?
 * Currently I temporarily resolved the issue by preventing the URLs where the Product
   Configurator is enabled to be translated but ideally this is not a long-term 
   solution.
 *  Plugin Contributor [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/syntaxerror-when-using-weglot/#post-14788133)
 * Could you maybe contact Weglot support, as they’re obviously applying some filters
   on the Ajax results, ending in the broken content.
    They’ll probably know the
   right filter to use to disable this.
 * Marc

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SyntaxError when using Weglot’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/syntaxerror-when-using-weglot/#post-14788133)
 * Status: not resolved