Changeset 1640116
- Timestamp:
- 04/18/2017 10:07:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
woo-vendors-bookings-dashboard/trunk/woo-wendors-bookings-dashboard.php
r1640099 r1640116 123 123 return; 124 124 } 125 $this->active_vendor = WC_Product_Vendors_Utils::get_logged_in_vendor();125 $this->active_vendor = $vendor->term_id; 126 126 $cols = array('Booking ID', 'Parent Order', 'Date', 'Start Time', 'End Time', '# of Guests', 'Price', 'User', 'Date Applied', 'Status', 'Actions'); 127 127 $tabs = array('bookings'); … … 137 137 138 138 $bookings = get_posts( apply_filters( 'wcpv_bookings_list_widget_args', $args ) ); 139 140 139 if ( ! empty( $bookings ) ) { 141 140 // filter out only bookings with products of the vendor 142 141 $bookings = array_filter( $bookings, array( $this, 'filter_booking_products' ) ); 143 142 } 144 145 143 set_transient( 'wcpv_reports_bookings_wg_' . $this->active_vendor, $bookings, DAY_IN_SECONDS ); 146 144 } … … 162 160 foreach ($actions as $action) { 163 161 $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') . "/"); 164 $action_strings[] = ($action == "cancel") ? "<a href='" . $_booking->get_cancel_url( ) . "'>Cancel</a>" : "<a href='" . $action_url . "'>" . ucfirst($action) . "</a>";162 $action_strings[] = ($action == "cancel") ? "<a href='" . $_booking->get_cancel_url("/vendors-dashboard/{$vendor->slug}/") . "'>Cancel</a>" : "<a href='" . $action_url . "'>" . ucfirst($action) . "</a>"; 165 163 } 166 164 $data[$booking->ID] = array(
Note: See TracChangeset
for help on using the changeset viewer.