@@ -440,7 +440,7 @@ function add_swiftcomplete_order_billing($fields)
440
440
if ($ settings !== false && array_key_exists ('api_key ' , $ settings ) && strlen ($ settings ['api_key ' ]) > 0 )
441
441
$ api_key = $ settings ['api_key ' ];
442
442
443
- wp_enqueue_script ('swiftcomplete_script ' , 'https://script .swiftcomplete.com/js/swiftcomplete .js ' );
443
+ wp_enqueue_script ('swiftcomplete_script ' , 'https://assets .swiftcomplete.com/js/swiftlookup .js ' );
444
444
wp_enqueue_script ('swiftcomplete_launch ' , plugin_dir_url (__FILE__ ) . 'addressfinder.js ' , array ('jquery ' ), '1.0.7 ' );
445
445
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAdminAddressLookup("billing", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('billing_placeholder ' , $ settings ) ? esc_attr ($ settings ['billing_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
446
446
@@ -476,7 +476,7 @@ function add_swiftcomplete_order_shipping($fields)
476
476
if ($ settings !== false && array_key_exists ('api_key ' , $ settings ) && strlen ($ settings ['api_key ' ]) > 0 )
477
477
$ api_key = $ settings ['api_key ' ];
478
478
479
- wp_enqueue_script ('swiftcomplete_script ' , 'https://script .swiftcomplete.com/js/swiftcomplete .js ' );
479
+ wp_enqueue_script ('swiftcomplete_script ' , 'https://assets .swiftcomplete.com/js/swiftlookup .js ' );
480
480
wp_enqueue_script ('swiftcomplete_launch ' , plugin_dir_url (__FILE__ ) . 'addressfinder.js ' , array ('jquery ' ), '1.0.7 ' );
481
481
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAdminAddressLookup("shipping", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('billing_placeholder ' , $ settings ) ? esc_attr ($ settings ['billing_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
482
482
@@ -513,7 +513,7 @@ function add_swiftcomplete_billing()
513
513
if ($ settings !== false && array_key_exists ('api_key ' , $ settings ) && strlen ($ settings ['api_key ' ]) > 0 )
514
514
$ api_key = $ settings ['api_key ' ];
515
515
516
- wp_enqueue_script ('swiftcomplete_script ' , 'https://script .swiftcomplete.com/js/swiftcomplete .js ' );
516
+ wp_enqueue_script ('swiftcomplete_script ' , 'https://assets .swiftcomplete.com/js/swiftlookup .js ' );
517
517
wp_enqueue_script ('swiftcomplete_launch ' , plugin_dir_url (__FILE__ ) . 'addressfinder.js ' , array ('jquery ' ), '1.0.7 ' );
518
518
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAddressLookup("billing", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address,what3words ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('billing_placeholder ' , $ settings ) ? esc_attr ($ settings ['billing_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
519
519
}
@@ -526,7 +526,7 @@ function add_swiftcomplete_shipping()
526
526
if ($ settings !== false && array_key_exists ('api_key ' , $ settings ) && strlen ($ settings ['api_key ' ]) > 0 )
527
527
$ api_key = $ settings ['api_key ' ];
528
528
529
- wp_enqueue_script ('swiftcomplete_script ' , 'https://script .swiftcomplete.com/js/swiftcomplete .js ' );
529
+ wp_enqueue_script ('swiftcomplete_script ' , 'https://assets .swiftcomplete.com/js/swiftlookup .js ' );
530
530
wp_enqueue_script ('swiftcomplete_launch ' , plugin_dir_url (__FILE__ ) . 'addressfinder.js ' , array ('jquery ' ), '1.0.7 ' );
531
531
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAddressLookup("shipping", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address,what3words ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('shipping_placeholder ' , $ settings ) ? esc_attr ($ settings ['shipping_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
532
532
}
@@ -539,7 +539,7 @@ function add_swiftcomplete_script()
539
539
if ($ settings !== false && array_key_exists ('api_key ' , $ settings ) && strlen ($ settings ['api_key ' ]) > 0 )
540
540
$ api_key = $ settings ['api_key ' ];
541
541
542
- wp_enqueue_script ('swiftcomplete_script ' , 'https://script .swiftcomplete.com/js/swiftcomplete .js ' );
542
+ wp_enqueue_script ('swiftcomplete_script ' , 'https://assets .swiftcomplete.com/js/swiftlookup .js ' );
543
543
wp_enqueue_script ('swiftcomplete_launch ' , plugin_dir_url (__FILE__ ) . 'addressfinder.js ' , array ('jquery ' ), '1.0.7 ' );
544
544
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAddressLookup("shipping", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address,what3words ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('shipping_placeholder ' , $ settings ) ? esc_attr ($ settings ['shipping_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
545
545
wp_add_inline_script ('swiftcomplete_launch ' , sprintf ('launchAddressLookup("billing", " ' . esc_attr ($ api_key ) . '", " ' . ($ settings === false || (!array_key_exists ('w3w_enabled ' , $ settings ) || (array_key_exists ('w3w_enabled ' , $ settings ) && $ settings ['w3w_enabled ' ] == true )) ? 'address,what3words ' : 'address ' ) . '", " ' . ($ settings !== false && array_key_exists ('hide_fields ' , $ settings ) && $ settings ['hide_fields ' ] ? true : false ) . '", " ' . ($ settings !== false && array_key_exists ('bias_towards_lat_lon ' , $ settings ) ? esc_attr ($ settings ['bias_towards_lat_lon ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('billing_placeholder ' , $ settings ) ? esc_attr ($ settings ['billing_placeholder ' ]) : '' ) . '", " ' . ($ settings !== false && array_key_exists ('state_counties_enabled ' , $ settings ) ? esc_attr ($ settings ['state_counties_enabled ' ]) : '' ) . '") ' ));
0 commit comments