Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show custom benefits for a subscription card on the subscribe page in Leaky Paywall
<?php
add_filter( 'leaky_paywall_subscription_options_allowed_content', 'zeen101_show_level_benefits_on_card', 10, 3 );
function zeen101_show_level_benefits_on_card( $allowed_content, $level_id, $level ) {
switch ( $level_id ) {
case 0:
$output = '<ul>';
$output .= '<li>Gold Benfit #1</li>';
$output .= '<li>Gold Benefit #2</li>';
$output .= '<li>Gold Benefit #3</li>';
$output .= '</ul>';
break;
case 1:
$output = '<ul>';
$output .= '<li>Platinum Benfit #1</li>';
$output .= '<li>Platinum Benefit #2</li>';
$output .= '<li>Platinum Benefit #3</li>';
$output .= '</ul>';
break;
default:
$output = $allowed_content;
break;
}
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.