15 Mar How to hide the text “free trial” in WooCommerce Subscriptions
Posted at 17:54h
in WooSubscriptions
add_filter( 'woocommerce_subscriptions_product_price_string', 'subscriptions_custom_price_string', 20, 3 ); function subscriptions_custom_price_string( $price_string, $product, $args ) { // Get the trial length to check if it's enabled $trial_length = get_post_meta( $product->get_id(), '_subscription_trial_length', true ); if( $trial_length > 0 ) $price_string = $args['price']; return $price_string; }
Code goes in function.php file of your active child theme (or theme). reference from StackOverFlow