MyListing Club

Hide Subscription Details for Free Packages

Building better MyListing websites. One code snippet at a time.

Overview

The Hide Subscription Details for Free Packages code snippet provides additional functionality for MyListing websites.

If you use WooCoomerce Subscriptions, it may append /day, /month, etc., to the price. This snippet uses the opacity setting to make that text transparent.

Implementation

  1. Grab the code snippet.
  2. Follow the provided instructions.
  3. Save your changes.
				
					//// INSTRUCTIONS: 
//// Copy and paste the code snippet below into Theme Tools > Theme Options > Custom Code > JavaScript.

//// NOTES:
//// If you use WooCoomerce Subscriptions, it may append /day, /month, etc., to the price.
//// This snippet uses the opacity setting to make that text transparent.

--------------------------- CODE SNIPPET IS BELOW THIS LINE --------------------------- 

// HIDE SUBSCRIPTION DETAILS FOR FREE PACKAGES
jQuery(document).ready(function($) {
    $('span:contains("FREE")').siblings('.subscription-details').css('opacity', '0');
});