Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

I Need A Custom Shortcode To Include Price and Add to Cart Button

This is a follow on to this question
https://www.experts-exchange.com/questions/29145432/Need-WooCommerce-Product-Short-Code-That-Uses-Thumbnail.html#a42863437

Open in new window


This is the perfect size image but I also need it to show the price and an add to cart button.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharingsunshine

ASKER

Thanks so much for putting this together.  This is great, there is only one thing wrong.  If someone wants to copy the code the ending heredoc can't be indented.  Before I made the change it went to a white screen.

Now it works perfectly.
No worries.

I'm using PHP 7.3 and you can indent the closing HEREDOC - it's a new (much loved) feature. I used to hate the fact that HEREDOC ruined my code indentation. PHP 7.3 - Problem Solved !!
Thanks for letting me know I am on 7 but not 7.3.