WC_Abstract_Order::set_parent_id( int $value )

Set parent order ID.


Description Description


Parameters Parameters

$value

(Required) Value to set.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	public function set_parent_id( $value ) {
		if ( $value && ( $value === $this->get_id() || ! wc_get_order( $value ) ) ) {
			$this->error( 'order_invalid_parent_id', __( 'Invalid parent ID', 'woocommerce' ) );
		}
		$this->set_prop( 'parent_id', absint( $value ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.