如何在 Woocommerce 中将运输方式转换为下拉菜单 [英] How to convert shipping methods to dropdown in Woocommerce
本文介绍了如何在 Woocommerce 中将运输方式转换为下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,在 Woocommerce 中,我正在尝试将运输方式单选按钮转换为下拉列表.这是列表 html
Hey in Woocommerce im trying to convert the shipping methods radio buttons to a dropdown list. this is the list html
<ul id="shipping_method">
<li>
<input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_flat_rate1" value="flat_rate:1" class="shipping_method">
<label for="shipping_method_0_flat_rate1">רעננה: <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">₪</span>16</span></label> </li>
<li>
<input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_flat_rate7" value="flat_rate:7" class="shipping_method" checked="checked">
<label for="shipping_method_0_flat_rate7">נתניה: <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">₪</span>30</span></label> </li>
<li>
<input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_flat_rate8" value="flat_rate:8" class="shipping_method">
<label for="shipping_method_0_flat_rate8">חדרה: <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">₪</span>45</span></label> </li>
<li>
<input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_free_shipping3" value="free_shipping:3" class="shipping_method">
<label for="shipping_method_0_free_shipping3">איסוף עצמי חינם</label> </li>
</ul>
有什么我可以用的钩子吗?有什么快速技巧吗?
is there any hook i can use? any quick trick ?
推荐答案
试用 WooCommerce Shipping Method Display Style 插件(已在 WordPress v4.9.8 + WooCommerce v3.4.7 上测试):
Try the WooCommerce Shipping Method Display Style plug-in (tested on WordPress v4.9.8 + WooCommerce v3.4.7):
https://wordpress.org/plugins/woo-shipping-display-模式/
这篇关于如何在 Woocommerce 中将运输方式转换为下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文