I am using a plugin Chargebee WP Membership
to connect up to their API to process payments. At the moment they are only using shortcodes to restrict content.
What I am trying to do, is output the functions of these shortcodes inside the page template. So far I've attempted the do_shortcode
method but would rather access the function directly.
For cb_content_show
the shortcode format is currently:
[cb_content_show level="1"] This content will be shown to any users who have plan associated with Level 1 [/cb_content_show]
What is the best method to access this function directly? I believe it derives from the function render_content_show_hide()
- Line 707
public function render_content_show_hide( $attr, $content = null, $shortcode_name = '' ) { ...
Ideally I'd like to access as the function for example:
<?php
if (cb_content_show('level') == 1) :
//do something
endif;
?>