/** * Setup the order normally and add invoice-specific class members * * @since 3.0 * @param string|int $order_id * @return \WC_FreshBooks_Order */ public function __construct($order_id) { parent::__construct($order_id); // easy access to invoice data $this->invoice = new stdClass(); foreach ((array) $this->wc_freshbooks_invoice as $key => $value) { $this->invoice->{$key} = $value; } }
public function __construct($id = '') { parent::__construct($id); }
public function __construct($id = '') { // _deprecated_function( 'woocommerce_order', '1.4', 'WC_Order()' ); Depreciated, but leaving uncommented until all gateways are updated parent::__construct($id); }
/** * Initialize the subscription object. * * @param int|WC_Subscription $order */ public function __construct($subscription) { parent::__construct($subscription); $this->order_type = 'shop_subscription'; $this->schedule = new stdClass(); }
/** * Get the order if ID is passed, otherwise the order is new and empty. * * @see WC_Order::__construct() */ public function __construct($id = '') { add_filter('woocommerce_load_order_data', array($this, 'woocommerce_load_order_data')); parent::__construct($id); }