當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WCV_Vendors::get_vendor_sold_by方法代碼示例

本文整理匯總了PHP中WCV_Vendors::get_vendor_sold_by方法的典型用法代碼示例。如果您正苦於以下問題:PHP WCV_Vendors::get_vendor_sold_by方法的具體用法?PHP WCV_Vendors::get_vendor_sold_by怎麽用?PHP WCV_Vendors::get_vendor_sold_by使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WCV_Vendors的用法示例。


在下文中一共展示了WCV_Vendors::get_vendor_sold_by方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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 = 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 : ', 'wcvendors')), $sold_by);
 }
開發者ID:Kemitestech,項目名稱:WordPress-Skeleton,代碼行數:6,代碼來源:class-vendor-shop.php


注:本文中的WCV_Vendors::get_vendor_sold_by方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。