Get and use the product type in WooCommerce
问题 I'm working on a project and I'm stuck in getting Woocommerce product types as 'simple', 'variable', 'grouped' or 'external'... What I want to achieve: On the Thank you page, where it says " Thank you. Your order has been received. ". I want to show a particular text there if product is 'simple' and another text is product is variable or grouped or external, so something like: if (product->get_type() == 'simple') {// (for simple product) //show a text }else {// (for variable, grouped and