Merge branch 'master' of https://github.com/woothemes/woocommerce
Conflicts: includes/gateways/cod/class-wc-gateway-cod.php
This commit is contained in:
commit
4fa5ec8310
|
@ -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' ),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue