我需要在购物车重量超过150磅后删除购物车和结账页面上的UPS送货方法。这跟我想的差不多。
function is_it_over_onefifty($available_methods){
global $woocommerce;
if ($woocommerce->cart->cart_contents_weight > 150){
//diable shipping
unset( $available_methods['ups'] );
}
我正在将PayPal集成到我的web应用程序中。在这里,我想做完整的结账,process.It有直接付款和快速结账。
In Express checkout we need only PayPal account like
1)Clicking Check out with PayPal
2) Logs into PayPal to authenticate
3)Reviews the transaction on PayPal
4)Confirms the order and pays from your site
5)Receives an order confirmation
I
我正在尝试删除继续结帐按钮,并限制对结帐页面的访问,直到客户在购物篮页面上填写“计算发货”选项。 我创建了一个本地送货方法,该方法仅限于多个post/zipcodes。然后,我将其添加到我的functions.php文件中。 function disable_checkout_button_no_shipping() {
$package_counts = array();
// get shipping packages and their rate counts
$packages = WC()->shipping->get_packages();
fore
我正在建立一个WooCommerce插件,增加了一些功能(基本上是新的领域)结账;这些领域应该出现在结帐时所选择的航运方法,并由管理员在插件设置页面进行关联(管理员将选择哪些航运方法的功能将是可用的)。因此,在我的设置页面中,我需要一种方法来列出我尝试过的商店中配置的所有送货方法
WC()->shipping->get_shipping_methods()
但它返回一个可配置的传送方法列表(不是已配置的方法)我找不到一个函数,它给了我一个已配置方法的数组,其中包括: zone - type - name - cost有任何提示吗?