Created
October 22, 2018 17:30
-
-
Save ellegaarddk/5710119b3687e73d6a0b15c8cbb21ee6 to your computer and use it in GitHub Desktop.
Tilføj SKU fra WooCommerce på kategorisider
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
/* WooCommerce - add SKU on cat pages */ | |
add_action( 'woocommerce_after_shop_loop_item_title', 'shop_sku', 5 ); | |
function shop_sku(){ | |
global $product; | |
echo '<span itemprop="productID" class="sku">' . __('SKU', 'woocommerce'). ': ' . $product->sku . '</span>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment