| 1 |
<?php |
| 2 |
|
| 3 |
class Order_Status extends Tag_Base { |
| 4 |
/** |
| 5 |
* Get class id. |
| 6 |
* |
| 7 |
* @return string |
| 8 |
*/ |
| 9 |
public function get_id() { |
| 10 |
return '_order_status'; |
| 11 |
} |
| 12 |
|
| 13 |
/** |
| 14 |
* Get class title. |
| 15 |
* |
| 16 |
* @param array $atts array of shortcode arguments. |
| 17 |
* @return string |
| 18 |
*/ |
| 19 |
public function get_title() { |
| 20 |
return esc_html__( 'Order Status', 'sellkit' ); |
| 21 |
} |
| 22 |
|
| 23 |
/** |
| 24 |
* Render true content. |
| 25 |
* |
| 26 |
* @return string |
| 27 |
*/ |
| 28 |
public function render_content( $atts ) { |
| 29 |
$this->get_data(); |
| 30 |
|
| 31 |
if ( empty( self::$order ) ) { |
| 32 |
return $this->shortcode_content( $atts ); |
| 33 |
} |
| 34 |
|
| 35 |
$order_data = self::$order->get_data(); |
| 36 |
|
| 37 |
return $order_data['status']; |
| 38 |
} |
| 39 |
} |
| 40 |
|