• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WCV_Vendors类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中WCV_Vendors的典型用法代码示例。如果您正苦于以下问题:PHP WCV_Vendors类的具体用法?PHP WCV_Vendors怎么用?PHP WCV_Vendors使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了WCV_Vendors类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: show_vendor_in_email

 /**
  *
  *
  * @param unknown $name
  * @param unknown $_product
  *
  * @return unknown
  */
 function show_vendor_in_email($name, $_product)
 {
     $product = get_post($_product->id);
     $sold_by = WCV_Vendors::is_vendor($product->post_author) ? sprintf('<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page($product->post_author), WCV_Vendors::get_vendor_sold_by($product->post_author)) : get_bloginfo('name');
     $name .= '<small class="wcvendors_sold_by_in_email"><br />' . apply_filters('wcvendors_sold_by_in_email', __('Sold by: ', 'wcvendors')) . $sold_by . '</small><br />';
     return $name;
 }
开发者ID:soydiegomen,项目名称:plazajilo,代码行数:15,代码来源:class-emails.php


示例2: manage_commissions_column_content

 function manage_commissions_column_content($column, $order_id)
 {
     if ('commissions' == $column) {
         $order = new WC_Order($order_id);
         $dues = WCV_Vendors::get_vendor_dues_from_order($order, false);
         foreach ($dues as $vendor_id => $details) {
             /*
             				$commission = 0;
             				$shipping = 0;
             				$tax = 0;*/
             $total = 0;
             foreach ($details as $value) {
                 /*
                 					$commission += $value['commission'];
                 					$shipping += $value['shipping'];
                 					$tax += $value['tax'];*/
                 $total += $value['total'];
             }
             echo sprintf("%01.2f&nbsp;€ ", $total);
             $vendor = get_user_by('id', $vendor_id);
             echo __('for', 'wcvendors') . ' <a href="/wp-admin/user-edit.php?user_id=' . $vendor_id . '">' . $vendor->display_name . '</a>';
             echo '<br />';
         }
     }
 }
开发者ID:simplementNat,项目名称:wcvendors,代码行数:25,代码来源:class-wc-vendors.php


示例3: __construct

 /**
  * Constructor
  */
 function __construct()
 {
     if (!is_admin()) {
         return;
     }
     add_action('edit_user_profile', array($this, 'show_extra_profile_fields'));
     add_action('edit_user_profile_update', array($this, 'save_extra_profile_fields'));
     add_filter('add_menu_classes', array($this, 'show_pending_number'));
     // Disabling non-vendor related items on the admin screens
     if (WCV_Vendors::is_vendor(get_current_user_id())) {
         add_filter('woocommerce_csv_product_role', array($this, 'csv_import_suite_compatibility'));
         add_filter('woocommerce_csv_product_export_args', array($this, 'csv_import_suite_compatibility_export'));
         // Admin page lockdown
         remove_action('admin_init', 'woocommerce_prevent_admin_access');
         add_action('admin_init', array($this, 'prevent_admin_access'));
         add_filter('woocommerce_prevent_admin_access', array($this, 'deny_admin_access'));
         // WC > Product page fixes
         add_action('load-post-new.php', array($this, 'confirm_access_to_add'));
         add_action('load-edit.php', array($this, 'edit_nonvendors'));
         add_filter('views_edit-product', array($this, 'hide_nonvendor_links'));
         // Filter user attachments so they only see their own attachements
         add_action('ajax_query_attachments_args', array($this, 'show_user_attachment_ajax'));
         add_filter('parse_query', array($this, 'show_user_attachment_page'));
         add_action('admin_menu', array($this, 'remove_menu_page'), 99);
         add_action('add_meta_boxes', array($this, 'remove_meta_boxes'), 99);
         add_filter('product_type_selector', array($this, 'filter_product_types'), 99, 2);
         add_filter('product_type_options', array($this, 'filter_product_type_options'), 99);
         add_filter('woocommerce_duplicate_product_capability', array($this, 'add_duplicate_capability'));
         // WC > Product featured
         $product_misc = (array) WC_Vendors::$pv_options->get_option('hide_product_misc');
         if (isset($product_misc['featured'])) {
             add_filter('manage_product_posts_columns', array($this, 'manage_product_columns'), 99);
         }
     }
 }
开发者ID:soydiegomen,项目名称:plazajilo,代码行数:38,代码来源:class-admin-users.php


示例4: sold_by_meta

 /**
  * Single product meta 
  */
 public static function sold_by_meta()
 {
     $vendor_id = get_the_author_meta('ID');
     $sold_by_label = WC_Vendors::$pv_options->get_option('sold_by_label');
     $sold_by = WCV_Vendors::is_vendor($vendor_id) ? sprintf('<a href="%s" class="wcvendors_cart_sold_by_meta">%s</a>', WCV_Vendors::get_vendor_shop_page($vendor_id), WCV_Vendors::get_vendor_sold_by($vendor_id)) : get_bloginfo('name');
     echo apply_filters('wcvendors_cart_sold_by_meta', $sold_by_label) . $sold_by . '<br/>';
 }
开发者ID:GoTeamScotch,项目名称:wcvendors,代码行数:10,代码来源:class-vendor-cart.php


示例5: filter_products_json

 /**
  *
  *
  * @param unknown $products
  *
  * @return unknown
  */
 public function filter_products_json($products)
 {
     $vendor_products = WCV_Vendors::get_vendor_products($this->vendor_id);
     $ids = array();
     foreach ($vendor_products as $vendor_product) {
         $ids[$vendor_product->ID] = $vendor_product->post_title;
     }
     return array_intersect_key($products, $ids);
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:16,代码来源:class-vendor-reports.php


示例6: filter_comment

 public function filter_comment($commentdata, $order)
 {
     $user_id = get_current_user_id();
     $commentdata['user_id'] = $user_id;
     $commentdata['comment_author'] = WCV_Vendors::get_vendor_shop_name($user_id);
     $commentdata['comment_author_url'] = WCV_Vendors::get_vendor_shop_page($user_id);
     $commentdata['comment_author_email'] = wp_get_current_user()->user_email;
     return $commentdata;
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:9,代码来源:class-submit-comment.php


示例7: settings_page

 function settings_page()
 {
     $user_id = get_current_user_id();
     $paypal_address = true;
     $shop_description = true;
     $description = get_user_meta($user_id, 'pv_shop_description', true);
     $seller_info = get_user_meta($user_id, 'pv_seller_info', true);
     $has_html = get_user_meta($user_id, 'pv_shop_html_enabled', true);
     $shop_page = WCV_Vendors::get_vendor_shop_page(wp_get_current_user()->user_login);
     $global_html = WC_Vendors::$pv_options->get_option('shop_html_enabled');
     include 'views/html-vendor-settings-page.php';
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:12,代码来源:class-vendor-admin-dashboard.php


示例8: trigger

 /**
  * trigger function.
  *
  * @access public
  * @return void
  *
  * @param unknown $order_id
  */
 function trigger($post_id, $post)
 {
     if (!WCV_Vendors::is_vendor($post->post_author)) {
         return;
     }
     $this->find[] = '{product_name}';
     $this->product_name = $post->post_title;
     $this->replace[] = $this->product_name;
     $this->find[] = '{vendor_name}';
     $this->vendor_name = WCV_Vendors::get_vendor_shop_name($post->post_author);
     $this->replace[] = $this->vendor_name;
     $this->post_id = $post->ID;
     $this->send($this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments());
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:22,代码来源:class-wc-notify-admin.php


示例9: check_items

 /**
  *
  *
  * @param unknown $items
  * @param unknown $order
  *
  * @return unknown
  */
 public function check_items($items, $order)
 {
     foreach ($items as $key => $product) {
         if (empty($product['product_id'])) {
             unset($items[$key]);
             continue;
         }
         $author = WCV_Vendors::get_vendor_from_product($product['product_id']);
         if ($this->current_vendor != $author) {
             unset($items[$key]);
             continue;
         }
     }
     return $items;
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:23,代码来源:class-wc-notify-shipped.php


示例10: display_product_orders

 /**
  * Use views to display the Orders page
  *
  * @return html
  */
 public function display_product_orders()
 {
     if (!WCV_Vendors::is_vendor(get_current_user_id())) {
         ob_start();
         wc_get_template('denied.php', array(), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/');
         return ob_get_clean();
     }
     if (empty($_GET['orders_for_product'])) {
         return __('You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', 'wcvendors');
     }
     if (!$this->orders) {
         return __('No orders.', 'wcvendors');
     }
     if (!empty($_POST['submit_comment'])) {
         require_once wcv_plugin_dir . 'classes/front/orders/class-submit-comment.php';
         WCV_Submit_Comment::new_comment($this->orders);
     }
     if (isset($_POST['mark_shipped'])) {
         $order_id = (int) $_POST['order_id'];
         $product_id = (int) $_POST['product_id'];
         exit;
     }
     $headers = WCV_Orders::get_headers();
     $all = WCV_Orders::format_order_details($this->orders, $this->product_id);
     wp_enqueue_style('pv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css');
     wp_enqueue_script('pv_frontend_script', wcv_assets_url . 'js/front-orders.js');
     $providers = array();
     $provider_array = array();
     // WC Shipment Tracking Providers
     if (class_exists('WC_Shipment_Tracking')) {
         $WC_Shipment_Tracking = new WC_Shipment_Tracking();
         $providers = method_exists($WC_Shipment_Tracking, 'get_providers') ? $WC_Shipment_Tracking->get_providers() : $WC_Shipment_Tracking->providers;
         $provider_array = array();
         foreach ($providers as $all_providers) {
             foreach ($all_providers as $provider => $format) {
                 $provider_array[sanitize_title($provider)] = urlencode($format);
             }
         }
     }
     ob_start();
     // Show the Export CSV button
     if ($this->can_export_csv) {
         wc_get_template('csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/');
     }
     wc_get_template('orders.php', array('headers' => $headers, 'body' => $all['body'], 'items' => $all['items'], 'product_id' => $all['product_id'], 'providers' => $providers, 'provider_array' => $provider_array), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/');
     return ob_get_clean();
 }
开发者ID:sawanmeister,项目名称:wcvendors,代码行数:52,代码来源:class-orders.php


示例11: trigger

 /**
  * trigger function.
  *
  * @access public
  * @return void
  *
  * @param unknown $order_id
  */
 function trigger($new_status, $old_status, $post)
 {
     // Ensure this is only firing on products
     if (!in_array($post->post_type, array('product', 'product_variation'))) {
         return;
     }
     // Ensure that the post author is a vendor
     if (!WCV_Vendors::is_vendor($post->post_author)) {
         return;
     }
     if (!$this->is_enabled()) {
         return;
     }
     $this->find[] = '{product_name}';
     $this->product_name = $post->post_title;
     $this->replace[] = $this->product_name;
     $this->find[] = '{vendor_name}';
     $this->vendor_name = WCV_Vendors::get_vendor_shop_name($post->post_author);
     $this->replace[] = $this->vendor_name;
     $this->post_id = $post->ID;
     $this->send($this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments());
 }
开发者ID:soydiegomen,项目名称:plazajilo,代码行数:30,代码来源:class-wc-notify-admin.php


示例12: wpautop

</h2>
    <?php 
}
?>

	<div class="wcv_shop_description">
		<?php 
echo wpautop($shop_description);
?>
	</div>

	<?php 
if (of_get_option('tokopress_wcvendors_shop_profile') != 'no') {
    ?>
        <?php 
    $author = WCV_Vendors::get_vendor_from_product(get_the_ID());
    $user = get_userdata($author);
    ?>
        <p class="user-social">
        <?php 
    if ($user->facebook_url) {
        ?>
            <span class="user-facebook"><a rel="nofollow" href="<?php 
        echo esc_url($user->facebook_url);
        ?>
"><i class="fa fa-facebook"></i></a></span>
        <?php 
    }
    ?>

        <?php 
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:31,代码来源:vendor-main-header.php


示例13: display_product_orders

 /**
  * Use views to display the Orders page
  *
  * @return html
  */
 public function display_product_orders()
 {
     if (!WCV_Vendors::is_vendor(get_current_user_id())) {
         ob_start();
         wc_get_template('denied.php', array(), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/');
         return ob_get_clean();
     }
     if (empty($_GET['orders_for_product'])) {
         return __('You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', 'wcvendors');
     }
     if (!$this->orders) {
         return __('No orders.', 'wcvendors');
     }
     if (!empty($_POST['submit_comment'])) {
         require_once wcv_plugin_dir . 'classes/front/orders/class-submit-comment.php';
         WCV_Submit_Comment::new_comment($this->orders);
     }
     if (isset($_POST['mark_shipped'])) {
         $order_id = (int) $_POST['order_id'];
         $product_id = (int) $_POST['product_id'];
         exit;
     }
     if (isset($_POST['update_tracking'])) {
         $order_id = (int) $_POST['order_id'];
         $product_id = (int) $_POST['product_id'];
         $tracking_provider = woocommerce_clean($_POST['tracking_provider']);
         $custom_tracking_provider = woocommerce_clean($_POST['custom_tracking_provider']);
         $custom_tracking_link = woocommerce_clean($_POST['custom_tracking_link']);
         $tracking_number = woocommerce_clean($_POST['tracking_number']);
         $date_shipped = woocommerce_clean(strtotime($_POST['date_shipped']));
         $order = new WC_Order($order_id);
         $products = $order->get_items();
         foreach ($products as $key => $value) {
             if ($value['product_id'] == $product_id || $value['variation_id'] == $product_id) {
                 $order_item_id = $key;
                 break;
             }
         }
         if ($order_item_id) {
             woocommerce_delete_order_item_meta($order_item_id, __('Tracking number', 'wcvendors'));
             woocommerce_add_order_item_meta($order_item_id, __('Tracking number', 'wcvendors'), $tracking_number);
             $message = __('Success. Your tracking number has been updated.', 'wcvendors');
             wc_add_notice($message, 'success');
             // Update order data
             update_post_meta($order_id, '_tracking_provider', $tracking_provider);
             update_post_meta($order_id, '_custom_tracking_provider', $custom_tracking_provider);
             update_post_meta($order_id, '_tracking_number', $tracking_number);
             update_post_meta($order_id, '_custom_tracking_link', $custom_tracking_link);
             update_post_meta($order_id, '_date_shipped', $date_shipped);
         }
     }
     $headers = WCV_Orders::get_headers();
     $all = WCV_Orders::format_order_details($this->orders, $this->product_id);
     wp_enqueue_style('pv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css');
     wp_enqueue_script('pv_frontend_script', wcv_assets_url . 'js/front-orders.js');
     // WC Shipment Tracking Providers
     global $WC_Shipment_Tracking;
     $providers = !empty($WC_Shipment_Tracking->providers) ? $WC_Shipment_Tracking->providers : false;
     $provider_array = array();
     if ($providers) {
         foreach ($providers as $providerss) {
             foreach ($providerss as $provider => $format) {
                 $provider_array[sanitize_title($provider)] = urlencode($format);
             }
         }
     }
     // End
     ob_start();
     // Show the Export CSV button
     if ($this->can_export_csv) {
         wc_get_template('csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/');
     }
     wc_get_template('orders.php', array('headers' => $headers, 'body' => $all['body'], 'items' => $all['items'], 'product_id' => $all['product_id'], 'providers' => $providers, 'provider_array' => $provider_array), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/');
     return ob_get_clean();
 }
开发者ID:soydiegomen,项目名称:plazajilo,代码行数:80,代码来源:class-orders.php


示例14: of_get_option

    $vendor_profile = of_get_option('tokopress_wcvendors_product_profile') != 'no' ? true : false;
}
$vendor = get_userdata($vendor_id);
if (!$vendor) {
    return;
}
$vendor_display_name = WC_Vendors::$pv_options->get_option('vendor_display_name');
switch ($vendor_display_name) {
    case 'display_name':
        $vendor_name = $vendor->display_name;
        break;
    case 'user_login':
        $vendor_name = $vendor->user_login;
        break;
    default:
        $vendor_name = WCV_Vendors::get_vendor_shop_name($vendor_id);
        break;
}
$vendor_description = do_shortcode(get_user_meta($vendor_id, 'pv_shop_description', true));
$has_html = get_user_meta($vendor_id, 'pv_shop_html_enabled', true);
$global_html = WC_Vendors::$pv_options->get_option('shop_html_enabled');
$store_banner = get_user_meta($vendor_id, 'tppv_shop_banner', true);
$store_info = '';
if ($vendor_name) {
    $store_info .= '<li class="store-name">' . esc_html($vendor_name) . '</li>';
}
if (trim($vendor_description)) {
    $store_info .= '<li class="store-description">' . ($global_html || $has_html) ? wpautop(wptexturize(wp_kses_post($vendor_description))) : sanitize_text_field($vendor_description) . '</li>';
}
$store_contact = '';
if ($vendor_profile) {
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:31,代码来源:store-header.php


示例15: can_view_vendor_page

 /**
  *
  *
  * @return unknown
  */
 public static function can_view_vendor_page()
 {
     if (!is_user_logged_in()) {
         return false;
     } else {
         if (!WCV_Vendors::is_vendor(get_current_user_id())) {
             wc_get_template('denied.php', array(), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/');
             return false;
         }
     }
     return true;
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:17,代码来源:class-vendor-dashboard.php


示例16: add_vendor_to_order_item_meta

 public static function add_vendor_to_order_item_meta($item_id, $cart_item)
 {
     $vendor_id = $cart_item['data']->post->post_author;
     $sold_by_label = WC_Vendors::$pv_options->get_option('sold_by_label');
     $sold_by = WCV_Vendors::is_vendor($vendor_id) ? sprintf(WCV_Vendors::get_vendor_sold_by($vendor_id)) : get_bloginfo('name');
     wc_add_order_item_meta($item_id, apply_filters('wcvendors_sold_by_in_email', $sold_by_label), $sold_by);
 }
开发者ID:simplementNat,项目名称:wcvendors,代码行数:7,代码来源:class-vendor-shop.php


示例17: tokopress_wcvendors_user_vendorshop

function tokopress_wcvendors_user_vendorshop()
{
    $user = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
    if (WCV_Vendors::is_vendor($user->ID)) {
        $shop_name = WCV_Vendors::get_vendor_shop_name($user->ID);
        $shop_page = WCV_Vendors::get_vendor_shop_page($user->user_login);
        if ($shop_name && $shop_page) {
            echo '<div class="user-vendorshop">';
            echo '<p>' . sprintf(__('%s is a seller on &quot;%s&quot; shop.', 'tokopress'), '<strong>' . $user->display_name . '</strong>', $shop_name) . '</p>';
            echo '<a href="' . $shop_page . '" class="button alt">' . sprintf(__('Visit &quot;%s&quot;', 'tokopress'), $shop_name) . '</a>';
            echo '</div>';
        }
    }
}
开发者ID:rtmzzi,项目名称:yummMacVersao,代码行数:14,代码来源:wcvendors-settings.php


示例18: show_pending_number

 /**
  *
  *
  * @param unknown $menu
  *
  * @return unknown
  */
 public function show_pending_number($menu)
 {
     $args = array('post_type' => 'product', 'author' => get_current_user_id(), 'post_status' => 'pending');
     if (!WCV_Vendors::is_vendor(get_current_user_id())) {
         unset($args['author']);
     }
     $pending_posts = get_posts($args);
     $pending_count = is_array($pending_posts) ? count($pending_posts) : 0;
     $menu_str = 'edit.php?post_type=product';
     foreach ($menu as $menu_key => $menu_data) {
         if ($menu_str != $menu_data[2]) {
             continue;
         }
         if ($pending_count > 0) {
             $menu[$menu_key][0] .= " <span class='update-plugins counting-{$pending_count}'><span class='plugin-count'>" . number_format_i18n($pending_count) . '</span></span>';
         }
     }
     return $menu;
 }
开发者ID:sawanmeister,项目名称:wcvendors,代码行数:26,代码来源:class-admin-users.php


示例19: set_vendor_items

 /**
  *
  *
  * @param unknown $order
  * @param unknown $author_email
  * @param unknown $setPaymentOptionsRequest
  * @param unknown $is_admin (optional)
  *
  * @return unknown
  */
 public function set_vendor_items($order, $setPaymentOptionsRequest)
 {
     $receivers = WCV_Vendors::get_vendor_dues_from_order($order, false);
     $receivers_two = WCV_Vendors::get_vendor_dues_from_order($order);
     foreach ($receivers as $products) {
         $invoice_items = array();
         $shipping_given = $tax_given = 0;
         foreach ($products as $key => $product) {
             $product_id = $product['product_id'];
             $shipping_given += $product['shipping'];
             $tax_given += $product['tax'];
             $product['commission'] = round($product['commission'], 2);
             if (!empty($product['commission'])) {
                 $item = new InvoiceItem();
                 $item->name = get_the_title($product_id);
                 $item->identifier = $product_id;
                 $item->price = $product['commission'];
                 $item->itemPrice = round($product['commission'] / $product['qty'], 2);
                 $item->itemCount = $product['qty'];
                 $invoice_items[] = $item;
             }
         }
         if (empty($invoice_items)) {
             continue;
         }
         $receiverOptions = new ReceiverOptions();
         $setPaymentOptionsRequest->receiverOptions[] = $receiverOptions;
         // Set the current vendor
         $receiverId = new ReceiverIdentifier();
         $receiverId->email = $product['vendor_id'] == 1 ? $this->main_paypal : WCV_Vendors::get_vendor_paypal($product['vendor_id']);
         $receiverOptions->receiver = $receiverId;
         $receiverOptions->invoiceData = new InvoiceData();
         $receiverOptions->invoiceData->item = $invoice_items;
         $receiverOptions->invoiceData->totalTax = number_format($receivers_two[$product['vendor_id']]['tax'], 2);
         $receiverOptions->invoiceData->totalShipping = number_format($receivers_two[$product['vendor_id']]['shipping'], 2);
     }
     return $setPaymentOptionsRequest;
 }
开发者ID:stodorovic,项目名称:wcvendors,代码行数:48,代码来源:paypal_ap.php


示例20: sales


//.........这里部分代码省略.........
							<div class="woocommerce_order_items_wrapper">
								<table id="commission-table" class="woocommerce_order_items" cellspacing="0">
									<thead>
									<tr>
										<th><?php 
            _e('Order', 'wcvendors');
            ?>
</th>
										<th><?php 
            _e('Product', 'wcvendors');
            ?>
</th>
										<th><?php 
            _e('Vendor', 'wcvendors');
            ?>
</th>
										<th><?php 
            _e('Total', 'wcvendors');
            ?>
</th>
										<th><?php 
            _e('Date &amp; Time', 'wcvendors');
            ?>
</th>
										<th><?php 
            _e('Status', 'wcvendors');
            ?>
</th>
									</tr>
									</thead>
									<tbody>
									<?php 
            $i = 1;
            foreach ($commission as $row) {
                $i++;
                ?>
										<tr<?php 
                if ($i % 2 == 1) {
                    echo ' class="alternate"';
                }
                ?>
>
											<td><?php 
                if ($row->order_id) {
                    ?>
<a
													href="<?php 
                    echo admin_url('post.php?post=' . $row->order_id . '&action=edit');
                    ?>
"><?php 
                    echo $row->order_id;
                    ?>
</a><?php 
                } else {
                    _e('N/A', 'wcvendors');
                }
                ?>
											</td>
											<td><?php 
                echo get_the_title($row->product_id);
                ?>
</td>
											<td><?php 
                echo WCV_Vendors::get_vendor_shop_name($row->vendor_id);
                ?>
</td>
											<td><?php 
                echo woocommerce_price($row->total_due + $row->total_shipping + $row->tax);
                ?>
</td>
											<td><?php 
                echo date(__('D j M Y \\a\\t h:ia', 'wcvendors'), strtotime($row->time));
                ?>
</td>
											<td><?php 
                echo $row->status;
                ?>
</td>
										</tr>
									<?php 
            }
            ?>
									</tbody>
								</table>
							</div>
						<?php 
        } else {
            ?>
<p><?php 
            _e('No commission yet', 'wcvendors');
            ?>
</p><?php 
        }
        ?>
					</div>
				</div>
			</div>
		</div>
	<?php 
    }
开发者ID:oleggen,项目名称:wcvendors,代码行数:101,代码来源:class-admin-reports.php



注:本文中的WCV_Vendors类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WC_AJAX类代码示例发布时间:2022-05-23
下一篇:
PHP WCJ_Module类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap