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


PHP yith_wcpv_get_template函数代码示例

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


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

示例1: widget

 /**
  * Echo the widget content.
  *
  * Subclasses should over-ride this function to generate their widget code.
  *
  * @param array $args     Display arguments including before_title, after_title,
  *                        before_widget, and after_widget.
  * @param array $instance The settings for the particular instance of the widget.
  *
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
  */
 public function widget($args, $instance)
 {
     $vendor = yith_get_vendor(get_query_var('term'));
     $hide_from_guests = !empty($instance['hide_from_guests']) ? true : false;
     $show = true;
     if ($hide_from_guests) {
         $show = is_user_logged_in();
     }
     if (YITH_Vendors()->frontend->is_vendor_page() && !empty($vendor->store_email) && $show) {
         $args = array('instance' => $instance, 'vendor' => $vendor, 'current_user' => wp_get_current_user(), 'widget' => $this);
         $this->_instance = $instance;
         yith_wcpv_get_template('quick-info', $args, 'widgets');
     }
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:25,代码来源:class.yith-vendor-quick-info.php

示例2: widget

 /**
  * Echo the widget content.
  *
  * Subclasses should over-ride this function to generate their widget code.
  *
  * @param array $args     Display arguments including before_title, after_title,
  *                        before_widget, and after_widget.
  * @param array $instance The settings for the particular instance of the widget.
  *
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
  */
 public function widget($args, $instance)
 {
     $hide = !empty($instance['hide_on_vendor_page']) && is_product_taxonomy(YITH_Vendors()->get_taxonomy_name());
     if (!$hide) {
         yith_wcpv_get_template('vendors-list', $instance, 'widgets');
     }
 }
开发者ID:yarwalker,项目名称:ecobyt,代码行数:18,代码来源:class.yith-woocommerce-vendors-widget.php

示例3: widget

 /**
  * Echo the widget content.
  *
  * Subclasses should over-ride this function to generate their widget code.
  *
  * @param array $args     Display arguments including before_title, after_title,
  *                        before_widget, and after_widget.
  * @param array $instance The settings for the particular instance of the widget.
  *
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
  */
 public function widget($args, $instance)
 {
     $vendor = yith_get_vendor(get_query_var('term'));
     if (YITH_Vendors()->frontend->is_vendor_page() && !empty($vendor->location)) {
         $args = array('instance' => $instance, 'vendor' => $vendor, 'gmaps_link' => esc_url(add_query_arg(array('q' => urlencode($vendor->location)), '//maps.google.com/')));
         yith_wcpv_get_template('store-location', $args, 'widgets');
     }
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:19,代码来源:class.yith-vendor-store-location.php

示例4: output_report

 /**
  * Output the report
  */
 public function output_report()
 {
     $this->chart_colours = array('totals' => '#3498db', 'enabled' => '#5cc488', 'disabled' => '#e74c3c');
     $current_range = YITH_Reports()->get_current_date_range();
     $this->calculate_current_range($current_range);
     $args = array('report' => $this, 'current_range' => $current_range, 'ranges' => YITH_Reports()->get_ranges());
     $this->get_chart_data();
     yith_wcpv_get_template('vendors-registered', $args, 'woocommerce/admin/reports');
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-report-vendors-registered.php

示例5: output_report

 /**
  * Output the report
  */
 public function output_report()
 {
     if (empty($this->vendor_ids) && !empty($_GET['vendor_ids'])) {
         $this->vendor_ids = $_GET['vendor_ids'];
     }
     $this->chart_colours = array('vendor_sales' => '#d4d9dc', 'vendor_amount' => '#3498db');
     $args = array('report' => $this, 'current_range' => YITH_Reports()->get_current_date_range(), 'ranges' => YITH_Reports()->get_ranges());
     yith_wcpv_get_template('vendor-sales', $args, 'woocommerce/admin/reports');
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-report-vendors-sales.php

示例6: __

<?php

/**
 * Admin new order email (plain text)
 *
 * @author		WooThemes
 * @package 	WooCommerce/Templates/Emails/Plain
 * @version 	2.0.0
 *
 * @var string $email_heading
 * @var YITH_Commission $commission
 * @var bool $sent_to_admin
 * @var bool $plain_text
 */
if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
echo "= " . $email_heading . " =\n\n";
echo __('New vendor registered', 'yith_wc_product_vendors') . "\n\n";
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
do_action('woocommerce_email_before_new_vendor_table', $vendor, $sent_to_admin, $plain_text);
echo strtoupper(__('A new user has made a request to become a vendor in your store.', 'yith_wc_product_vendors')) . "\n";
echo "\n";
yith_wcpv_get_template('new-vendor-detail-table', array('vendor' => $vendor, 'owner' => $vendor->get_owner()), 'emails/plain');
do_action('woocommerce_email_after_new_vendor_table', $commission, $sent_to_admin, $plain_text);
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo apply_filters('woocommerce_email_footer_text', get_option('woocommerce_email_footer_text'));
开发者ID:shwetadubey,项目名称:upfit,代码行数:28,代码来源:new-vendor-registration.php

示例7: get_content_plain

 /**
  * get_content_plain function.
  *
  * @access public
  * @return string
  */
 function get_content_plain()
 {
     ob_start();
     yith_wcpv_get_template($this->template_plain, array('order' => $this->object, 'vendor' => $this->vendor, 'email_heading' => $this->get_heading(), 'sent_to_admin' => true, 'plain_text' => false, 'yith_wc_email' => $this), '');
     return ob_get_clean();
 }
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:12,代码来源:class-yith-wc-email-cancelled-order.php

示例8: woocommerce_template_vendor_name

 /**
  * Add vendor name after product title
  *
  * @return   string The title
  * @since    1.0
  * @author   Andrea Grillo <andrea.grillo@yithemes.com>
  * @use     the_title filter
  */
 public function woocommerce_template_vendor_name()
 {
     global $product;
     if (!empty($product) && is_object($product)) {
         $vendor = yith_get_vendor($product, 'product');
         if ($vendor->is_valid()) {
             $args = array('vendor' => $vendor, 'label_color' => 'color: ' . get_option('yith_vendors_color_name'));
             $template_info = array('name' => 'vendor-name-title', 'args' => $args, 'section' => is_product() ? 'woocommerce/single-product' : 'woocommerce/loop');
             $template_info = apply_filters('yith_woocommerce_vendor_name_template_info', $template_info);
             extract($template_info);
             yith_wcpv_get_template($name, $args, $section);
         }
     }
 }
开发者ID:tib07,项目名称:yith-woocommerce-product-vendors,代码行数:22,代码来源:class.yith-vendors-frontend.php

示例9: email_order_items_table

 /**
  * get the email vendor order table
  *
  * @return array The review average and the product with reviews count
  */
 public function email_order_items_table($order, $show_download_links = false, $show_sku = false, $show_purchase_note = false, $show_image = false, $image_size = array(32, 32), $plain_text = false)
 {
     ob_start();
     $template = $plain_text ? 'emails/plain/vendor-email-order-items.php' : 'emails/vendor-email-order-items.php';
     yith_wcpv_get_template($template, array('order' => $order, 'vendor' => $this, 'items' => $order->get_items(), 'show_download_links' => $show_download_links, 'show_sku' => $show_sku, 'show_purchase_note' => $show_purchase_note, 'show_image' => $show_image, 'image_size' => $image_size), '');
     return ob_get_clean();
 }
开发者ID:yarwalker,项目名称:ecobyt,代码行数:12,代码来源:class.yith-vendor.php

示例10: get_content_plain

 /**
  * get_content_plain function.
  *
  * @access public
  * @return string
  */
 function get_content_plain()
 {
     ob_start();
     yith_wcpv_get_template($this->template_plain, array('email_heading' => $this->get_heading(), 'blogname' => $this->get_blogname(), 'sent_to_admin' => false, 'plain_text' => true), '');
     return ob_get_clean();
 }
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:12,代码来源:class-yith-wc-email-vendor-new-account.php

示例11: output_report

 /**
  * Output the report
  */
 public function output_report()
 {
     $this->chart_colours = array('orders_gross' => '#b1d4ea', 'orders_net' => '#3498db', 'orders_count' => '#95a5a6', 'products_count' => '#dbe1e3');
     $current_range = YITH_Reports()->get_current_date_range();
     $this->calculate_current_range($current_range);
     $args = array('report' => $this, 'current_range' => $current_range, 'ranges' => YITH_Reports()->get_ranges());
     yith_wcpv_get_template('sales-by-date', $args, 'woocommerce/admin/reports');
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:11,代码来源:class.yith-report-sales-by-date.php

示例12: single_product_commission_content

 /**
  * Add commission tab in single product "Product Data" section
  */
 public function single_product_commission_content()
 {
     if (current_user_can('manage_woocommerce')) {
         global $post;
         $meta_value = get_post_meta($post->ID, '_product_commission', true);
         $args = array('field_args' => array('id' => 'yith_wpv_product_commission', 'label' => __('Product commission', 'yith_wc_product_vendors'), 'desc_tip' => 'true', 'description' => __('You can set a specific commission for a single product. Keep this field blank or zero to use the vendor commission', 'yith_wc_product_vendors'), 'value' => $meta_value ? $meta_value : '', 'type' => 'number', 'custom_attributes' => array('step' => 0.1, 'min' => 0, 'max' => 100)));
         yith_wcpv_get_template('product-data-commission', $args, 'woocommerce/admin');
     }
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-vendors-admin-premium.php

示例13: email_commission_details_table

 /**
  * Retrieve the table for commission details
  *
  * @param bool $plain_text
  *
  * @return string
  */
 public function email_commission_details_table($plain_text = false)
 {
     ob_start();
     $template = $plain_text ? 'plain/commission-detail-table' : 'commission-detail-table';
     yith_wcpv_get_template($template, array('commission' => $this, 'order' => $this->get_order(), 'vendor' => $this->get_vendor(), 'item' => $this->get_item(), 'product' => $this->get_product()), 'emails');
     $return = apply_filters('woocommerce_email_commission_detail_table', ob_get_clean(), $this);
     return $return;
 }
开发者ID:yarwalker,项目名称:ecobyt,代码行数:15,代码来源:class.yith-commission.php

示例14: do_action

 * @var YITH_Commission $commission
 * @var bool $sent_to_admin
 * @var bool $plain_text
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>

<?php do_action( 'woocommerce_email_header', $email_heading ); ?>

<p><?php _e( 'New vendor registered', 'yith_wc_product_vendors' ) ?></p>

<p><?php _e( 'A new user has made a request to become a vendor in your store.', 'yith_wc_product_vendors' ) ?></p>

<?php do_action( 'woocommerce_email_before_commission_table', $vendor, $sent_to_admin, $plain_text ); ?>

<h2><a href="<?php echo admin_url() ?>"><?php _e( 'Vendor detail', 'yith_wc_product_vendors ') ?></a></h2>

<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
	<tbody>
		<?php yith_wcpv_get_template( 'new-vendor-detail-table', array( 'vendor' => $vendor, 'owner' => get_user_by( 'id', absint( $vendor->get_owner() ) ) ), 'emails' ); ?>
	</tbody>
</table>

<?php do_action( 'woocommerce_email_after_commission_table', $vendor, $sent_to_admin, $plain_text ); ?>

<?php do_action( 'woocommerce_email_footer' ); ?>
开发者ID:shwetadubey,项目名称:upfit,代码行数:30,代码来源:new-vendor-registration.php

示例15: get_content_plain

 /**
  * get_content_plain function.
  *
  * @access public
  * @return string
  */
 function get_content_plain()
 {
     ob_start();
     yith_wcpv_get_template($this->template_plain, array('commission' => $this->object, 'email_heading' => $this->get_heading(), 'sent_to_admin' => true, 'plain_text' => true), '');
     return ob_get_clean();
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class-yith-wc-email-vendor-commissions-paid.php


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