WC_Product::get_weight()publicWC 1.0

Returns the product's weight.

Method of the class: WC_Product{}

No Hooks.

Return

String.

Usage

$WC_Product = new WC_Product();
$WC_Product->get_weight( $context );
$context(string)
What the value is for. Valid values are view and edit.
Default: 'view'

WC_Product::get_weight() code WC 9.3.3

public function get_weight( $context = 'view' ) {
	return $this->get_prop( 'weight', $context );
}