Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
hide "cod" payment method at frontend checkout page
// hide "cod" payment method at frontend checkout page
add_filter( 'woocommerce_available_payment_gateways', function( $available_gateways ) {
if ( !is_admin() )
unset($available_gateways['cod']);
return $available_gateways;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment