Merge pull request #5415 from tamarazuk/patch-2

COD: no need to hide in admin
This commit is contained in:
Mike Jolley 2014-05-08 15:04:55 +01:00
commit a4b6c4eb4f
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}