HTTPS for google maps
This commit is contained in:
parent
d30c54ef84
commit
06280a7003
|
@ -776,7 +776,7 @@ class WC_Order extends WC_Abstract_Order {
|
|||
*/
|
||||
public function get_shipping_address_map_url() {
|
||||
$address = apply_filters( 'woocommerce_shipping_address_map_url_parts', $this->get_address( 'shipping' ), $this );
|
||||
return apply_filters( 'woocommerce_shipping_address_map_url', 'http://maps.google.com/maps?&q=' . urlencode( implode( ', ', $address ) ) . '&z=16', $this );
|
||||
return apply_filters( 'woocommerce_shipping_address_map_url', 'https://maps.google.com/maps?&q=' . urlencode( implode( ', ', $address ) ) . '&z=16', $this );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1079,7 +1079,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
|
|||
$object->set_shipping_state( 'Boulder' );
|
||||
$object->set_shipping_postcode( '00001' );
|
||||
$object->set_shipping_country( 'US' );
|
||||
$this->assertEquals( 'http://maps.google.com/maps?&q=Barney%2C+Rubble%2C+Bedrock+Ltd.%2C+34+Stonepants+avenue%2C+Rockville%2C+Bedrock%2C+Boulder%2C+00001%2C+US&z=16', $object->get_shipping_address_map_url() );
|
||||
$this->assertEquals( 'https://maps.google.com/maps?&q=Barney%2C+Rubble%2C+Bedrock+Ltd.%2C+34+Stonepants+avenue%2C+Rockville%2C+Bedrock%2C+Boulder%2C+00001%2C+US&z=16', $object->get_shipping_address_map_url() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue