Support System Shortcode in a function


I have made some changes to my functions.php file to add a new endpoint for Support to the Woocommerce My Account page.

The function I am using to display content in this tab is:

// ------------------
// 4. Add content to the new endpoint
function revealws_premium_support_content() {
echo '<h3>Reveal Web Solutions Support</h3><p>Welcome to the Reveal Web Solutions support area. As a valued customer, you can submit a ticket should you have any issues with your website.<p><i>Please contact your theme/plugin developer for specific theme/plugin-related support.</i></p>';
echo do_shortcode('[support-system-tickets-index]');
add_action( 'woocommerce_account_premium-support_endpoint', 'revealws_premium_support_content' );

Although the html content displays correctly and it creates a container called <div id="support-system"> the container is empty.

The shortcode works correctly on a page just not in this function.

Any ideas why?

  • Rupok
    • Support Ninja

    Hi Tony,

    Thanks for asking. The shortcode "[support-system-tickets-index]" doesn't work normally on any page. It should work only on that page which is defined as "Support Page" in Support System Settings section. Please check the attached screenshot for reference.

    Probably the page where it's working for you is defined as "Support Page" in your Support System Settings. That's why the shortcode is working on that page but not in your function.

    I believe this cleared the confusion. Please let us know if you have any further query. We will be glad to help.

    Have a nice day. Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.