Skip to content

Commit

Permalink
Merge pull request #11 from UVLabs/development
Browse files Browse the repository at this point in the history
chore: syncing
  • Loading branch information
UVLabs authored Sep 12, 2021
2 parents d0c1889 + 61b3af8 commit 6626472
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions includes/helpers/class-lpac-functions-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Lpac_Functions_Helper
*/
public static function lpac_show_map( $option )
{
//TODO Rather than this one method handling both the checkout on order-received and view-order page, we should possibly split it into another method just for the order-received and view-order pages.

if ( $option === 'checkout' ) {
$show = true;
Expand Down
12 changes: 6 additions & 6 deletions includes/public/js/maps/checkout-page-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function get_navigator_coordinates() {
return;
}

latitude = position.coords.latitude
longitude = position.coords.longitude
let latitude = position.coords.latitude
let longitude = position.coords.longitude

const latlng = {
lat: parseFloat( latitude ),
Expand Down Expand Up @@ -259,8 +259,8 @@ function get_navigator_coordinates() {
return;
}

$latitude = document.querySelector( '#lpac_latitude' );
$longitude = document.querySelector( '#lpac_longitude' );
let latitude = document.querySelector( '#lpac_latitude' );
let longitude = document.querySelector( '#lpac_longitude' );

if( typeof(latitude) === 'undefined' || latitude === null ){
console.log( 'LPAC: Can\'t find latitude and longitude input areas. Can\'t insert location coordinates.' );
Expand All @@ -270,8 +270,8 @@ function get_navigator_coordinates() {
console.log( 'LPAC: Can\'t find latitude and longitude input areas. Can\'t insert location coordinates.' );
}

$latitude.value = latlng.lat
$longitude.value = latlng.lng
latitude.value = latlng.lat
longitude.value = latlng.lng

}

Expand Down
4 changes: 2 additions & 2 deletions lpac.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: Location Picker At Checkout For WooCommerce
* Plugin URI: https://soaringleads.com
* Description: Allow customers to choose their shipping location using a map at checkout.
* Version: 1.2.0
* Version: 1.2.1
* Author: Uriahs Victor
* Author URI: https://uriahsvictor.com
* License: GPL-2.0+
Expand Down Expand Up @@ -76,7 +76,7 @@ function lpac_fs()
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
define( 'LPAC_VERSION', '1.2.0' );
define( 'LPAC_VERSION', '1.2.1' );
define( 'LPAC_PLUGIN_NAME', 'lpac' );
define( 'LPAC_PLUGIN_DIR', __DIR__ );
define( 'LPAC_PLUGIN_PATH_URL', plugin_dir_url( __FILE__ ) );
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ This plugin has built-in support for automatically filling in the WooCommerce ch

### Features:

- Detect current location of customer.
- Allow customers to pick their exact location using Google Maps.
- Autofill checkout fields with information pulled from Google Maps.
- Automatically translates map's buttons based on site language (set in WordPress' general settings).
- Detect current location of customer.
- Show/Hide Map based on Shipping Class
- Include a QR Code or button link to the customer's selected location in the WooCommerce order emails.
- Customizable Map container
- "View on map" button to allow admin to view exact location for delivery of any order.
- Customers can see the delivery location they selected on past orders.
- Customizable Map container
- Have a feature in mind? Feel free to submit it on the support forum.

### Configure Plugin:
Expand Down Expand Up @@ -74,6 +75,9 @@ Ensure that you have setup the plugin with your API key by going to WordPress Da

== Changelog ==

= 1.2.1 =
* [Improvement] Better assign coordinates input fields variables on checkout page.

= 1.2.0 =
* [New] Show or Hide map based on the shipping classes of items in the customer's cart.
* [Fix] Console error when the map was not enabled in Settings.
Expand Down

0 comments on commit 6626472

Please sign in to comment.