Skip Navigation

[Resolved] Shortcode parameters inside php

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by Ido Angel 4 years ago.

Author
Posts
#1580847

hey
I created a woocommerce tab with content in my theme's functions.php file.
In the content, I need to pass this shortcode:

[wpv-view name="single-product-tips" producttips="[types field='id-faq'][/types]"]

How would I do that?
I tried:

	$args = array(
    "name" => "product-faq",
    "productfaq" => echo do_shortcode("[types field='id-faq'][/types]")
);
echo render_view( $args );
 $faq = "[types field='id-faq'][/types]";
echo do_shortcode('[wpv-view name="product-faq" productfaq="'. $faq . '"]');

none worked of course.
Help appreciated
thanks!

#1580913

got it:

$faq = do_shortcode( '[wpv-post-id]' );
echo do_shortcode('[wpv-view name="product-faq" productfaq="'. $faq . '"]');
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.