Stock Availability on Product Archive
-
Hi
I’m trying to get the stock availability showing on the Product Archive page before the add to cart button and after the price but I can’t get it working.
It is displaying the availability but above the product
add_action( 'woocommerce_after_shop_loop_item', 'wc_loop_get_product_stock_availability_text', 10 ); function wc_loop_get_product_stock_availability_text() { global $wpdb, $product; // For variable products if( $product->is_type('variable') ) { } // Other products types else { echo wc_get_stock_html( $product ); } }
Any help would be massively appreciated.
Thanks in advance!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Stock Availability on Product Archive’ is closed to new replies.