public function test_get_the_order_total() { $total = get_the_order_total(self::$order->get_id()); $this->assertEquals($total, appthemes_get_price(self::$order->get_total(), self::$order->get_currency())); $this->expectOutputString($total); the_order_total(self::$order->get_id()); }
/** * Displays the current order total in a human readable format * Uses appthemes_get_price() for formatting * @return void */ function the_order_total($order_id) { echo get_the_order_total($order_id); }
protected function row($item) { if (get_post_type($item) != APPTHEMES_ORDER_PTYPE) { return; } $title_link = '<a href="' . get_edit_post_link($item->ID) . '">' . get_the_order_id($item->ID) . '</a>'; $cells = $this->cells(array($title_link, get_the_order_total($item->ID), get_the_order_status($item->ID), $item->post_date)); return html('tr', array(), $cells); }