本文整理汇总了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);
}