wordpress - How to add an "add to cart" button in single-product.php page in woocommerce? -


I am using woocommerce to develop an ecommerce site

Single-Product The problem I am facing in php is

I can not display the add to cart button under the product in this page.

So far I am using this code:

  & lt ;? Php // global $ post; Echo do_shortcode ('[add_to_cart id = "$ post- & gt; id"]'); ? & Gt;   

But so far no luck to me!

Perhaps you made a simple writing mistake? Try it out:

  & lt ;? Php echo do_shortcode ('[add_to_cart id =' '. $ Post- & gt; id.' "] ');); ? & Gt;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -