Last active
August 17, 2023 10:20
-
-
Save wooxperto/adc94256e0d7cba4825105cacdbfae88 to your computer and use it in GitHub Desktop.
Display stock availablitiy on shop page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @snippet Display Stock Availability on Shop page | WooCommerce | |
* @author WooXperto | |
* @date 17.08.2023 | |
*/ | |
function wooXperto_show_stock_shop() { | |
global $product; | |
echo wc_get_stock_html( $product ); | |
} | |
add_action( 'woocommerce_after_shop_loop_item', 'wooXperto_show_stock_shop', 10 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment