automatewoo/includes/Variables/Order_Status.php
fei-source 47d3c9a8b6 Update to v6.2.2
Source: GrootMade/Festinger Vault
2026-03-15 08:31:15 +08:00

31 lines
589 B
PHP

<?php
namespace AutomateWoo;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* @class Variable_Order_Status
*/
class Variable_Order_Status extends Variable {
/**
* Load the admin details for this variable
*/
public function load_admin_details() {
$this->description = __( 'Displays the status of the order.', 'automatewoo' );
}
/**
* Get the Order Status Name
*
* @param \WC_Order $order The Order to get the status
*
* @return string The Order Status Name
*/
public function get_value( $order ) {
return wc_get_order_status_name( $order->get_status() );
}
}