0

How can I add a button that says 'See Details' below my products in WooCommerce?

Here is a link to the page I would like to add it to.

Issue is similar to this but it doesn't quite work for me.

Zak
  • 23
  • 1
  • 6
  • Please remove this line "if( $product->is_type('variable') || $product->is_type('grouped') ) return;" and than check, you are using variable product and which function you are using from reference link it's now allowing to add it. – Jogi Mehul Jan 03 '19 at 05:51
  • Of course! Thank you for pointing that out Jogi Mehul, I appreciate your help (and thank you to @LoicTheAztec for the original post). – Zak Jan 03 '19 at 06:09

1 Answers1

0

Use the normal function of wordpress

get_permalink( $product_id );

check the documentation here

Also check this answer

abdallah Nofal
  • 1,077
  • 8
  • 13
  • 1
    Thanks Abdallah, I don't know php very well so having the full code mentioned in the other comments really helped. – Zak Jan 03 '19 at 07:15
  • 1
    You may also find this helpful, @Zak, for figuring out where you want to hook the function you'll create: https://businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/ – aronmoshe_m Jan 03 '19 at 09:49