Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'template_redirect', 'wpgenie_add_bid_button_template_redirect' );
- function wpgenie_add_bid_button_template_redirect() {
- if ( is_page('auction-lot-1') ) {
- add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_add_bid_button',50 );
- }
- }
- function wpgenie_add_bid_button(){
- global $product, $post;
- if ( $product->get_type() !== 'auction' ){
- return;
- }
- wc_get_template( 'single-product/auction-bid-form.php' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement