How to echo a dynamic url
There are two workarounds: If the first line you’re mentioning is inside a void function: You have to create a wrapper function and use ob_ functions to get the real link: <?php function echo_link($post, $landing_page) { global $myfy; echo $myfy->get_retrieve_cart_url( $post->ID, $landing_page ); } function get_link($post, $landing_page){ ob_start(); echo_link($post, $landing_page); return ob_get_clean(); } // And … Read more