Automattic\WooCommerce\Internal\DataStores\Orders
HposOrderCapabilityHelper::get_wp_status_for_order
Get the WordPress post status equivalent for an order.
Method of the class: HposOrderCapabilityHelper{}
No Hooks.
Returns
String. Post status.
Usage
// private - for code of main (parent) class only $result = $this->get_wp_status_for_order( $order ): string;
- $order(WC_Abstract_Order) (required)
- Order object.
HposOrderCapabilityHelper::get_wp_status_for_order() HposOrderCapabilityHelper::get wp status for order code WC 11.0.0
private function get_wp_status_for_order( WC_Abstract_Order $order ): string {
$status = $order->get_status( 'edit' );
return wc_is_order_status( 'wc-' . $status ) ? 'wc-' . $status : $status;
}