当前位置: 首页>>代码示例>>PHP>>正文


PHP WCV_Vendors::get_vendor_shop_name方法代码示例

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


在下文中一共展示了WCV_Vendors::get_vendor_shop_name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_shop_name($product->post_author)) : get_bloginfo('name');
     $name .= '<small><br />' . apply_filters('wcvendors_sold_by_in_email', __('Sold by: ', 'wcvendors')) . $sold_by . '</small><br />';
     return $name;
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:15,代码来源:class-emails.php

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

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

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

示例5: get_vendor_sold_by

 public static function get_vendor_sold_by($vendor_id)
 {
     $vendor_display_name = WC_Vendors::$pv_options->get_option('vendor_display_name');
     $vendor = get_userdata($vendor_id);
     switch ($vendor_display_name) {
         case 'display_name':
             $display_name = $vendor->display_name;
             break;
         case 'user_login':
             $display_name = $vendor->user_login;
             break;
         case 'user_email':
             $display_name = $vendor->user_email;
             break;
         default:
             $display_name = WCV_Vendors::get_vendor_shop_name($vendor_id);
             break;
     }
     return $display_name;
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:20,代码来源:class-vendors.php

示例6: save_vendor_settings

 public function save_vendor_settings()
 {
     global $woocommerce;
     $user_id = get_current_user_id();
     if (!empty($_GET['wc_pv_mark_shipped'])) {
         $shop_name = WCV_Vendors::get_vendor_shop_name($user_id);
         $order_id = $_GET['wc_pv_mark_shipped'];
         $shippers = (array) get_post_meta($order_id, 'wc_pv_shipped', true);
         $order = new WC_Order($order_id);
         // If not in the shippers array mark as shipped otherwise do nothing.
         if (!in_array($user_id, $shippers)) {
             $shippers[] = $user_id;
             $mails = $woocommerce->mailer()->get_emails();
             if (!empty($mails)) {
                 $mails['WC_Email_Notify_Shipped']->trigger($order_id, $user_id);
             }
             do_action('wcvendors_vendor_ship', $order_id, $user_id);
             wc_add_notice(__('Order marked shipped.', 'wcvendors'), 'success');
             $order->add_order_note(apply_filters('wcvendors_vendor_shipped_note', __($shop_name . ' has marked as shipped. ', 'wcvendors')), $user_id);
         } elseif (false != ($key = array_search($user_id, $shippers))) {
             unset($shippers[$key]);
             // Remove user from the shippers array
         }
         update_post_meta($order_id, 'wc_pv_shipped', $shippers);
         return;
     }
     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_name']);
         $custom_tracking_link = woocommerce_clean($_POST['custom_tracking_url']);
         $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);
         }
     }
     if (empty($_POST['vendor_application_submit'])) {
         return false;
     }
     if (isset($_POST['wc-product-vendor-nonce'])) {
         if (!wp_verify_nonce($_POST['wc-product-vendor-nonce'], 'save-shop-settings')) {
             return false;
         }
         if (isset($_POST['pv_paypal'])) {
             if (!is_email($_POST['pv_paypal'])) {
                 wc_add_notice(__('Your PayPal address is not a valid email address.', 'wcvendors'), 'error');
             } else {
                 update_user_meta($user_id, 'pv_paypal', $_POST['pv_paypal']);
             }
         }
         if (!empty($_POST['pv_shop_name'])) {
             $users = get_users(array('meta_key' => 'pv_shop_slug', 'meta_value' => sanitize_title($_POST['pv_shop_name'])));
             if (!empty($users) && $users[0]->ID != $user_id) {
                 wc_add_notice(__('That shop name is already taken. Your shop name must be unique.', 'wcvendors'), 'error');
             } else {
                 update_user_meta($user_id, 'pv_shop_name', $_POST['pv_shop_name']);
                 update_user_meta($user_id, 'pv_shop_slug', sanitize_title($_POST['pv_shop_name']));
             }
         }
         if (isset($_POST['pv_shop_description'])) {
             update_user_meta($user_id, 'pv_shop_description', $_POST['pv_shop_description']);
         }
         if (isset($_POST['pv_seller_info'])) {
             update_user_meta($user_id, 'pv_seller_info', $_POST['pv_seller_info']);
         }
         do_action('wcvendors_shop_settings_saved', $user_id);
         if (!wc_notice_count()) {
             wc_add_notice(__('Settings saved.', 'wcvendors'), 'success');
         }
     }
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:90,代码来源:class-vendor-dashboard.php

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

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

示例9: page_title

 public static function page_title($page_title = "")
 {
     $vendor_shop = urldecode(get_query_var('vendor_shop'));
     $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
     return $vendor_id ? WCV_Vendors::get_vendor_shop_name($vendor_id) : $page_title;
 }
开发者ID:simplementNat,项目名称:wcvendors,代码行数:6,代码来源:class-vendor-shop.php

示例10: column_default

 /**
  * column_default function.
  *
  * @access public
  *
  * @param unknown $item
  * @param mixed   $column_name
  *
  * @return unknown
  */
 function column_default($item, $column_name)
 {
     global $wpdb;
     switch ($column_name) {
         case 'id':
             return $item->id;
         case 'vendor_id':
             $user = get_userdata($item->vendor_id);
             return '<a href="' . admin_url('user-edit.php?user_id=' . $item->vendor_id) . '">' . WCV_Vendors::get_vendor_shop_name($item->vendor_id) . '</a>';
         case 'total_due':
             return woocommerce_price($item->total_due + $item->total_shipping + $item->tax);
         case 'product_id':
             $parent = get_post_ancestors($item->product_id);
             $product_id = $parent ? $parent[0] : $item->product_id;
             return '<a href="' . admin_url('post.php?post=' . $product_id . '&action=edit') . '">' . get_the_title($item->product_id) . '</a>';
         case 'order_id':
             return '<a href="' . admin_url('post.php?post=' . $item->order_id . '&action=edit') . '">' . $item->order_id . '</a>';
         case 'status':
             return $item->status;
         case 'time':
             return date_i18n(get_option('date_format'), strtotime($item->time));
     }
 }
开发者ID:soydiegomen,项目名称:plazajilo,代码行数:33,代码来源:class-admin-page.php

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

示例12: template_loop_sold_by

 public function template_loop_sold_by($product_id)
 {
     $author = WCV_Vendors::get_vendor_from_product($product_id);
     $sold_by = WCV_Vendors::is_vendor($author) ? sprintf('<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page($author), WCV_Vendors::get_vendor_shop_name($author)) : get_bloginfo('name');
     echo '<small>' . apply_filters('wcvendors_sold_by_in_loop', __('Sold by: ', 'wcvendors')) . $sold_by . '</small> <br />';
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:6,代码来源:class-vendor-shop.php

示例13: mango_wc_vendors_sold_by_meta

 function mango_wc_vendors_sold_by_meta()
 {
     global $mango_settings;
     $author_id = get_the_author_meta('ID');
     $vendor_display_name = WC_Vendors::$pv_options->get_option('vendor_display_name');
     switch ($vendor_display_name) {
         case 'display_name':
             $vendor = get_userdata($author_id);
             $vendor_name = $vendor->display_name;
             break;
         case 'user_login':
             $vendor = get_userdata($author_id);
             $vendor_name = $vendor->user_login;
             break;
         default:
             $vendor_name = WCV_Vendors::get_vendor_shop_name($author_id);
             break;
     }
     $sold_by = WCV_Vendors::is_vendor($author_id) ? sprintf('<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page($author_id), $vendor_name) : get_bloginfo('name');
     if ($mango_settings['mango_wcvendors_product_soldby']) {
         echo '<ul class="list-item-details"><li><span class="data-type">' . __('Sold by : ', 'mango') . '</span><span class="value">' . $sold_by . '</span></li></ul>';
     }
 }
开发者ID:nickkoskowski,项目名称:Work-Depot,代码行数:23,代码来源:woocommerce.php

示例14: _e

//gets url of members profile dashboard based on current user id
if ($can_submit) {
    ?>
                <a target="_TOP" href="<?php 
    echo $profile_url . 'products/products-create';
    ?>
" class="button"><?php 
    echo _e('Add New Product', 'wcvendors');
    ?>
</a>
                <a target="_TOP" href="<?php 
    echo $profile_url . 'products/products-my-posts';
    ?>
" class="button"><?php 
    echo _e('Edit Products', 'wcvendors');
    ?>
</a>
<?php 
}
?>
</center>

<hr>
<?php 
$author_id = get_current_user_id();
$shop_name_set = WCV_Vendors::get_vendor_shop_name($author_id);
$vendor_login = get_userdata($author_id);
if ($shop_name_set == $vendor_login->user_login) {
    //outputs warning to vendor if they haven't configured their shop settings
    echo '<div class="alert alert-danger"><h4>You need to set up your shop!</h4><p>Also don\'t forget to set your paypal email address in the shop settings to receive payments.<br><br><a href="' . $settings_page . '">Click here to set up your shop.</a>.</p></div>';
}
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:31,代码来源:links.php

示例15: sold_by_meta

 /**
  *
  */
 public static function sold_by_meta()
 {
     $author_id = get_the_author_meta('ID');
     $sold_by = WCV_Vendors::is_vendor($author_id) ? sprintf('<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page($author_id), WCV_Vendors::get_vendor_shop_name($author_id)) : get_bloginfo('name');
     echo apply_filters('wcvendors_cart_sold_by_meta', __('Sold by: ', 'wcvendors')) . $sold_by . '<br/>';
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:9,代码来源:class-vendor-cart.php


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