Show custom benefits for a subscription card on the subscribe page in Leaky Paywall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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