Skip Navigation

[Resuelto] Shortcode parameters inside php

This support ticket is created hace 4 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Ido Angel hace 4 años, 7 meses.

Autor
Mensajes
#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 . '"]');