Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created November 1, 2013 18:55
Show Gist options
  • Select an option

  • Save deckerweb/7270138 to your computer and use it in GitHub Desktop.

Select an option

Save deckerweb/7270138 to your computer and use it in GitHub Desktop.
Entfernt Gettext Filter in "WooCommerce German (de_DE)" Plugin wenn WPML-Sprache NICHT deutsch ist! // Removes gettext filters in "WooCommerce German (de_DE)" plugin for all non-German locales.
<?php
/** Do NOT include the opening php tag */
/**
* Remove gettext filters of WCDE, for non-German locales when using WPML.
*
* @author David Decker - DECKERWEB
* @link http://deckerweb.de/twitter
*/
if ( defined( 'ICL_LANGUAGE_CODE' ) && ! ( ICL_LANGUAGE_CODE == 'de' ) ) {
remove_filter( 'gettext', 'ddw_wcde_gettext_read_accept_string', 10, 4 );
remove_filter( 'gettext', 'ddw_wcde_gettext_terms_string', 10, 4 );
} // end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment