Skip to content

Instantly share code, notes, and snippets.

@aletoropov
Created January 5, 2024 15:56
Show Gist options
  • Save aletoropov/f7376f5ceaf75ec38fc68347813c7c06 to your computer and use it in GitHub Desktop.
Save aletoropov/f7376f5ceaf75ec38fc68347813c7c06 to your computer and use it in GitHub Desktop.
отключить доставку и оплату в Woocommerce
<?php
//отключаем параметры доставки по стране
add_filter( 'woocommerce_cart_needs_shipping', 'woocommerce_disable_shipping' );
function woocommerce_disable_shipping() {
return false;
}
//отключаем параметры оплаты
add_filter( 'woocommerce_cart_needs_payment', 'woocommerce_disabled_payment' );
function woocommerce_disabled_payment() {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment