本文整理匯總了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/>';
}
示例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;
}
示例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);
}
示例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);
}