Get Post Terms with [g9_post_terms] Shortcode

function g9_get_post_terms() { global $post; ob_start(); $taxonomy_name = ‘category’; // Taxonomy name $terms = get_the_terms($post->ID, $taxonomy_name); if ($terms) : $term_links = array(); foreach ($terms as $term) { $term_links[] = ‘Continue reading

Show SKU in Cart

function g9_sku_cart_page($item_name, $cart_item, $cart_item_key) { // The WC_Product object $product = $cart_item[‘data’]; // Get the SKU $sku = $product->get_sku(); // When sku doesn’t exist if (empty($sku)) return $item_name; // Add the sku $item_name .= ‘‘ . __(“SKU: “, “woocommerce”) .…Continue reading