Flexible Shipping for WooCommerce - Version 3.3.13

Version Description

  • 2019-05-13 =
  • Fixed fatal when can't unserialize the token from persistence container
  • Added option of hiding the FS Connect box
  • Added plugin rate notice
  • Fixed CSS select height
Download this release

Release Info

Developer jablonowski
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 3.3.13
Comparing to
See all releases

Code changes from version 3.3.12 to 3.3.13

assets/css/admin.css CHANGED
@@ -226,7 +226,7 @@ table.flexible_shipping_method_rules tfoot th {
226
  }
227
 
228
  /** select */
229
- .wp-admin select {
230
  height: 100%;
231
  }
232
 
@@ -731,3 +731,11 @@ input.woocommerce_flexible_shipping_service_name {
731
  width: 33.33%;
732
  }
733
  }
 
 
 
 
 
 
 
 
226
  }
227
 
228
  /** select */
229
+ .woocommerce .wp-admin select {
230
  height: 100%;
231
  }
232
 
731
  width: 33.33%;
732
  }
733
  }
734
+
735
+ .fs-connect-box-header {
736
+ margin-top: 3em;
737
+ }
738
+
739
+ .hide-fs-connect-integration-box {
740
+ display: none;
741
+ }
assets/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- table.flexible_shipping_methods th.select,table.flexible_shipping_methods td.select{text-align:center;width:40px;margin-top:-7px;margin-left:-6px;padding:2px}table.flexible_shipping_methods .checkbox-select-all{margin:0 12px 0 8px}table.flexible_shipping_methods th.integration,table.flexible_shipping_methods td.integration{text-align:center;width:130px}table.flexible_shipping_methods tr.highlight td{background-color:#e4f2fd}table.flexible_shipping_methods.wc_shipping th{font-weight:400;width:auto}table.flexible_shipping_methods td.ui-sortable-handle:before,table.flexible_shipping_services td.ui-sortable-handle:before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules th{padding:5px 10px 5px 0}table.flexible_shipping_method_rules td p,table.flexible_shipping_method_rules td p input,table.flexible_shipping_method_rules td p select{margin:0;width:100%;box-shadow:none;padding:0 !important}table.flexible_shipping_method_rules td p input[type=text]{text-align:right;padding:0 5px 0 5px !important;width:100% !important}table.flexible_shipping_method_rules td p select{margin:0;width:100% !important;box-shadow:none;line-height:28px;height:37px;vertical-align:middle}table.flexible_shipping_method_rules td p input[type=checkbox]{margin:0;width:auto}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules td{text-align:center}table.flexible_shipping_method_rules th.shipping_class,table.flexible_shipping_method_rules td.shipping_class{text-align:center;width:200px}table.flexible_shipping_method_rules td.shipping_class span{border:0}table.flexible_shipping_method_rules th.stop,table.flexible_shipping_method_rules td.stop{text-align:center;width:30px}table.flexible_shipping_method_rules th.cancel,table.flexible_shipping_method_rules td.cancel{text-align:center;width:60px}.woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip{float:none;margin:0}.woocommerce table.form-table .flexible_shipping_method_rules .select2-container{margin:0}.woocommerce table.form-table .fs-locations-table .select2-container{max-width:none}.woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip{float:none}div.flexilble_shipping_export_import{float:right}table.flexible_shipping_method_rules tfoot th{padding:10px}.woocommerce_page_wc-settings #mainform{position:relative}.flexible-shipping-pro-box{max-width:280px;min-width:180px;right:0;position:absolute;top:135px}@media screen and (max-width:1199px){.flexible-shipping-pro-box{display:none}}.column-flexible_shipping{width:130px}.column-flexible_shipping .shipping-status{float:left;margin-right:8px;margin-top:4px;text-align:left;width:18px}.column-flexible_shipping .shipping-status .created:after{color:#d0c21f !important}.column-flexible_shipping .shipping-actions a.button{float:left;margin:0 4px 2px 0;display:block;height:2em !important;padding:0 !important;position:relative;text-indent:-9999px;width:2em}.column-flexible_shipping .shipping-actions a.button:after{font-family:WooCommerce;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.column-flexible_shipping .shipping-actions a.button.get-label:after{content:"\e01e"}.column-flexible_shipping .shipping-actions a.button.track:after{content:"\e01b"}.column-flexible_shipping mark.failed:after{color:#a00 !important}.column-flexible_shipping mark.manifest:after{color:#2ea2cc !important}.flexible_shipping_shipment_message{color:green}.flexible_shipping_shipment_message_error{color:#a00 !important}.flexible_shipping_shipment_message_error span{color:#444;font-weight:bold}.wp-admin select{height:100%}.button.flexible-printing-button-print{height:auto !important;white-space:normal !important;word-wrap:break-word !important}.inspire-settings{display:table;width:100%}.inspire-settings .inspire-main-content,.inspire-settings .inspire-sidebar{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.inspire-settings .inspire-main-content{min-width:800px}.inspire-settings .inspire-sidebar{padding-left:30px;width:250px}.flexible-shipping-info ol{margin-top:0}#wpbody-content .flexible-shipping-info .metabox-holder{padding-top:0}#adminmenu #toplevel_page_flexible-shipping .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce !important;content:'\e01d'}.fs-new-service{color:#006799}span.flexible_shipping_saas_connection_error{color:#a00;font-weight:bold}.fs-order-item-fallback{margin-top:.5em;color:#888}.flexible_shipping_shipment_content p select{max-width:95%}.flexible_shipping_shipment_content span.description{display:block}.fs-saas-button-cancel-created{float:right;color:#a00;margin-top:5px}.fs-saas-button-cancel-created:hover{color:#a00;cursor:pointer}.flexible_shipping_shipment_content input[type=checkbox]{float:left;margin-right:5px;margin-top:2px !important;opacity:1;border-color:#888}.flexible_shipping_shipment_content input[type=checkbox]:disabled{opacity:.7;border-color:rgba(51,51,51,0.5)}.flexible_shipping_shipment_content p.fs-saas-status span{font-weight:bold;color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-new{color:#ffba00}.flexible_shipping_shipment_content p.fs-saas-status-fs-created{color:#d0c21f}.flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed{color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-failed{color:#a00}.flexible_shipping_shipment_content p.fs-saas-status-fs-manifest{color:#2ea2cc}.flexible_shipping_shipment_content p.connection-error{font-weight:bold;color:#a00}.fs-saas-shipment span{font-weight:bold}.fs-saas-labels-counts span{font-weight:bold}.fs-saas-no-labels-left{color:#a00}div.flexible-shipping-shipment-attachments p{display:inline}.flexible_shipping_shipment_attachment_message{padding-top:10px;color:green}table.flexible_shipping_services{max-width:550px}table.flexible_shipping_services .sort{width:1%}table.flexible_shipping_services .service_code{width:30px}table.flexible_shipping_services .select{text-align:center;width:1%}table.flexible_shipping_services .select input{margin:0 8px 0 8px}.woocommerce table.form-table table.flexible_shipping_services td.service_name input{width:100%}input.woocommerce_flexible_shipping_service_name{width:100%}.updated .fs-banner__button-container{padding:.75rem 0 0}.notice-info.fs-connect__container{border-left:0;padding:0;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}@media screen and (max-width:782px){.notice-info.fs-connect__container{padding:0 !important}}.fs-connect__container{display:block;position:relative;box-sizing:border-box}.fs-connect__inner-container>a:first-child{z-index:1}.fs-connect__inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:left;justify-content:left}.fs-connect__content-container{width:1250px;position:relative;padding:2rem;z-index:0}@media(min-width:782px){.fs-connect__content-container{padding:2rem 2rem 4rem 2rem}}.fs-connect__content-container p{color:#555;font-size:.875rem}.fs-connect__content-container h2{margin-top:0;color:#555;line-height:1.6}.fs-connect__content-icon{float:right;margin:0 1.5rem 0 2.25rem}.fs-connect__content-icon svg{fill:#0085ba;height:180px;width:auto}@media(max-width:782px){.fs-connect__content-icon.fs-connect-illo{float:none;width:100%;text-align:center;margin:2.25rem 0 1.5rem}}.fs-connect__slide{display:none}.fs-connect__slide.fs__slide-is-active{display:block}@media(min-width:782px){.fs-connect__content-container .fs-banner__button-container{position:absolute;bottom:.5rem}}.fs-banner__button-container .button-primary{margin:0 .3125rem .3125rem 0}.fs-connect__vertical-nav{background-color:#f1f1f1}@media(min-width:600px){.fs-connect__vertical-nav{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}}@media(max-width:600px){.fs-connect__vertical-nav{display:none}}.fs-connect__vertical-nav-container{width:15rem}.vertical-menu__feature-item-label{display:none}@media(min-width:600px){.vertical-menu__feature-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:0;padding:.5rem;border-bottom:1px solid #dfdfdf;border-right:1px solid #dfdfdf;border-left:3px solid #f9f9f9;background-color:#f9f9f9;color:#555;cursor:pointer}.vertical-menu__feature-item:last-of-type{position:relative;top:1px}.vertical-menu__feature-item-is-selected{border-left:3px solid #0085ba;border-right:1px solid #fff;background-color:#fff;color:#2e4453}.vertical-menu__feature-item-is-selected.fs-feature-intro{border-left:3px solid #00be28}.vertical-menu__feature-item-icon{width:1.25rem;height:1.25rem;padding:.25rem;text-align:center}.vertical-menu__feature-item svg{fill:#555;vertical-align:middle}.vertical-menu__feature-item-is-selected svg{fill:#0085ba}.vertical-menu__feature-item-label{display:block;padding:.5rem}}.fs-couriers{margin-top:2.5em}.fs-courier{position:relative;margin-bottom:2.5em;text-align:center}.fs-courier img{height:50px;width:auto}.fs-courier-label{background-color:#333;border-radius:3px;color:#fff;padding:0 4px 1px;position:absolute;right:0;top:-10px}@media(min-width:1200px){.fs-couriers{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.fs-courier{width:20%}}.admin_page_flexible_shipping_connect_register .notice.is-dismissible,.admin_page_flexible_shipping_connect_register .update-nag,.admin_page_flexible_shipping_connect_register .updated,.admin_page_flexible_shipping_connect_register .settings-error{display:none !important}.fs-page-wrap{margin:0 auto;max-width:45rem}.fs-page-wrap h1{font-weight:normal;margin-bottom:.67em;text-align:center}.fs-box{display:block;position:relative;margin:0 auto 20px;padding:16px;box-sizing:border-box;background:white;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}.fs-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.admin_page_flexible_shipping_connect_register .fs-box,.fs-box.text-center{text-align:center}.admin_page_flexible_shipping_connect_register .fs-box p{margin:1.5em 0}.fs-box input[type="email"]{padding:8px 10px}.fs-actions{padding-left:40px}.fs-actions button:active{vertical-align:inherit !important}.fs-actions .spinner{float:none;margin-top:0}.fs-cols{display:flex;flex-wrap:wrap;justify-content:space-between}.fs-inner-box{box-sizing:border-box;margin-top:30px;padding:0 20px}.fs-inner-box h4{font-size:1.2em;margin-bottom:.37em}.fs-inner-box svg{fill:#0085ba;height:70px;width:auto}@media(min-width:600px){.fs-inner-box{width:33.33%}}
1
+ table.flexible_shipping_methods th.select,table.flexible_shipping_methods td.select{text-align:center;width:40px;margin-top:-7px;margin-left:-6px;padding:2px}table.flexible_shipping_methods .checkbox-select-all{margin:0 12px 0 8px}table.flexible_shipping_methods th.integration,table.flexible_shipping_methods td.integration{text-align:center;width:130px}table.flexible_shipping_methods tr.highlight td{background-color:#e4f2fd}table.flexible_shipping_methods.wc_shipping th{font-weight:400;width:auto}table.flexible_shipping_methods td.ui-sortable-handle:before,table.flexible_shipping_services td.ui-sortable-handle:before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules th{padding:5px 10px 5px 0}table.flexible_shipping_method_rules td p,table.flexible_shipping_method_rules td p input,table.flexible_shipping_method_rules td p select{margin:0;width:100%;box-shadow:none;padding:0 !important}table.flexible_shipping_method_rules td p input[type=text]{text-align:right;padding:0 5px 0 5px !important;width:100% !important}table.flexible_shipping_method_rules td p select{margin:0;width:100% !important;box-shadow:none;line-height:28px;height:37px;vertical-align:middle}table.flexible_shipping_method_rules td p input[type=checkbox]{margin:0;width:auto}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules td{text-align:center}table.flexible_shipping_method_rules th.shipping_class,table.flexible_shipping_method_rules td.shipping_class{text-align:center;width:200px}table.flexible_shipping_method_rules td.shipping_class span{border:0}table.flexible_shipping_method_rules th.stop,table.flexible_shipping_method_rules td.stop{text-align:center;width:30px}table.flexible_shipping_method_rules th.cancel,table.flexible_shipping_method_rules td.cancel{text-align:center;width:60px}.woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip{float:none;margin:0}.woocommerce table.form-table .flexible_shipping_method_rules .select2-container{margin:0}.woocommerce table.form-table .fs-locations-table .select2-container{max-width:none}.woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip{float:none}div.flexilble_shipping_export_import{float:right}table.flexible_shipping_method_rules tfoot th{padding:10px}.woocommerce_page_wc-settings #mainform{position:relative}.flexible-shipping-pro-box{max-width:280px;min-width:180px;right:0;position:absolute;top:135px}@media screen and (max-width:1199px){.flexible-shipping-pro-box{display:none}}.column-flexible_shipping{width:130px}.column-flexible_shipping .shipping-status{float:left;margin-right:8px;margin-top:4px;text-align:left;width:18px}.column-flexible_shipping .shipping-status .created:after{color:#d0c21f !important}.column-flexible_shipping .shipping-actions a.button{float:left;margin:0 4px 2px 0;display:block;height:2em !important;padding:0 !important;position:relative;text-indent:-9999px;width:2em}.column-flexible_shipping .shipping-actions a.button:after{font-family:WooCommerce;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.column-flexible_shipping .shipping-actions a.button.get-label:after{content:"\e01e"}.column-flexible_shipping .shipping-actions a.button.track:after{content:"\e01b"}.column-flexible_shipping mark.failed:after{color:#a00 !important}.column-flexible_shipping mark.manifest:after{color:#2ea2cc !important}.flexible_shipping_shipment_message{color:green}.flexible_shipping_shipment_message_error{color:#a00 !important}.flexible_shipping_shipment_message_error span{color:#444;font-weight:bold}.woocommerce .wp-admin select{height:100%}.button.flexible-printing-button-print{height:auto !important;white-space:normal !important;word-wrap:break-word !important}.inspire-settings{display:table;width:100%}.inspire-settings .inspire-main-content,.inspire-settings .inspire-sidebar{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.inspire-settings .inspire-main-content{min-width:800px}.inspire-settings .inspire-sidebar{padding-left:30px;width:250px}.flexible-shipping-info ol{margin-top:0}#wpbody-content .flexible-shipping-info .metabox-holder{padding-top:0}#adminmenu #toplevel_page_flexible-shipping .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce !important;content:'\e01d'}.fs-new-service{color:#006799}span.flexible_shipping_saas_connection_error{color:#a00;font-weight:bold}.fs-order-item-fallback{margin-top:.5em;color:#888}.flexible_shipping_shipment_content p select{max-width:95%}.flexible_shipping_shipment_content span.description{display:block}.fs-saas-button-cancel-created{float:right;color:#a00;margin-top:5px}.fs-saas-button-cancel-created:hover{color:#a00;cursor:pointer}.flexible_shipping_shipment_content input[type=checkbox]{float:left;margin-right:5px;margin-top:2px !important;opacity:1;border-color:#888}.flexible_shipping_shipment_content input[type=checkbox]:disabled{opacity:.7;border-color:rgba(51,51,51,0.5)}.flexible_shipping_shipment_content p.fs-saas-status span{font-weight:bold;color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-new{color:#ffba00}.flexible_shipping_shipment_content p.fs-saas-status-fs-created{color:#d0c21f}.flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed{color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-failed{color:#a00}.flexible_shipping_shipment_content p.fs-saas-status-fs-manifest{color:#2ea2cc}.flexible_shipping_shipment_content p.connection-error{font-weight:bold;color:#a00}.fs-saas-shipment span{font-weight:bold}.fs-saas-labels-counts span{font-weight:bold}.fs-saas-no-labels-left{color:#a00}div.flexible-shipping-shipment-attachments p{display:inline}.flexible_shipping_shipment_attachment_message{padding-top:10px;color:green}table.flexible_shipping_services{max-width:550px}table.flexible_shipping_services .sort{width:1%}table.flexible_shipping_services .service_code{width:30px}table.flexible_shipping_services .select{text-align:center;width:1%}table.flexible_shipping_services .select input{margin:0 8px 0 8px}.woocommerce table.form-table table.flexible_shipping_services td.service_name input{width:100%}input.woocommerce_flexible_shipping_service_name{width:100%}.updated .fs-banner__button-container{padding:.75rem 0 0}.notice-info.fs-connect__container{border-left:0;padding:0;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}@media screen and (max-width:782px){.notice-info.fs-connect__container{padding:0 !important}}.fs-connect__container{display:block;position:relative;box-sizing:border-box}.fs-connect__inner-container>a:first-child{z-index:1}.fs-connect__inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:left;justify-content:left}.fs-connect__content-container{width:1250px;position:relative;padding:2rem;z-index:0}@media(min-width:782px){.fs-connect__content-container{padding:2rem 2rem 4rem 2rem}}.fs-connect__content-container p{color:#555;font-size:.875rem}.fs-connect__content-container h2{margin-top:0;color:#555;line-height:1.6}.fs-connect__content-icon{float:right;margin:0 1.5rem 0 2.25rem}.fs-connect__content-icon svg{fill:#0085ba;height:180px;width:auto}@media(max-width:782px){.fs-connect__content-icon.fs-connect-illo{float:none;width:100%;text-align:center;margin:2.25rem 0 1.5rem}}.fs-connect__slide{display:none}.fs-connect__slide.fs__slide-is-active{display:block}@media(min-width:782px){.fs-connect__content-container .fs-banner__button-container{position:absolute;bottom:.5rem}}.fs-banner__button-container .button-primary{margin:0 .3125rem .3125rem 0}.fs-connect__vertical-nav{background-color:#f1f1f1}@media(min-width:600px){.fs-connect__vertical-nav{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}}@media(max-width:600px){.fs-connect__vertical-nav{display:none}}.fs-connect__vertical-nav-container{width:15rem}.vertical-menu__feature-item-label{display:none}@media(min-width:600px){.vertical-menu__feature-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:0;padding:.5rem;border-bottom:1px solid #dfdfdf;border-right:1px solid #dfdfdf;border-left:3px solid #f9f9f9;background-color:#f9f9f9;color:#555;cursor:pointer}.vertical-menu__feature-item:last-of-type{position:relative;top:1px}.vertical-menu__feature-item-is-selected{border-left:3px solid #0085ba;border-right:1px solid #fff;background-color:#fff;color:#2e4453}.vertical-menu__feature-item-is-selected.fs-feature-intro{border-left:3px solid #00be28}.vertical-menu__feature-item-icon{width:1.25rem;height:1.25rem;padding:.25rem;text-align:center}.vertical-menu__feature-item svg{fill:#555;vertical-align:middle}.vertical-menu__feature-item-is-selected svg{fill:#0085ba}.vertical-menu__feature-item-label{display:block;padding:.5rem}}.fs-couriers{margin-top:2.5em}.fs-courier{position:relative;margin-bottom:2.5em;text-align:center}.fs-courier img{height:50px;width:auto}.fs-courier-label{background-color:#333;border-radius:3px;color:#fff;padding:0 4px 1px;position:absolute;right:0;top:-10px}@media(min-width:1200px){.fs-couriers{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.fs-courier{width:20%}}.admin_page_flexible_shipping_connect_register .notice.is-dismissible,.admin_page_flexible_shipping_connect_register .update-nag,.admin_page_flexible_shipping_connect_register .updated,.admin_page_flexible_shipping_connect_register .settings-error{display:none !important}.fs-page-wrap{margin:0 auto;max-width:45rem}.fs-page-wrap h1{font-weight:normal;margin-bottom:.67em;text-align:center}.fs-box{display:block;position:relative;margin:0 auto 20px;padding:16px;box-sizing:border-box;background:white;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}.fs-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.admin_page_flexible_shipping_connect_register .fs-box,.fs-box.text-center{text-align:center}.admin_page_flexible_shipping_connect_register .fs-box p{margin:1.5em 0}.fs-box input[type="email"]{padding:8px 10px}.fs-actions{padding-left:40px}.fs-actions button:active{vertical-align:inherit !important}.fs-actions .spinner{float:none;margin-top:0}.fs-cols{display:flex;flex-wrap:wrap;justify-content:space-between}.fs-inner-box{box-sizing:border-box;margin-top:30px;padding:0 20px}.fs-inner-box h4{font-size:1.2em;margin-bottom:.37em}.fs-inner-box svg{fill:#0085ba;height:70px;width:auto}@media(min-width:600px){.fs-inner-box{width:33.33%}}.fs-connect-box-header{margin-top:3em}.hide-fs-connect-integration-box{display:none}
assets/js/admin.js CHANGED
@@ -202,7 +202,6 @@ function fs_ajax(button, id, fs_action) {
202
  }
203
 
204
  /* Notice */
205
-
206
  jQuery(function($) {
207
  $( document ).on( 'click', '.flexible-shipping-taxes-notice .notice-dismiss', function () {
208
  $.ajax( ajaxurl,
@@ -213,4 +212,35 @@ jQuery(function($) {
213
  }
214
  } );
215
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  });
202
  }
203
 
204
  /* Notice */
 
205
  jQuery(function($) {
206
  $( document ).on( 'click', '.flexible-shipping-taxes-notice .notice-dismiss', function () {
207
  $.ajax( ajaxurl,
212
  }
213
  } );
214
  } );
215
+
216
+ $( document ).on( 'click', '#enable-fs-connect-box', function () {
217
+ var fs_connect_checkbox = $('.enable-fs-connect-box');
218
+ var fs_box_state;
219
+
220
+ if ( fs_connect_checkbox.prop('checked') ){
221
+ $('.fs-connect-integration-box').slideDown();
222
+ fs_box_state = 1;
223
+ } else{
224
+ $('.fs-connect-integration-box').slideUp();
225
+ fs_box_state = 0;
226
+ }
227
+
228
+ $.ajax( ajaxurl,
229
+ {
230
+ type: 'POST',
231
+ data: {
232
+ action: 'update_fs_connect_integration_setting',
233
+ fs_box_state: fs_box_state
234
+ }
235
+ } );
236
+ } );
237
+
238
+ $( document ).on( 'click', '#flexible_shipping_rate_plugin .close-fs-rate-notice', function () {
239
+ $( '#flexible_shipping_rate_plugin .notice-dismiss' ).click();
240
+ } );
241
+
242
+ $( document ).on( 'click', '#flexible_shipping_rate_plugin .fs-not-good', function () {
243
+ $('#flexible_shipping_rate_plugin p').html( fs_admin.notice_not_good_enought );
244
+ } );
245
+
246
  });
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){if(jQuery("#flexible_shipping_labels_url").length){window.location.href=jQuery("#flexible_shipping_labels_url").attr("href")}if(jQuery("a.shipping_manifest_download").length==1){window.location.href=jQuery("a.shipping_manifest_download").attr("href")}if(typeof window.history.pushState=="function"){var a=document.location.href;var d=document.location.href;a=fs_removeParam("bulk_flexible_shipping_labels",a);a=fs_removeParam("bulk_flexible_shipping_send",a);a=fs_removeParam("bulk_flexible_shipping_manifests",a);a=fs_removeParam("bulk_flexible_shipping_no_labels_created",a);a=fs_trimChar(a,"?");if(a!=d){window.history.pushState({},"",a)}}var e=jQuery(".fs-connect__vertical-nav-container"),c=jQuery(".fs-connect__content-container");nextFeatureButtons=jQuery(".fs-banner__button-container .next-feature"),e.on("click",".vertical-menu__feature-item:not( .vertical-menu__feature-item-is-selected )",function(){b(jQuery(this).index())});nextFeatureButtons.on("click",function(g){g.preventDefault();var f=jQuery(this).closest(".fs-connect__slide").index();b(f+1)});function b(f){e.find(".vertical-menu__feature-item-is-selected").removeClass("vertical-menu__feature-item-is-selected");c.find(".fs__slide-is-active").removeClass("fs__slide-is-active");e.children().eq(f).addClass("vertical-menu__feature-item-is-selected");c.children().eq(f).addClass("fs__slide-is-active")}});function fs_removeParam(b,d){var e=d.split("?")[0],f,c=[],g=(d.indexOf("?")!==-1)?d.split("?")[1]:"";if(g!==""){c=g.split("&");for(var a=c.length-1;a>=0;a-=1){f=c[a].split("=")[0];if(f===b){c.splice(a,1)}}e=e+"?"+c.join("&")}return e}function fs_trimChar(b,a){while(b.charAt(0)==a){b=b.substring(1)}while(b.charAt(b.length-1)==a){b=b.substring(0,b.length-1)}return b}function fs_id(a){return jQuery(a).closest(".flexible_shipping_shipment").attr("data-id")}function fs_data_set_val(c,a,f){if(typeof a=="undefined"){return c}if(a.indexOf("[")==-1){c[a]=f}else{var d=a.split("[");var g=c;var e=c;var b="";jQuery.each(d,function(i,h){b=h.replace("]","");if(typeof g[b]=="undefined"){g[b]={}}e=g;g=g[b]});e[b]=f}return c}function fs_ajax(a,e,d){jQuery(".button-shipping").attr("disabled",true);jQuery(a).parent().find(".spinner").css({visibility:"visible"});var c={};jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content input, #flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content select, #flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content textarea").each(function(){if(jQuery(this).attr("type")=="radio"){c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery("#flexible_shipping_shipment_"+e+" input[name="+jQuery(this).attr("name")+"]:checked").val())}else{if(jQuery(this).attr("type")=="checkbox"){if(jQuery(this).is(":checked")){c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery(this).val())}else{c=fs_data_set_val(c,jQuery(this).attr("name"),"")}}else{c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery(this).val())}}});var b=jQuery("#flexible_shipping_shipment_nonce_"+e).val();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").hide();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").removeClass("flexible_shipping_shipment_message_error");jQuery.ajax({url:fs_admin.ajax_url,type:"POST",data:{fs_action:d,action:"flexible_shipping",nonce:b,shipment_id:e,data:c},dataType:"json"}).done(function(f){if(f){if(f=="0"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Invalid response: 0")}else{if(f.status=="success"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content").html(f.content);jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").hide();if(typeof f.message!="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html(f.message)}}else{if(typeof f.content!=="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content").html(f.content)}jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html(f.message)}}}else{jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Request failed: invalid method?")}}).always(function(){jQuery(".button-shipping").attr("disabled",false);jQuery(".shipping-spinner").parent().find(".spinner").css({visibility:"hidden"});fs_select2()}).fail(function(f,g){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Request failed: "+g+" "+f.status)})}jQuery(function(a){a(document).on("click",".flexible-shipping-taxes-notice .notice-dismiss",function(){a.ajax(ajaxurl,{type:"POST",data:{action:"flexible_shipping_taxes_notice"}})})});
1
+ jQuery(document).ready(function(){if(jQuery("#flexible_shipping_labels_url").length){window.location.href=jQuery("#flexible_shipping_labels_url").attr("href")}if(jQuery("a.shipping_manifest_download").length==1){window.location.href=jQuery("a.shipping_manifest_download").attr("href")}if(typeof window.history.pushState=="function"){var a=document.location.href;var d=document.location.href;a=fs_removeParam("bulk_flexible_shipping_labels",a);a=fs_removeParam("bulk_flexible_shipping_send",a);a=fs_removeParam("bulk_flexible_shipping_manifests",a);a=fs_removeParam("bulk_flexible_shipping_no_labels_created",a);a=fs_trimChar(a,"?");if(a!=d){window.history.pushState({},"",a)}}var e=jQuery(".fs-connect__vertical-nav-container"),c=jQuery(".fs-connect__content-container");nextFeatureButtons=jQuery(".fs-banner__button-container .next-feature"),e.on("click",".vertical-menu__feature-item:not( .vertical-menu__feature-item-is-selected )",function(){b(jQuery(this).index())});nextFeatureButtons.on("click",function(g){g.preventDefault();var f=jQuery(this).closest(".fs-connect__slide").index();b(f+1)});function b(f){e.find(".vertical-menu__feature-item-is-selected").removeClass("vertical-menu__feature-item-is-selected");c.find(".fs__slide-is-active").removeClass("fs__slide-is-active");e.children().eq(f).addClass("vertical-menu__feature-item-is-selected");c.children().eq(f).addClass("fs__slide-is-active")}});function fs_removeParam(b,d){var e=d.split("?")[0],f,c=[],g=(d.indexOf("?")!==-1)?d.split("?")[1]:"";if(g!==""){c=g.split("&");for(var a=c.length-1;a>=0;a-=1){f=c[a].split("=")[0];if(f===b){c.splice(a,1)}}e=e+"?"+c.join("&")}return e}function fs_trimChar(b,a){while(b.charAt(0)==a){b=b.substring(1)}while(b.charAt(b.length-1)==a){b=b.substring(0,b.length-1)}return b}function fs_id(a){return jQuery(a).closest(".flexible_shipping_shipment").attr("data-id")}function fs_data_set_val(c,a,f){if(typeof a=="undefined"){return c}if(a.indexOf("[")==-1){c[a]=f}else{var d=a.split("[");var g=c;var e=c;var b="";jQuery.each(d,function(i,h){b=h.replace("]","");if(typeof g[b]=="undefined"){g[b]={}}e=g;g=g[b]});e[b]=f}return c}function fs_ajax(a,e,d){jQuery(".button-shipping").attr("disabled",true);jQuery(a).parent().find(".spinner").css({visibility:"visible"});var c={};jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content input, #flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content select, #flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content textarea").each(function(){if(jQuery(this).attr("type")=="radio"){c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery("#flexible_shipping_shipment_"+e+" input[name="+jQuery(this).attr("name")+"]:checked").val())}else{if(jQuery(this).attr("type")=="checkbox"){if(jQuery(this).is(":checked")){c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery(this).val())}else{c=fs_data_set_val(c,jQuery(this).attr("name"),"")}}else{c=fs_data_set_val(c,jQuery(this).attr("name"),jQuery(this).val())}}});var b=jQuery("#flexible_shipping_shipment_nonce_"+e).val();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").hide();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").removeClass("flexible_shipping_shipment_message_error");jQuery.ajax({url:fs_admin.ajax_url,type:"POST",data:{fs_action:d,action:"flexible_shipping",nonce:b,shipment_id:e,data:c},dataType:"json"}).done(function(f){if(f){if(f=="0"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Invalid response: 0")}else{if(f.status=="success"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content").html(f.content);jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").hide();if(typeof f.message!="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html(f.message)}}else{if(typeof f.content!=="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_content").html(f.content)}jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html(f.message)}}}else{jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Request failed: invalid method?")}}).always(function(){jQuery(".button-shipping").attr("disabled",false);jQuery(".shipping-spinner").parent().find(".spinner").css({visibility:"hidden"});fs_select2()}).fail(function(f,g){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_message").html("Request failed: "+g+" "+f.status)})}jQuery(function(a){a(document).on("click",".flexible-shipping-taxes-notice .notice-dismiss",function(){a.ajax(ajaxurl,{type:"POST",data:{action:"flexible_shipping_taxes_notice"}})});a(document).on("click","#enable-fs-connect-box",function(){var c=a(".enable-fs-connect-box");var b;if(c.prop("checked")){a(".fs-connect-integration-box").slideDown();b=1}else{a(".fs-connect-integration-box").slideUp();b=0}a.ajax(ajaxurl,{type:"POST",data:{action:"update_fs_connect_integration_setting",fs_box_state:b}})});a(document).on("click","#flexible_shipping_rate_plugin .close-fs-rate-notice",function(){a("#flexible_shipping_rate_plugin .notice-dismiss").click()});a(document).on("click","#flexible_shipping_rate_plugin .fs-not-good",function(){a("#flexible_shipping_rate_plugin p").html(fs_admin.notice_not_good_enought)})});
classes/admin-notices.php CHANGED
@@ -33,6 +33,13 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Admin_Notices' ) ) {
33
  */
34
  const BASED_ON_VALUE = 'value';
35
 
 
 
 
 
 
 
 
36
  /**
37
  * @var Flexible_Shipping_Plugin
38
  */
@@ -61,6 +68,8 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Admin_Notices' ) ) {
61
  add_action( 'admin_notices', array( $this, 'admin_notices_taxes' ) );
62
 
63
  add_action( 'wp_ajax_flexible_shipping_taxes_notice', array( $this, 'wp_ajax_flexible_shipping_taxes_notice' ) );
 
 
64
  }
65
 
66
  /**
@@ -233,5 +242,84 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Admin_Notices' ) ) {
233
  printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
234
  }
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
237
  }
33
  */
34
  const BASED_ON_VALUE = 'value';
35
 
36
+ /**
37
+ *
38
+ */
39
+ const SETTINGS_CHECKED_OPTION_NAME_FS_RATE = 'flexible_shipping_rate_plugin';
40
+
41
+ const PLUGIN_RATE_NOTICE_NAME = 'flexible_shipping_rate_plugin';
42
+
43
  /**
44
  * @var Flexible_Shipping_Plugin
45
  */
68
  add_action( 'admin_notices', array( $this, 'admin_notices_taxes' ) );
69
 
70
  add_action( 'wp_ajax_flexible_shipping_taxes_notice', array( $this, 'wp_ajax_flexible_shipping_taxes_notice' ) );
71
+
72
+ add_action( 'current_screen', [ $this, 'admin_notices_fs_rate' ] );
73
  }
74
 
75
  /**
242
  printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
243
  }
244
 
245
+ /**
246
+ * @return bool
247
+ */
248
+ public function is_admin_notice_fs_rate_dismissed() {
249
+ if ( get_option( self::SETTINGS_CHECKED_OPTION_NAME_FS_RATE, '0' ) === '1' ) {
250
+ return true;
251
+ }
252
+ return false;
253
+ }
254
+
255
+ /**
256
+ * Check for which screen display notice
257
+ *
258
+ * @return bool
259
+ */
260
+ private function display_fs_rate_notice_for_screen() {
261
+ $screen = get_current_screen();
262
+ $show = false;
263
+ if ( 'woocommerce_page_wc-settings' === $screen->id && isset( $_GET['tab'] ) && 'shipping' === $_GET['tab'] ) {
264
+ $show = true;
265
+ }
266
+ return $show;
267
+ }
268
+
269
+ /**
270
+ * Is past a week after activation
271
+ *
272
+ * @return bool
273
+ */
274
+ private function is_past_a_week_after_activation() {
275
+ $method_creation_date = strtotime( get_option( 'flexible_shipping_method_creation_date', current_time( 'mysql' ) ) );
276
+ $current_date = strtotime( current_time( 'mysql' ) );
277
+ $difference = $current_date - $method_creation_date;
278
+ $days = (int) floor( $difference / ( 60 * 60 * 24 ) );
279
+ if ( $days > 6 ) {
280
+ return true;
281
+ }
282
+
283
+ return false;
284
+ }
285
+
286
+ /**
287
+ * Show FS rate notice.
288
+ */
289
+ public function admin_notices_fs_rate() {
290
+ if ( $this->display_fs_rate_notice_for_screen() && $this->is_past_a_week_after_activation() && ! $this->is_admin_notice_fs_rate_dismissed() ) {
291
+ $class = 'notice notice-info is-dismissible flexible-shipping-rate-notice';
292
+ $message = __( 'Awesome, you\'ve been using Flexible Shipping for more than 1 week. May I ask you to give it a 5-star rating on WordPress?', 'flexible-shipping' );
293
+ $actions[] = sprintf(
294
+ __( '%1$sOk, you deserved it%2$s', 'flexible-shipping' ),
295
+ '<a target="_blank" href="' . esc_url( 'https://wpde.sk/fs-rate' ) . '">',
296
+ '</a>'
297
+ );
298
+ $actions[] = sprintf(
299
+ __( '%1$sI already did%2$s', 'flexible-shipping' ),
300
+ '<a class="close-fs-rate-notice" href="#">',
301
+ '</a>'
302
+ );
303
+ $actions[] = sprintf(
304
+ __( '%1$sNot good enough%2$s', 'flexible-shipping' ),
305
+ '<a class="fs-not-good" href="#">',
306
+ '</a>'
307
+ );
308
+ $message .= '<br/>';
309
+ $message .= implode( ' | ', $actions );
310
+
311
+ new \WPDesk\Notice\PermanentDismissibleNotice(
312
+ $message,
313
+ self::PLUGIN_RATE_NOTICE_NAME,
314
+ \WPDesk\Notice\Notice::NOTICE_TYPE_INFO,
315
+ 10,
316
+ array(
317
+ 'class' => self::PLUGIN_RATE_NOTICE_NAME,
318
+ 'id' => self::PLUGIN_RATE_NOTICE_NAME,
319
+ )
320
+ );
321
+ }
322
+ }
323
+
324
  }
325
  }
classes/class-flexible-shipping-plugin.php CHANGED
@@ -109,7 +109,10 @@ class Flexible_Shipping_Plugin
109
 
110
  $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_User_Registration( $connection, $this->saas_platform_links ) );
111
 
112
- $services_manager = new WPDesk_Flexible_Shipping_SaaS_Services_Manager( $connection, $this->saas_platform_links, $this->renderer, $this->logger );
 
 
 
113
  $this->add_hookable( $services_manager );
114
 
115
  if ( $services_manager->is_require_uk_states() ) {
@@ -403,8 +406,15 @@ class Flexible_Shipping_Plugin
403
  wp_register_script( 'fs_admin',
404
  trailingslashit( $this->get_plugin_assets_url() ) . 'js/admin' . $suffix . '.js', array( 'jquery' ),
405
  $this->scripts_version );
 
 
406
  wp_localize_script( 'fs_admin', 'fs_admin', array(
407
  'ajax_url' => admin_url( 'admin-ajax.php' ),
 
 
 
 
 
408
  ) );
409
  wp_enqueue_script( 'fs_admin' );
410
 
109
 
110
  $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_User_Registration( $connection, $this->saas_platform_links ) );
111
 
112
+ $integration_checkbox = new WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox( $connection );
113
+ $this->add_hookable( $integration_checkbox );
114
+
115
+ $services_manager = new WPDesk_Flexible_Shipping_SaaS_Services_Manager( $connection, $this->saas_platform_links, $this->renderer, $integration_checkbox, $this->logger );
116
  $this->add_hookable( $services_manager );
117
 
118
  if ( $services_manager->is_require_uk_states() ) {
406
  wp_register_script( 'fs_admin',
407
  trailingslashit( $this->get_plugin_assets_url() ) . 'js/admin' . $suffix . '.js', array( 'jquery' ),
408
  $this->scripts_version );
409
+
410
+ $notice_url = get_locale() == 'pl_PL' ? 'https://wpde.sk/fs-rate-not-good-pl' : 'https://wpde.sk/fs-rate-not-good';
411
  wp_localize_script( 'fs_admin', 'fs_admin', array(
412
  'ajax_url' => admin_url( 'admin-ajax.php' ),
413
+ 'notice_not_good_enought' => sprintf(
414
+ __( 'How can We make Flexible Shipping better for you? %sJust write to us.%s', 'flexible-shipping' ),
415
+ '<a class="button close-fs-rate-notice" target="_blank" href="'. esc_url( $notice_url ) .'">',
416
+ '</a>'
417
+ )
418
  ) );
419
  wp_enqueue_script( 'fs_admin' );
420
 
classes/saas/class-saas-settings.php CHANGED
@@ -15,7 +15,6 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
15
  const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
16
 
17
  const WPDESK_HELPER_OPTIONS = 'wpdesk_helper_options';
18
-
19
  /**
20
  * Shipping methods manager.
21
  *
@@ -58,6 +57,13 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
58
  */
59
  private $new_courier_settings_section;
60
 
 
 
 
 
 
 
 
61
  /**
62
  * WPDesk_Flexible_Shipping_Connect constructor.
63
  *
@@ -65,12 +71,14 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
65
  * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
66
  * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
67
  * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
 
68
  */
69
  public function __construct(
70
  $instance_id = 0,
71
  $saas_connection = null,
72
  WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
73
- $shipping_methods_manager = null
 
74
 
75
  ) {
76
  parent::__construct( $instance_id );
@@ -84,6 +92,7 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
84
 
85
  $this->shipping_methods_manager = $shipping_methods_manager;
86
  $this->saas_connection = $saas_connection;
 
87
 
88
  if ( null === $saas_platform_links ) {
89
  $saas_platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
@@ -99,7 +108,6 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
99
  $this->init_form_fields();
100
 
101
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
102
-
103
  }
104
 
105
  /**
@@ -329,6 +337,7 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
329
  */
330
  public function generate_flexible_shipping_html( $key, $data ) {
331
  $html_class_is_dismissible = 'is-dismissible';
 
332
  ob_start();
333
  include 'views/html-shipping-method-info-description.php';
334
  $notice_content = ob_get_contents();
@@ -347,6 +356,7 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
347
  public function generate_saas_connection_html( $key, $data ) {
348
  ob_start();
349
  $saas_connection = $this->saas_connection;
 
350
  $saas_platform_my_account_url = $this->saas_platform_links->add_utm(
351
  $this->saas_platform_links->get_my_account(),
352
  'fs-configuration-myaccount',
15
  const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
16
 
17
  const WPDESK_HELPER_OPTIONS = 'wpdesk_helper_options';
 
18
  /**
19
  * Shipping methods manager.
20
  *
57
  */
58
  private $new_courier_settings_section;
59
 
60
+ /**
61
+ * Settings integration checkbox.
62
+ *
63
+ * @var WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
64
+ */
65
+ private $integration_checkbox;
66
+
67
  /**
68
  * WPDesk_Flexible_Shipping_Connect constructor.
69
  *
71
  * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
72
  * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
73
  * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
74
+ * @param WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox Setting integration checkbox.
75
  */
76
  public function __construct(
77
  $instance_id = 0,
78
  $saas_connection = null,
79
  WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
80
+ $shipping_methods_manager = null,
81
+ WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox
82
 
83
  ) {
84
  parent::__construct( $instance_id );
92
 
93
  $this->shipping_methods_manager = $shipping_methods_manager;
94
  $this->saas_connection = $saas_connection;
95
+ $this->integration_checkbox = $integration_checkbox;
96
 
97
  if ( null === $saas_platform_links ) {
98
  $saas_platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
108
  $this->init_form_fields();
109
 
110
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
 
111
  }
112
 
113
  /**
337
  */
338
  public function generate_flexible_shipping_html( $key, $data ) {
339
  $html_class_is_dismissible = 'is-dismissible';
340
+ $integration_checkbox = $this->integration_checkbox->is_visible();
341
  ob_start();
342
  include 'views/html-shipping-method-info-description.php';
343
  $notice_content = ob_get_contents();
356
  public function generate_saas_connection_html( $key, $data ) {
357
  ob_start();
358
  $saas_connection = $this->saas_connection;
359
+ $integration_checkbox = $this->integration_checkbox->is_visible();
360
  $saas_platform_my_account_url = $this->saas_platform_links->add_utm(
361
  $this->saas_platform_links->get_my_account(),
362
  'fs-configuration-myaccount',
classes/saas/class-saas-shipping-services-manager.php CHANGED
@@ -77,6 +77,13 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
77
  */
78
  private $logger;
79
 
 
 
 
 
 
 
 
80
  /**
81
  * WPDesk_Flexible_Shipping_Services constructor.
82
  *
@@ -89,6 +96,7 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
89
  WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
90
  WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
91
  WPDesk\View\Renderer\Renderer $renderer,
 
92
  \Psr\Log\LoggerInterface $logger = null
93
  ) {
94
  $this->saas_connection = $saas_connection;
@@ -99,8 +107,8 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
99
  $this->logger = WPDesk_Flexible_Shipping_Logger_Factory::create_logger();
100
  }
101
 
102
- $this->saas_platform_links = $saas_platform_links;
103
-
104
  $this->create_saas_shipping_methods();
105
 
106
  }
@@ -397,7 +405,8 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
397
  0,
398
  $this->saas_connection,
399
  $this->saas_platform_links,
400
- null
 
401
  );
402
  $this->shipping_method_connect->set_shipping_methods_manager( $this );
403
  }
77
  */
78
  private $logger;
79
 
80
+ /**
81
+ * Settings integration checkbox.
82
+ *
83
+ * @var WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
84
+ */
85
+ private $integration_checkbox;
86
+
87
  /**
88
  * WPDesk_Flexible_Shipping_Services constructor.
89
  *
96
  WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
97
  WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
98
  WPDesk\View\Renderer\Renderer $renderer,
99
+ WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox,
100
  \Psr\Log\LoggerInterface $logger = null
101
  ) {
102
  $this->saas_connection = $saas_connection;
107
  $this->logger = WPDesk_Flexible_Shipping_Logger_Factory::create_logger();
108
  }
109
 
110
+ $this->saas_platform_links = $saas_platform_links;
111
+ $this->integration_checkbox = $integration_checkbox;
112
  $this->create_saas_shipping_methods();
113
 
114
  }
405
  0,
406
  $this->saas_connection,
407
  $this->saas_platform_links,
408
+ null,
409
+ $this->integration_checkbox
410
  );
411
  $this->shipping_method_connect->set_shipping_methods_manager( $this );
412
  }
classes/saas/class-sass-settings-integration-checkbox.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
4
+ implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
5
+
6
+ use \WPDesk\PluginBuilder\Plugin\PluginAccess;
7
+
8
+ const OPTION_NAME = 'flexible_shipping_connect_integration_box';
9
+
10
+ /**
11
+ * Connection
12
+ *
13
+ * @var WPDesk_Flexible_Shipping_SaaS_Connection
14
+ */
15
+ private $connection;
16
+
17
+ /**
18
+ * WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox constructor.
19
+ *
20
+ * @param WPDesk_Flexible_Shipping_SaaS_Connection $connection
21
+ */
22
+ public function __construct( WPDesk_Flexible_Shipping_SaaS_Connection $connection ) {
23
+ $this->connection = $connection;
24
+ }
25
+
26
+ public function hooks() {
27
+ add_action( 'wp_ajax_update_fs_connect_integration_setting', [ $this, 'wp_ajax_update_integration_setting' ] );
28
+ }
29
+
30
+ /**
31
+ * Handle AJAX update setting request.
32
+ */
33
+ public function wp_ajax_update_integration_setting() {
34
+ $state = $_POST['fs_box_state'];
35
+ update_option( self::OPTION_NAME, $state );
36
+ wp_send_json_success( [ 'state' => $state ] );
37
+ }
38
+
39
+ /**
40
+ * Is FS Connect visible
41
+ *
42
+ * @return bool
43
+ */
44
+ public function is_visible() {
45
+ if( $this->connection->is_connected() ) {
46
+ return true;
47
+ }
48
+ return get_option( self::OPTION_NAME, '0' ) === '1';
49
+ }
50
+
51
+ }
classes/saas/views/html-field-saas-connection.php CHANGED
@@ -1,6 +1,10 @@
 
 
 
 
1
  </table>
2
 
3
- <div class="fs-page-wrap">
4
  <div class="fs-box">
5
  <h3 class="wc-settings-sub-title"><?php _e( 'Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
6
 
1
+ <?php
2
+ /** @var $integration_checkbox bool */
3
+ ?>
4
+
5
  </table>
6
 
7
+ <div class="fs-page-wrap fs-connect-integration-box <?php echo ! $integration_checkbox ? 'hide-fs-connect-integration-box' : ''; ?>">
8
  <div class="fs-box">
9
  <h3 class="wc-settings-sub-title"><?php _e( 'Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
10
 
classes/saas/views/html-shipping-method-info-description-body.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- $pl = get_locale() === 'pl_PL';
3
- $youtube_url = 'https://www.youtube.com/embed/qsFvYoiNDgU';
4
- $general_settings_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=general-settings#Ustawienia_glowne' : 'https://docs.flexibleshipping.com/article/25-general-settings/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=general-settings&utm_content=fs-configuration-flexibleshippingtablerate';
5
- $adding_a_shipping_method_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=adding-a-shipping-method#Metody_wysylki' : 'https://docs.flexibleshipping.com/article/29-shipping-methods/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=adding-a-shipping-method&utm_content=fs-configuration-flexibleshippingtablerate';
6
- $currency_support_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=currency-support#Waluty' : 'https://docs.flexibleshipping.com/article/30-currency-support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=currency-support&utm_content=fs-configuration-flexibleshippingtablerate';
7
- $weight_based_shipping_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=weight-based-shipping#Koszt_na_wage' : 'https://docs.flexibleshipping.com/article/32-weight-based-shipping-woocommerce/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=weight-based-shipping&utm_content=fs-configuration-flexibleshippingtablerate';
8
- $shipping_insurance_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=shipping-insurance#Ubezpieczenie_przesylki' : 'https://docs.flexibleshipping.com/article/34-shipping-insurance/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=shipping-insurance&utm_content=fs-configuration-flexibleshippingtablerate';
9
- $conditional_cash_on_delivery_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=conditional-cash-on-delivery#Przesylka_za_pobraniem' : 'https://docs.flexibleshipping.com/article/35-conditional-cash-on-delivery/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=contitional-cash-on-delivery&utm_content=fs-configuration-flexibleshippingtablerate';
10
- ?>
11
-
12
- <div class="fs-box">
13
- <h3 class="wc-settings-sub-title"><?php _e( 'How to use Flexible Shipping?', 'flexible-shipping' ); ?></h3>
14
-
15
- <ol>
16
- <li>
17
- <?php
18
- echo sprintf(
19
- __( 'To add first Flexible Shipping method go to %sShipping zones%s and add Flexible Shipping to a shipping zone.', 'flexible-shipping' ),
20
- '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ) . '">',
21
- '</a>'
22
- );
23
- ?>
24
- </li>
25
-
26
- <li><?php _e( 'You can start the configuration by clicking the Flexible Shipping link in the Shipping methods table.', 'flexible-shipping' ); ?></li>
27
- </ol>
28
-
29
- <h4><?php _e( 'Quick Video Overview', 'flexible-shipping' ); ?></h4>
30
-
31
- <div class="flexible-shipping-video">
32
- <iframe width="688" height="387" src="<?php echo $youtube_url?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
33
- </div>
34
-
35
- <h4><?php _e( 'More resources', 'flexible-shipping' ); ?></h4>
36
-
37
- <ul>
38
- <li><a href="<?php echo $general_settings_url; ?>"><?php _e( 'General Settings', 'flexible-shipping' ); ?></a></li>
39
- <li><a href="<?php echo $adding_a_shipping_method_url; ?>"><?php _e( 'Adding a shipping method', 'flexible-shipping' ); ?></a></li>
40
- <li><a href="<?php echo $currency_support_url; ?>"><?php _e( 'Currency Support', 'flexible-shipping' ); ?></a></li>
41
- <li><a href="<?php echo $weight_based_shipping_url; ?>"><?php _e( 'Weight Based Shipping', 'flexible-shipping' ); ?></a></li>
42
- <li><a href="<?php echo $shipping_insurance_url; ?>"><?php _e( 'Shipping Insurance', 'flexible-shipping' ); ?></a></li>
43
- <li><a href="<?php echo $conditional_cash_on_delivery_url; ?>"><?php _e( 'Conditional Cash on Delivery', 'flexible-shipping' ); ?></a></li>
44
- </ul>
45
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/saas/views/html-shipping-method-info-description.php CHANGED
@@ -1,7 +1,70 @@
1
- </table>
2
- <div class="fs-page-wrap">
3
  <?php
4
- require 'html-shipping-method-info-description-body.php';
 
 
 
 
 
 
 
 
 
5
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  </div>
7
  <table>
 
 
1
  <?php
2
+ /** @var $integration_checkbox bool */
3
+
4
+ $pl = get_locale() === 'pl_PL';
5
+ $youtube_url = 'https://www.youtube.com/embed/qsFvYoiNDgU';
6
+ $general_settings_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=general-settings#Ustawienia_glowne' : 'https://docs.flexibleshipping.com/article/25-general-settings/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=general-settings&utm_content=fs-configuration-flexibleshippingtablerate';
7
+ $adding_a_shipping_method_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=adding-a-shipping-method#Metody_wysylki' : 'https://docs.flexibleshipping.com/article/29-shipping-methods/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=adding-a-shipping-method&utm_content=fs-configuration-flexibleshippingtablerate';
8
+ $currency_support_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=currency-support#Waluty' : 'https://docs.flexibleshipping.com/article/30-currency-support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=currency-support&utm_content=fs-configuration-flexibleshippingtablerate';
9
+ $weight_based_shipping_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=weight-based-shipping#Koszt_na_wage' : 'https://docs.flexibleshipping.com/article/32-weight-based-shipping-woocommerce/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=weight-based-shipping&utm_content=fs-configuration-flexibleshippingtablerate';
10
+ $shipping_insurance_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=shipping-insurance#Ubezpieczenie_przesylki' : 'https://docs.flexibleshipping.com/article/34-shipping-insurance/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=shipping-insurance&utm_content=fs-configuration-flexibleshippingtablerate';
11
+ $conditional_cash_on_delivery_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=conditional-cash-on-delivery#Przesylka_za_pobraniem' : 'https://docs.flexibleshipping.com/article/35-conditional-cash-on-delivery/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=contitional-cash-on-delivery&utm_content=fs-configuration-flexibleshippingtablerate';
12
  ?>
13
+ </table>
14
+ <div class="fs-page-wrap">
15
+ <div class="fs-box">
16
+ <h3 class="wc-settings-sub-title"><?php _e( 'How to use Flexible Shipping?', 'flexible-shipping' ); ?></h3>
17
+
18
+ <ol>
19
+ <li>
20
+ <?php
21
+ echo sprintf(
22
+ __( 'To add first Flexible Shipping method go to %sShipping zones%s and add Flexible Shipping to a shipping zone.', 'flexible-shipping' ),
23
+ '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ) . '">',
24
+ '</a>'
25
+ );
26
+ ?>
27
+ </li>
28
+
29
+ <li><?php _e( 'You can start the configuration by clicking the Flexible Shipping link in the Shipping methods table.', 'flexible-shipping' ); ?></li>
30
+ </ol>
31
+
32
+ <h4><?php _e( 'Quick Video Overview', 'flexible-shipping' ); ?></h4>
33
+
34
+ <div class="flexible-shipping-video">
35
+ <iframe width="688" height="387" src="<?php echo $youtube_url?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
36
+ </div>
37
+
38
+ <h4><?php _e( 'More resources', 'flexible-shipping' ); ?></h4>
39
+
40
+ <ul>
41
+ <li><a href="<?php echo $general_settings_url; ?>"><?php _e( 'General Settings', 'flexible-shipping' ); ?></a></li>
42
+ <li><a href="<?php echo $adding_a_shipping_method_url; ?>"><?php _e( 'Adding a shipping method', 'flexible-shipping' ); ?></a></li>
43
+ <li><a href="<?php echo $currency_support_url; ?>"><?php _e( 'Currency Support', 'flexible-shipping' ); ?></a></li>
44
+ <li><a href="<?php echo $weight_based_shipping_url; ?>"><?php _e( 'Weight Based Shipping', 'flexible-shipping' ); ?></a></li>
45
+ <li><a href="<?php echo $shipping_insurance_url; ?>"><?php _e( 'Shipping Insurance', 'flexible-shipping' ); ?></a></li>
46
+ <li><a href="<?php echo $conditional_cash_on_delivery_url; ?>"><?php _e( 'Conditional Cash on Delivery', 'flexible-shipping' ); ?></a></li>
47
+ </ul>
48
+
49
+ <h3 class="wc-settings-sub-title fs-connect-box-header"><?php _e( 'Integrations', 'flexible-shipping' ); ?></h3>
50
+ <table class="form-table">
51
+ <tbody>
52
+ <tr valign="top">
53
+ <th scope="row" class="titledesc">
54
+ <label for="enable-fs-connect-box"><?php _e( 'FS Connect', 'flexible-shipping' ); ?></label>
55
+ </th>
56
+ <td class="forminp">
57
+ <fieldset>
58
+ <legend class="screen-reader-text"><span><?php _e( 'FS Connect', 'flexible-shipping' ); ?></span></legend>
59
+ <label for="enable-fs-connect-box">
60
+ <input class="enable-fs-connect-box" <?php checked( $integration_checkbox, 1 ); ?> type="checkbox" name="fsconnect_box" id="enable-fs-connect-box" style="" value="1"> <?php _e( 'Enable integration with Flexible Shipping Connect', 'flexible-shipping' ); ?>
61
+ </label>
62
+ </fieldset>
63
+ </td>
64
+ </tr>
65
+ </tbody>
66
+ </table>
67
+
68
+ </div>
69
  </div>
70
  <table>
classes/shipping-method.php CHANGED
@@ -227,12 +227,22 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping' ) ) {
227
  return $next_id;
228
  }
229
 
 
 
 
 
 
 
 
 
 
230
  public function process_admin_options() {
231
  $action = false;
232
  if ( isset( $_POST['method_action'] ) ) {
233
  $action = $_POST['method_action'];
234
  }
235
  if ( $action == 'new' || $action == 'edit' ) {
 
236
  $shipping_methods = get_option( $this->shipping_methods_option, array() );
237
  $shipping_method = array();
238
  if ( $action == 'new' ) {
227
  return $next_id;
228
  }
229
 
230
+ /**
231
+ * Add method creation date.
232
+ */
233
+ private function add_method_creation_date() {
234
+ if ( ! get_option( 'flexible_shipping_method_creation_date' ) ) {
235
+ add_option( 'flexible_shipping_method_creation_date', current_time('mysql') );
236
+ }
237
+ }
238
+
239
  public function process_admin_options() {
240
  $action = false;
241
  if ( isset( $_POST['method_action'] ) ) {
242
  $action = $_POST['method_action'];
243
  }
244
  if ( $action == 'new' || $action == 'edit' ) {
245
+ $this->add_method_creation_date();
246
  $shipping_methods = get_option( $this->shipping_methods_option, array() );
247
  $shipping_method = array();
248
  if ( $action == 'new' ) {
composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "02fb3d3e03cb1d0744240b03086799aa",
8
  "packages": [
9
  {
10
  "name": "moneyphp/money",
@@ -660,16 +660,16 @@
660
  },
661
  {
662
  "name": "wpdesk/wp-saas-platform-client",
663
- "version": "1.10",
664
  "source": {
665
  "type": "git",
666
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
667
- "reference": "54327826936f8133481a917774e9b4fb2a8911f9"
668
  },
669
  "dist": {
670
  "type": "zip",
671
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=54327826936f8133481a917774e9b4fb2a8911f9",
672
- "reference": "54327826936f8133481a917774e9b4fb2a8911f9",
673
  "shasum": ""
674
  },
675
  "require": {
@@ -700,7 +700,7 @@
700
  "email": "krzysiek@wpdesk.pl"
701
  }
702
  ],
703
- "time": "2019-03-14T13:31:32+00:00"
704
  },
705
  {
706
  "name": "wpdesk/wp-view",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "ead12a78be8ea3a8cc5666e7a8c16489",
8
  "packages": [
9
  {
10
  "name": "moneyphp/money",
660
  },
661
  {
662
  "name": "wpdesk/wp-saas-platform-client",
663
+ "version": "1.10.1",
664
  "source": {
665
  "type": "git",
666
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
667
+ "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf"
668
  },
669
  "dist": {
670
  "type": "zip",
671
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
672
+ "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
673
  "shasum": ""
674
  },
675
  "require": {
700
  "email": "krzysiek@wpdesk.pl"
701
  }
702
  ],
703
+ "time": "2019-05-10T09:59:04+00:00"
704
  },
705
  {
706
  "name": "wpdesk/wp-view",
flexible-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
- Version: 3.3.12
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
@@ -43,8 +43,8 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
43
  }
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
- $plugin_version = '3.3.12';
47
- $plugin_release_timestamp = '2019-05-08 15:43';
48
 
49
  $plugin_name = 'Flexible Shipping';
50
  $plugin_class_name = 'Flexible_Shipping_Plugin';
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ Version: 3.3.13
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
43
  }
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
+ $plugin_version = '3.3.13';
47
+ $plugin_release_timestamp = '2019-05-13 14:17';
48
 
49
  $plugin_name = 'Flexible Shipping';
50
  $plugin_class_name = 'Flexible_Shipping_Plugin';
lang/flexible-shipping-pl_PL.mo CHANGED
Binary file
lang/flexible-shipping-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
- "POT-Creation-Date: 2019-04-10 09:34+0200\n"
5
- "PO-Revision-Date: 2019-04-10 09:40+0200\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.1.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
@@ -22,7 +22,7 @@ msgstr ""
22
  "X-Poedit-SearchPathExcluded-0: *.js\n"
23
  "X-Poedit-SearchPathExcluded-1: vendor\n"
24
 
25
- #: classes/admin-notices.php:164
26
  #, php-format
27
  msgid ""
28
  "Flexible Shipping has changed the calculation method for shipping rules. "
@@ -35,23 +35,23 @@ msgstr ""
35
  "podstawie ustawienia podatków WooCommerce ”Wyświetlanie cen w sklepie”. "
36
  "Sprawdź %sustawienia podatków%s."
37
 
38
- #: classes/admin-notices.php:181
39
  msgid ""
40
  "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
41
  msgstr ""
42
  "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
43
 
44
- #: classes/admin-notices.php:196
45
  msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
46
  msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
47
 
48
- #: classes/admin-notices.php:211
49
  msgid ""
50
  "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
51
  msgstr ""
52
  "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
53
 
54
- #: classes/admin-notices.php:223
55
  #, php-format
56
  msgid ""
57
  "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
@@ -62,6 +62,29 @@ msgstr ""
62
  "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
63
  "Shipping na %snaszym blogu →%s"
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  #: classes/bulk-actions.php:46
66
  msgid "New"
67
  msgstr "Nowa"
@@ -175,19 +198,25 @@ msgstr ""
175
  msgid "Bulk shipping manifest - processed orders: %d"
176
  msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
177
 
178
- #: classes/class-flexible-shipping-plugin.php:452
 
 
 
 
 
 
179
  msgid "Settings"
180
  msgstr "Ustawienia"
181
 
182
- #: classes/class-flexible-shipping-plugin.php:454
183
  msgid "Docs"
184
  msgstr "Docs"
185
 
186
- #: classes/class-flexible-shipping-plugin.php:455
187
  msgid "Support"
188
  msgstr "Wsparcie"
189
 
190
- #: classes/class-flexible-shipping-plugin.php:461
191
  msgid "Upgrade"
192
  msgstr "Kup PRO"
193
 
@@ -248,17 +277,17 @@ msgstr "Nieprawidłowa wartość dla Metody obliczania w wierszu %d."
248
  msgid "%1$s value %2$s is not valid number. Row number %3$d."
249
  msgstr "%1$s wartość %2$s jest niepoprawna. Numer wiersza %3$d."
250
 
251
- #: classes/csv/class-csv-importer.php:191
252
  #, php-format
253
  msgid "Error while creating shipping class: %1$s, %2$s"
254
  msgstr "Błąd podczas tworzenia klasy wysyłkowej: %1$s, %2$s"
255
 
256
- #: classes/csv/class-csv-importer.php:224
257
  #, php-format
258
  msgid "Invalid value for Based On in row number %d."
259
  msgstr "Nieprawidłowa wartość dla Oparte na w wierszu %d."
260
 
261
- #: classes/csv/class-csv-importer.php:291
262
  #, php-format
263
  msgid "Shipping method %1$s imported as %2$s."
264
  msgstr "Metoda wysyłki %1$s została zaimportowana jako %2$s."
@@ -332,8 +361,8 @@ msgid "Shipping Manifests."
332
  msgstr "Protokoły nadania."
333
 
334
  #: classes/manifest/cpt-shipping-manifest.php:116
335
- #: classes/shipment/cpt-shipment.php:48 classes/shipment/cpt-shipment.php:50
336
- #: classes/shipment/cpt-shipment.php:52
337
  msgid "Shipments"
338
  msgstr "Przesyłki"
339
 
@@ -364,7 +393,7 @@ msgstr "Akcje"
364
  #: classes/manifest/cpt-shipping-manifest.php:219
365
  #: classes/manifest/cpt-shipping-manifest.php:243
366
  #: classes/saas/collection-points/class-saas-collection-points-ajax.php:76
367
- #: classes/shipment/cpt-shipment.php:188
368
  msgid "Invalid nonce!"
369
  msgstr "Błąd weryfikacji nonce!"
370
 
@@ -389,7 +418,7 @@ msgstr "Wszystkie protokoły nadania"
389
 
390
  #: classes/manifest/views/manifest-metabox.php:7
391
  #: classes/manifest/views/manifest-metabox.php:47
392
- #: classes/shipment/cpt-shipment.php:49
393
  #: templates/email/after_order_table.php:12
394
  #: templates/myaccount/after_order_table.php:12
395
  msgid "Shipment"
@@ -400,8 +429,9 @@ msgstr "Przesyłka"
400
  msgid "Order"
401
  msgstr "Zamówienie"
402
 
 
403
  #: classes/multilingual.php:44 classes/multilingual.php:47
404
- #: classes/multilingual.php:50 classes/saas/class-saas-settings.php:79
405
  #: classes/settings/flexible-shipping.php:16
406
  #: classes/settings/flexible-shipping.php:30
407
  #: classes/settings/shipping-method-form.php:79 classes/shipping-method.php:34
@@ -598,11 +628,11 @@ msgstr "Przejdź do ustawień %s</a>"
598
  msgid "%1$s%2$s (new)%3$s"
599
  msgstr "%1$s%2$s (nowość)%3$s"
600
 
601
- #: classes/saas/class-saas-settings.php:243
602
  msgid "Connect Services"
603
  msgstr "Usługi Connect"
604
 
605
- #: classes/saas/class-saas-settings.php:244
606
  msgid ""
607
  "Enable services to automate shipping and print labels with Flexible Shipping "
608
  "Connect."
@@ -610,7 +640,7 @@ msgstr ""
610
  "Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
611
  "Shipping Connect."
612
 
613
- #: classes/saas/class-saas-settings.php:297
614
  msgid "Advanced settings"
615
  msgstr "Ustawienia zaawansowane"
616
 
@@ -723,7 +753,7 @@ msgstr ""
723
  msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
724
  msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
725
 
726
- #: classes/saas/class-saas-shipping-services-manager.php:165
727
  #, php-format
728
  msgid "%1$sYour settings have been saved.%2$s"
729
  msgstr "%1$sUstawienia zostały zapisane.%2$s"
@@ -914,11 +944,11 @@ msgstr "Wysyłaj zamówienia szybciej z Flexible Shipping Connect"
914
  msgid "Sign up now!"
915
  msgstr "Zarejestruj się teraz!"
916
 
917
- #: classes/saas/views/html-field-saas-connection.php:5
918
  msgid "Flexible Shipping Connect"
919
  msgstr "Flexible Shipping Connect"
920
 
921
- #: classes/saas/views/html-field-saas-connection.php:12
922
  #, php-format
923
  msgid ""
924
  "Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s."
@@ -926,7 +956,7 @@ msgstr ""
926
  "Dowiedz się więcej o możliwościach związanych z %1$sFlexible Shipping Connect"
927
  "%2$s."
928
 
929
- #: classes/saas/views/html-field-saas-connection.php:22
930
  #, php-format
931
  msgid ""
932
  "%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
@@ -935,7 +965,7 @@ msgstr ""
935
  "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
936
  "%2$sswojego konta%3$s, aby otrzymać klucz."
937
 
938
- #: classes/saas/views/html-field-saas-connection.php:29
939
  msgid "Check how to start with FS Connect &rarr;"
940
  msgstr "Sprawdź jak zacząć z FS Connect &rarr;"
941
 
@@ -1079,11 +1109,11 @@ msgstr ""
1079
  "Czy jesteś pewien, że chcesz odłączyć swój sklep od Flexible Shipping "
1080
  "Connect?\\n\\nWszystkie integracje wysyłkowe zostaną wyłączone."
1081
 
1082
- #: classes/saas/views/html-shipping-method-info-description-body.php:13
1083
  msgid "How to use Flexible Shipping?"
1084
  msgstr "Jak używać Flexible Shipping?"
1085
 
1086
- #: classes/saas/views/html-shipping-method-info-description-body.php:19
1087
  #, php-format
1088
  msgid ""
1089
  "To add first Flexible Shipping method go to %sShipping zones%s and add "
@@ -1092,7 +1122,7 @@ msgstr ""
1092
  "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %sStrefy "
1093
  "wysyłki%s i dodaj Flexible Shipping do strefy wysyłki."
1094
 
1095
- #: classes/saas/views/html-shipping-method-info-description-body.php:26
1096
  msgid ""
1097
  "You can start the configuration by clicking the Flexible Shipping link in "
1098
  "the Shipping methods table."
@@ -1100,38 +1130,51 @@ msgstr ""
1100
  "Możesz rozpocząć konfigurację klikając na link Flexible Shipping w tabeli "
1101
  "”Metody wysyłki”."
1102
 
1103
- #: classes/saas/views/html-shipping-method-info-description-body.php:29
1104
  msgid "Quick Video Overview"
1105
  msgstr "Krótki przewodnik video"
1106
 
1107
- #: classes/saas/views/html-shipping-method-info-description-body.php:35
1108
  msgid "More resources"
1109
  msgstr "Więcej informacji"
1110
 
1111
- #: classes/saas/views/html-shipping-method-info-description-body.php:38
1112
  msgid "General Settings"
1113
  msgstr "Ustawienia główne"
1114
 
1115
- #: classes/saas/views/html-shipping-method-info-description-body.php:39
1116
  msgid "Adding a shipping method"
1117
  msgstr "Dodawanie metody wysyłki"
1118
 
1119
- #: classes/saas/views/html-shipping-method-info-description-body.php:40
1120
  msgid "Currency Support"
1121
  msgstr "Waluty"
1122
 
1123
- #: classes/saas/views/html-shipping-method-info-description-body.php:41
1124
  msgid "Weight Based Shipping"
1125
  msgstr "Koszt na wagę"
1126
 
1127
- #: classes/saas/views/html-shipping-method-info-description-body.php:42
1128
  msgid "Shipping Insurance"
1129
  msgstr "Ubezpieczenie przesyłki"
1130
 
1131
- #: classes/saas/views/html-shipping-method-info-description-body.php:43
1132
  msgid "Conditional Cash on Delivery"
1133
  msgstr "Przesyłka za pobraniem"
1134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1135
  #: classes/settings/flexible-shipping.php:18
1136
  #, php-format
1137
  msgid "See how to %sconfigure Flexible Shipping%s."
@@ -1204,7 +1247,7 @@ msgstr ""
1204
  "Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
1205
  "%4$sZarejestruj się teraz!%5$s"
1206
 
1207
- #: classes/settings/shipping-method-form.php:54 classes/shipping-method.php:749
1208
  msgid "Free"
1209
  msgstr "Bezpłatnie"
1210
 
@@ -1340,44 +1383,44 @@ msgstr "Zapisano"
1340
  msgid "Please override shipping_column method!"
1341
  msgstr "Proszę nadpisać metodę shipping_column!"
1342
 
1343
- #: classes/shipment/cpt-shipment.php:53
1344
  msgid "View Shipments"
1345
  msgstr "Wyświetl przesyłki"
1346
 
1347
- #: classes/shipment/cpt-shipment.php:54 classes/shipment/cpt-shipment.php:55
1348
  msgid "Add new Shipment"
1349
  msgstr "Dodaj nową przesyłkę"
1350
 
1351
- #: classes/shipment/cpt-shipment.php:56
1352
  msgid "Edit Shipment"
1353
  msgstr "Edytuj przesyłkę"
1354
 
1355
- #: classes/shipment/cpt-shipment.php:57
1356
  msgid "Save Shipment"
1357
  msgstr "Zapisz przesyłkę"
1358
 
1359
- #: classes/shipment/cpt-shipment.php:58
1360
  msgid "Search Shipments"
1361
  msgstr "Szukaj przesyłek"
1362
 
1363
- #: classes/shipment/cpt-shipment.php:59
1364
  msgid "Shipment not found"
1365
  msgstr "Nie znaleziono przesyłki"
1366
 
1367
- #: classes/shipment/cpt-shipment.php:60
1368
  msgid "Shipment not found in trash"
1369
  msgstr "Nie znaleziono przesyłki w koszu"
1370
 
1371
- #: classes/shipment/cpt-shipment.php:62
1372
  msgid "Shipments."
1373
  msgstr "Przesyłki."
1374
 
1375
- #: classes/shipment/cpt-shipment.php:82
1376
  msgctxt "Shipment status"
1377
  msgid "New"
1378
  msgstr "Nowa"
1379
 
1380
- #: classes/shipment/cpt-shipment.php:87
1381
  #, php-format
1382
  msgid "New <span class=\"count\">(%s)</span>"
1383
  msgid_plural "New <span class=\"count\">(%s)</span>"
@@ -1385,12 +1428,12 @@ msgstr[0] "Nowa <span class=\"count\">(%s)</span>"
1385
  msgstr[1] "Nowa <span class=\"count\">(%s)</span>"
1386
  msgstr[2] "Nowa <span class=\"count\">(%s)</span>"
1387
 
1388
- #: classes/shipment/cpt-shipment.php:90
1389
  msgctxt "Shipment status"
1390
  msgid "Created"
1391
  msgstr "Utworzona"
1392
 
1393
- #: classes/shipment/cpt-shipment.php:95
1394
  #, php-format
1395
  msgid "Created <span class=\"count\">(%s)</span>"
1396
  msgid_plural "Created <span class=\"count\">(%s)</span>"
@@ -1398,12 +1441,12 @@ msgstr[0] "Utworzona <span class=\"count\">(%s)</span>"
1398
  msgstr[1] "Utworzona <span class=\"count\">(%s)</span>"
1399
  msgstr[2] "Utworzona <span class=\"count\">(%s)</span>"
1400
 
1401
- #: classes/shipment/cpt-shipment.php:98
1402
  msgctxt "Shipment status"
1403
  msgid "Confirmed"
1404
  msgstr "Zatwierdzona"
1405
 
1406
- #: classes/shipment/cpt-shipment.php:103 classes/shipment/cpt-shipment.php:111
1407
  #, php-format
1408
  msgid "Confirmed <span class=\"count\">(%s)</span>"
1409
  msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
@@ -1411,17 +1454,17 @@ msgstr[0] "Zatwierdzona <span class=\"count\">(%s)</span>"
1411
  msgstr[1] "Zatwierdzona <span class=\"count\">(%s)</span>"
1412
  msgstr[2] "Zatwierdzona <span class=\"count\">(%s)</span>"
1413
 
1414
- #: classes/shipment/cpt-shipment.php:106
1415
  msgctxt "Shipment status"
1416
  msgid "Manifest created"
1417
  msgstr "Protokół nadania utworzony"
1418
 
1419
- #: classes/shipment/cpt-shipment.php:114
1420
  msgctxt "Shipment status"
1421
  msgid "Failed"
1422
  msgstr "Błąd"
1423
 
1424
- #: classes/shipment/cpt-shipment.php:119
1425
  #, php-format
1426
  msgid "Failed <span class=\"count\">(%s)</span>"
1427
  msgid_plural "Failed <span class=\"count\">(%s)</span>"
@@ -1429,7 +1472,7 @@ msgstr[0] "Błąd <span class=\"count\">(%s)</span>"
1429
  msgstr[1] "Błąd <span class=\"count\">(%s)</span>"
1430
  msgstr[2] "Błąd <span class=\"count\">(%s)</span>"
1431
 
1432
- #: classes/shipment/cpt-shipment.php:134
1433
  msgid "Shipment data"
1434
  msgstr "Dane przesyłki"
1435
 
@@ -1596,29 +1639,29 @@ msgstr "Tytuł"
1596
  msgid "Add New"
1597
  msgstr "Dodaj nową"
1598
 
1599
- #: classes/shipping-method.php:391
1600
  msgid "New Shipping Method"
1601
  msgstr "Nowa metoda wysyłki"
1602
 
1603
- #: classes/shipping-method.php:394
1604
  msgid "Edit Shipping Method"
1605
  msgstr "Edytuj metodę wysyłki"
1606
 
1607
- #: classes/shipping-method.php:404 classes/shipping-method.php:446
1608
  #, php-format
1609
  msgid "Shipping method %s added."
1610
  msgstr "Metoda wysyłki dodana: %s."
1611
 
1612
- #: classes/shipping-method.php:429
1613
  #, php-format
1614
  msgid "Shipping method %s deleted."
1615
  msgstr "Metoda wysyłki usunięta: %s."
1616
 
1617
- #: classes/shipping-method.php:432
1618
  msgid "Shipping method not found."
1619
  msgstr "Metoda wysyłki nie znaleziona."
1620
 
1621
- #: classes/shipping-method.php:458
1622
  #, php-format
1623
  msgid "Shipping method %s updated."
1624
  msgstr "Metoda wysyłki zaktualizowana: %s."
@@ -1986,8 +2029,25 @@ msgstr ""
1986
  msgid "Track shipment: "
1987
  msgstr "Śledź przesyłkę: "
1988
 
1989
- #~ msgid "FS Connect"
1990
- #~ msgstr "FS Connect"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1991
 
1992
  #~ msgid "Max value %s is not valid number. Row number %d."
1993
  #~ msgstr "Wartość Maks %s jest niepoprawna. Numer wiersza %d."
@@ -2001,22 +2061,6 @@ msgstr "Śledź przesyłkę: "
2001
  #~ msgid "Value value %s is not valid number. Row number %d."
2002
  #~ msgstr "Wartość w polu Wartość %s jest niepoprawna. Numer wiersza %d."
2003
 
2004
- #~ msgid "https://wordpress.org/plugins/flexible-shipping/"
2005
- #~ msgstr "https://pl.wordpress.org/plugins/flexible-shipping/"
2006
-
2007
- #~ msgid ""
2008
- #~ "Create additional shipment methods in WooCommerce and enable pricing "
2009
- #~ "based on cart weight or total."
2010
- #~ msgstr ""
2011
- #~ "Stwórz dodatkowe metody wysyłki w WooCommerce i włącz obliczanie kosztów "
2012
- #~ "w oparciu o wagę lub wartość zamówienia."
2013
-
2014
- #~ msgid "WP Desk"
2015
- #~ msgstr "WP Desk"
2016
-
2017
- #~ msgid "https://www.wpdesk.net/"
2018
- #~ msgstr "https://www.wpdesk.pl/"
2019
-
2020
  #~ msgid "Test"
2021
  #~ msgstr "Test"
2022
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
+ "POT-Creation-Date: 2019-05-13 08:42+0200\n"
5
+ "PO-Revision-Date: 2019-05-13 08:43+0200\n"
6
  "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
22
  "X-Poedit-SearchPathExcluded-0: *.js\n"
23
  "X-Poedit-SearchPathExcluded-1: vendor\n"
24
 
25
+ #: classes/admin-notices.php:173
26
  #, php-format
27
  msgid ""
28
  "Flexible Shipping has changed the calculation method for shipping rules. "
35
  "podstawie ustawienia podatków WooCommerce ”Wyświetlanie cen w sklepie”. "
36
  "Sprawdź %sustawienia podatków%s."
37
 
38
+ #: classes/admin-notices.php:190
39
  msgid ""
40
  "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
41
  msgstr ""
42
  "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
43
 
44
+ #: classes/admin-notices.php:205
45
  msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
46
  msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
47
 
48
+ #: classes/admin-notices.php:220
49
  msgid ""
50
  "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
51
  msgstr ""
52
  "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
53
 
54
+ #: classes/admin-notices.php:232
55
  #, php-format
56
  msgid ""
57
  "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
62
  "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
63
  "Shipping na %snaszym blogu →%s"
64
 
65
+ #: classes/admin-notices.php:292
66
+ msgid ""
67
+ "Awesome, you've been using Flexible Shipping for more than 1 week. May I ask "
68
+ "you to give it a 5-star rating on WordPress?"
69
+ msgstr ""
70
+ "Fantastycznie, korzystasz z Flexible Shipping już ponad tydzień. Czy możemy "
71
+ "Cię prosić o wystawienie 5-gwiazdkowej oceny?"
72
+
73
+ #: classes/admin-notices.php:294
74
+ #, php-format
75
+ msgid "%1$sOk, you deserved it%2$s"
76
+ msgstr "%1$sTak, zasługujecie na nią%2$s"
77
+
78
+ #: classes/admin-notices.php:299
79
+ #, php-format
80
+ msgid "%1$sI already did%2$s"
81
+ msgstr "%1$sJuż to zrobiłem/am%2$s"
82
+
83
+ #: classes/admin-notices.php:304
84
+ #, php-format
85
+ msgid "%1$sNot good enough%2$s"
86
+ msgstr "%1$sNie jest wystarczająco dobra%2$s"
87
+
88
  #: classes/bulk-actions.php:46
89
  msgid "New"
90
  msgstr "Nowa"
198
  msgid "Bulk shipping manifest - processed orders: %d"
199
  msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
200
 
201
+ #: classes/class-flexible-shipping-plugin.php:414
202
+ #, php-format
203
+ msgid "How can We make Flexible Shipping better for you? %sJust write to us.%s"
204
+ msgstr ""
205
+ "Jak możemy sprawić, aby Flexible Shipping był lepszy? %sNapisz do nas.%s"
206
+
207
+ #: classes/class-flexible-shipping-plugin.php:462
208
  msgid "Settings"
209
  msgstr "Ustawienia"
210
 
211
+ #: classes/class-flexible-shipping-plugin.php:464
212
  msgid "Docs"
213
  msgstr "Docs"
214
 
215
+ #: classes/class-flexible-shipping-plugin.php:465
216
  msgid "Support"
217
  msgstr "Wsparcie"
218
 
219
+ #: classes/class-flexible-shipping-plugin.php:471
220
  msgid "Upgrade"
221
  msgstr "Kup PRO"
222
 
277
  msgid "%1$s value %2$s is not valid number. Row number %3$d."
278
  msgstr "%1$s wartość %2$s jest niepoprawna. Numer wiersza %3$d."
279
 
280
+ #: classes/csv/class-csv-importer.php:194
281
  #, php-format
282
  msgid "Error while creating shipping class: %1$s, %2$s"
283
  msgstr "Błąd podczas tworzenia klasy wysyłkowej: %1$s, %2$s"
284
 
285
+ #: classes/csv/class-csv-importer.php:227
286
  #, php-format
287
  msgid "Invalid value for Based On in row number %d."
288
  msgstr "Nieprawidłowa wartość dla Oparte na w wierszu %d."
289
 
290
+ #: classes/csv/class-csv-importer.php:294
291
  #, php-format
292
  msgid "Shipping method %1$s imported as %2$s."
293
  msgstr "Metoda wysyłki %1$s została zaimportowana jako %2$s."
361
  msgstr "Protokoły nadania."
362
 
363
  #: classes/manifest/cpt-shipping-manifest.php:116
364
+ #: classes/shipment/cpt-shipment.php:50 classes/shipment/cpt-shipment.php:52
365
+ #: classes/shipment/cpt-shipment.php:54
366
  msgid "Shipments"
367
  msgstr "Przesyłki"
368
 
393
  #: classes/manifest/cpt-shipping-manifest.php:219
394
  #: classes/manifest/cpt-shipping-manifest.php:243
395
  #: classes/saas/collection-points/class-saas-collection-points-ajax.php:76
396
+ #: classes/shipment/cpt-shipment.php:190
397
  msgid "Invalid nonce!"
398
  msgstr "Błąd weryfikacji nonce!"
399
 
418
 
419
  #: classes/manifest/views/manifest-metabox.php:7
420
  #: classes/manifest/views/manifest-metabox.php:47
421
+ #: classes/shipment/cpt-shipment.php:51
422
  #: templates/email/after_order_table.php:12
423
  #: templates/myaccount/after_order_table.php:12
424
  msgid "Shipment"
429
  msgid "Order"
430
  msgstr "Zamówienie"
431
 
432
+ #. Plugin Name of the plugin/theme
433
  #: classes/multilingual.php:44 classes/multilingual.php:47
434
+ #: classes/multilingual.php:50 classes/saas/class-saas-settings.php:87
435
  #: classes/settings/flexible-shipping.php:16
436
  #: classes/settings/flexible-shipping.php:30
437
  #: classes/settings/shipping-method-form.php:79 classes/shipping-method.php:34
628
  msgid "%1$s%2$s (new)%3$s"
629
  msgstr "%1$s%2$s (nowość)%3$s"
630
 
631
+ #: classes/saas/class-saas-settings.php:251
632
  msgid "Connect Services"
633
  msgstr "Usługi Connect"
634
 
635
+ #: classes/saas/class-saas-settings.php:252
636
  msgid ""
637
  "Enable services to automate shipping and print labels with Flexible Shipping "
638
  "Connect."
640
  "Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
641
  "Shipping Connect."
642
 
643
+ #: classes/saas/class-saas-settings.php:305
644
  msgid "Advanced settings"
645
  msgstr "Ustawienia zaawansowane"
646
 
753
  msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
754
  msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
755
 
756
+ #: classes/saas/class-saas-shipping-services-manager.php:173
757
  #, php-format
758
  msgid "%1$sYour settings have been saved.%2$s"
759
  msgstr "%1$sUstawienia zostały zapisane.%2$s"
944
  msgid "Sign up now!"
945
  msgstr "Zarejestruj się teraz!"
946
 
947
+ #: classes/saas/views/html-field-saas-connection.php:9
948
  msgid "Flexible Shipping Connect"
949
  msgstr "Flexible Shipping Connect"
950
 
951
+ #: classes/saas/views/html-field-saas-connection.php:16
952
  #, php-format
953
  msgid ""
954
  "Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s."
956
  "Dowiedz się więcej o możliwościach związanych z %1$sFlexible Shipping Connect"
957
  "%2$s."
958
 
959
+ #: classes/saas/views/html-field-saas-connection.php:26
960
  #, php-format
961
  msgid ""
962
  "%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
965
  "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
966
  "%2$sswojego konta%3$s, aby otrzymać klucz."
967
 
968
+ #: classes/saas/views/html-field-saas-connection.php:33
969
  msgid "Check how to start with FS Connect &rarr;"
970
  msgstr "Sprawdź jak zacząć z FS Connect &rarr;"
971
 
1109
  "Czy jesteś pewien, że chcesz odłączyć swój sklep od Flexible Shipping "
1110
  "Connect?\\n\\nWszystkie integracje wysyłkowe zostaną wyłączone."
1111
 
1112
+ #: classes/saas/views/html-shipping-method-info-description.php:16
1113
  msgid "How to use Flexible Shipping?"
1114
  msgstr "Jak używać Flexible Shipping?"
1115
 
1116
+ #: classes/saas/views/html-shipping-method-info-description.php:22
1117
  #, php-format
1118
  msgid ""
1119
  "To add first Flexible Shipping method go to %sShipping zones%s and add "
1122
  "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %sStrefy "
1123
  "wysyłki%s i dodaj Flexible Shipping do strefy wysyłki."
1124
 
1125
+ #: classes/saas/views/html-shipping-method-info-description.php:29
1126
  msgid ""
1127
  "You can start the configuration by clicking the Flexible Shipping link in "
1128
  "the Shipping methods table."
1130
  "Możesz rozpocząć konfigurację klikając na link Flexible Shipping w tabeli "
1131
  "”Metody wysyłki”."
1132
 
1133
+ #: classes/saas/views/html-shipping-method-info-description.php:32
1134
  msgid "Quick Video Overview"
1135
  msgstr "Krótki przewodnik video"
1136
 
1137
+ #: classes/saas/views/html-shipping-method-info-description.php:38
1138
  msgid "More resources"
1139
  msgstr "Więcej informacji"
1140
 
1141
+ #: classes/saas/views/html-shipping-method-info-description.php:41
1142
  msgid "General Settings"
1143
  msgstr "Ustawienia główne"
1144
 
1145
+ #: classes/saas/views/html-shipping-method-info-description.php:42
1146
  msgid "Adding a shipping method"
1147
  msgstr "Dodawanie metody wysyłki"
1148
 
1149
+ #: classes/saas/views/html-shipping-method-info-description.php:43
1150
  msgid "Currency Support"
1151
  msgstr "Waluty"
1152
 
1153
+ #: classes/saas/views/html-shipping-method-info-description.php:44
1154
  msgid "Weight Based Shipping"
1155
  msgstr "Koszt na wagę"
1156
 
1157
+ #: classes/saas/views/html-shipping-method-info-description.php:45
1158
  msgid "Shipping Insurance"
1159
  msgstr "Ubezpieczenie przesyłki"
1160
 
1161
+ #: classes/saas/views/html-shipping-method-info-description.php:46
1162
  msgid "Conditional Cash on Delivery"
1163
  msgstr "Przesyłka za pobraniem"
1164
 
1165
+ #: classes/saas/views/html-shipping-method-info-description.php:49
1166
+ msgid "Integrations"
1167
+ msgstr "Integracja"
1168
+
1169
+ #: classes/saas/views/html-shipping-method-info-description.php:54
1170
+ #: classes/saas/views/html-shipping-method-info-description.php:58
1171
+ msgid "FS Connect"
1172
+ msgstr "FS Connect"
1173
+
1174
+ #: classes/saas/views/html-shipping-method-info-description.php:60
1175
+ msgid "Enable integration with Flexible Shipping Connect"
1176
+ msgstr "Włącz integrację z Flexible Shipping Connect"
1177
+
1178
  #: classes/settings/flexible-shipping.php:18
1179
  #, php-format
1180
  msgid "See how to %sconfigure Flexible Shipping%s."
1247
  "Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
1248
  "%4$sZarejestruj się teraz!%5$s"
1249
 
1250
+ #: classes/settings/shipping-method-form.php:54 classes/shipping-method.php:759
1251
  msgid "Free"
1252
  msgstr "Bezpłatnie"
1253
 
1383
  msgid "Please override shipping_column method!"
1384
  msgstr "Proszę nadpisać metodę shipping_column!"
1385
 
1386
+ #: classes/shipment/cpt-shipment.php:55
1387
  msgid "View Shipments"
1388
  msgstr "Wyświetl przesyłki"
1389
 
1390
+ #: classes/shipment/cpt-shipment.php:56 classes/shipment/cpt-shipment.php:57
1391
  msgid "Add new Shipment"
1392
  msgstr "Dodaj nową przesyłkę"
1393
 
1394
+ #: classes/shipment/cpt-shipment.php:58
1395
  msgid "Edit Shipment"
1396
  msgstr "Edytuj przesyłkę"
1397
 
1398
+ #: classes/shipment/cpt-shipment.php:59
1399
  msgid "Save Shipment"
1400
  msgstr "Zapisz przesyłkę"
1401
 
1402
+ #: classes/shipment/cpt-shipment.php:60
1403
  msgid "Search Shipments"
1404
  msgstr "Szukaj przesyłek"
1405
 
1406
+ #: classes/shipment/cpt-shipment.php:61
1407
  msgid "Shipment not found"
1408
  msgstr "Nie znaleziono przesyłki"
1409
 
1410
+ #: classes/shipment/cpt-shipment.php:62
1411
  msgid "Shipment not found in trash"
1412
  msgstr "Nie znaleziono przesyłki w koszu"
1413
 
1414
+ #: classes/shipment/cpt-shipment.php:64
1415
  msgid "Shipments."
1416
  msgstr "Przesyłki."
1417
 
1418
+ #: classes/shipment/cpt-shipment.php:84
1419
  msgctxt "Shipment status"
1420
  msgid "New"
1421
  msgstr "Nowa"
1422
 
1423
+ #: classes/shipment/cpt-shipment.php:89
1424
  #, php-format
1425
  msgid "New <span class=\"count\">(%s)</span>"
1426
  msgid_plural "New <span class=\"count\">(%s)</span>"
1428
  msgstr[1] "Nowa <span class=\"count\">(%s)</span>"
1429
  msgstr[2] "Nowa <span class=\"count\">(%s)</span>"
1430
 
1431
+ #: classes/shipment/cpt-shipment.php:92
1432
  msgctxt "Shipment status"
1433
  msgid "Created"
1434
  msgstr "Utworzona"
1435
 
1436
+ #: classes/shipment/cpt-shipment.php:97
1437
  #, php-format
1438
  msgid "Created <span class=\"count\">(%s)</span>"
1439
  msgid_plural "Created <span class=\"count\">(%s)</span>"
1441
  msgstr[1] "Utworzona <span class=\"count\">(%s)</span>"
1442
  msgstr[2] "Utworzona <span class=\"count\">(%s)</span>"
1443
 
1444
+ #: classes/shipment/cpt-shipment.php:100
1445
  msgctxt "Shipment status"
1446
  msgid "Confirmed"
1447
  msgstr "Zatwierdzona"
1448
 
1449
+ #: classes/shipment/cpt-shipment.php:105 classes/shipment/cpt-shipment.php:113
1450
  #, php-format
1451
  msgid "Confirmed <span class=\"count\">(%s)</span>"
1452
  msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
1454
  msgstr[1] "Zatwierdzona <span class=\"count\">(%s)</span>"
1455
  msgstr[2] "Zatwierdzona <span class=\"count\">(%s)</span>"
1456
 
1457
+ #: classes/shipment/cpt-shipment.php:108
1458
  msgctxt "Shipment status"
1459
  msgid "Manifest created"
1460
  msgstr "Protokół nadania utworzony"
1461
 
1462
+ #: classes/shipment/cpt-shipment.php:116
1463
  msgctxt "Shipment status"
1464
  msgid "Failed"
1465
  msgstr "Błąd"
1466
 
1467
+ #: classes/shipment/cpt-shipment.php:121
1468
  #, php-format
1469
  msgid "Failed <span class=\"count\">(%s)</span>"
1470
  msgid_plural "Failed <span class=\"count\">(%s)</span>"
1472
  msgstr[1] "Błąd <span class=\"count\">(%s)</span>"
1473
  msgstr[2] "Błąd <span class=\"count\">(%s)</span>"
1474
 
1475
+ #: classes/shipment/cpt-shipment.php:136
1476
  msgid "Shipment data"
1477
  msgstr "Dane przesyłki"
1478
 
1639
  msgid "Add New"
1640
  msgstr "Dodaj nową"
1641
 
1642
+ #: classes/shipping-method.php:401
1643
  msgid "New Shipping Method"
1644
  msgstr "Nowa metoda wysyłki"
1645
 
1646
+ #: classes/shipping-method.php:404
1647
  msgid "Edit Shipping Method"
1648
  msgstr "Edytuj metodę wysyłki"
1649
 
1650
+ #: classes/shipping-method.php:414 classes/shipping-method.php:456
1651
  #, php-format
1652
  msgid "Shipping method %s added."
1653
  msgstr "Metoda wysyłki dodana: %s."
1654
 
1655
+ #: classes/shipping-method.php:439
1656
  #, php-format
1657
  msgid "Shipping method %s deleted."
1658
  msgstr "Metoda wysyłki usunięta: %s."
1659
 
1660
+ #: classes/shipping-method.php:442
1661
  msgid "Shipping method not found."
1662
  msgstr "Metoda wysyłki nie znaleziona."
1663
 
1664
+ #: classes/shipping-method.php:468
1665
  #, php-format
1666
  msgid "Shipping method %s updated."
1667
  msgstr "Metoda wysyłki zaktualizowana: %s."
2029
  msgid "Track shipment: "
2030
  msgstr "Śledź przesyłkę: "
2031
 
2032
+ #. Plugin URI of the plugin/theme
2033
+ msgid "https://wordpress.org/plugins/flexible-shipping/"
2034
+ msgstr "https://pl.wordpress.org/plugins/flexible-shipping/"
2035
+
2036
+ #. Description of the plugin/theme
2037
+ msgid ""
2038
+ "Create additional shipment methods in WooCommerce and enable pricing based "
2039
+ "on cart weight or total."
2040
+ msgstr ""
2041
+ "Stwórz dodatkowe metody wysyłki w WooCommerce i włącz obliczanie kosztów w "
2042
+ "oparciu o wagę lub wartość zamówienia."
2043
+
2044
+ #. Author of the plugin/theme
2045
+ msgid "WP Desk"
2046
+ msgstr "WP Desk"
2047
+
2048
+ #. Author URI of the plugin/theme
2049
+ msgid "https://www.wpdesk.net/"
2050
+ msgstr "https://www.wpdesk.pl/"
2051
 
2052
  #~ msgid "Max value %s is not valid number. Row number %d."
2053
  #~ msgstr "Wartość Maks %s jest niepoprawna. Numer wiersza %d."
2061
  #~ msgid "Value value %s is not valid number. Row number %d."
2062
  #~ msgstr "Wartość w polu Wartość %s jest niepoprawna. Numer wiersza %d."
2063
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2064
  #~ msgid "Test"
2065
  #~ msgstr "Test"
2066
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.2
7
- Stable tag: 3.3.12
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -175,6 +175,12 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
178
  = 3.3.12 - 2019-05-08 =
179
  * Fixed export/import for shipping classes with comma in name
180
 
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.2
7
+ Stable tag: 3.3.13
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
175
 
176
  == Changelog ==
177
 
178
+ = 3.3.13 - 2019-05-13 =
179
+ * Fixed fatal when can't unserialize the token from persistence container
180
+ * Added option of hiding the FS Connect box
181
+ * Added plugin rate notice
182
+ * Fixed CSS select height
183
+
184
  = 3.3.12 - 2019-05-08 =
185
  * Fixed export/import for shipping classes with comma in name
186
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5830c3381b0570b2eaa038de2180e2a2::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -404,6 +404,7 @@ return array(
404
  'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => $baseDir . '/classes/saas/class-saas-service-settings-not-found-exception.php',
405
  'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => $baseDir . '/classes/saas/class-saas-shipping-services-manager.php',
406
  'WPDesk_Flexible_Shipping_SaaS_Settings' => $baseDir . '/classes/saas/class-saas-settings.php',
 
407
  'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => $baseDir . '/classes/saas/class-saas-settings-service-checkbox.php',
408
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => $baseDir . '/classes/saas/class-saas-shipment-auto-create.php',
409
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => $baseDir . '/classes/saas/class-saas-shipment-order-auto-complete.php',
404
  'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => $baseDir . '/classes/saas/class-saas-service-settings-not-found-exception.php',
405
  'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => $baseDir . '/classes/saas/class-saas-shipping-services-manager.php',
406
  'WPDesk_Flexible_Shipping_SaaS_Settings' => $baseDir . '/classes/saas/class-saas-settings.php',
407
+ 'WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox' => $baseDir . '/classes/saas/class-sass-settings-integration-checkbox.php',
408
  'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => $baseDir . '/classes/saas/class-saas-settings-service-checkbox.php',
409
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => $baseDir . '/classes/saas/class-saas-shipment-auto-create.php',
410
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => $baseDir . '/classes/saas/class-saas-shipment-order-auto-complete.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit2d2efbea06f2006f9d9405b304994c66::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit2d2efbea06f2006f9d9405b304994c66
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit2d2efbea06f2006f9d9405b304994c66::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire2d2efbea06f2006f9d9405b304994c66($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire2d2efbea06f2006f9d9405b304994c66($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5830c3381b0570b2eaa038de2180e2a2
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit5830c3381b0570b2eaa038de2180e2a2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit5830c3381b0570b2eaa038de2180e2a2', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire5830c3381b0570b2eaa038de2180e2a2($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire5830c3381b0570b2eaa038de2180e2a2($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit2d2efbea06f2006f9d9405b304994c66
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
@@ -490,6 +490,7 @@ class ComposerStaticInit2d2efbea06f2006f9d9405b304994c66
490
  'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => __DIR__ . '/../..' . '/classes/saas/class-saas-service-settings-not-found-exception.php',
491
  'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipping-services-manager.php',
492
  'WPDesk_Flexible_Shipping_SaaS_Settings' => __DIR__ . '/../..' . '/classes/saas/class-saas-settings.php',
 
493
  'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => __DIR__ . '/../..' . '/classes/saas/class-saas-settings-service-checkbox.php',
494
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipment-auto-create.php',
495
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipment-order-auto-complete.php',
@@ -566,9 +567,9 @@ class ComposerStaticInit2d2efbea06f2006f9d9405b304994c66
566
  public static function getInitializer(ClassLoader $loader)
567
  {
568
  return \Closure::bind(function () use ($loader) {
569
- $loader->prefixLengthsPsr4 = ComposerStaticInit2d2efbea06f2006f9d9405b304994c66::$prefixLengthsPsr4;
570
- $loader->prefixDirsPsr4 = ComposerStaticInit2d2efbea06f2006f9d9405b304994c66::$prefixDirsPsr4;
571
- $loader->classMap = ComposerStaticInit2d2efbea06f2006f9d9405b304994c66::$classMap;
572
 
573
  }, null, ClassLoader::class);
574
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
490
  'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => __DIR__ . '/../..' . '/classes/saas/class-saas-service-settings-not-found-exception.php',
491
  'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipping-services-manager.php',
492
  'WPDesk_Flexible_Shipping_SaaS_Settings' => __DIR__ . '/../..' . '/classes/saas/class-saas-settings.php',
493
+ 'WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox' => __DIR__ . '/../..' . '/classes/saas/class-sass-settings-integration-checkbox.php',
494
  'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => __DIR__ . '/../..' . '/classes/saas/class-saas-settings-service-checkbox.php',
495
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipment-auto-create.php',
496
  'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => __DIR__ . '/../..' . '/classes/saas/class-saas-shipment-order-auto-complete.php',
567
  public static function getInitializer(ClassLoader $loader)
568
  {
569
  return \Closure::bind(function () use ($loader) {
570
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2::$prefixLengthsPsr4;
571
+ $loader->prefixDirsPsr4 = ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2::$prefixDirsPsr4;
572
+ $loader->classMap = ComposerStaticInit5830c3381b0570b2eaa038de2180e2a2::$classMap;
573
 
574
  }, null, ClassLoader::class);
575
  }
vendor/composer/installed.json CHANGED
@@ -679,17 +679,17 @@
679
  },
680
  {
681
  "name": "wpdesk/wp-saas-platform-client",
682
- "version": "1.10",
683
- "version_normalized": "1.10.0.0",
684
  "source": {
685
  "type": "git",
686
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
687
- "reference": "54327826936f8133481a917774e9b4fb2a8911f9"
688
  },
689
  "dist": {
690
  "type": "zip",
691
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=54327826936f8133481a917774e9b4fb2a8911f9",
692
- "reference": "54327826936f8133481a917774e9b4fb2a8911f9",
693
  "shasum": ""
694
  },
695
  "require": {
@@ -707,7 +707,7 @@
707
  "squizlabs/php_codesniffer": "^3.0.2",
708
  "wp-coding-standards/wpcs": "^0.14.1"
709
  },
710
- "time": "2019-03-14T13:31:32+00:00",
711
  "type": "library",
712
  "installation-source": "dist",
713
  "autoload": {
679
  },
680
  {
681
  "name": "wpdesk/wp-saas-platform-client",
682
+ "version": "1.10.1",
683
+ "version_normalized": "1.10.1.0",
684
  "source": {
685
  "type": "git",
686
  "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
687
+ "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf"
688
  },
689
  "dist": {
690
  "type": "zip",
691
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
692
+ "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
693
  "shasum": ""
694
  },
695
  "require": {
707
  "squizlabs/php_codesniffer": "^3.0.2",
708
  "wp-coding-standards/wpcs": "^0.14.1"
709
  },
710
+ "time": "2019-05-10T09:59:04+00:00",
711
  "type": "library",
712
  "installation-source": "dist",
713
  "autoload": {
vendor/wpdesk/wp-saas-platform-client/changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 1.9.1 - 2019-03-05 =
2
  * Added email to actor
3
 
1
+ = 1.10.1 - 2019-05-10 =
2
+ * Fixed NullToken handling in JWTSaasToken
3
+
4
  = 1.9.1 - 2019-03-05 =
5
  * Added email to actor
6
 
vendor/wpdesk/wp-saas-platform-client/src/Authentication/JWTSaasToken.php CHANGED
@@ -5,18 +5,18 @@ namespace WPDesk\SaasPlatformClient\Authentication;
5
  class JWTSaasToken implements Token
6
  {
7
  const SHOP_ID_PARAM = 'shop';
 
8
 
9
- const ROLE_PARAM = 'ROLE_SHOP';
10
 
11
 
12
- /** @var JWTToken */
13
  private $token;
14
 
15
  /**
16
- * JWTToken constructor.
17
- * @param string $token
18
  */
19
- public function __construct(JWTToken $token)
20
  {
21
  $this->token = $token;
22
  }
@@ -48,8 +48,13 @@ class JWTSaasToken implements Token
48
  */
49
  public function hasShopId()
50
  {
51
- $info = $this->token->getDecodedPublicTokenInfo();
52
- return !empty($info[self::SHOP_ID_PARAM]) && in_array(self::ROLE_PARAM, $info['roles']);
 
 
 
 
 
53
  }
54
 
55
  /**
@@ -59,8 +64,10 @@ class JWTSaasToken implements Token
59
  */
60
  public function getShopId()
61
  {
62
- $info = $this->token->getDecodedPublicTokenInfo();
63
- return (int)$info[self::SHOP_ID_PARAM];
 
 
 
64
  }
65
-
66
  }
5
  class JWTSaasToken implements Token
6
  {
7
  const SHOP_ID_PARAM = 'shop';
8
+ const ROLES_PARAM = 'roles';
9
 
10
+ const SHOP_ROLE = 'ROLE_SHOP';
11
 
12
 
13
+ /** @var Token */
14
  private $token;
15
 
16
  /**
17
+ * @param Token $token
 
18
  */
19
+ public function __construct(Token $token)
20
  {
21
  $this->token = $token;
22
  }
48
  */
49
  public function hasShopId()
50
  {
51
+ if ($this->token instanceof JWTToken) {
52
+ $info = $this->token->getDecodedPublicTokenInfo();
53
+ return !empty($info[self::SHOP_ID_PARAM]) && !empty($info[self::ROLES_PARAM]) &&
54
+ in_array(self::SHOP_ROLE, $info[self::ROLES_PARAM], true);
55
+ }
56
+ return false;
57
+
58
  }
59
 
60
  /**
64
  */
65
  public function getShopId()
66
  {
67
+ if ($this->token instanceof JWTToken && $this->hasShopId()) {
68
+ $info = $this->token->getDecodedPublicTokenInfo();
69
+ return (int)$info[self::SHOP_ID_PARAM];
70
+ }
71
+ return 0;
72
  }
 
73
  }