Skip to content

Commit

Permalink
Merge pull request #22 from UVLabs/development
Browse files Browse the repository at this point in the history
chore: syncing
  • Loading branch information
UVLabs authored Feb 6, 2022
2 parents 2ca4807 + b81914a commit 05ac0c8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

npm run format
composer run format
1 change: 1 addition & 0 deletions assets/admin/js/order-map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function lpacSetupShopOrderMap() {
/** These values are coming from the base-map.js enqueued from our maps folder */
const map = window.lpac_map;
const marker = window.lpac_marker;
const infowindow = window.lpac_infowindow;
Expand Down
4 changes: 2 additions & 2 deletions includes/Controllers/Emails_Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function create_delivery_location_link_qrcode( $link, $order_id ) {
/*
* https://example.com/wp-content/uploads/lpac/qr-codes/order_id.jpg
*/
$qr_code_link = $this->get_resource_url( $folder_name, $order_id, '.jpg' );
$qr_code_link = $this->get_resource_url( $folder_name, $order_id );
$delivery_location_text = __( 'Delivery Location', 'map-location-picker-at-checkout-for-woocommerce' );
$delivery_location_text = apply_filters( 'lpac_email_map_location_link_button_text', $delivery_location_text );

Expand Down Expand Up @@ -166,7 +166,7 @@ private function create_delivery_location_static_map( $order_id, $map_link, $lat
return;
}

$image_src = $this->get_resource_url( $folder_name, $order_id, '.jpg' );
$image_src = $this->get_resource_url( $folder_name, $order_id );

$width = '';
$height = '';
Expand Down
6 changes: 5 additions & 1 deletion includes/Notices/Notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ protected function create_notice_markup( string $notice_id, array $content ) {

$dismissed_notices = $this->get_dismissed_notices();

if ( ! is_array( $dismissed_notices ) ) {
return; // Bail if received value type is unexpected.
}

# Bail if this notice has been dismissed
if ( in_array( $notice_id, $dismissed_notices ) ) {
if ( in_array( $notice_id, $dismissed_notices, true ) ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/Traits/Upload_Folders.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function create_upload_folder( string $folder_name ) {
* @param string $ext
* @return string The upload URL
*/
private function get_resource_url( string $folder_name, int $order_id, string $ext ) {
private function get_resource_url( string $folder_name, int $order_id, string $ext = '.jpg' ) {

$upload_url = wp_upload_dir()['baseurl'];

Expand Down
4 changes: 2 additions & 2 deletions lpac.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Plugin Name: Location Picker At Checkout For WooCommerce
* Plugin URI: https://lpacwp.com
* Description: Allow customers to choose their shipping location using a map at checkout.
* Version: 1.4.3-lite
* Version: 1.4.4-lite
* Author: Uriahs Victor
* Author URI: https://uriahsvictor.com
* License: GPL-2.0+
Expand All @@ -33,7 +33,7 @@
die;
}
if ( !defined( 'LPAC_VERSION' ) ) {
define( 'LPAC_VERSION', '1.4.3' );
define( 'LPAC_VERSION', '1.4.4' );
}
/**
* The code that runs during plugin activation.
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Donate link: https://uriahsvictor.com
Tags: woocommerce, location picker, checkout map, geolocation, google map, map, delivery map
Requires at least: 5.5
Requires PHP: 7.0
Tested up to: 5.8
Stable tag: 1.4.3
Tested up to: 5.9
Stable tag: 1.4.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -164,6 +164,10 @@ The save location of QR codes have been changed. Links to QR codes in past order

== Changelog ==

= 1.4.4 =
* [Fix] Error caused when dismissed notices returns a string.
* [Info] Tested on WP 5.9

= 1.4.3 =
* [New PRO] Option to change the type of results returned by the Places Autocomplete API (Geocode, Address, Establishment, Regions, Cities)
* [Fix] Console error when Billing City field was not present on checkout page.
Expand Down

0 comments on commit 05ac0c8

Please sign in to comment.