Get Composite product component price in Product Page

I need to add the price of component to the product page, i use the composite product plugin, i saw the documentation and found i posibly can add, but i dont know how to add to my product page.

Here is the link: https://docs.woocommerce.com/document/composite-products/

And here is the part i want to add (appears in the link):

get_component_totals

Description

object get_component_totals( string component_id )

Returns an object containing the specified Component price, regular price and price incl/excl tax.

Arguments

string component_id – ID of the component

I dont know how to implement to my wordpress site, snippet? shortcode? function? hook?

Source: Ask Javascript Questions

LEAVE A COMMENT