Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpgenie_shop_display_post_meta() {
- global $product;
- if($product && $product->get_type() == 'auction'){
- if ( ! empty( $product->get_auction_start_price() ) ) {
- echo '<div class="product-meta"><span class="product-meta-title">Starting price:</span> ' . wc_price( $product->get_auction_start_price() ) . '</div>';
- }
- if ( ! empty( $product->get_auction_current_bid() ) ) {
- echo '<div class="product-meta"><span class="product-meta-title">Current pice:</span> ' . wc_price( $product->get_auction_current_bid() ) . '</div>';
- }
- if ( ! empty( $product->get_auction_max_bid() ) ) {
- echo '<div class="product-meta"><span class="product-meta-title">User max bid:</span> ' . wc_price( $product->get_auction_max_bid() ) . '</div>';
- }
- }
- }
- add_action( 'woocommerce_after_shop_loop_item', 'wpgenie_shop_display_post_meta', 9 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement