WC_Product::set_customs_country_of_origin │ public │ WC 11.3.0

Sets the customs country of origin.

Method of the class: WC_Product{}

No Hooks.

Returns

void. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_customs_country_of_origin( $country );
$country(string|null) (required)
Country code, or null to clear it.

Changelog

Since 11.3.0 Introduced.

WC_Product::set_customs_country_of_origin() code WC 11.3.0

public function set_customs_country_of_origin( $country ) {
	$this->set_prop(
		'customs_country_of_origin',
		$this->get_object_read() ? CustomsDataValidator::normalize_country_of_origin( $country ) : CustomsDataValidator::normalize_stored_value( 'customs_country_of_origin', $country )
	);
}