2016-11-17 14:37:29 +00:00
|
|
|
<?php
|
2018-03-06 08:08:42 +00:00
|
|
|
/**
|
2018-03-06 08:13:06 +00:00
|
|
|
* Order Data Store Interface
|
2018-03-06 08:08:42 +00:00
|
|
|
*
|
|
|
|
* @version 3.0.0
|
2020-08-05 16:36:24 +00:00
|
|
|
* @package WooCommerce\Interfaces
|
2018-03-06 08:08:42 +00:00
|
|
|
*/
|
|
|
|
|
2016-11-17 14:37:29 +00:00
|
|
|
/**
|
|
|
|
* WC Order Data Store Interface
|
|
|
|
*
|
|
|
|
* Functions that must be defined by order store classes.
|
|
|
|
*
|
2017-03-15 16:36:53 +00:00
|
|
|
* @version 3.0.0
|
2016-11-17 14:37:29 +00:00
|
|
|
*/
|
2016-11-18 11:14:09 +00:00
|
|
|
interface WC_Abstract_Order_Data_Store_Interface {
|
2016-11-17 14:37:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Read order items of a specific type from the database for this order.
|
|
|
|
*
|
2018-03-06 08:08:42 +00:00
|
|
|
* @param WC_Order $order Order object.
|
|
|
|
* @param string $type Order item type.
|
2016-11-17 14:37:29 +00:00
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function read_items( $order, $type );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove all line items (products, coupons, shipping, taxes) from the order.
|
|
|
|
*
|
2018-03-06 08:08:42 +00:00
|
|
|
* @param WC_Order $order Order object.
|
|
|
|
* @param string $type Order item type. Default null.
|
2016-11-17 14:37:29 +00:00
|
|
|
*/
|
|
|
|
public function delete_items( $order, $type = null );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get token ids for an order.
|
|
|
|
*
|
2018-03-06 08:08:42 +00:00
|
|
|
* @param WC_Order $order Order object.
|
2016-11-17 14:37:29 +00:00
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function get_payment_token_ids( $order );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update token ids for an order.
|
|
|
|
*
|
2018-03-06 08:08:42 +00:00
|
|
|
* @param WC_Order $order Order object.
|
|
|
|
* @param array $token_ids Token IDs.
|
2016-11-17 14:37:29 +00:00
|
|
|
*/
|
|
|
|
public function update_payment_token_ids( $order, $token_ids );
|
|
|
|
}
|