Merge pull request #5415 from tamarazuk/patch-2
COD: no need to hide in admin
This commit is contained in:
commit
a4b6c4eb4f
|
@ -108,7 +108,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
|
|||
public function is_available() {
|
||||
$order = null;
|
||||
|
||||
if ( ! WC()->cart->needs_shipping() ) {
|
||||
if ( WC()->cart && ! WC()->cart->needs_shipping() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue