跳过导航

Open

Topic Tags: Compatibility

Overview of the issue

After updating WordPress to version 6.7.1, strings from the Germanized for WooCommerce Pro plugin are not being translated into German as expected.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/woocommerce-germanized-pro/includes/class-wc-gzdp-wpml-helper.php file.
  • Look for line 112.
  • Replace:
    	public function reload_locale() {
    		unload_textdomain( 'woocommerce-germanized-pro' );
    
    		WC_germanized_pro()->load_plugin_textdomain();
    	}
    
  • With:
    	public function reload_locale() {
    		unload_textdomain( 'woocommerce-germanized-pro', true );
    
    		WC_germanized_pro()->load_plugin_textdomain();
    	}
    
  • Then open the …/wp-content/plugins/woocommerce-germanized-pro/woocommerce-germanized-pro.php file.
  • Look for line 772.
  • Change the order of these two lines:
    load_textdomain( 'woocommerce-germanized-pro', trailingslashit( WP_LANG_DIR ) . 'woocommerce-germanized-pro/woocommerce-germanized-pro-' . $locale . '.mo' );
    load_plugin_textdomain( 'woocommerce-germanized-pro', false, plugin_basename( __DIR__ ) . '/i18n/languages/' );
    
  • With:
    load_plugin_textdomain( 'woocommerce-germanized-pro', false, plugin_basename( __DIR__ ) . '/i18n/languages/' );
    load_textdomain( 'woocommerce-germanized-pro', trailingslashit( WP_LANG_DIR ) . 'woocommerce-germanized-pro/woocommerce-germanized-pro-' . $locale . '.mo' );
    

8 所有回复 给 “Germanized for WooCommerce Pro - Strings Are Not Translated After Updating WordPress to 6.7.1”

  1. Good day,

    I’m afraid it already says

    public function reload_locale() {
    unload_textdomain( 'woocommerce-germanized-pro', true );
    WC_germanized_pro()->load_plugin_textdomain();
    }

    in the file you mentioned. The issue persists.

  2. To be more precise:

    The mentioned fix works, BUT ONLY if there is no translation file at /wp-content/languages/wpml/

    As soon as you edit at least one string for Germanized Pro, so that a .mo file is created at /wp-content/languages/wpml/, the fix falls apart and everything is English again for Germanized Pro.

    • Hello Martin,

      Could you please open a ticket in our support forum? In that way, we will be able to investigate your case and help you to find a solution. Please mention this erratum to the supporter handling your ticket

      • Hello,

        Thanks for the update. I can confirm that it works after these two steps.

        The first step has already been fixed by the Germanized Pro authors in the newest version of Germanized Pro. The second issue still remains in their code.

  3. we have exactly the same issue! Germanized support told us that some Germanized Pro Strings are registered wrong in the Database. There is no fix available and this has to be fixed manually in den DB – but how??

    • Hi Paul,

      Thanks for reporting this issue in your support ticket. As Marcel mentioned, we don’t recommend manually changing the strings stored in the database.

      We’ve already escalated your feedback to our second-tier support team and will keep you updated directly in your ticket.

留下回复

紧扣主题并尊重他人。如果您需要帮助解决与本帖无关的问题,请使用我们的 Support Forum 开始聊天或提交票据。

您可以使用这些标签:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>