Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active December 21, 2015 19:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/6356966 to your computer and use it in GitHub Desktop.
Save deckerweb/6356966 to your computer and use it in GitHub Desktop.
WooCommerce - Text für "Aktion!" (Original: "On Sale!") ändern via originalem Filter von WooCommerce:
<?php
/** Öffnenden PHP Tag oben NICHT kopieren!!! */
add_filter( 'woocommerce_sale_flash', 'ddw_wcde_custom_onsale_text', 10, 3 );
/**
* Change the "One Sale!" (Aktion!) price string in WooCommerce.
*
* @author David Decker - DECKERWEB
* @link http://deckerweb.de/twitter
*
* @param string $text
* @param string $post
* @param string $product
*
* @return string For 'On Sale!' string.
*/
function ddw_wcde_custom_onsale_text( $text, $post, $product ) {
/** Set new string output */
$text = 'Angebot';
/** Return changed string */
return esc_attr__( $text );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment