Last active
October 26, 2020 17:17
-
-
Save assoscoupa/6e96785d3a6a829191530752b7dd3734 to your computer and use it in GitHub Desktop.
Adding SKU to Woo 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
/* Adding SKU to shop page */ | |
function qwerty_gr_custom_shop_item() { | |
global $post, $product; | |
/* product sku */ | |
echo '<p>SKU: '.$product->get_sku().'</p>'; | |
} | |
add_action( 'woocommerce_after_shop_loop_item', 'qwerty_gr_custom_shop_item', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment