How to display Woocommerce product price by ID number on a custom page?

If you have the product’s ID you can use that to create a product object: $_product = wc_get_product( $product_id ); Then from the object you can run any of WooCommerce’s product methods. $_product->get_regular_price(); $_product->get_sale_price(); $_product->get_price(); Update Please review the Codex article on how to write your own shortcode. Integrating the WooCommerce product data might look … Read more

WooCommerce: Finding the products in database

Update 2020 Products are located mainly in the following tables: wp_posts table with post_type like product (or product_variation), wp_postmeta table with post_id as relational index (the product ID). wp_wc_product_meta_lookup table with product_id as relational index (the post ID) | Allow fast queries on specific product data (since WooCommerce 3.7) wp_wc_order_product_lookuptable with product_id as relational index … Read more

What are the differences between plug-ins, features, and products in Eclipse RCP?

As the RCP tutorial details Plugins are the smallest deployable and installable software components of Eclipse. Each plugin can define extension-points which define possibilities for functionality contributions (code and non-code) by other plugins. Non-code functionality contributions can, for example, provide help content. The basis for this architecture is the runtime environment Equinox of Eclipse which … Read more

Get custom product attributes in Woocommerce

Edited: The woocommerce_get_product_terms is deprecated since Woocommerce version 3 Go with the following as @datafeedr wrote in his answer: global $product; $koostis = array_shift( wc_get_product_terms( $product->id, ‘pa_koostis’, array( ‘fields’ => ‘names’ ) ) ); or even more compact: global $product; $koostis = $product->get_attribute( ‘pa_koostis’ ); Original answer: $result = array_shift(woocommerce_get_product_terms($product->id, ‘pa_koostis’, ‘names’));