Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created December 23, 2025 07:47
Show Gist options
  • Select an option

  • Save andrewlimaza/2340523e071f5afc608fdced81d2974b to your computer and use it in GitHub Desktop.

Select an option

Save andrewlimaza/2340523e071f5afc608fdced81d2974b to your computer and use it in GitHub Desktop.
Remove trailing full stop from level pricing.
<?php
/**
* Removes the last "." from the level's cost text.
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_remove_period_from_cost_text( $cost_text, $level, $tags, $short ) {
return rtrim( $cost_text, '. ' );
}
add_filter( 'pmpro_level_cost_text', 'my_pmpro_remove_period_from_cost_text', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment