Automattic\WooCommerce\Internal\DataStores\Orders
HposOrderCapabilityHelper::get_trashed_status
Get the previous status stored when an order is trashed.
Method of the class: HposOrderCapabilityHelper{}
No Hooks.
Returns
String. Previous post status.
Usage
// private - for code of main (parent) class only $result = $this->get_trashed_status( $order ): string;
- $order(WC_Abstract_Order) (required)
- Order object.
HposOrderCapabilityHelper::get_trashed_status() HposOrderCapabilityHelper::get trashed status code WC 11.0.0
private function get_trashed_status( WC_Abstract_Order $order ): string {
$status = $order->get_meta( '_wp_trash_meta_status', true, 'edit' );
return is_string( $status ) ? $status : '';
}