2017-04-19 784 views
0

需要在Woocommerce結帳中隱藏「運送到其他地址?」文本和複選框。 這意味着只有這些形式的元素應該消失,沒有任何航運領域的變化。 因此,「運送到不同的地址?」複選框必須被選中,但不可見。 如何做到這一點?任何幫助是極大的讚賞。在Woocommerce結帳中隱藏「運送到其他地址?」文本和複選框

+0

你可以用CSS ... – Reigel

+0

隱藏爲什麼你不想運送到計費地址,如果用戶可以」使用不同的地址? – jjj

回答

0

通過編輯form-shipping.php文件,成功完成Woocommerce結帳中「隱藏不同地址?」文本和複選框。 相反,這些線路的

<h3 id="ship-to-different-address"> 
     <label for="ship-to-different-address-checkbox" class="checkbox"><?php _e('Ship to a different address?', 'woocommerce'); ?></label> 
     <input id="ship-to-different-address-checkbox" class="input-checkbox" <?php checked(apply_filters('woocommerce_ship_to_different_address_checked', 'shipping' === get_option('woocommerce_ship_to_destination') ? 1 : 0), 1); ?> type="checkbox" name="ship_to_different_address" value="1" /> 
    </h3> 

我們應該加上這些的

<h3 id="ship-to-different-address"> 
     <input id="ship-to-different-address-checkbox" class="input-checkbox" <?php checked(apply_filters('woocommerce_ship_to_different_address_checked', 'shipping' === get_option('woocommerce_ship_to_destination') ? 1 : 0), 1); ?> type="checkbox" style="display:none;" name="ship_to_different_address" value="1" /> 
    </h3> 
相關問題