Skip to content

Commit

Permalink
Branding update and more (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins Docker committed Jul 11, 2023
1 parent efa2d7f commit 4713309
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 52 deletions.
4 changes: 2 additions & 2 deletions admin/woocommerce-mastersoft-notices.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Admin notices for Mastersoft Address.
* Admin notices for Loqate AU NZ Address.
**/
if (!class_exists('WC_Mastersoft_Admin_Notices')) {

Expand All @@ -26,7 +26,7 @@ function mastersoft_add_admin_notices()
} else {
?>
<div id="mastesoft_admin_notices" class="notice notice-success is-dismissible">
<strong>Almost done!</strong> Configure <strong>Mastersoft Address</strong>
<strong>Almost done!</strong> Configure <strong>Loqate AU NZ Address</strong>
<button class="button-primary" onclick="location.href='<?php echo $settings_url; ?>'" style="margin:10px;">
Set up your account
</button>
Expand Down
46 changes: 22 additions & 24 deletions admin/woocommerce-mastersoft-settings.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Woocommerce Settings for Mastersoft Address.
* Woocommerce Settings for Loqate AU NZ Address.
**/
if (!class_exists('WC_Mastersoft_Settings_Tab')) {

Expand All @@ -22,7 +22,7 @@ public static function init()
*/
public static function add_settings_tab($settings_tabs)
{
$settings_tabs['mastersoft_settings_tab'] = __('Mastersoft Address', 'woocommerce-mastersoft-settings-tab');
$settings_tabs['mastersoft_settings_tab'] = __('Loqate AU NZ Address', 'woocommerce-mastersoft-settings-tab');
return $settings_tabs;
}

Expand Down Expand Up @@ -50,9 +50,9 @@ public static function get_settings()
$settings = array(
//General/Address section
'section_title' => array(
'title' => __('Mastersoft Address', 'woocommerce-mastersoft-settings-tab'),
'title' => __('Loqate AU NZ Address', 'woocommerce-mastersoft-settings-tab'),
'type' => 'title',
'desc' => 'Get started with a FREE Trial licence key - https://hosted.mastersoftgroup.com/console/#/.',
'desc' => 'Get started with a FREE Trial licence key - <a href="https://www.loqate.com/anz/register/" target="_blank">Register</a>.',
'id' => 'wc_mastersoft_settings_tab_section_title'
),
'console_button' => array(
Expand All @@ -64,7 +64,7 @@ public static function get_settings()
'id' => 'wc_mastersoft_settings_tab_console_button',
'desc_tip' => true,
'custom_attributes' => array(
'onclick' => "window.open('https://hosted.mastersoftgroup.com/console/#/signUp', '_blank')"
'onclick' => "window.open('https://hosted.mastersoftgroup.com/console/#/', '_blank')"
)
),
'licence_key' => array(
Expand All @@ -74,40 +74,34 @@ public static function get_settings()
'id' => 'wc_mastersoft_settings_tab_licence_key',
'placeholder' => 'Get your Licence Key'
),
'url' => array(
'title' => __('URL', 'woocommerce-mastersoft-settings-tab'),
'type' => 'text',
'desc' => __('Default value if empty/blank: https://hosted.mastersoftgroup.com.', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_url',
'default' => 'https://hosted.mastersoftgroup.com'
),
'widget_layout' => array(
'title' => __('Address Layout Options', 'woocommerce-mastersoft-settings-tab'),
'type' => 'textarea',
'desc' => __('Address layout options. Must be in valid JSON format. Choose "OPTIMISED" layout to replace detailed address fields with single address line. Preconfigured and default value: { "layout": "DEFAULT" }.'),
'desc' => __('Address layout options. Must be in valid format. The preconfigured value is OPTIMISED. Options {"layout":"OPTIMISED"} or {"layout":"DEFAULT"}.'),
'id' => 'wc_mastersoft_settings_tab_widget_layout',
'default' => '{ "layout": "DEFAULT" }'
'default' => '{ "layout": "OPTIMISED" }'
),
'widget_options' => array(
'title' => __('Default Widget Options', 'woocommerce-mastersoft-settings-tab'),
'title' => __('Address FeatureOptions', 'woocommerce-mastersoft-settings-tab'),
'type' => 'textarea',
'desc' => __('Must be in valid JSON format - http://developer.mastersoftgroup.com/harmony/api/object/address.html#FeatureOption. Preconfigured and default value: { "singleLineHitNumber": 5, "caseType": "TITLE" }.', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid format. The preconfigured value is { "singleLineHitNumber": 5, "caseType": "TITLE", "displayGnafLot":1,"suppressLot":1}. '.
'Further documentation <a href="https://docs.mastersoftgroup.com/loqate-harmony-api/api-specification/address/address-validation-and-lookup#request" target="_blank">Here</a>.', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_widget_options',
'default' => '{ "singleLineHitNumber": 5, "caseType": "TITLE" }'
'default' => '{ "singleLineHitNumber": 5, "caseType": "TITLE", "displayGnafLot":1,"suppressLot":1 }'
),
'widget_options_au' => array(
'title' => __('Widget Options for AUSTRALIA', 'woocommerce-mastersoft-settings-tab'),
'title' => __('Address Data Australia', 'woocommerce-mastersoft-settings-tab'),
'type' => 'textarea',
'desc' => __('Must be in valid JSON format. If the same key is in the Default Widget Options, the value here will take precedence for AUSTRALIA. Preconfigured and default value: { "sot": "GNAF" }.', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid format. The preconfigured value is {"sot":"GNAF"}. Options {"sot":"AUPAF"} , {"sot":"AUSOTS"} .', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_widget_options_au',
'default' => '{ "sot": "GNAF" }'
),
'widget_options_nz' => array(
'type' => 'textarea',
'title' => __('Widget Options for NEW ZEALAND', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid JSON format. If the same key is in the Default Widget Options, the value here will take precedence for NEW ZEALAND. Note: to populate the Region, sot must be "NZAD" and exposeAttributes must be "1". Preconfigured and default value: { "sot": "NZAD", "exposeAttributes": "1" }.', 'woocommerce-mastersoft-settings-tab'),
'title' => __('Address Data New Zealand', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid format. The preconfigured value is {"sot":"NZPAF"}. Options {"sot":"NZAD", "exposeAttributes":"1"} , {"sot":"CNAR"}.', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_widget_options_nz',
'default' => '{ "sot": "NZAD", "exposeAttributes": "1" }'
'default' => '{ "sot": "NZPAF" }'
),
'widget_options_enhanced_state' => array(
'title' => __('Enhanced State/County/Region', 'woocommerce-mastersoft-settings-tab'),
Expand Down Expand Up @@ -136,7 +130,10 @@ public static function get_settings()
'widget_options_business' => array(
'title' => __('Widget Options for Business Lookup', 'woocommerce-mastersoft-settings-tab'),
'type' => 'textarea',
'desc' => __('Must be in valid JSON format. If the same key is in the Default Widget Options, the value here will take precedence for Business Lookup. Preconfigured and default value: { "caseType": "TITLE", "hits": 5, "taxStatus": "", "bnStatus": "", "state": ["NSW","VIC","QLD","ACT","SA","WA","NT"], "nameTypes": ["MN","BN","TRD","OTN","LGL","DGR"] }', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid format. The preconfigured value is ​'.
'{ "caseType": "TITLE", "hits": 5, "taxStatus": "", "bnStatus": "", "state": ["NSW","VIC","QLD","ACT","SA","WA","NT"], "nameTypes": ["MN","BN","TRD","OTN","LGL","DGR"] }. '.
'Note: state only applicable for au business lookup, it will be ignored for other countries. '.
'Further documentation <a href="https://docs.mastersoftgroup.com/loqate-harmony-api/api-specification/business-validation" target="_blank">Here</a>.', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_widget_options_business',
'default' => '{ "caseType": "TITLE", "hits": 5, "taxStatus": "", "bnStatus": "", "state": ["NSW","VIC","QLD","ACT","SA","WA","NT"], "nameTypes": ["MN","BN","TRD","OTN","LGL","DGR"] }'
),
Expand Down Expand Up @@ -167,7 +164,8 @@ public static function get_settings()
'widget_options_email' => array(
'title' => __('Widget Options for Email Validation', 'woocommerce-mastersoft-settings-tab'),
'type' => 'textarea',
'desc' => __('Must be in valid JSON format. If the same key is in the Default Widget Options, the value here will take precedence for email validation. Preconfigured and default value: { "sot": "VE_ALL", "options": [ "FORMAT", "BLOCKLIST", "DOMAIN", "MAILSERVER", "MAILBOX" ] }.', 'woocommerce-mastersoft-settings-tab'),
'desc' => __('Must be in valid format. The preconfigured value is { "sot": "VE_ALL", "options": [ "FORMAT", "BLOCKLIST", "DOMAIN", "MAILSERVER", "MAILBOX" ] }. '.
'Further documentation <a href="https://docs.mastersoftgroup.com/loqate-harmony-api/api-specification/email-validation" target="_blank">Here</a>.​', 'woocommerce-mastersoft-settings-tab'),
'id' => 'wc_mastersoft_settings_tab_widget_options_email',
'default' => '{ "sot": "VE_ALL", "options": [ "FORMAT", "BLOCKLIST", "DOMAIN", "MAILSERVER", "MAILBOX" ] }'
),
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"name": "mastersoft/woocommerce-mastersoft-address",
"description": "A WooCommerce Address Autocomplete plugin for Checkout and Account Addresses",
"description": "Performance checkout with Address lookup and validation, business lookup and validation, email and phone validation​",
"type": "wordpress-plugin",
"version": "1.6.0",
"version": "2.0.0",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Mastersoft",
"email": "support@mastersoftgroup.com",
"homepage": "https://www.mastersoftgroup.com/"
"name": "Loqate",
"email": "customer.support@gbgplc.com",
"homepage": "https://www.loqate.com/anz/"
}
],
"support": {
"issues": "https://github.com/MastersoftGroup/mastersoft-address-woocommerce/issues"
},
"keywords": [
"loqate",
"mastersoft",
"wordpress",
"woocommerce",
Expand Down

0 comments on commit 4713309

Please sign in to comment.