Title: s2Membershort Code render issue
Last modified: December 30, 2018

---

# s2Membershort Code render issue

 *  [jevon@thewarriorsvoice.com](https://wordpress.org/support/users/jevonthewarriorsvoicecom/)
 * (@jevonthewarriorsvoicecom)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/s2membershort-code-render-issue/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fs2membershort-code-render-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Kirill [Webcraftic support]](https://wordpress.org/support/users/kirillgru/)
 * (@kirillgru)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/s2membershort-code-render-issue/#post-11063543)
 * 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.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kirill [Webcraftic support]](https://wordpress.org/support/users/kirillgru/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/s2membershort-code-render-issue/#post-11063543)
 * Status: not resolved