WPML
状态
已由作者解决
相关插件/主题
YITH WooCommerce Request a Quote
主题标签
Compatibility

问题概述

在使用 YITH WooCommerce Request a Quote 插件和 WPML 时,用户在提交报价请求后会被重定向到默认语言页面。

临时解决方法

在继续操作之前,请确保对您的站点进行了完整备份


  • 打开 …./wp-content/plugins/yith-woocommerce-request-a-quote-premium/includes/forms/default/class.yith-ywraq-default-form.php 文件。

  • 找到第 619 行。

  • 在此注释之后:
    					/**
    					 * DO_ACTION:send_raq_mail
    					 *
    					 * This action triggers to send the quote email
    					 *
    					 * @param array $raq List of arguments useful to send the email with quote.
    					 */

  • 添加:
    					// workaround compsupp-7072
    					$wpml_default_lang = apply_filters('wpml_default_language', NULL);
    					if ($wpml_default_lang !== $filled_form_fields['lang'] ) {
    						do_action( 'wpml_switch_language',  $filled_form_fields['lang'] );
    					}

所有已知问题 →