Skip to content

Instantly share code, notes, and snippets.

@dwanjuki
Created November 26, 2025 09:00
Show Gist options
  • Select an option

  • Save dwanjuki/0cd67be66cb93c60521d60db520d4202 to your computer and use it in GitHub Desktop.

Select an option

Save dwanjuki/0cd67be66cb93c60521d60db520d4202 to your computer and use it in GitHub Desktop.
Exclude the default level billing price from payment plan radio options at checkout
<?php // copy from below.
/**
* Exclude the default level billing price from payment plans at checkout
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpropp_exclude_default_level_price( $include_level_price, $level_id ) {
// Bail if level price is already excluded.
if ( ! $include_level_price ) {
return $include_level_price;
}
// Exclude the default level pricing as a payment plan for the following level IDs.
$exclude_level_price_levels = array( 1 );
if ( in_array( $level_id, $exclude_level_price_levels ) ) {
$include_level_price = false;
}
return $include_level_price;
}
add_filter( 'pmpropp_include_level_pricing_option_at_checkout', 'my_pmpropp_exclude_default_level_price', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment