Skip to content

Instantly share code, notes, and snippets.

@woogist
Created August 6, 2015 10:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save woogist/95c2d9af6009f2c27476 to your computer and use it in GitHub Desktop.
Save woogist/95c2d9af6009f2c27476 to your computer and use it in GitHub Desktop.
function wc_subscriptions_custom_price_string( $pricestring ) {
global $product;
$products_to_change = array( 45, 90, 238 );
if ( in_array( $product->id, $products_to_change ) ) {
$pricestring = str_replace( 'every 3 months', 'per season', $pricestring );
}
return $pricestring;
}
add_filter( 'woocommerce_subscriptions_product_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