• Resolved gezzamondo

    (@gezzamondo)


    Is it possible to change how the price is displayed on the product?

    For example it currently shows as… £10.00 / 30 days

    Can it be changed to £10.00 / EVERY 30 days ???

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Armando

    (@geckod22)

    Hi there,
    try to use this snippet in your child theme functions.php file

    if ( ! function_exists( 'ywsbs_custom_price_html' ) && class_exists( 'YITH_WC_Subscription' ) ) {
    	add_filter('woocommerce_get_price_html', 'ywsbs_custom_price_html', 15, 2 );
    	function ywsbs_custom_price_html( $price, $p ) {
    		
    		if ( ! YITH_WC_Subscription::get_instance()->is_subscription( $p->get_id() ) ) {
    			return $price;
    		}
    
    		return str_replace( ' / ', ' / every ', $price );
    
    	}
    }
    Thread Starter gezzamondo

    (@gezzamondo)

    Thank you so much for this

    Plugin Support Armando

    (@geckod22)

    Happy to help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update the price display on product’ is closed to new replies.