• I’ve been using this plugin for a few years now with no issue. When I attempted to upgrade to the snippits I have a problem with a button rendering.

    My snippit calls a page of PHP code. This page runs calculations and then renders a paypal button with the details inserted into it for s2Member short code. I’m reasonably certain it can be corrected with syntax, but I’m not sure where to start.

    Here is my snippit:
    include('./custom_code/memberportal.php');
    This renders ok untill the end of the script where the s2member shortcode.

    Here is the page I am rendering: (trimmed)

    <?php
    ...
    $buttonCode = '[s2Member-PayPal-Button level="2" ccaps="" desc="Premium Marketing Membership" ps="paypal" lc="" cc="CAD" dg="0" ns="1" custom="edmontoncoaches.com" ta="0" tp="0" tt="D" ra="'.$price.'" rp="'.$daysleft.'" rt="D" rr="BN" rrt="" rra="1" image="default" output="button" /]';
    
    echo $buttonCode;
    ...
    ?>

    The page shows this as literal text rather than rendering the s2member shortcode.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello
    The text that prints the snippet does not execute shortcodes. Because the shortcode filter has already triggered.
    You need to call the function do_shortcode.

    echo do_shortcode($buttonCode);

    Best regards

Viewing 1 replies (of 1 total)

The topic ‘s2Membershort Code render issue’ is closed to new replies.