WC_Product::set_parent_id()
Set parent ID.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Product = new WC_Product(); $WC_Product->set_parent_id( $parent_id );
- $parent_id(int) (required)
- Product parent ID.
Changelog
Since 3.0.0 | Introduced. |
WC_Product::set_parent_id() WC Product::set parent id code WC 8.6.1
public function set_parent_id( $parent_id ) { $this->set_prop( 'parent_id', absint( $parent_id ) ); }