Skip to content

Commit

Permalink
Merge branch 'release/G22.nodosaurus' into fix/ET-1531-selectwoo-miss…
Browse files Browse the repository at this point in the history
…ing-when-tec-is-deactivated
  • Loading branch information
codingmusician committed Jun 20, 2022
2 parents 2f970f7 + 6991633 commit 310beb5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 5 deletions.
2 changes: 2 additions & 0 deletions readme.txt
Expand Up @@ -191,8 +191,10 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
= [5.4.2] TBD =

* Fix - Remove duplicate `Total Event Capacity` wording when ET+ is activated. [ET-1535]
* Enhancement - Sorting support added on Tickets Commerce Order report page Order, Email, Date, Status, and Total columns. [ET-1527]
* Enhancement - Unify CSS class names for many admin elements. [ET-1536]
* Fix - When using ET as a standalone plugin, the SelectWoo asset was not being properly loaded. [ET-1531]
* Fix - Some CSS issues within the tickets block in the block editor. [ET-1530]

= [5.4.1] 2022-06-08 =

Expand Down
28 changes: 27 additions & 1 deletion src/Tickets/Commerce/Admin_Tables/Orders.php
Expand Up @@ -140,6 +140,9 @@ public function prepare_items() {

$search = tribe_get_request_var( 's' );
$page = absint( tribe_get_request_var( 'paged', 0 ) );
$orderby = tribe_get_request_var( 'orderby' );
$order = tribe_get_request_var( 'order' );

$arguments = [
'status' => 'any',
'paged' => $page,
Expand All @@ -161,7 +164,13 @@ public function prepare_items() {

$total_items = $orders_repository->found();

$this->items = $orders_repository->all();
$items = $orders_repository->all();

if ( $orderby && $order ) {
$items = wp_list_sort( $items, $orderby, $order );
}

$this->items = $items;

$this->set_pagination_args( [
'total_items' => $total_items,
Expand Down Expand Up @@ -334,4 +343,21 @@ public function column_gateway( $item ) {
}
return $gateway::get_label();
}

/**
* List of sortable columns.
*
* @since TBD
*
* @return array
*/
public function get_sortable_columns() {
return [
'order' => 'order_id',
'email' => 'purchaser_email',
'date' => 'purchase_time',
'status' => 'status',
'total' => 'total'
];
}
}
2 changes: 2 additions & 0 deletions src/Tickets/Commerce/Models/Order_Model.php
Expand Up @@ -63,10 +63,12 @@ protected function build_properties( $filter ) {
'provider_slug' => Commerce::ABBR,
'status_log' => $status_log,
'status_obj' => $status,
'status' => $status->get_name(),
'gateway' => $gateway_slug,
'gateway_order_id' => $gateway_order_id,
'gateway_payload' => $gateway_payload,
'total_value' => Commerce\Utils\Value::create( $total_value ),
'total' => $total_value,
'currency' => $currency,
'purchaser' => [
'user_id' => (int) $purchaser_user_id,
Expand Down
Expand Up @@ -11,7 +11,7 @@
text-align: center;

.tribe-editor__ticket--selected & {
margin-right: 118px;
margin: 30px 143px 30px 0;
}

.tribe-editor__ticket--disabled & {
Expand Down
1 change: 1 addition & 0 deletions src/modules/blocks/ticket/container-header/style.pcss
Expand Up @@ -8,4 +8,5 @@

.tribe-editor__ticket__container-header-details {
flex: auto;
margin: 30px 0 30px 25px;
}
8 changes: 5 additions & 3 deletions src/modules/elements/container-panel/style.pcss
Expand Up @@ -21,8 +21,11 @@

.tribe-editor__container-panel--ticket & {
width: 100px;
padding: 25px 4px;
background-color: #F8F9F9;

svg {
margin: 25px 4px;
}
}
}

Expand All @@ -41,7 +44,6 @@
.tribe-editor__container-panel--ticket & {
flex: none;
width: calc(100% - 100px);
padding: 30px 25px;
}
}

Expand All @@ -54,7 +56,7 @@

.tribe-editor__container-panel--ticket & {
flex: none;
width: 100%;
width: calc(100% - 40px);
background-color: #F8F9F9;
padding: 30px 20px 25px;
border-top: 1px dashed #B5BCC2;
Expand Down

0 comments on commit 310beb5

Please sign in to comment.