<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] # WooCommerce常用的API和幫助函數 ### 1\. API #### 1.1. WC\_Product * `get_id()`:獲取產品ID。 * `get_name()`:獲取產品名稱。 * `get_price()`:獲取產品價格。 * `get_sale_price()`:獲取產品折扣價。 * `get_regular_price()`:獲取產品常規價。 * `get_stock_quantity()`:獲取產品庫存數量。 * `is_in_stock()`:檢查產品是否有庫存。 * `get_categories()`:獲取產品分類。 * `get_tags()`:獲取產品標簽。 * `get_rating_count()`:獲取產品評分次數。 * `get_average_rating()`:獲取產品平均評分。 #### 1.2. WC\_Order * `get_id()`:獲取訂單ID。 * `get_status()`:獲取訂單狀態。 * `get_total()`:獲取訂單總金額。 * `get_billing_first_name()`:獲取訂單收件人姓名。 * `get_billing_last_name()`:獲取訂單收件人姓氏。 * `get_billing_email()`:獲取訂單收件人郵箱。 * `get_billing_phone()`:獲取訂單收件人電話。 * `get_shipping_first_name()`:獲取訂單收貨人姓名。 * `get_shipping_last_name()`:獲取訂單收貨人姓氏。 * `get_shipping_address_1()`:獲取訂單收貨地址1。 * `get_shipping_address_2()`:獲取訂單收貨地址2。 * `get_shipping_city()`:獲取訂單收貨城市。 * `get_shipping_state()`:獲取訂單收貨州/省份。 * `get_shipping_postcode()`:獲取訂單收貨郵政編碼。 #### 1.3. WC\_Cart * `get_cart_contents()`:獲取購物車中的產品。 * `get_cart_total()`:獲取購物車中產品的總價。 * `add_to_cart()`:向購物車中添加產品。 * `remove_cart_item()`:從購物車中刪除產品。 * `empty_cart()`:清空購物車。 #### 1.4. WC\_Customer * `get_id()`:獲取客戶ID。 * `get_billing_first_name()`:獲取客戶賬單收件人姓名。 * `get_billing_last_name()`:獲取客戶賬單收件人姓氏。 * `get_billing_email()`:獲取客戶郵箱。 * `get_billing_phone()`:獲取客戶電話。 * `get_shipping_first_name()`:獲取客戶收貨人姓名。 * `get_shipping_last_name()`:獲取客戶收貨人姓氏。 * `get_shipping_address_1()`:獲取客戶收貨地址1。 \-`get_shipping_address_2()`:獲取客戶收貨地址2。 * `get_shipping_city()`:獲取客戶收貨城市。 * `get_shipping_state()`:獲取客戶收貨州/省份。 * `get_shipping_postcode()`:獲取客戶收貨郵政編碼。 ### 2\. 幫助函數 #### 2.1. wc\_get\_product() `wc_get_product($product_id)`:根據產品ID獲取產品對象。 #### 2.2. wc\_get\_order() `wc_get_order($order_id)`:根據訂單ID獲取訂單對象。 #### 2.3. wc\_get\_order\_item\_meta() `wc_get_order_item_meta($order_item_id, $meta_key, $single = true)`:獲取訂單項元數據。 #### 2.4. wc\_get\_customer() `wc_get_customer($customer_id)`:根據客戶ID獲取客戶對象。 #### 2.5. wc\_price() `wc_price($price, $args = array())`:格式化價格。 #### 2.6. wc\_get\_template() `wc_get_template($template_name, $args = array(), $template_path = '', $default_path = '')`:獲取WooCommerce模板文件。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看