Plugin Directory

Changeset 1640116


Ignore:
Timestamp:
04/18/2017 10:07:25 PM (9 years ago)
Author:
Webby Scots
Message:

correcting code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • woo-vendors-bookings-dashboard/trunk/woo-wendors-bookings-dashboard.php

    r1640099 r1640116  
    123123            return;
    124124        }
    125         $this->active_vendor = WC_Product_Vendors_Utils::get_logged_in_vendor();
     125        $this->active_vendor = $vendor->term_id;
    126126        $cols = array('Booking ID', 'Parent Order', 'Date', 'Start Time', 'End Time', '# of Guests', 'Price', 'User', 'Date Applied', 'Status', 'Actions');
    127127        $tabs = array('bookings');
     
    137137
    138138            $bookings = get_posts( apply_filters( 'wcpv_bookings_list_widget_args', $args ) );
    139 
    140139            if ( ! empty( $bookings ) ) {
    141140                // filter out only bookings with products of the vendor
    142141                $bookings = array_filter( $bookings, array( $this, 'filter_booking_products' ) );
    143142            }
    144 
    145143            set_transient( 'wcpv_reports_bookings_wg_' . $this->active_vendor, $bookings, DAY_IN_SECONDS );
    146144        }
     
    162160            foreach ($actions as $action) {
    163161                $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>";
    165163            }
    166164            $data[$booking->ID] = array(
Note: See TracChangeset for help on using the changeset viewer.