Woocommerce Custom post type permalink
-
I’m using woocommerce with Custom Post Types to enable CPTs to be added to cart as a workaround on a running system
i’m facing an issue returning the permalink of the CPT as a hyperlink for the product name at the cart page and the orders page
i’ve tried to filter but i can’t get it to hyperlink the product name as to the product url which is a permalink
woocommerce 2.6 wp 4.5.3
thanks in advance//item permalink add_filter('woocommerce_cart_item_permalink','listing_peramlink',20,2); function listing_peramlink($product_permalink,$post){ if ($post->post->post_type == 'listing_type') $product_permalink = get_permalink( get_post_meta($post->id)); return $product_permalink; }
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Woocommerce Custom post type permalink’ is closed to new replies.