Warning: This method has been deprecated. Logic moved to constructor instead.
WC_Abstract_Legacy_Order::init( int|object|WC_Order $order )
Load the order object. Called from the constructor.
Description Description
Parameters Parameters
- $order
-
(Required) Order to init.
Source Source
File: includes/legacy/abstract-wc-legacy-order.php
protected function init( $order ) { wc_deprecated_function( 'WC_Order::init', '3.0', 'Logic moved to constructor' ); if ( is_numeric( $order ) ) { $this->set_id( $order ); } elseif ( $order instanceof WC_Order ) { $this->set_id( absint( $order->get_id() ) ); } elseif ( isset( $order->ID ) ) { $this->set_id( absint( $order->ID ) ); } $this->set_object_read( false ); $this->data_store->read( $this ); }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |