Refactor logic for passing no_shipping, it should only be passed when no shipping items are available.
This commit is contained in:
parent
8332bed7bc
commit
70231461b2
|
@ -249,7 +249,7 @@ class WC_Gateway_Paypal_Request {
|
|||
*/
|
||||
protected function get_shipping_args( $order ) {
|
||||
$shipping_args = array();
|
||||
if ( $order->has_shipping_method() ) {
|
||||
if ( $order->needs_shipping_address() ) {
|
||||
$shipping_args['address_override'] = $this->gateway->get_option( 'address_override' ) === 'yes' ? 1 : 0;
|
||||
$shipping_args['no_shipping'] = 0;
|
||||
if ( 'yes' === $this->gateway->get_option( 'send_shipping' ) ) {
|
||||
|
|
Loading…
Reference in New Issue