Create Custom Menu in WordPress Dashboard
Complete tutorial on create custom menu in wordpress dashboard. Discover practical examples, implementation tips, and expert advice for WordPress and WooCo
Read More β
In WooCommerce, the $product object holds all the essential details about a product. Whether you're building a custom function or customizing templates, here's a handy guide to the most commonly used properties and methods available from the $product object:
$product->get_id()$product->get_name()$product->get_type()$product->get_sku()$product->get_description()$product->get_short_description()$product->get_regular_price()$product->get_sale_price()$product->get_stock_quantity()$product->get_weight()$product->get_dimensions()$product->get_category_ids()$product->get_tag_ids()$product->get_gallery_image_ids()$product->get_image_id()$product->get_attributes()$product->get_available_variations()$product->get_average_rating()$product->get_review_count()$product->get_permalink()$product->add_to_cart_url()$product->add_to_cart_text()These methods help you retrieve just about any product-related data you need. You can inspect the full object using var_dump($product) or print_r($product) for custom debugging. Refer to the WooCommerce Developer Docs for more in-depth reference. 
Search our archives or reach out to our team for solutions and expert advice.