I just found a way!!! If you have another way, I would like to know what it is.
With my way, you have to use:
► [woocs_price meta_value=”x”] shortcode
► Advanced Custom field “get_field” and
► do_shordcode() BUT you have to switch around the single and double quotes on the do_shortcode() form it’s normal syntax.
So in my case, I have an ACF meta key called “base_price”, so this is what my code looks like…
<?php
$base_price = get_field('base_price', $post_id);
echo do_shortcode( "[woocs_show_custom_price value='$base_price']" );
?>
This works for me. I hope it helps someone else. Again, please post here if there is another way.
-
This reply was modified 7 years, 5 months ago by
toolsavvy.
Hello
Thank you for cooperation!
Yes! It’s the right way!