Changeset 1640694
- Timestamp:
- 04/19/2017 02:51:38 PM (9 years ago)
- Location:
- woo-vendors-bookings-dashboard/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
woo-wendors-bookings-dashboard.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-vendors-bookings-dashboard/trunk/readme.txt
r1640105 r1640694 38 38 39 39 = 2.1.0 = 40 * Fix missing entries in the dashboard 40 * Fix missing entries in the dashboard - works with more setups 41 42 = 2.2.0 = 43 * Filters out in-cart statuses from results -
woo-vendors-bookings-dashboard/trunk/woo-wendors-bookings-dashboard.php
r1640116 r1640694 3 3 * Plugin Name: Woo Vendors Bookings Management 4 4 * Description: Allows vendors to manage their bookings in the frontend 5 * Version: 2. 1.05 * Version: 2.2.0 6 6 * Author: Liam Bailey 7 7 * Author URI: http://webbyscots.com/ … … 141 141 $bookings = array_filter( $bookings, array( $this, 'filter_booking_products' ) ); 142 142 } 143 143 144 set_transient( 'wcpv_reports_bookings_wg_' . $this->active_vendor, $bookings, DAY_IN_SECONDS ); 144 145 } … … 160 161 foreach ($actions as $action) { 161 162 $action_url = add_query_arg(array('wvbd_action' => $action, 'booking_id' => $booking->ID, 'security' => wp_create_nonce('vendor-booking-confirm-noncerator')), site_url() . "/vendors-dashboard/" . get_query_var('vendors-dashboard') . "/"); 162 $action_strings[] = ($action == "cancel") ? "<a href='" . $_booking->get_cancel_url("/vendors-dashboard/{$vendor->slug} /") . "'>Cancel</a>" : "<a href='" . $action_url . "'>" . ucfirst($action) . "</a>";163 $action_strings[] = ($action == "cancel") ? "<a href='" . $_booking->get_cancel_url("/vendors-dashboard/{$vendor->slug}") . "'>Cancel</a>" : "<a href='" . $action_url . "'>" . ucfirst($action) . "</a>"; 163 164 } 164 165 $data[$booking->ID] = array( … … 177 178 } 178 179 wc_print_notices(); 179 ?><div class="woocommerce-tabs"> 180 <ul class="tabs"> 181 <?php 180 ?><div class="woocommerce-tabs"><?php 181 if (count($tabs) > 1) { 182 ?><ul class="tabs"><?php 183 foreach ($tabs as $key => $tab) { 184 $class = ($key == 0) ? "active" : ""; 185 ?><li class="dashboard_tab <?php echo $class; ?>"> 186 <a href="#tab-<?php echo $tab; ?>"><?php echo ucwords($tab); ?></a> 187 </li><?php 188 } ?> 189 </ul><?php 190 } 182 191 foreach ($tabs as $key => $tab) { 183 $class = ($key == 0) ? "active" : "";184 ?><li class="dashboard_tab <?php echo $class; ?>">185 <a href="#tab-<?php echo $tab; ?>"><?php echo ucwords($tab); ?></a>186 </li>187 <?php } ?>188 </ul>189 <?php foreach ($tabs as $key => $tab) {190 192 ?><div class="panel entry-content" id="tab-<?php echo $tab; ?>" style="display: block;"> 191 193 <table class="<?php echo $tab; ?>-table"> … … 225 227 $booking_item = get_wc_booking( $item->ID ); 226 228 227 if ( is_object( $booking_item ) && is_object( $booking_item->get_product() ) && $booking_item->get_product()->id && in_array( $booking_item->get_product()->id, $product_ids ) ) {229 if ( is_object( $booking_item ) && !strstr($booking_item->status, "in-cart") && is_object( $booking_item->get_product() ) && $booking_item->get_product()->id && in_array( $booking_item->get_product()->id, $product_ids ) ) { 228 230 return $item; 229 231 }
Note: See TracChangeset
for help on using the changeset viewer.