Created
January 5, 2024 15:56
-
-
Save aletoropov/f7376f5ceaf75ec38fc68347813c7c06 to your computer and use it in GitHub Desktop.
отключить доставку и оплату в Woocommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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