Skip to content

Instantly share code, notes, and snippets.

@lukecav
Forked from woogist/functions.php
Last active January 11, 2018 03:45
Show Gist options
  • Save lukecav/4796a944c8062b0a5687d74ebc5ee58b to your computer and use it in GitHub Desktop.
Save lukecav/4796a944c8062b0a5687d74ebc5ee58b to your computer and use it in GitHub Desktop.
Change the price string globally for WooCommerce Subscriptions
function wc_subscriptions_custom_price_string( $pricestring ) {
$newprice = str_replace( 'every 3 months', 'per season', $pricestring );
return $newprice;
}
add_filter( 'woocommerce_subscriptions_product_price_string', 'wc_subscriptions_custom_price_string' );
add_filter( 'woocommerce_subscription_price_string', 'wc_subscriptions_custom_price_string' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment