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


PHP wc_get_template_html函數代碼示例

本文整理匯總了PHP中wc_get_template_html函數的典型用法代碼示例。如果您正苦於以下問題:PHP wc_get_template_html函數的具體用法?PHP wc_get_template_html怎麽用?PHP wc_get_template_html使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: search_courses

 public function search_courses()
 {
     $args = wp_parse_args($_POST['data'], array('post_type' => 'product', 'posts_per_page' => -1, 'post_status' => 'publish', 'meta_query' => array(array('key' => '_visibility', 'value' => 'hidden', 'compare' => '!='))));
     wp_send_json(array('response' => 'success', 'html' => wc_get_template_html('search-courses.php', array('products' => new WP_Query($args), 's' => $args['s'])), 'args' => $args));
 }
開發者ID:creativelittledots,項目名稱:wp-kit-core,代碼行數:5,代碼來源:AjaxController.php

示例2: get_content_plain

 /**
  * Get content plain.
  *
  * @access public
  * @return string
  */
 function get_content_plain()
 {
     return wc_get_template_html($this->template_plain, array('order' => $this->object, 'email_heading' => $this->get_heading(), 'customer_note' => $this->customer_note, 'sent_to_admin' => false, 'plain_text' => true, 'email' => $this));
 }
開發者ID:robbenz,項目名稱:plugs,代碼行數:10,代碼來源:class-wc-email-customer-note.php

示例3: get_content_plain

 /**
  * Get content plain.
  *
  * @access public
  * @return string
  */
 public function get_content_plain()
 {
     return wc_get_template_html($this->template_plain, array('email_heading' => $this->get_heading(), 'user_login' => $this->user_login, 'user_pass' => $this->user_pass, 'blogname' => $this->get_blogname(), 'password_generated' => $this->password_generated, 'sent_to_admin' => false, 'plain_text' => true, 'email' => $this));
 }
開發者ID:jesusmarket,項目名稱:jesusmarket,代碼行數:10,代碼來源:class-wc-email-customer-new-account.php

示例4: get_content_plain

 /**
  * Get content plain.
  *
  * @return string
  */
 public function get_content_plain()
 {
     return wc_get_template_html($this->template_plain, array('order' => $this->object, 'refund' => $this->refund, 'partial_refund' => $this->partial_refund, 'email_heading' => $this->get_heading(), 'sent_to_admin' => false, 'plain_text' => true, 'email' => $this));
 }
開發者ID:Korkey128k,項目名稱:woocommerce,代碼行數:9,代碼來源:class-wc-email-customer-refunded-order.php

示例5: ywrr_email_items_list

 /**
  * Set the list item for the selected template.
  *
  * @since   1.0.0
  *
  * @param   $item_list
  * @param   $template
  *
  * @return  string
  * @author  Alberto Ruggiero
  */
 public function ywrr_email_items_list($item_list, $template = false)
 {
     if (!$template) {
         $template = get_option('ywrr_mail_template');
     }
     if (array_key_exists($template, $this->_email_templates)) {
         $path = $this->_email_templates[$template]['path'];
         $folder = $this->_email_templates[$template]['folder'];
         $style = wc_get_template_html($folder . '/email-items-list.php', array('item_list' => $item_list), '', $path);
     } elseif (defined('YITH_WCET_PREMIUM') && get_option('ywrr_mail_template_enable') == 'yes') {
         $style = wc_get_template_html('/emails/woocommerce2.4/emails/email-items-list.php', array('item_list' => $item_list), '', YITH_WCET_TEMPLATE_PATH);
     } else {
         $style = wc_get_template_html('emails/email-items-list.php', array('item_list' => $item_list), '', YWRR_TEMPLATE_PATH);
     }
     return $style;
 }
開發者ID:VitaliyProdan,項目名稱:wp_shop,代碼行數:27,代碼來源:class.yith-woocommerce-review-reminder.php

示例6: get_script_data

 /**
  * Return data for script handles.
  * @access private
  * @param  string $handle
  * @return array|bool
  */
 private static function get_script_data($handle)
 {
     global $wp;
     switch ($handle) {
         case 'woocommerce':
             return array('ajax_url' => WC()->ajax_url(), 'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"));
             break;
         case 'wc-geolocation':
             return array('wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"), 'home_url' => home_url(), 'is_available' => !(is_cart() || is_account_page() || is_checkout() || is_customize_preview()) ? '1' : '0', 'hash' => isset($_GET['v']) ? wc_clean($_GET['v']) : '');
             break;
         case 'wc-single-product':
             return array('i18n_required_rating_text' => esc_attr__('Please select a rating', 'woocommerce'), 'review_rating_required' => get_option('woocommerce_review_rating_required'));
             break;
         case 'wc-checkout':
             return array('ajax_url' => WC()->ajax_url(), 'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"), 'update_order_review_nonce' => wp_create_nonce('update-order-review'), 'apply_coupon_nonce' => wp_create_nonce('apply-coupon'), 'remove_coupon_nonce' => wp_create_nonce('remove-coupon'), 'option_guest_checkout' => get_option('woocommerce_enable_guest_checkout'), 'checkout_url' => WC_AJAX::get_endpoint("checkout"), 'is_checkout' => is_page(wc_get_page_id('checkout')) && empty($wp->query_vars['order-pay']) && !isset($wp->query_vars['order-received']) ? 1 : 0, 'debug_mode' => defined('WP_DEBUG') && WP_DEBUG, 'i18n_checkout_error' => esc_attr__('Error processing checkout. Please try again.', 'woocommerce'));
             break;
         case 'wc-address-i18n':
             return array('locale' => json_encode(WC()->countries->get_country_locale()), 'locale_fields' => json_encode(WC()->countries->get_country_locale_field_selectors()), 'i18n_required_text' => esc_attr__('required', 'woocommerce'));
             break;
         case 'wc-cart':
             return array('ajax_url' => WC()->ajax_url(), 'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"), 'update_shipping_method_nonce' => wp_create_nonce("update-shipping-method"));
             break;
         case 'wc-cart-fragments':
             return array('ajax_url' => WC()->ajax_url(), 'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"), 'fragment_name' => apply_filters('woocommerce_cart_fragment_name', 'wc_fragments'));
             break;
         case 'wc-add-to-cart':
             return array('ajax_url' => WC()->ajax_url(), 'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%"), 'i18n_view_cart' => esc_attr__('View Cart', 'woocommerce'), 'cart_url' => apply_filters('woocommerce_add_to_cart_redirect', wc_get_cart_url()), 'is_cart' => is_cart(), 'cart_redirect_after_add' => get_option('woocommerce_cart_redirect_after_add'));
             break;
         case 'wc-add-to-cart-variation':
             return array('i18n_no_matching_variations_text' => esc_attr__('Sorry, no products matched your selection. Please choose a different combination.', 'woocommerce'), 'i18n_make_a_selection_text' => esc_attr__('Select product options before adding this product to your cart.', 'woocommerce'), 'i18n_unavailable_text' => esc_attr__('Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce'), 'variation_template' => esc_attr(wc_get_template_html('single-product/add-to-cart/variation.php')));
             break;
         case 'wc-country-select':
             return array('countries' => json_encode(array_merge(WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states())), 'i18n_select_state_text' => esc_attr__('Select an option…', 'woocommerce'), 'i18n_matches_1' => _x('One result is available, press enter to select it.', 'enhanced select', 'woocommerce'), 'i18n_matches_n' => _x('%qty% results are available, use up and down arrow keys to navigate.', 'enhanced select', 'woocommerce'), 'i18n_no_matches' => _x('No matches found', 'enhanced select', 'woocommerce'), 'i18n_ajax_error' => _x('Loading failed', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_1' => _x('Please enter 1 or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_n' => _x('Please enter %qty% or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_1' => _x('Please delete 1 character', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_n' => _x('Please delete %qty% characters', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_1' => _x('You can only select 1 item', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_n' => _x('You can only select %qty% items', 'enhanced select', 'woocommerce'), 'i18n_load_more' => _x('Loading more results…', 'enhanced select', 'woocommerce'), 'i18n_searching' => _x('Searching…', 'enhanced select', 'woocommerce'));
             break;
     }
     return false;
 }
開發者ID:DeangelisPedro,項目名稱:woocommerce,代碼行數:43,代碼來源:class-wc-frontend-scripts.php

示例7: get_content_plain

 /**
  * get_content_plain function.
  *
  * @access public
  * @return string
  */
 function get_content_plain()
 {
     return wc_get_template_html($this->template_plain, array('email_heading' => $this->get_heading(), 'user_login' => $this->user_login, 'reset_key' => $this->reset_key, 'blogname' => $this->get_blogname(), 'sent_to_admin' => false, 'plain_text' => true, 'email' => $this));
 }
開發者ID:bitoncoin,項目名稱:woocommerce,代碼行數:10,代碼來源:class-wc-email-customer-reset-password.php


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