Skip Navigation

[Resolved] Shortcode parameters inside php

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.

This topic contains 1 reply, has 1 voice.

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