WC_Abstract_Legacy_Order::get_order()
Deprecated since 3.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Gets an order from the database.
Method of the class: WC_Abstract_Legacy_Order{}
No Hooks.
Returns
true|false
.
Usage
$WC_Abstract_Legacy_Order = new WC_Abstract_Legacy_Order(); $WC_Abstract_Legacy_Order->get_order( $id );
- $id(int)
- -
Default: 0)
Changelog
Deprecated since | 3.0 |
WC_Abstract_Legacy_Order::get_order() WC Abstract Legacy Order::get order code WC 9.8.5
public function get_order( $id = 0 ) { wc_deprecated_function( 'WC_Order::get_order', '3.0' ); if ( ! $id ) { return false; } $result = get_post( $id ); if ( $result ) { $this->populate( $result ); return true; } return false; }