WC_Product::get_parent_id
Get parent ID.
Method of the class: WC_Product{}
No Hooks.
Returns
Int.
Usage
$WC_Product = new WC_Product(); $WC_Product->get_parent_id( $context );
- $context(string)
- What the value is for. Valid values are view and edit.
Default: 'view'
Changelog
| Since 3.0.0 | Introduced. |
WC_Product::get_parent_id() WC Product::get parent id code WC 10.4.3
public function get_parent_id( $context = 'view' ) {
return $this->get_prop( 'parent_id', $context );
}