Skip Navigation

[Resolved] Shortcode parameters inside php

This support ticket is created 4 years, 7 months 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.

Our next available supporter will start replying to tickets in about 2.93 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by Ido Angel 4 years, 7 months 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 . '"]');