call this on product-page template where you want to handle icon or tab:
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $post, $woocommerce, $product;
if ($product-> is_virtual('yes')) {
// your logic to display tab or image etc
}else{
// your logic not to display tab or image etc
}
?>
For more related details see this link and this one
Hope this will give you idea and help!
According to comment to get product type with ID : For details
$product = get_product(619);
echo $product->product_type;
Related Posts:
- How to add a new endpoint in woocommerce
- Slow Loading Attribute Select – WooCommerce Backend
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- Display orders instead of woocommerce my account dashboard for logged in users [closed]
- Detect whether a page is a product subcategory page?
- Get WooCommerce Email Classes in Backend
- Use Hooks to Limit One Comment Per User Per Post – Hide Form if Already Commented
- Display Categories Assigned to a WooCommerce Product
- WooCommerce is slow with many categories [closed]
- Get current WooCommerce endpoint not working
- Changing Woocommerce price display [closed]
- How to remove recurring totals information for a particular subscription product? [closed]
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- Set a default quantity input value for a variable product category in WooCommerce
- WooCommerce product sorting VERY slow
- Woocommerce – Move product without price a the end
- How to get all attributes with their terms related to specific Woocommerce product category [closed]
- Extra row / text field to a product page (WooCommerce)
- woocommerce_email_attachments filter arguments [closed]
- Problem with cURL and rest API
- Child theme dosn’t overwrite WooCommerce (version 3.4.7)
- How to Show Single Product – 4 Data by ID in Custom Page without over-riding the existing Woo-Commerce
- WOOCommerce redirect after registration to account details
- How can I add an additional action button into the woocommerce admin order page?
- How to add a custom text for order confirmation email template woocommerce
- woocomerce is serving OR Relation instead of AND on taxonomy product_tag
- Woocommerce Subscriptions – Set Billing Interval/Period
- WooCommerce with ACF: custom fields per product variation
- Woocommerce checkout page reload on up dating shipping method
- change wp_login url and redirect users at the same time
- How to clear woocommerce checkout form after pageload
- Is there a plugin available for recurring orders in Woocommerce? [closed]
- call_user_func_array() error in class-wp-hook.php
- Error after woocommerce update from 2.6 to 3.5 [closed]
- Send billing info from woocommerce checkout page to paypal checkout form
- Check if a category has a parent category in WooCommerce REST API
- Remove a higher quantity from stock according to a variation
- Auto generate user email while registration
- Switch position of short description and variations [closed]
- Get specific values in Woocommerce Rest API
- Javascript error when adding an item to the cart [closed]
- Woocommerce: Complex query in pre_get_posts [closed]
- Woocommerce check if email already created order recently [closed]
- Switch to user link
- Customize WooCommerce Add To Cart Form Name [closed]
- Woocommerce product editor does not add br
- Can’t find a product by SKU
- Weird strange letters appeared in all website links [duplicate]
- How can I edit the Woocommerce product widget html class?
- WooCommerce Cart Items
- Can’t show Woocommerce product category description
- Create new email in WooCommerce
- Display vendor phone number on single product page
- 3 Different Prices for Woocommerce Product
- Retrieve Data from Custom Endpoint
- Online wc-blocks-style.css rendering instead of the hosted wc-blocks-style.css
- How to create a WooCommerce Product filter based on PHP foreach
- Use ID as slug for product category by default in WooCommerce?
- I have 3 types of prices in WP and I need to change price for each specific user role using hooks
- How do I display only the relevant attributes?
- Woocommerce : Add name filed of checkout page to buyers wordpress display name
- How to add php variable inside wc_enqueue_js(‘jQuery’) function?
- Show menu order field in quick edit
- How to remove Calendar on Woocommerce Category Pages
- How to remove the Sub category product URL Woocommerce
- WC_Structured_Data Class Causing Needless Translation
- Placing Lock Icon on WooCommmerce “Place Order” Checkout Button (WordPress ‘ignoring’ Changes…)
- How do i display zip code options during checkout [closed]
- Collapsible product categories on sidebar?
- Woocommerce – wc_cart_totals_shipping_method_label() breaking out option tag
- Woocommerce Add prices
- How to limit Woocommerce search to titles only?
- How to invoice Woocommerce customer the remainder balance amount for additional items to an already paid order
- WooCommerce – Show different terms and conditions for different user roles
- How to set subcategory in Woocommerce?
- Woocommerce – How to Show product tags in shop page
- Bulk edit orders to ‘wc-processing’ status
- woocommerce price filter not working when change currency
- With what hook do I remove WooCommerce existing Product Data Tab form fields?
- After update Woocommerce shop page not showing products
- Remove link for Woocommerce product tags
- WooCommerce Class dosen’t exist
- How to only show featured products in wooCommerce using function.php function
- How to insert link, with lightbox, that opens specific page content only
- Remove plugin function and add it back in via functions.php
- deactivate product-page image slider on mobile
- Vendor Listing by Location
- Woocommerece category page showing in stock product as out of stock
- Increase product variation limit in woocommerce
- WooCommerce widget “WooCommerce Products” template [closed]
- Woocommerce woocommerce_breadcrumb_defaults filter [closed]
- Some Admin disappeared
- Sort by promo code used woocommerce admin panel [closed]
- How to access Woo Commerce products from within custom theme? [closed]
- Use Homepage as “Shop” for Woocommerce [closed]
- How to display India country first in country selection drop down list in WordPress
- error 500 in Back Office when using a woocommerce function in functions.php
- What is the best and cheapest way to generate dashboards about conversions data and store users? [closed]
- Sort by price when price is set in multiple keys
- Add a custom code with custom link after add to cart for every product