Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function patricks_woocommerce_call_to_order_button(){
- global $product; //get the product object
- if ( $product ) { // if there's a product proceed
- $url = esc_url( $product->get_permalink() ); //get the permalink to the product
- echo '<a rel="nofollow" href="' . $url . '" class="button add_to_cart_button ">Call to order!</a>'; //display a button that goes to the product page
- }
- }
- add_action('woocommerce_after_shop_loop_item','patricks_woocommerce_call_to_order_button', 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement