Conflicts:
	includes/gateways/cod/class-wc-gateway-cod.php
This commit is contained in:
Mike Jolley 2014-05-08 15:06:20 +01:00
commit 4fa5ec8310
2 changed files with 5 additions and 3 deletions

View File

@ -16,6 +16,7 @@ $states['BD'] = array(
'BARI' => __( 'Barisal', 'woocommerce' ),
'BHO' => __( 'Bhola', 'woocommerce' ),
'BOG' => __( 'Bogra', 'woocommerce' ),
'BRA' => __( 'Brahmanbaria', 'woocommerce' ),
'CHA' => __( 'Chandpur', 'woocommerce' ),
'CHI' => __( 'Chittagong', 'woocommerce' ),
'CHU' => __( 'Chuadanga', 'woocommerce' ),
@ -28,6 +29,7 @@ $states['BD'] = array(
'GAI' => __( 'Gaibandha', 'woocommerce' ),
'GAZI' => __( 'Gazipur', 'woocommerce' ),
'GOP' => __( 'Gopalganj', 'woocommerce' ),
'HAB' => __( 'Habiganj', 'woocommerce' ),
'JAM' => __( 'Jamalpur', 'woocommerce' ),
'JES' => __( 'Jessore', 'woocommerce' ),
'JHA' => __( 'Jhalokati', 'woocommerce' ),

View File

@ -115,8 +115,8 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
public function is_available() {
$order = null;
if ( ! $this->enable_for_virtual )
if ( ! WC()->cart->needs_shipping() ) {
if ( ! $this->enable_for_virtual ) {
if ( WC()->cart && ! WC()->cart->needs_shipping() ) {
return false;
}