Flexible Shipping for WooCommerce - Version 3.15.0

Version Description

  • 2020-10-22 =
  • Added documentation Beacon
  • Added Cart Calculation field for export
Download this release

Release Info

Developer wpdesk
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 3.15.0
Comparing to
See all releases

Code changes from version 3.14.4 to 3.15.0

Files changed (35) hide show
  1. assets/css/admin.min.css +1 -1
  2. assets/css/font.min.css +1 -1
  3. assets/js/admin.min.js +20 -1
  4. assets/js/ap_conditional_logic.min.js +0 -1
  5. assets/js/beacon-clicked.js +13 -0
  6. assets/js/beacon-clicked.min.js +1 -0
  7. assets/js/contextual-info.min.js +4 -1
  8. classes/class-flexible-shipping-plugin.php +25 -0
  9. classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php +1 -0
  10. classes/table-rate/csv/flexible-shipping-export.php +6 -0
  11. classes/table-rate/flexible-shipping-settings.php +16 -0
  12. classes/table-rate/settings/shipping-method-form.php +41 -13
  13. classes/table-rate/shipping-method.php +1 -0
  14. classes/table-rate/views/html-shipping-method-rules.php +2 -2
  15. composer.lock +88 -83
  16. flexible-shipping.php +3 -3
  17. readme.txt +5 -1
  18. src/WPDesk/FS/TableRate/Beacon.php +33 -0
  19. src/WPDesk/FS/TableRate/Beacon/Beacon.php +33 -0
  20. src/WPDesk/FS/TableRate/Beacon/BeaconClickedAjax.php +96 -0
  21. src/WPDesk/FS/TableRate/Beacon/BeaconDeactivationTracker.php +49 -0
  22. src/WPDesk/FS/TableRate/Beacon/BeaconDisplayStrategy.php +60 -0
  23. vendor/autoload.php +1 -1
  24. vendor/composer/autoload_classmap.php +9 -0
  25. vendor/composer/autoload_real.php +4 -4
  26. vendor/composer/autoload_static.php +14 -5
  27. vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php +12 -1
  28. vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php +7 -1
  29. vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/templates/html-beacon-script.php +8 -49
  30. vendor_prefixed/wpdesk/wp-plugin-flow/src/Initialization/HelperInstanceAsFilterTrait.php +1 -1
  31. vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager.php +22 -0
  32. vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php +37 -0
  33. vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php +70 -0
  34. vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php +93 -0
  35. vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php +65 -0
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.wc_input_table.flexible_shipping_rules.fs_new_interface td{padding:25px 5px;vertical-align:middle;border:0}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(even) td{background:#f9f9f9}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(odd) td.sort{background:white}table.wc_input_table.flexible_shipping_rules.fs_new_interface td p.form-row{margin-top:0}table.wc_input_table.flexible_shipping_rules.fs_new_interface .description{padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .form-row{padding-right:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .single_rule_condition{vertical-align:middle;display:flex}table.wc_input_table.flexible_shipping_rules.fs_new_interface tbody .sort{padding-top:27px !important;padding-bottom:23px !important}.flexible_shipping_method_rules th{width:auto}.flexible_shipping_method_rules th.sort{width:10px}td.fs_cost{width:75px !important}div.rule_condition div{display:inline-block}div.rule_condition div.based_on{width:70px}div.rule_condition div input{width:70px}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}.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}.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}.fs-settings-div table.form-table{width:700px;float:left}.fs-flexible-shipping-sidebar{float:right;padding-left:30px;width:300px;margin-top:-100px}@media(max-width:1200px){.fs-flexible-shipping-sidebar{display:none}}.wpdesk-metabox{background-color:#23282d;color:#fff;padding:20px}.wpdesk-metabox .title{color:#fff}.wpdesk-metabox .icon{display:block;margin:0 auto;width:110px}table.wc_input_table.flexible_shipping_rules{width:auto;min-width:764px}table.wc_input_table.flexible_shipping_rules td{padding:3px 5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper input{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper select,table.wc_input_table.flexible_shipping_rules p span.woocommerce-input-wrapper select{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper label{padding-right:3px;padding-left:3px}table.wc_input_table.flexible_shipping_rules td label{padding-right:3px;padding-left:3px;padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface td label{padding-right:10px;padding-left:10px;padding-top:5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper span.description,table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-right:3px;padding-left:3px;vertical-align:middle;font-style:normal;font-size:14px}table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-top:4px;position:absolute}table.wc_input_table.flexible_shipping_rules td{vertical-align:top}table.wc_input_table.flexible_shipping_rules td{padding-top:2px;padding-bottom:2px}table.wc_input_table.flexible_shipping_rules th.sort,table.wc_input_table.flexible_shipping_rules th.sort{width:20px;text-align:center}table.wc_input_table.flexible_shipping_rules th.cb,table.wc_input_table.flexible_shipping_rules td.cb{width:20px;text-align:center;padding:10px 5px;padding-right:5px !important;margin:0}table.wc_input_table.flexible_shipping_rules th.cb input,table.wc_input_table.flexible_shipping_rules td.cb input{margin:0}table.wc_input_table.flexible_shipping_rules th.rule_costs{width:220px}table.wc_input_table.flexible_shipping_rules input[type=text]{width:100px !important;height:2em !important;border:1px solid}table.wc_input_table.flexible_shipping_rules select{width:120px !important;height:2em !important;border:1px solid;padding:0 5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface select{width:130px !important}table.wc_input_table.flexible_shipping_rules input.cost_additional{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules input.per_value{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules td.rule_costs div.input-wrapper.cost_per_order{display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.plus.insert{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules td.rule_costs div.additional_cost_wrapper{border-top:1px solid #dfdfdf;margin-top:2px;padding-top:2px;display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.minus{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2){border-top:1px solid #dfdfdf;padding-top:2px;margin-top:2px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_field_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_min{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_max{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition label.condition_field_label{width:55px;text-align:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_where{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_where{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_and{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_and{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.minus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.plus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child a.minus{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) a.plus{display:none}table.wc_input_table.flexible_shipping_rules input.select2-search__field{border:0}table.wc_input_table.flexible_shipping_method_rules td p label span.optional{display:none}table.wc_input_table.flexible_shipping_rules td.rule_conditions{min-width:465px}table.wc_input_table.flexible_shipping_rules td.rule_conditions div.single_rule_condition p.form-row{display:inline-block}table.wc_input_table.flexible_shipping_rules td p label span.optional{display:none}table#fs_new_rules_table_banner.widefat thead td,table#fs_new_rules_table_banner_for_new_table.widefat thead td{padding:5px 20px 20px}
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.wc_input_table.flexible_shipping_rules.fs_new_interface td{padding:25px 5px;vertical-align:middle;border:none}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(even) td{background:#f9f9f9}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(odd) td.sort{background:#fff}table.wc_input_table.flexible_shipping_rules.fs_new_interface td p.form-row{margin-top:0}table.wc_input_table.flexible_shipping_rules.fs_new_interface .description{padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .form-row{padding-right:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .single_rule_condition{vertical-align:middle;display:flex}table.wc_input_table.flexible_shipping_rules.fs_new_interface tbody .sort{padding-top:27px!important;padding-bottom:23px!important}.flexible_shipping_method_rules th{width:auto}.flexible_shipping_method_rules th.sort{width:10px}td.fs_cost{width:75px!important}div.rule_condition div{display:inline-block}div.rule_condition div.based_on{width:70px}div.rule_condition div input{width:70px}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:0px!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:none}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}.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:700}.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}.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,.5)}.flexible_shipping_shipment_content p.fs-saas-status span{font-weight:700;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:700;color:#a00}.fs-saas-shipment span{font-weight:700}.fs-saas-labels-counts span{font-weight:700}.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:none;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:none;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:400;margin-bottom:.67em;text-align:center}.fs-box{display:block;position:relative;margin:0 auto 20px;padding:16px;box-sizing:border-box;background:#fff;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}.fs-settings-div table.form-table{width:700px;float:left}.fs-flexible-shipping-sidebar{float:right;padding-left:30px;width:300px;margin-top:-100px}@media (max-width:1200px){.fs-flexible-shipping-sidebar{display:none}}.wpdesk-metabox{background-color:#23282d;color:#fff;padding:20px}.wpdesk-metabox .title{color:#fff}.wpdesk-metabox .icon{display:block;margin:0 auto;width:110px}table.wc_input_table.flexible_shipping_rules{width:auto;min-width:764px}table.wc_input_table.flexible_shipping_rules td{padding:3px 5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper input{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper select,table.wc_input_table.flexible_shipping_rules p span.woocommerce-input-wrapper select{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper label{padding-right:3px;padding-left:3px}table.wc_input_table.flexible_shipping_rules td label{padding-right:3px;padding-left:3px;padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface td label{padding-right:10px;padding-left:10px;padding-top:5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper span.description,table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-right:3px;padding-left:3px;vertical-align:middle;font-style:normal;font-size:14px}table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-top:4px;position:absolute}table.wc_input_table.flexible_shipping_rules td{vertical-align:top}table.wc_input_table.flexible_shipping_rules td{padding-top:2px;padding-bottom:2px}table.wc_input_table.flexible_shipping_rules th.sort,table.wc_input_table.flexible_shipping_rules th.sort{width:20px;text-align:center}table.wc_input_table.flexible_shipping_rules th.cb,table.wc_input_table.flexible_shipping_rules td.cb{width:20px;text-align:center;padding:10px 5px;padding-right:5px!important;margin:0}table.wc_input_table.flexible_shipping_rules th.cb input,table.wc_input_table.flexible_shipping_rules td.cb input{margin:0}table.wc_input_table.flexible_shipping_rules th.rule_costs{width:220px}table.wc_input_table.flexible_shipping_rules input[type=text]{width:100px!important;height:2em!important;border:1px solid}table.wc_input_table.flexible_shipping_rules select{width:120px!important;height:2em!important;border:1px solid;padding:0 5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface select{width:130px!important}table.wc_input_table.flexible_shipping_rules input.cost_additional{width:60px!important;min-width:60px}table.wc_input_table.flexible_shipping_rules input.per_value{width:60px!important;min-width:60px}table.wc_input_table.flexible_shipping_rules td.rule_costs div.input-wrapper.cost_per_order{display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.plus.insert{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules td.rule_costs div.additional_cost_wrapper{border-top:1px solid #dfdfdf;margin-top:2px;padding-top:2px;display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.minus{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2){border-top:1px solid #dfdfdf;padding-top:2px;margin-top:2px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_field_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_min{width:60px!important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_max{width:60px!important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition label.condition_field_label{width:55px;text-align:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_where{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_where{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_and{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_and{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.minus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.plus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child a.minus{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) a.plus{display:none}table.wc_input_table.flexible_shipping_rules input.select2-search__field{border:0}table.wc_input_table.flexible_shipping_method_rules td p label span.optional{display:none}table.wc_input_table.flexible_shipping_rules td.rule_conditions{min-width:465px}table.wc_input_table.flexible_shipping_rules td.rule_conditions div.single_rule_condition p.form-row{display:inline-block}table.wc_input_table.flexible_shipping_rules td p label span.optional{display:none}table#fs_new_rules_table_banner.widefat thead td,table#fs_new_rules_table_banner_for_new_table.widefat thead td{padding:5px 20px 20px}
assets/css/font.min.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:'flexible-shipping';src:url('../fonts/flexible-shipping.eot?imgwjn');src:url('../fonts/flexible-shipping.eot?imgwjn#iefix') format('embedded-opentype'),url('../fonts/flexible-shipping.ttf?imgwjn') format('truetype'),url('../fonts/flexible-shipping.woff?imgwjn') format('woff'),url('../fonts/flexible-shipping.svg?imgwjn#flexible-shipping') format('svg');font-weight:normal;font-style:normal}div.shipping-status a.icon-status{font-family:'flexible-shipping' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;display:inline-block;overflow:hidden;text-indent:-9999px;height:2em !important;width:2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.shipping-status a.icon-status:before{font-size:20px;float:left;text-align:center;background:transparent none;margin:0 0 0 5px;text-indent:0}.icon-plus-circle:before,.icon-status-new:before{color:#ffba00;background:transparent none;text-indent:0;content:"\f055"}.icon-check-circle:before,.icon-status-confirmed:before{color:#2ea2cc;content:"\f058"}.icon-exclamation-circle:before,.icon-status-error:before{color:#d0c21f;content:"\f06a"}.icon-truck:before{content:"\f0d1"}.icon-pause-circle:before,.icon-status-created:before{color:#999;content:"\f28b"}.icon-check-circle:before,.icon-status-manifest:before{color:#00ae11;content:"\f058"}
1
+ @font-face{font-family:'flexible-shipping';src:url(../fonts/flexible-shipping.eot?imgwjn);src:url('../fonts/flexible-shipping.eot?imgwjn#iefix') format('embedded-opentype'),url(../fonts/flexible-shipping.ttf?imgwjn) format('truetype'),url(../fonts/flexible-shipping.woff?imgwjn) format('woff'),url('../fonts/flexible-shipping.svg?imgwjn#flexible-shipping') format('svg');font-weight:400;font-style:normal}div.shipping-status a.icon-status{font-family:'flexible-shipping'!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;display:inline-block;overflow:hidden;text-indent:-9999px;height:2em!important;width:2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.shipping-status a.icon-status:before{font-size:20px;float:left;text-align:center;background:transparent none;margin:0 0 0 5px;text-indent:0}.icon-plus-circle:before,.icon-status-new:before{color:#ffba00;background:transparent none;text-indent:0;content:"\f055"}.icon-check-circle:before,.icon-status-confirmed:before{color:#2ea2cc;content:"\f058"}.icon-exclamation-circle:before,.icon-status-error:before{color:#d0c21f;content:"\f06a"}.icon-truck:before{content:"\f0d1"}.icon-pause-circle:before,.icon-status-created:before{color:#999;content:"\f28b"}.icon-check-circle:before,.icon-status-manifest:before{color:#00aE11;content:"\f058"}
assets/js/admin.min.js CHANGED
@@ -1 +1,20 @@
1
- function fs_select2(){let elements=jQuery(".fs_select2");if(elements.length){if(jQuery.fn.selectWoo){elements.selectWoo()}else{elements.select2()}}}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();jQuery("#flexible_shipping_shipment_"+e).trigger("flexible_shipping_ajax_fs_action_after")}).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)})});jQuery(function(b){function a(){b("#woocommerce_flexible_shipping_method_free_shipping_cart_notice").closest("tr").toggle(b("#woocommerce_flexible_shipping_method_free_shipping").val()!=="")}b("#woocommerce_flexible_shipping_method_free_shipping").on("change",function(){a()});a()});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function fs_select2(){let elements=jQuery('.fs_select2');if(elements.length){if(jQuery.fn.selectWoo){elements.selectWoo()}else{elements.select2()}}}
2
+ jQuery(document).ready(function(){if(jQuery('#flexible_shipping_labels_url').length){window.location.href=jQuery('#flexible_shipping_labels_url').attr('href')}
3
+ if(jQuery('a.shipping_manifest_download').length==1){window.location.href=jQuery('a.shipping_manifest_download').attr('href')}
4
+ if(typeof window.history.pushState=='function'){var url=document.location.href;var url2=document.location.href;url=fs_removeParam('bulk_flexible_shipping_labels',url);url=fs_removeParam('bulk_flexible_shipping_send',url);url=fs_removeParam('bulk_flexible_shipping_manifests',url);url=fs_removeParam('bulk_flexible_shipping_no_labels_created',url);url=fs_trimChar(url,'?');if(url!=url2){window.history.pushState({},"",url)}}
5
+ var nav=jQuery('.fs-connect__vertical-nav-container'),contentContainer=jQuery('.fs-connect__content-container');nextFeatureButtons=jQuery('.fs-banner__button-container .next-feature'),nav.on('click','.vertical-menu__feature-item:not( .vertical-menu__feature-item-is-selected )',function(){transitionSlideToIndex(jQuery(this).index())});nextFeatureButtons.on('click',function(e){e.preventDefault();var slideIndex=jQuery(this).closest('.fs-connect__slide').index();transitionSlideToIndex(slideIndex+1)});function transitionSlideToIndex(index){nav.find('.vertical-menu__feature-item-is-selected').removeClass('vertical-menu__feature-item-is-selected');contentContainer.find('.fs__slide-is-active').removeClass('fs__slide-is-active');nav.children().eq(index).addClass('vertical-menu__feature-item-is-selected');contentContainer.children().eq(index).addClass('fs__slide-is-active')}});function fs_removeParam(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1)}}
6
+ rtn=rtn+"?"+params_arr.join("&")}
7
+ return rtn}
8
+ function fs_trimChar(string,charToRemove){while(string.charAt(0)==charToRemove){string=string.substring(1)}
9
+ while(string.charAt(string.length-1)==charToRemove){string=string.substring(0,string.length-1)}
10
+ return string}
11
+ function fs_id(element){return jQuery(element).closest('.flexible_shipping_shipment').attr('data-id')}
12
+ function fs_data_set_val(data,name,val){if(typeof name=='undefined'){return data}
13
+ if(name.indexOf("[")==-1){data[name]=val}else{var names=name.split("[");var data2=data;var data3=data;var name2='';jQuery.each(names,function(index,name){name2=name.replace("]","");if(typeof data2[name2]=='undefined'){data2[name2]={}}
14
+ data3=data2;data2=data2[name2]});data3[name2]=val}
15
+ return data}
16
+ function fs_ajax(button,id,fs_action){jQuery('.button-shipping').attr('disabled',!0);jQuery(button).parent().find('.spinner').css({visibility:'visible'});var data={};jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_content input, #flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_content select, #flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_content textarea').each(function(){if(jQuery(this).attr('type')=='radio'){data=fs_data_set_val(data,jQuery(this).attr('name'),jQuery('#flexible_shipping_shipment_'+id+' input[name='+jQuery(this).attr('name')+']:checked').val())}else if(jQuery(this).attr('type')=='checkbox'){if(jQuery(this).is(':checked')){data=fs_data_set_val(data,jQuery(this).attr('name'),jQuery(this).val())}else{data=fs_data_set_val(data,jQuery(this).attr('name'),'')}}else{data=fs_data_set_val(data,jQuery(this).attr('name'),jQuery(this).val())}});var nonce=jQuery('#flexible_shipping_shipment_nonce_'+id).val();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').hide();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').removeClass("flexible_shipping_shipment_message_error");jQuery.ajax({url:fs_admin.ajax_url,type:'POST',data:{fs_action:fs_action,action:'flexible_shipping',nonce:nonce,shipment_id:id,data:data,},dataType:'json',}).done(function(response){if(response){if(response=='0'){jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').show();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').html("Invalid response: 0")}else if(response.status=='success'){jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_content').html(response.content);jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').hide();if(typeof response.message!='undefined'){jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').show();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').html(response.message)}}else{if(typeof response.content!=='undefined'){jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_content').html(response.content)}
17
+ jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').addClass("flexible_shipping_shipment_message_error");jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').show();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').html(response.message)}}else{jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').addClass("flexible_shipping_shipment_message_error");jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').show();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').html("Request failed: invalid method?")}}).always(function(){jQuery('.button-shipping').attr('disabled',!1);jQuery('.shipping-spinner').parent().find('.spinner').css({visibility:'hidden'});fs_select2();jQuery('#flexible_shipping_shipment_'+id).trigger("flexible_shipping_ajax_fs_action_after")}).fail(function(jqXHR,textStatus){jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').addClass("flexible_shipping_shipment_message_error");jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').show();jQuery('#flexible_shipping_shipment_'+id+' .flexible_shipping_shipment_message').html("Request failed: "+textStatus+" "+jqXHR.status)})}
18
+ jQuery(function($){$(document).on('click','.flexible-shipping-taxes-notice .notice-dismiss',function(){$.ajax(ajaxurl,{type:'POST',data:{action:'flexible_shipping_taxes_notice',}})});$(document).on('click','#enable-fs-connect-box',function(){var fs_connect_checkbox=$('.enable-fs-connect-box');var fs_box_state;if(fs_connect_checkbox.prop('checked')){$('.fs-connect-integration-box').slideDown();fs_box_state=1}else{$('.fs-connect-integration-box').slideUp();fs_box_state=0}
19
+ $.ajax(ajaxurl,{type:'POST',data:{action:'update_fs_connect_integration_setting',fs_box_state:fs_box_state}})});$(document).on('click','#flexible_shipping_rate_plugin .close-fs-rate-notice',function(){$('#flexible_shipping_rate_plugin .notice-dismiss').click()});$(document).on('click','#flexible_shipping_rate_plugin .fs-not-good',function(){$('#flexible_shipping_rate_plugin p').html(fs_admin.notice_not_good_enought)})});jQuery(function($){function fs_toggle_free_shipping_notice(){$('#woocommerce_flexible_shipping_method_free_shipping_cart_notice').closest('tr').toggle($('#woocommerce_flexible_shipping_method_free_shipping').val()!=='')}
20
+ $('#woocommerce_flexible_shipping_method_free_shipping').on('change',function(){fs_toggle_free_shipping_notice()});fs_toggle_free_shipping_notice()})
assets/js/ap_conditional_logic.min.js DELETED
@@ -1 +0,0 @@
1
- function ApConditionalLogic(a,c,b){this.field_name=a;this.shipment_id=c;this.conditions=b;this.field_id="#"+this.field_name+"_"+this.shipment_id;this.field_id=this.createFieldId(this.field_name,this.shipment_id);let conditional_logic=this;this.conditions.forEach(function(d){jQuery(conditional_logic.createFieldId(d.field,c)).on("change",function(e){conditional_logic.doLogic(e)})});jQuery(document).ready(function(d){conditional_logic.doLogic(d)})}ApConditionalLogic.prototype.createFieldId=function(a,b){return"#"+a+"_"+b};ApConditionalLogic.prototype.doLogic=function(a){let show_field=true;let field_id=this.field_id;let shipment_id=this.shipment_id;let ap_conditional_logic=this;this.conditions.forEach(function(c){let cond_value=false;if(c.cond==="in"&&c.values.indexOf(jQuery(ap_conditional_logic.createFieldId(c.field,shipment_id)).val())!==-1){cond_value=true}show_field=show_field&&cond_value});var b=jQuery(field_id).closest("div");if(show_field){b.show()}else{b.hide()}};
 
assets/js/beacon-clicked.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ $('#wpdesk-helpscout-beacon').on('click', function() {
3
+ $.ajax({
4
+ url: fs_beacon_clicked.ajax_url,
5
+ type: 'POST',
6
+ data: {
7
+ action: fs_beacon_clicked.action,
8
+ nonce: fs_beacon_clicked.nonce,
9
+ },
10
+ dataType: 'json',
11
+ });
12
+ });
13
+ });
assets/js/beacon-clicked.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function($){$('#wpdesk-helpscout-beacon').on('click',function(){$.ajax({url:fs_beacon_clicked.ajax_url,type:'POST',data:{action:fs_beacon_clicked.action,nonce:fs_beacon_clicked.nonce,},dataType:'json',})})})
assets/js/contextual-info.min.js CHANGED
@@ -1 +1,4 @@
1
- (function(a){a.fn.contextualInfo=function(d){let config=a.extend({id:"",phrases_in:[],info_html:"",phrases_not_in:[]},d);return this.each(function(){let $element=a(this);b($element);e($element);$element.keyup(function(){e($element)})});function c(f){return f.attr("id")+"_"+config.id}function b(f){a(f).after(function(){return'<p class="description" id="'+c(f)+'" style="display: none;">'+config.info_html+"</p>"})}function e(f){let element_value=f.val().toLowerCase();let show_info=false;if(config.phrases_in.length===0){show_info=true}a(config.phrases_in).each(function(g,h){let phrase_value=h.toLowerCase();show_info=show_info||element_value.indexOf(phrase_value)!==-1});a(config.phrases_not_in).each(function(g,h){let phrase_value=h.toLowerCase();show_info=show_info&&element_value.indexOf(phrase_value)===-1});a("#"+f.attr("id")+"_"+config.id).toggle(show_info)}}})(jQuery);
 
 
 
1
+ (function($){$.fn.contextualInfo=function(settings){let config=$.extend({'id':'','phrases_in':[],'info_html':'','phrases_not_in':[],},settings);return this.each(function(){let $element=$(this);createInfoHTMLElement($element);toggleInfoElement($element);$element.keyup(function(){toggleInfoElement($element)})});function prepareInfoElementId($element){return $element.attr('id')+"_"+config.id}
2
+ function createInfoHTMLElement($element){$($element).after(function(){return'<p class="description" id="'+prepareInfoElementId($element)+'" style="display: none;">'+config.info_html+"</p>"})}
3
+ function toggleInfoElement($element){let element_value=$element.val().toLowerCase();let show_info=!1;if(config.phrases_in.length===0){show_info=!0}
4
+ $(config.phrases_in).each(function(index,value){let phrase_value=value.toLowerCase();show_info=show_info||element_value.indexOf(phrase_value)!==-1});$(config.phrases_not_in).each(function(index,value){let phrase_value=value.toLowerCase();show_info=show_info&&element_value.indexOf(phrase_value)===-1});$('#'+$element.attr('id')+"_"+config.id).toggle(show_info)}}})(jQuery)
classes/class-flexible-shipping-plugin.php CHANGED
@@ -22,6 +22,10 @@ use FSVendor\WPDesk\View\Resolver\WPThemeResolver;
22
  use FSVendor\WPDesk\WooCommerce\CurrencySwitchers\ShippingIntegrations;
23
  use Psr\Log\LoggerInterface;
24
  use Psr\Log\NullLogger;
 
 
 
 
25
  use WPDesk\FS\TableRate\FreeShipping\FreeShippingNotice;
26
  use WPDesk\FS\TableRate\FreeShipping\FreeShippingNoticeGenerator;
27
  use WPDesk\FS\TableRate\NewRulesTableBanner\RulesBannerClickedOption;
@@ -208,6 +212,26 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
208
 
209
  }
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  /**
212
  * Init contextual info on Flexible Shipping settings fields.
213
  *
@@ -324,6 +348,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
324
 
325
  $this->hooks_on_hookable_objects();
326
 
 
327
  }
328
 
329
  /**
22
  use FSVendor\WPDesk\WooCommerce\CurrencySwitchers\ShippingIntegrations;
23
  use Psr\Log\LoggerInterface;
24
  use Psr\Log\NullLogger;
25
+ use WPDesk\FS\TableRate\Beacon\Beacon;
26
+ use WPDesk\FS\TableRate\Beacon\BeaconClickedAjax;
27
+ use WPDesk\FS\TableRate\Beacon\BeaconDeactivationTracker;
28
+ use WPDesk\FS\TableRate\Beacon\BeaconDisplayStrategy;
29
  use WPDesk\FS\TableRate\FreeShipping\FreeShippingNotice;
30
  use WPDesk\FS\TableRate\FreeShipping\FreeShippingNoticeGenerator;
31
  use WPDesk\FS\TableRate\NewRulesTableBanner\RulesBannerClickedOption;
212
 
213
  }
214
 
215
+ /**
216
+ * Init beacon.
217
+ */
218
+ private function init_beacon() {
219
+ if ( 'pl_PL' !== get_locale() ) {
220
+ $strategy = new BeaconDisplayStrategy();
221
+
222
+ $beacon = new Beacon(
223
+ $strategy,
224
+ trailingslashit( $this->get_plugin_url() ) . 'vendor_prefixed/wpdesk/wp-helpscout-beacon/assets/'
225
+ );
226
+ $beacon->hooks();
227
+
228
+ $beacon_clicked_ajax = new BeaconClickedAjax( $strategy, $this->get_plugin_assets_url(), $this->scripts_version );
229
+ $beacon_clicked_ajax->hooks();
230
+
231
+ (new BeaconDeactivationTracker())->hooks();
232
+ }
233
+ }
234
+
235
  /**
236
  * Init contextual info on Flexible Shipping settings fields.
237
  *
348
 
349
  $this->hooks_on_hookable_objects();
350
 
351
+ $this->init_beacon();
352
  }
353
 
354
  /**
classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php CHANGED
@@ -184,6 +184,7 @@ class WPDesk_Flexible_Shipping_Csv_Importer {
184
  }
185
  $new_shipping_method['method_max_cost'] = str_replace( ',', '.', $csv_row['Maximum Cost'] );
186
  $new_shipping_method['method_calculation_method'] = $csv_row['Calculation Method'];
 
187
  if ( ! in_array(
188
  $new_shipping_method['method_calculation_method'],
189
  array( 'sum', 'lowest', 'highest' ),
184
  }
185
  $new_shipping_method['method_max_cost'] = str_replace( ',', '.', $csv_row['Maximum Cost'] );
186
  $new_shipping_method['method_calculation_method'] = $csv_row['Calculation Method'];
187
+ $new_shipping_method['cart_calculation'] = isset( $csv_row['Cart Calculation'] ) ? $csv_row['Cart Calculation'] : '';
188
  if ( ! in_array(
189
  $new_shipping_method['method_calculation_method'],
190
  array( 'sum', 'lowest', 'highest' ),
classes/table-rate/csv/flexible-shipping-export.php CHANGED
@@ -72,6 +72,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Export' ) ) {
72
  'Free Shipping',
73
  'Maximum Cost',
74
  'Calculation Method',
 
75
  'Visibility',
76
  'Default',
77
  'Based on',
@@ -104,6 +105,9 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Export' ) ) {
104
  if ( ! isset( $flexible_shipping_rate['method_calculation_method'] ) ) {
105
  $flexible_shipping_rate['method_calculation_method'] = '';
106
  }
 
 
 
107
  if ( ! isset( $flexible_shipping_rate['method_visibility'] ) ) {
108
  $flexible_shipping_rate['method_visibility'] = '';
109
  }
@@ -122,6 +126,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Export' ) ) {
122
  $flexible_shipping_rate['method_free_shipping'],
123
  $flexible_shipping_rate['method_max_cost'],
124
  $flexible_shipping_rate['method_calculation_method'],
 
125
  $flexible_shipping_rate['method_visibility'],
126
  $flexible_shipping_rate['method_default'],
127
  '',
@@ -199,6 +204,7 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_Export' ) ) {
199
  '',
200
  '',
201
  '',
 
202
  $method_rule['based_on'],
203
  $method_rule['min'],
204
  $method_rule['max'],
72
  'Free Shipping',
73
  'Maximum Cost',
74
  'Calculation Method',
75
+ 'Cart Calculation',
76
  'Visibility',
77
  'Default',
78
  'Based on',
105
  if ( ! isset( $flexible_shipping_rate['method_calculation_method'] ) ) {
106
  $flexible_shipping_rate['method_calculation_method'] = '';
107
  }
108
+ if ( ! isset( $flexible_shipping_rate['cart_calculation'] ) ) {
109
+ $flexible_shipping_rate['cart_calculation'] = '';
110
+ }
111
  if ( ! isset( $flexible_shipping_rate['method_visibility'] ) ) {
112
  $flexible_shipping_rate['method_visibility'] = '';
113
  }
126
  $flexible_shipping_rate['method_free_shipping'],
127
  $flexible_shipping_rate['method_max_cost'],
128
  $flexible_shipping_rate['method_calculation_method'],
129
+ $flexible_shipping_rate['cart_calculation'],
130
  $flexible_shipping_rate['method_visibility'],
131
  $flexible_shipping_rate['method_default'],
132
  '',
204
  '',
205
  '',
206
  '',
207
+ '',
208
  $method_rule['based_on'],
209
  $method_rule['min'],
210
  $method_rule['max'],
classes/table-rate/flexible-shipping-settings.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package Flexible Shipping
6
  */
7
 
 
8
  use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
9
 
10
  /**
@@ -113,6 +114,21 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
113
 
114
  $this->form_fields = $this->new_rules_table_settings->add_fields_to_settings( $this->form_fields );
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  }
117
 
118
  /**
5
  * @package Flexible Shipping
6
  */
7
 
8
+ use FSVendor\WPDesk\Beacon\Beacon\WooCommerceSettingsFieldsModifier;
9
  use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
10
 
11
  /**
114
 
115
  $this->form_fields = $this->new_rules_table_settings->add_fields_to_settings( $this->form_fields );
116
 
117
+ $this->form_fields = $this->add_beacon_search_data_to_fields( $this->form_fields );
118
+
119
+ }
120
+
121
+ /**
122
+ * Add beacon search data to fields.
123
+ *
124
+ * @param array $form_fields .
125
+ *
126
+ * @return array
127
+ */
128
+ private function add_beacon_search_data_to_fields( array $form_fields ) {
129
+ $modifier = new WooCommerceSettingsFieldsModifier();
130
+
131
+ return $modifier->append_beacon_search_data_to_fields( $form_fields );
132
  }
133
 
134
  /**
classes/table-rate/settings/shipping-method-form.php CHANGED
@@ -62,11 +62,6 @@ $settings = array(
62
  'desc_tip' => true,
63
  'default' => $shipping_method['method_description'],
64
  ),
65
- array(
66
- 'title' => '',
67
- 'type' => 'title',
68
- 'description' => '',
69
- ),
70
  'method_free_shipping' => array(
71
  'title' => __( 'Free Shipping', 'flexible-shipping' ),
72
  'type' => 'price',
@@ -89,11 +84,6 @@ $settings = array(
89
  'description' => __( 'Tick this option to display the notice in the cart and on the checkout page.', 'flexible-shipping' ),
90
  'desc_tip' => true,
91
  ),
92
- array(
93
- 'title' => '',
94
- 'type' => 'title',
95
- 'description' => '',
96
- ),
97
  'method_calculation_method' => array(
98
  'title' => __( 'Rules Calculation', 'flexible-shipping' ),
99
  'type' => 'select',
@@ -129,6 +119,10 @@ $settings = array(
129
  );
130
 
131
  if ( 1 < count( $integrations_options ) ) {
 
 
 
 
132
  $settings['method_integration'] = array(
133
  'title' => __( 'Integration', 'flexible-shipping' ),
134
  'type' => 'select',
@@ -138,14 +132,48 @@ if ( 1 < count( $integrations_options ) ) {
138
  );
139
  }
140
 
141
- $settings = apply_filters( 'flexible_shipping_method_settings', $settings, $shipping_method );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
  if ( isset( $settings['method_max_cost'] ) ) {
144
  $this->settings['method_max_cost'] = $settings['method_max_cost']['default'];
145
  }
146
 
147
  $settings['method_rules'] = array(
148
- 'title' => __( 'Rules', 'flexible-shipping' ),
149
  'type' => 'shipping_rules',
150
  'default' => isset( $shipping_method['method_rules'] ) ? $shipping_method['method_rules'] : array(),
151
  'method_title' => $shipping_method['method_title'],
@@ -160,6 +188,6 @@ $docs_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/flexible-shi
160
  $docs_link .= '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=configure-shipment-methods&utm_content=fs-shippingzone-addnew-seehow';
161
 
162
  // Translators: link.
163
- echo '<p>' . sprintf( __( 'See how to %1$sconfigure shipment methods%2$s.', 'flexible-shipping' ), '<a href="' . $docs_link . '" target="_blank">', '</a>' ) . '</p>'; // WPCS: XSS ok.
164
 
165
  return $settings;
62
  'desc_tip' => true,
63
  'default' => $shipping_method['method_description'],
64
  ),
 
 
 
 
 
65
  'method_free_shipping' => array(
66
  'title' => __( 'Free Shipping', 'flexible-shipping' ),
67
  'type' => 'price',
84
  'description' => __( 'Tick this option to display the notice in the cart and on the checkout page.', 'flexible-shipping' ),
85
  'desc_tip' => true,
86
  ),
 
 
 
 
 
87
  'method_calculation_method' => array(
88
  'title' => __( 'Rules Calculation', 'flexible-shipping' ),
89
  'type' => 'select',
119
  );
120
 
121
  if ( 1 < count( $integrations_options ) ) {
122
+ $settings['title_shipping_integration'] = array(
123
+ 'title' => __( 'Shipping Integration', 'flexible-shipping' ),
124
+ 'type' => 'title',
125
+ );
126
  $settings['method_integration'] = array(
127
  'title' => __( 'Integration', 'flexible-shipping' ),
128
  'type' => 'select',
132
  );
133
  }
134
 
135
+ $filtered_settings = apply_filters( 'flexible_shipping_method_settings', $settings, $shipping_method );
136
+
137
+ $settings = array();
138
+
139
+ foreach ( $filtered_settings as $settings_key => $settings_value ) {
140
+ if ( 'method_enabled' === $settings_key ) {
141
+ $settings['title_general_settings'] = array(
142
+ 'title' => __( 'General Settings', 'flexible-shipping' ),
143
+ 'type' => 'title',
144
+ );
145
+ }
146
+
147
+ if ( 'method_free_shipping_requires' === $settings_key || ( 'method_free_shipping' === $settings_key && ! isset( $settings['method_free_shipping_requires'] ) ) ) {
148
+ $settings['title_free_shipping'] = array(
149
+ 'title' => __( 'Free Shipping', 'flexible-shipping' ),
150
+ 'type' => 'title',
151
+ );
152
+ }
153
+
154
+ if ( 'method_max_cost' === $settings_key || ( 'method_calculation_method' === $settings_key && ! isset( $settings['method_max_cost'] ) ) ) {
155
+ $settings['title_cost_calculation'] = array(
156
+ 'title' => __( 'Cost Calculation', 'flexible-shipping' ),
157
+ 'type' => 'title',
158
+ );
159
+ }
160
+
161
+ if ( 'method_visibility' === $settings_key ) {
162
+ $settings['title_advanced_options'] = array(
163
+ 'title' => __( 'Advanced Options', 'flexible-shipping' ),
164
+ 'type' => 'title',
165
+ );
166
+ }
167
+
168
+ $settings[ $settings_key ] = $settings_value;
169
+ }
170
 
171
  if ( isset( $settings['method_max_cost'] ) ) {
172
  $this->settings['method_max_cost'] = $settings['method_max_cost']['default'];
173
  }
174
 
175
  $settings['method_rules'] = array(
176
+ 'title' => __( 'Shipping Cost Calculation Rules', 'flexible-shipping' ),
177
  'type' => 'shipping_rules',
178
  'default' => isset( $shipping_method['method_rules'] ) ? $shipping_method['method_rules'] : array(),
179
  'method_title' => $shipping_method['method_title'],
188
  $docs_link .= '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=configure-shipment-methods&utm_content=fs-shippingzone-addnew-seehow';
189
 
190
  // Translators: link.
191
+ echo '<p>' . sprintf( __( 'Check how to %1$sconfigure shipping methods →%2$s', 'flexible-shipping' ), '<a href="' . $docs_link . '" target="_blank">', '</a>' ) . '</p>'; // WPCS: XSS ok.
192
 
193
  return $settings;
classes/table-rate/shipping-method.php CHANGED
@@ -598,6 +598,7 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
598
 
599
  public function get_shipping_method_form( $shipping_method ) {
600
  $this->form_fields = include( 'settings/shipping-method-form.php' );
 
601
  }
602
 
603
  public function package_weight( $items ) {
598
 
599
  public function get_shipping_method_form( $shipping_method ) {
600
  $this->form_fields = include( 'settings/shipping-method-form.php' );
601
+ $this->form_fields = $this->add_beacon_search_data_to_fields( $this->form_fields );
602
  }
603
 
604
  public function package_weight( $items ) {
classes/table-rate/views/html-shipping-method-rules.php CHANGED
@@ -59,13 +59,13 @@
59
 
60
  <tr valign="top" class="flexible_shipping_method_rules">
61
  <th class="forminp" colspan="2">
62
- <label for="<?php echo esc_attr( $field ); ?>"><span id="<?php echo esc_attr( $field . '_label' ); ?>"><?php echo $data['title']; ?></span></label>
63
  <?php
64
  $fs_pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://flexibleshipping.com/table-rate/';
65
 
66
  if ( ! in_array( 'flexible-shipping-pro/flexible-shipping-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ):
67
  ?>
68
- <p><?php printf( __( 'Check %sFlexible Shipping PRO &rarr;%s to add advanced rules based on shipment classes, product/item count or additional handling fees/insurance.', 'flexible-shipping' ), '<a href="' . $fs_pro_link . '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=flexible-shipping-pro&utm_content=fs-shippingzone-addnew-rules" target="_blank">', '</a>' ); ?></p>
69
  <?php endif; ?>
70
  </th>
71
  </tr>
59
 
60
  <tr valign="top" class="flexible_shipping_method_rules">
61
  <th class="forminp" colspan="2">
62
+ <label for="<?php echo esc_attr( $field ); ?>"><h3><span id="<?php echo esc_attr( $field . '_label' ); ?>"><?php echo esc_html( $data['title'] ); ?></span></h3></label>
63
  <?php
64
  $fs_pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://flexibleshipping.com/table-rate/';
65
 
66
  if ( ! in_array( 'flexible-shipping-pro/flexible-shipping-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ):
67
  ?>
68
+ <p><?php echo wp_kses_post( sprintf( __( 'Check %sFlexible Shipping PRO &rarr;%s to add advanced rules based on shipment classes, product/item count or additional handling fees/insurance.', 'flexible-shipping' ), '<a href="' . $fs_pro_link . '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=flexible-shipping-pro&utm_content=fs-shippingzone-addnew-rules" target="_blank">', '</a>' ) ); ?></p>
69
  <?php endif; ?>
70
  </th>
71
  </tr>
composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "191dedab0496861f59986f9c751108e0",
8
  "packages": [
9
  {
10
  "name": "psr/log",
@@ -234,16 +234,16 @@
234
  },
235
  {
236
  "name": "codeception/codeception",
237
- "version": "4.1.7",
238
  "source": {
239
  "type": "git",
240
  "url": "https://github.com/Codeception/Codeception.git",
241
- "reference": "220ad18d3c192137d9dc2d0dd8d69a0d82083a26"
242
  },
243
  "dist": {
244
  "type": "zip",
245
- "url": "https://api.github.com/repos/Codeception/Codeception/zipball/220ad18d3c192137d9dc2d0dd8d69a0d82083a26",
246
- "reference": "220ad18d3c192137d9dc2d0dd8d69a0d82083a26",
247
  "shasum": ""
248
  },
249
  "require": {
@@ -321,7 +321,7 @@
321
  "type": "open_collective"
322
  }
323
  ],
324
- "time": "2020-08-28T06:37:06+00:00"
325
  },
326
  {
327
  "name": "codeception/lib-asserts",
@@ -375,16 +375,16 @@
375
  },
376
  {
377
  "name": "codeception/lib-innerbrowser",
378
- "version": "1.3.2",
379
  "source": {
380
  "type": "git",
381
  "url": "https://github.com/Codeception/lib-innerbrowser.git",
382
- "reference": "7bdcee4cf654cfeeedd00405edd4f06f85255659"
383
  },
384
  "dist": {
385
  "type": "zip",
386
- "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/7bdcee4cf654cfeeedd00405edd4f06f85255659",
387
- "reference": "7bdcee4cf654cfeeedd00405edd4f06f85255659",
388
  "shasum": ""
389
  },
390
  "require": {
@@ -423,11 +423,11 @@
423
  }
424
  ],
425
  "description": "Parent library for all Codeception framework modules and PhpBrowser",
426
- "homepage": "http://codeception.com/",
427
  "keywords": [
428
  "codeception"
429
  ],
430
- "time": "2020-07-05T14:21:45+00:00"
431
  },
432
  {
433
  "name": "codeception/module-asserts",
@@ -487,20 +487,20 @@
487
  },
488
  {
489
  "name": "codeception/module-cli",
490
- "version": "1.0.2",
491
  "source": {
492
  "type": "git",
493
  "url": "https://github.com/Codeception/module-cli.git",
494
- "reference": "ca35844de0392356b413e93dba52423aaf1a67a6"
495
  },
496
  "dist": {
497
  "type": "zip",
498
- "url": "https://api.github.com/repos/Codeception/module-cli/zipball/ca35844de0392356b413e93dba52423aaf1a67a6",
499
- "reference": "ca35844de0392356b413e93dba52423aaf1a67a6",
500
  "shasum": ""
501
  },
502
  "require": {
503
- "codeception/codeception": "*@dev",
504
  "php": ">=5.6.0 <8.0"
505
  },
506
  "conflict": {
@@ -529,7 +529,7 @@
529
  "keywords": [
530
  "codeception"
531
  ],
532
- "time": "2020-02-07T17:34:13+00:00"
533
  },
534
  {
535
  "name": "codeception/module-db",
@@ -692,16 +692,16 @@
692
  },
693
  {
694
  "name": "codeception/module-rest",
695
- "version": "1.2.3",
696
  "source": {
697
  "type": "git",
698
  "url": "https://github.com/Codeception/module-rest.git",
699
- "reference": "63d09a1ed9fb9bb981d22396e7c2c7d20570f217"
700
  },
701
  "dist": {
702
  "type": "zip",
703
- "url": "https://api.github.com/repos/Codeception/module-rest/zipball/63d09a1ed9fb9bb981d22396e7c2c7d20570f217",
704
- "reference": "63d09a1ed9fb9bb981d22396e7c2c7d20570f217",
705
  "shasum": ""
706
  },
707
  "require": {
@@ -739,20 +739,20 @@
739
  "codeception",
740
  "rest"
741
  ],
742
- "time": "2020-09-17T13:36:51+00:00"
743
  },
744
  {
745
  "name": "codeception/module-webdriver",
746
- "version": "1.1.1",
747
  "source": {
748
  "type": "git",
749
  "url": "https://github.com/Codeception/module-webdriver.git",
750
- "reference": "237c6cb42d3e914f011d0419e966cbe0cb5d82c6"
751
  },
752
  "dist": {
753
  "type": "zip",
754
- "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/237c6cb42d3e914f011d0419e966cbe0cb5d82c6",
755
- "reference": "237c6cb42d3e914f011d0419e966cbe0cb5d82c6",
756
  "shasum": ""
757
  },
758
  "require": {
@@ -794,20 +794,20 @@
794
  "browser-testing",
795
  "codeception"
796
  ],
797
- "time": "2020-08-06T07:39:31+00:00"
798
  },
799
  {
800
  "name": "codeception/phpunit-wrapper",
801
- "version": "6.0.19",
802
  "source": {
803
  "type": "git",
804
  "url": "https://github.com/Codeception/phpunit-wrapper.git",
805
- "reference": "f6dfd72bea6c66fcff86164600f5d725c1883ecc"
806
  },
807
  "dist": {
808
  "type": "zip",
809
- "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/f6dfd72bea6c66fcff86164600f5d725c1883ecc",
810
- "reference": "f6dfd72bea6c66fcff86164600f5d725c1883ecc",
811
  "shasum": ""
812
  },
813
  "require": {
@@ -840,7 +840,7 @@
840
  }
841
  ],
842
  "description": "PHPUnit classes used by Codeception",
843
- "time": "2020-03-20T08:04:35+00:00"
844
  },
845
  {
846
  "name": "codeception/stub",
@@ -977,16 +977,16 @@
977
  },
978
  {
979
  "name": "composer/composer",
980
- "version": "1.10.13",
981
  "source": {
982
  "type": "git",
983
  "url": "https://github.com/composer/composer.git",
984
- "reference": "47c841ba3b2d3fc0b4b13282cf029ea18b66d78b"
985
  },
986
  "dist": {
987
  "type": "zip",
988
- "url": "https://api.github.com/repos/composer/composer/zipball/47c841ba3b2d3fc0b4b13282cf029ea18b66d78b",
989
- "reference": "47c841ba3b2d3fc0b4b13282cf029ea18b66d78b",
990
  "shasum": ""
991
  },
992
  "require": {
@@ -1067,7 +1067,7 @@
1067
  "type": "tidelift"
1068
  }
1069
  ],
1070
- "time": "2020-09-09T09:46:34+00:00"
1071
  },
1072
  {
1073
  "name": "composer/semver",
@@ -1278,24 +1278,24 @@
1278
  },
1279
  {
1280
  "name": "cweagans/composer-patches",
1281
- "version": "1.6.7",
1282
  "source": {
1283
  "type": "git",
1284
  "url": "https://github.com/cweagans/composer-patches.git",
1285
- "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590"
1286
  },
1287
  "dist": {
1288
  "type": "zip",
1289
- "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2e6f72a2ad8d59cd7e2b729f218bf42adb14f590",
1290
- "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590",
1291
  "shasum": ""
1292
  },
1293
  "require": {
1294
- "composer-plugin-api": "^1.0",
1295
  "php": ">=5.3.0"
1296
  },
1297
  "require-dev": {
1298
- "composer/composer": "~1.0",
1299
  "phpunit/phpunit": "~4.6"
1300
  },
1301
  "type": "composer-plugin",
@@ -1318,7 +1318,7 @@
1318
  }
1319
  ],
1320
  "description": "Provides a way to patch Composer packages.",
1321
- "time": "2019-08-29T20:11:49+00:00"
1322
  },
1323
  {
1324
  "name": "dealerdirect/phpcodesniffer-composer-installer",
@@ -1586,6 +1586,7 @@
1586
  }
1587
  ],
1588
  "description": "JSONPath implementation for parsing, searching and flattening arrays",
 
1589
  "time": "2019-07-15T17:23:22+00:00"
1590
  },
1591
  {
@@ -2350,28 +2351,28 @@
2350
  },
2351
  {
2352
  "name": "mck89/peast",
2353
- "version": "v1.10.4",
2354
  "source": {
2355
  "type": "git",
2356
  "url": "https://github.com/mck89/peast.git",
2357
- "reference": "e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d"
2358
  },
2359
  "dist": {
2360
  "type": "zip",
2361
- "url": "https://api.github.com/repos/mck89/peast/zipball/e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d",
2362
- "reference": "e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d",
2363
  "shasum": ""
2364
  },
2365
  "require": {
2366
  "php": ">=5.4.0"
2367
  },
2368
  "require-dev": {
2369
- "phpunit/phpunit": "^4.0|^5.0"
2370
  },
2371
  "type": "library",
2372
  "extra": {
2373
  "branch-alias": {
2374
- "dev-master": "1.10.4-dev"
2375
  }
2376
  },
2377
  "autoload": {
@@ -2391,7 +2392,7 @@
2391
  }
2392
  ],
2393
  "description": "Peast is PHP library that generates AST for JavaScript code",
2394
- "time": "2020-06-21T17:16:08+00:00"
2395
  },
2396
  {
2397
  "name": "mikemclin/laravel-wp-password",
@@ -2873,16 +2874,16 @@
2873
  },
2874
  {
2875
  "name": "php-webdriver/webdriver",
2876
- "version": "1.8.2",
2877
  "source": {
2878
  "type": "git",
2879
  "url": "https://github.com/php-webdriver/php-webdriver.git",
2880
- "reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab"
2881
  },
2882
  "dist": {
2883
  "type": "zip",
2884
- "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab",
2885
- "reference": "3308a70be084d6d7fd1ee5787b4c2e6eb4b70aab",
2886
  "shasum": ""
2887
  },
2888
  "require": {
@@ -2893,11 +2894,15 @@
2893
  "symfony/polyfill-mbstring": "^1.12",
2894
  "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0"
2895
  },
 
 
 
2896
  "require-dev": {
2897
  "friendsofphp/php-cs-fixer": "^2.0",
2898
- "jakub-onderka/php-parallel-lint": "^1.0",
2899
  "php-coveralls/php-coveralls": "^2.0",
2900
  "php-mock/php-mock-phpunit": "^1.1",
 
2901
  "phpunit/phpunit": "^5.7",
2902
  "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
2903
  "sminnee/phpunit-mock-objects": "^3.4",
@@ -2910,7 +2915,7 @@
2910
  "type": "library",
2911
  "extra": {
2912
  "branch-alias": {
2913
- "dev-master": "1.8.x-dev"
2914
  }
2915
  },
2916
  "autoload": {
@@ -2934,7 +2939,7 @@
2934
  "selenium",
2935
  "webdriver"
2936
  ],
2937
- "time": "2020-03-04T14:40:12+00:00"
2938
  },
2939
  {
2940
  "name": "phpcompatibility/php-compatibility",
@@ -7660,12 +7665,12 @@
7660
  "source": {
7661
  "type": "git",
7662
  "url": "https://github.com/wp-cli/wp-cli.git",
7663
- "reference": "4221b5b0103e375a52483a9c95bad2e092d86904"
7664
  },
7665
  "dist": {
7666
  "type": "zip",
7667
- "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/4221b5b0103e375a52483a9c95bad2e092d86904",
7668
- "reference": "4221b5b0103e375a52483a9c95bad2e092d86904",
7669
  "shasum": ""
7670
  },
7671
  "require": {
@@ -7718,7 +7723,7 @@
7718
  "cli",
7719
  "wordpress"
7720
  ],
7721
- "time": "2020-09-29T08:28:11+00:00"
7722
  },
7723
  {
7724
  "name": "wp-cli/wp-cli-bundle",
@@ -7963,16 +7968,16 @@
7963
  },
7964
  {
7965
  "name": "wpdesk/wp-basic-requirements",
7966
- "version": "3.2.2",
7967
  "source": {
7968
  "type": "git",
7969
  "url": "https://gitlab.com/wpdesk/wp-basic-requirements.git",
7970
- "reference": "abf5fb85ac47324b8f4d5cc4088f89e0bda52d9d"
7971
  },
7972
  "dist": {
7973
  "type": "zip",
7974
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-basic-requirements/repository/archive.zip?sha=abf5fb85ac47324b8f4d5cc4088f89e0bda52d9d",
7975
- "reference": "abf5fb85ac47324b8f4d5cc4088f89e0bda52d9d",
7976
  "shasum": ""
7977
  },
7978
  "require": {
@@ -8002,7 +8007,7 @@
8002
  "email": "krzysiek@wpdesk.pl"
8003
  }
8004
  ],
8005
- "time": "2019-12-17T13:58:01+00:00"
8006
  },
8007
  {
8008
  "name": "wpdesk/wp-builder",
@@ -8165,16 +8170,16 @@
8165
  },
8166
  {
8167
  "name": "wpdesk/wp-helpscout-beacon",
8168
- "version": "1.2.0",
8169
  "source": {
8170
  "type": "git",
8171
  "url": "https://gitlab.com/wpdesk/wp-helpscout-beacon.git",
8172
- "reference": "d697ede98120649ff5cea052cab0b04f5ea8acb2"
8173
  },
8174
  "dist": {
8175
  "type": "zip",
8176
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-helpscout-beacon/repository/archive.zip?sha=d697ede98120649ff5cea052cab0b04f5ea8acb2",
8177
- "reference": "d697ede98120649ff5cea052cab0b04f5ea8acb2",
8178
  "shasum": ""
8179
  },
8180
  "require": {
@@ -8206,7 +8211,7 @@
8206
  "email": "krzysiek@wpdesk.pl"
8207
  }
8208
  ],
8209
- "time": "2020-04-24T10:23:45+00:00"
8210
  },
8211
  {
8212
  "name": "wpdesk/wp-logs",
@@ -8403,16 +8408,16 @@
8403
  },
8404
  {
8405
  "name": "wpdesk/wp-plugin-flow",
8406
- "version": "2.7.0",
8407
  "source": {
8408
  "type": "git",
8409
  "url": "https://gitlab.com/wpdesk/wp-plugin-flow.git",
8410
- "reference": "53c902f2627f668536d6cf8d9267e76fff8d07a2"
8411
  },
8412
  "dist": {
8413
  "type": "zip",
8414
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-plugin-flow/repository/archive.zip?sha=53c902f2627f668536d6cf8d9267e76fff8d07a2",
8415
- "reference": "53c902f2627f668536d6cf8d9267e76fff8d07a2",
8416
  "shasum": ""
8417
  },
8418
  "require": {
@@ -8450,7 +8455,7 @@
8450
  "email": "krzysiek@wpdesk.pl"
8451
  }
8452
  ],
8453
- "time": "2020-05-06T10:17:53+00:00"
8454
  },
8455
  {
8456
  "name": "wpdesk/wp-pointer",
@@ -8692,16 +8697,16 @@
8692
  },
8693
  {
8694
  "name": "wpdesk/wp-wpdesk-license",
8695
- "version": "2.8.0",
8696
  "source": {
8697
  "type": "git",
8698
  "url": "https://gitlab.com/wpdesk/wp-wpdesk-license.git",
8699
- "reference": "d386ad95b89844547e97e472128bb10d8216a7e1"
8700
  },
8701
  "dist": {
8702
  "type": "zip",
8703
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-license/repository/archive.zip?sha=d386ad95b89844547e97e472128bb10d8216a7e1",
8704
- "reference": "d386ad95b89844547e97e472128bb10d8216a7e1",
8705
  "shasum": ""
8706
  },
8707
  "require": {
@@ -8741,7 +8746,7 @@
8741
  "email": "krzysiek@wpdesk.pl"
8742
  }
8743
  ],
8744
- "time": "2020-03-06T11:13:06+00:00"
8745
  },
8746
  {
8747
  "name": "wpdesk/wp-wpdesk-tracker",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "13e6e09fa12c3c70ee60ca3c14d0e712",
8
  "packages": [
9
  {
10
  "name": "psr/log",
234
  },
235
  {
236
  "name": "codeception/codeception",
237
+ "version": "4.1.8",
238
  "source": {
239
  "type": "git",
240
  "url": "https://github.com/Codeception/Codeception.git",
241
+ "reference": "41036e8af66e727c4587012f0366b7f0576a99da"
242
  },
243
  "dist": {
244
  "type": "zip",
245
+ "url": "https://api.github.com/repos/Codeception/Codeception/zipball/41036e8af66e727c4587012f0366b7f0576a99da",
246
+ "reference": "41036e8af66e727c4587012f0366b7f0576a99da",
247
  "shasum": ""
248
  },
249
  "require": {
321
  "type": "open_collective"
322
  }
323
  ],
324
+ "time": "2020-10-11T17:54:58+00:00"
325
  },
326
  {
327
  "name": "codeception/lib-asserts",
375
  },
376
  {
377
  "name": "codeception/lib-innerbrowser",
378
+ "version": "1.3.3",
379
  "source": {
380
  "type": "git",
381
  "url": "https://github.com/Codeception/lib-innerbrowser.git",
382
+ "reference": "5ab24364b7b6408127028ad73d802bc5a49b797b"
383
  },
384
  "dist": {
385
  "type": "zip",
386
+ "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/5ab24364b7b6408127028ad73d802bc5a49b797b",
387
+ "reference": "5ab24364b7b6408127028ad73d802bc5a49b797b",
388
  "shasum": ""
389
  },
390
  "require": {
423
  }
424
  ],
425
  "description": "Parent library for all Codeception framework modules and PhpBrowser",
426
+ "homepage": "https://codeception.com/",
427
  "keywords": [
428
  "codeception"
429
  ],
430
+ "time": "2020-10-11T19:01:02+00:00"
431
  },
432
  {
433
  "name": "codeception/module-asserts",
487
  },
488
  {
489
  "name": "codeception/module-cli",
490
+ "version": "1.0.3",
491
  "source": {
492
  "type": "git",
493
  "url": "https://github.com/Codeception/module-cli.git",
494
+ "reference": "74736cd5abd400b5d1f8388a7a9cb3f9f7d16c7b"
495
  },
496
  "dist": {
497
  "type": "zip",
498
+ "url": "https://api.github.com/repos/Codeception/module-cli/zipball/74736cd5abd400b5d1f8388a7a9cb3f9f7d16c7b",
499
+ "reference": "74736cd5abd400b5d1f8388a7a9cb3f9f7d16c7b",
500
  "shasum": ""
501
  },
502
  "require": {
503
+ "codeception/codeception": "^4.0",
504
  "php": ">=5.6.0 <8.0"
505
  },
506
  "conflict": {
529
  "keywords": [
530
  "codeception"
531
  ],
532
+ "time": "2020-10-11T18:34:36+00:00"
533
  },
534
  {
535
  "name": "codeception/module-db",
692
  },
693
  {
694
  "name": "codeception/module-rest",
695
+ "version": "1.2.4",
696
  "source": {
697
  "type": "git",
698
  "url": "https://github.com/Codeception/module-rest.git",
699
+ "reference": "308d1b7782317310018e0ea45223caada51ea89f"
700
  },
701
  "dist": {
702
  "type": "zip",
703
+ "url": "https://api.github.com/repos/Codeception/module-rest/zipball/308d1b7782317310018e0ea45223caada51ea89f",
704
+ "reference": "308d1b7782317310018e0ea45223caada51ea89f",
705
  "shasum": ""
706
  },
707
  "require": {
739
  "codeception",
740
  "rest"
741
  ],
742
+ "time": "2020-10-11T18:38:50+00:00"
743
  },
744
  {
745
  "name": "codeception/module-webdriver",
746
+ "version": "1.1.2",
747
  "source": {
748
  "type": "git",
749
  "url": "https://github.com/Codeception/module-webdriver.git",
750
+ "reference": "d055c645f600e991e33d1f289a9645eee46c384e"
751
  },
752
  "dist": {
753
  "type": "zip",
754
+ "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/d055c645f600e991e33d1f289a9645eee46c384e",
755
+ "reference": "d055c645f600e991e33d1f289a9645eee46c384e",
756
  "shasum": ""
757
  },
758
  "require": {
794
  "browser-testing",
795
  "codeception"
796
  ],
797
+ "time": "2020-10-11T18:54:47+00:00"
798
  },
799
  {
800
  "name": "codeception/phpunit-wrapper",
801
+ "version": "6.0.20",
802
  "source": {
803
  "type": "git",
804
  "url": "https://github.com/Codeception/phpunit-wrapper.git",
805
+ "reference": "7d6f09bea302ef81bcd1df00cb82df5c43c6db50"
806
  },
807
  "dist": {
808
  "type": "zip",
809
+ "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7d6f09bea302ef81bcd1df00cb82df5c43c6db50",
810
+ "reference": "7d6f09bea302ef81bcd1df00cb82df5c43c6db50",
811
  "shasum": ""
812
  },
813
  "require": {
840
  }
841
  ],
842
  "description": "PHPUnit classes used by Codeception",
843
+ "time": "2020-10-11T18:18:29+00:00"
844
  },
845
  {
846
  "name": "codeception/stub",
977
  },
978
  {
979
  "name": "composer/composer",
980
+ "version": "1.10.15",
981
  "source": {
982
  "type": "git",
983
  "url": "https://github.com/composer/composer.git",
984
+ "reference": "547c9ee73fe26c77af09a0ea16419176b1cdbd12"
985
  },
986
  "dist": {
987
  "type": "zip",
988
+ "url": "https://api.github.com/repos/composer/composer/zipball/547c9ee73fe26c77af09a0ea16419176b1cdbd12",
989
+ "reference": "547c9ee73fe26c77af09a0ea16419176b1cdbd12",
990
  "shasum": ""
991
  },
992
  "require": {
1067
  "type": "tidelift"
1068
  }
1069
  ],
1070
+ "time": "2020-10-13T13:59:09+00:00"
1071
  },
1072
  {
1073
  "name": "composer/semver",
1278
  },
1279
  {
1280
  "name": "cweagans/composer-patches",
1281
+ "version": "1.7.0",
1282
  "source": {
1283
  "type": "git",
1284
  "url": "https://github.com/cweagans/composer-patches.git",
1285
+ "reference": "ae02121445ad75f4eaff800cc532b5e6233e2ddf"
1286
  },
1287
  "dist": {
1288
  "type": "zip",
1289
+ "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/ae02121445ad75f4eaff800cc532b5e6233e2ddf",
1290
+ "reference": "ae02121445ad75f4eaff800cc532b5e6233e2ddf",
1291
  "shasum": ""
1292
  },
1293
  "require": {
1294
+ "composer-plugin-api": "^1.0 || ^2.0",
1295
  "php": ">=5.3.0"
1296
  },
1297
  "require-dev": {
1298
+ "composer/composer": "~1.0 || ~2.0",
1299
  "phpunit/phpunit": "~4.6"
1300
  },
1301
  "type": "composer-plugin",
1318
  }
1319
  ],
1320
  "description": "Provides a way to patch Composer packages.",
1321
+ "time": "2020-09-30T17:56:20+00:00"
1322
  },
1323
  {
1324
  "name": "dealerdirect/phpcodesniffer-composer-installer",
1586
  }
1587
  ],
1588
  "description": "JSONPath implementation for parsing, searching and flattening arrays",
1589
+ "abandoned": "softcreatr/jsonpath",
1590
  "time": "2019-07-15T17:23:22+00:00"
1591
  },
1592
  {
2351
  },
2352
  {
2353
  "name": "mck89/peast",
2354
+ "version": "v1.11.0",
2355
  "source": {
2356
  "type": "git",
2357
  "url": "https://github.com/mck89/peast.git",
2358
+ "reference": "2a2bc6826114c46ff0bc1359208b7083a17f7a99"
2359
  },
2360
  "dist": {
2361
  "type": "zip",
2362
+ "url": "https://api.github.com/repos/mck89/peast/zipball/2a2bc6826114c46ff0bc1359208b7083a17f7a99",
2363
+ "reference": "2a2bc6826114c46ff0bc1359208b7083a17f7a99",
2364
  "shasum": ""
2365
  },
2366
  "require": {
2367
  "php": ">=5.4.0"
2368
  },
2369
  "require-dev": {
2370
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
2371
  },
2372
  "type": "library",
2373
  "extra": {
2374
  "branch-alias": {
2375
+ "dev-master": "1.11.0-dev"
2376
  }
2377
  },
2378
  "autoload": {
2392
  }
2393
  ],
2394
  "description": "Peast is PHP library that generates AST for JavaScript code",
2395
+ "time": "2020-10-09T15:12:13+00:00"
2396
  },
2397
  {
2398
  "name": "mikemclin/laravel-wp-password",
2874
  },
2875
  {
2876
  "name": "php-webdriver/webdriver",
2877
+ "version": "1.8.3",
2878
  "source": {
2879
  "type": "git",
2880
  "url": "https://github.com/php-webdriver/php-webdriver.git",
2881
+ "reference": "fb0fc4cb01c70a7790a5fcc91d461b88c83174a2"
2882
  },
2883
  "dist": {
2884
  "type": "zip",
2885
+ "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/fb0fc4cb01c70a7790a5fcc91d461b88c83174a2",
2886
+ "reference": "fb0fc4cb01c70a7790a5fcc91d461b88c83174a2",
2887
  "shasum": ""
2888
  },
2889
  "require": {
2894
  "symfony/polyfill-mbstring": "^1.12",
2895
  "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0"
2896
  },
2897
+ "replace": {
2898
+ "facebook/webdriver": "*"
2899
+ },
2900
  "require-dev": {
2901
  "friendsofphp/php-cs-fixer": "^2.0",
2902
+ "ondram/ci-detector": "^2.1 || ^3.5",
2903
  "php-coveralls/php-coveralls": "^2.0",
2904
  "php-mock/php-mock-phpunit": "^1.1",
2905
+ "php-parallel-lint/php-parallel-lint": "^1.2",
2906
  "phpunit/phpunit": "^5.7",
2907
  "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
2908
  "sminnee/phpunit-mock-objects": "^3.4",
2915
  "type": "library",
2916
  "extra": {
2917
  "branch-alias": {
2918
+ "dev-main": "1.8.x-dev"
2919
  }
2920
  },
2921
  "autoload": {
2939
  "selenium",
2940
  "webdriver"
2941
  ],
2942
+ "time": "2020-10-06T19:10:04+00:00"
2943
  },
2944
  {
2945
  "name": "phpcompatibility/php-compatibility",
7665
  "source": {
7666
  "type": "git",
7667
  "url": "https://github.com/wp-cli/wp-cli.git",
7668
+ "reference": "d394b395995e70932df5a58baab18f2942afbc28"
7669
  },
7670
  "dist": {
7671
  "type": "zip",
7672
+ "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/d394b395995e70932df5a58baab18f2942afbc28",
7673
+ "reference": "d394b395995e70932df5a58baab18f2942afbc28",
7674
  "shasum": ""
7675
  },
7676
  "require": {
7723
  "cli",
7724
  "wordpress"
7725
  ],
7726
+ "time": "2020-10-09T07:57:08+00:00"
7727
  },
7728
  {
7729
  "name": "wp-cli/wp-cli-bundle",
7968
  },
7969
  {
7970
  "name": "wpdesk/wp-basic-requirements",
7971
+ "version": "3.2.3",
7972
  "source": {
7973
  "type": "git",
7974
  "url": "https://gitlab.com/wpdesk/wp-basic-requirements.git",
7975
+ "reference": "7c5b1a36c35c3867900c3b8a470078342be24a65"
7976
  },
7977
  "dist": {
7978
  "type": "zip",
7979
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-basic-requirements/repository/archive.zip?sha=7c5b1a36c35c3867900c3b8a470078342be24a65",
7980
+ "reference": "7c5b1a36c35c3867900c3b8a470078342be24a65",
7981
  "shasum": ""
7982
  },
7983
  "require": {
8007
  "email": "krzysiek@wpdesk.pl"
8008
  }
8009
  ],
8010
+ "time": "2020-10-05T12:20:47+00:00"
8011
  },
8012
  {
8013
  "name": "wpdesk/wp-builder",
8170
  },
8171
  {
8172
  "name": "wpdesk/wp-helpscout-beacon",
8173
+ "version": "1.3.0",
8174
  "source": {
8175
  "type": "git",
8176
  "url": "https://gitlab.com/wpdesk/wp-helpscout-beacon.git",
8177
+ "reference": "3b3ad27aa084fd023682245406a469afab42d6e1"
8178
  },
8179
  "dist": {
8180
  "type": "zip",
8181
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-helpscout-beacon/repository/archive.zip?sha=3b3ad27aa084fd023682245406a469afab42d6e1",
8182
+ "reference": "3b3ad27aa084fd023682245406a469afab42d6e1",
8183
  "shasum": ""
8184
  },
8185
  "require": {
8211
  "email": "krzysiek@wpdesk.pl"
8212
  }
8213
  ],
8214
+ "time": "2020-10-14T12:49:56+00:00"
8215
  },
8216
  {
8217
  "name": "wpdesk/wp-logs",
8408
  },
8409
  {
8410
  "name": "wpdesk/wp-plugin-flow",
8411
+ "version": "2.8.0",
8412
  "source": {
8413
  "type": "git",
8414
  "url": "https://gitlab.com/wpdesk/wp-plugin-flow.git",
8415
+ "reference": "da50df9dce9b4a2706b1c0635768e4d84d0209dc"
8416
  },
8417
  "dist": {
8418
  "type": "zip",
8419
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-plugin-flow/repository/archive.zip?sha=da50df9dce9b4a2706b1c0635768e4d84d0209dc",
8420
+ "reference": "da50df9dce9b4a2706b1c0635768e4d84d0209dc",
8421
  "shasum": ""
8422
  },
8423
  "require": {
8455
  "email": "krzysiek@wpdesk.pl"
8456
  }
8457
  ],
8458
+ "time": "2020-10-15T14:54:50+00:00"
8459
  },
8460
  {
8461
  "name": "wpdesk/wp-pointer",
8697
  },
8698
  {
8699
  "name": "wpdesk/wp-wpdesk-license",
8700
+ "version": "2.9.0",
8701
  "source": {
8702
  "type": "git",
8703
  "url": "https://gitlab.com/wpdesk/wp-wpdesk-license.git",
8704
+ "reference": "4d3afabe74edd66af3c363d3b4bd0335da8d6e4b"
8705
  },
8706
  "dist": {
8707
  "type": "zip",
8708
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-license/repository/archive.zip?sha=4d3afabe74edd66af3c363d3b4bd0335da8d6e4b",
8709
+ "reference": "4d3afabe74edd66af3c363d3b4bd0335da8d6e4b",
8710
  "shasum": ""
8711
  },
8712
  "require": {
8746
  "email": "krzysiek@wpdesk.pl"
8747
  }
8748
  ],
8749
+ "time": "2020-10-15T14:56:37+00:00"
8750
  },
8751
  {
8752
  "name": "wpdesk/wp-wpdesk-tracker",
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.14.4
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
@@ -11,7 +11,7 @@
11
  * Requires at least: 4.9
12
  * Tested up to: 5.5
13
  * WC requires at least: 4.2
14
- * WC tested up to: 4.5
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '3.14.4';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
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.15.0
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
11
  * Requires at least: 4.9
12
  * Tested up to: 5.5
13
  * WC requires at least: 4.2
14
+ * WC tested up to: 4.6
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '3.15.0';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, 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, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.5
7
- Stable tag: 3.14.4
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -163,6 +163,10 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
163
 
164
  == Changelog ==
165
 
 
 
 
 
166
  = 3.14.4 - 2020-10-08 =
167
  * Fixed Java Script path
168
 
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, 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, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.5
7
+ Stable tag: 3.15.0
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
163
 
164
  == Changelog ==
165
 
166
+ = 3.15.0 - 2020-10-22 =
167
+ * Added documentation Beacon
168
+ * Added Cart Calculation field for export
169
+
170
  = 3.14.4 - 2020-10-08 =
171
  * Fixed Java Script path
172
 
src/WPDesk/FS/TableRate/Beacon.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Beacon
4
+ *
5
+ * @package WPDesk\FS\TableRate
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate;
9
+
10
+ use FSVendor\WPDesk\Beacon\BeaconGetShouldShowStrategy;
11
+
12
+ /**
13
+ * Can display Help Scout beacon.
14
+ */
15
+ class Beacon extends \FSVendor\WPDesk\Beacon\Beacon {
16
+
17
+ /**
18
+ * Beacon constructor.
19
+ *
20
+ * @param BeaconDisplayStrategy $strategy .
21
+ * @param string $assets_url .
22
+ */
23
+ public function __construct( BeaconDisplayStrategy $strategy, $assets_url ) {
24
+ parent::__construct(
25
+ '2321116f-e474-45a7-b04d-0950420ff894',
26
+ $strategy,
27
+ $assets_url,
28
+ 'hs-beacon-search',
29
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA4CAIAAADSNuW8AAAAA3NCSVQICAjb4U/gAAAAEHRFWHRTb2Z0d2FyZQBTaHV0dGVyY4LQCQAAD8NJREFUeNrtnX18U1Wax597b3Lz0ry0zUubNqS8BaTY8lakYkYULDDD6M4KIy/OOFqHWZzZkTIy6uoIun78zMg62lV3QVhhxlFAFN0Fy9sOK0jFCqUMLbRAKaUhJWmS5q1pbpLm3rt/nPQ2TdKQ4CgF7u+Pfk5vzrkv53zvc57nnHPvxbxeLySIZVlIJm47Slj9kSMdVLunzxmguynaGaCdvREqkrwsr29DEgGmzhKopYRaSqgkxK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Rate\Beacon;
9
+
10
+ use FSVendor\WPDesk\Beacon\BeaconGetShouldShowStrategy;
11
+
12
+ /**
13
+ * Can display Help Scout beacon.
14
+ */
15
+ class Beacon extends \FSVendor\WPDesk\Beacon\Beacon {
16
+
17
+ /**
18
+ * Beacon constructor.
19
+ *
20
+ * @param BeaconDisplayStrategy $strategy .
21
+ * @param string $assets_url .
22
+ */
23
+ public function __construct( BeaconDisplayStrategy $strategy, $assets_url ) {
24
+ parent::__construct(
25
+ '2321116f-e474-45a7-b04d-0950420ff894',
26
+ $strategy,
27
+ $assets_url,
28
+ 'hs-beacon-search',
29
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA4CAIAAADSNuW8AAAAA3NCSVQICAjb4U/gAAAAEHRFWHRTb2Z0d2FyZQBTaHV0dGVyY4LQCQAAD8NJREFUeNrtnX18U1Wax597b3Lz0ry0zUubNqS8BaTY8lakYkYULDDD6M4KIy/OOFqHWZzZkTIy6uoIun78zMg62lV3QVhhxlFAFN0Fy9sOK0jFCqUMLbRAKaUhJWmS5q1pbpLm3rt/nPQ2TdKQ4CgF7u+Pfk5vzrkv53zvc57nnHPvxbxeLySIZVlIJm47Slj9kSMdVLunzxmguynaGaCdvREqkrwsr29DEgGmzhKopYRaSqgkxKhs4feKJDqZAAAwDEN5uESckm7HEoFIpCGWgwgDjV3BI+bgEXOgzRXmm2QYakwuOatI+j2DpDRPhGOpyEiyJQ6IoWhgWZYF+Oy8f0O950pPhK/0G0KFcsEvp+d835iF9bf9VZkYACIFCgBwuCPw9jH3BVcfX8s3nIy5widn5JoMEkgDiygQKWgIRdgXD3fvu+Dna/aG1vyxshdnqUQCLDUTmNfrjaMh1jBc6en7zX7HuW7eV7gZNF5Fvj5PUyAXDmUqMAzDPB5Pco+BZWsvB9d87vAEGb4qbxpli/FX79NOLxBhWHJTMQiIWBreafBurPfwEeTNJwKDleW5PymRJ2UCT0rDxgbvOzwNN6loFl7/yrWxwYvaOs6DxBNp+OvFwIZ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gfWWlX6z1BfnvX9xEkpHY72Yq7tTFuJD9WEQTieaBQ6Y8H/+PCmVhJqPavIazCuWCDfOyy/MHeQjxRsLtHngJWaKdYFk20Mf+paVvR4s/wr/z+oaVAIdFt2X9rJiUCgdQSDQBUSCg/z2ViUxwCUsvVJ+g0h/b5jV8NFMvfmKyWJ8FSTqIOBrQ2/Bj32Qbi0KcqWBZ9ksr+3aDnx+5ulGkVwiqpkmnaQf1EXFBJUcCxH4eISkTABBrJ9BPNMOedbNf2+haS+iim//AznDU6BzhzEJRuY6YkIMReBIfEQCS0gCxn0dIZCKpzYiVIwjHbIy5h3EFGWeAdgVZ/qt837HQV/lyxZhKQqgkuEGO35GPa8SAJSiOgKQ0QIrvZSRikfhv3IvUh/q4I69vfWhh8Hf3ElFI8S8M/l7G/wMTjzX+MuAxsAAAAABJRU5ErkJggg=='
30
+ );
31
+ }
32
+
33
+ }
src/WPDesk/FS/TableRate/Beacon/BeaconClickedAjax.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class BeaconAjax
4
+ *
5
+ * @package WPDesk\FS\TableRate
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\Beacon;
9
+
10
+ use FSVendor\WPDesk\Beacon\BeaconGetShouldShowStrategy;
11
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
12
+
13
+ /**
14
+ * Can register Beacon click vi AJAX.
15
+ */
16
+ class BeaconClickedAjax implements Hookable {
17
+
18
+ const OPTION_NAME = 'flexible_shipping_beacon_clicked';
19
+ const NONCE_ACTION = 'flexible_shipping_beacon_clicked';
20
+ const AJAX_ACTION = 'flexible_shipping_beacon_clicked';
21
+
22
+ /**
23
+ * @var BeaconDisplayStrategy
24
+ */
25
+ private $strategy;
26
+
27
+ /**
28
+ * @var string
29
+ */
30
+ private $assets_url;
31
+
32
+ /**
33
+ * @var string
34
+ */
35
+ private $scripts_version;
36
+
37
+ /**
38
+ * BeaconAjax constructor.
39
+ *
40
+ * @param BeaconDisplayStrategy $strategy .
41
+ * @param string $assets_url .
42
+ * @param string $scripts_version .
43
+ */
44
+ public function __construct( BeaconDisplayStrategy $strategy, $assets_url, $scripts_version ) {
45
+ $this->strategy = $strategy;
46
+ $this->assets_url = $assets_url;
47
+ $this->scripts_version = $scripts_version;
48
+ }
49
+
50
+ /**
51
+ * Hooks.
52
+ */
53
+ public function hooks() {
54
+ if ( 0 === (int) get_option( self::OPTION_NAME, 0 ) ) {
55
+ if ( $this->strategy->shouldDisplay() ) {
56
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_script' ) );
57
+ }
58
+ add_action( 'wp_ajax_' . self::AJAX_ACTION, array( $this, 'handle_ajax_action' ) );
59
+ }
60
+ }
61
+
62
+ /**
63
+ * @internal
64
+ */
65
+ public function add_script() {
66
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
67
+ $handle = 'fs_beacon_clicked';
68
+ wp_register_script(
69
+ $handle,
70
+ trailingslashit( $this->assets_url ) . 'js/beacon-clicked' . $suffix . '.js',
71
+ array( 'jquery' ),
72
+ $this->scripts_version
73
+ );
74
+ wp_localize_script(
75
+ $handle,
76
+ 'fs_beacon_clicked',
77
+ array(
78
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
79
+ 'action' => self::AJAX_ACTION,
80
+ 'nonce' => wp_create_nonce( self::NONCE_ACTION ),
81
+ )
82
+ );
83
+ wp_enqueue_script( $handle );
84
+ }
85
+
86
+ /**
87
+ * Handle AJAX action.
88
+ *
89
+ * @internal
90
+ */
91
+ public function handle_ajax_action() {
92
+ check_ajax_referer( self::AJAX_ACTION, 'nonce' );
93
+ update_option( self::OPTION_NAME, 1 );
94
+ }
95
+
96
+ }
src/WPDesk/FS/TableRate/Beacon/BeaconDeactivationTracker.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Deactivation tracker data.
4
+ *
5
+ * @package WPDesk\FS\TableRate
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\Beacon;
9
+
10
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
11
+ use WPDesk\FS\TableRate\NewRulesTableBanner\RulesBannerClickedOption;
12
+ use WPDesk\FS\TableRate\NewRulesTableBanner\RulesBannerDontLikeOption;
13
+ use WPDesk\FS\TableRate\NewRulesTableBanner\RulesBannerLikeOption;
14
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerOption;
15
+ use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
16
+
17
+ /**
18
+ * Can add beacon data to deactivation tracker data.
19
+ */
20
+ class BeaconDeactivationTracker implements Hookable {
21
+
22
+ const ADDITIONAL_DATA = 'additional_data';
23
+
24
+ /**
25
+ * Hooks.
26
+ */
27
+ public function hooks() {
28
+ add_filter( 'wpdesk_tracker_deactivation_data', array( $this, 'append_beacon_data_to_deactivation_tracker' ) );
29
+ }
30
+
31
+ /**
32
+ * Set new rules table data to data array.
33
+ *
34
+ * @param array $data Data.
35
+ *
36
+ * @internal
37
+ *
38
+ * @return array
39
+ */
40
+ public function append_beacon_data_to_deactivation_tracker( array $data ) {
41
+ if ( empty( $data[ self::ADDITIONAL_DATA ] ) || ! is_array( $data[ self::ADDITIONAL_DATA ] ) ) {
42
+ $data[ self::ADDITIONAL_DATA ] = array();
43
+ }
44
+ $data[ self::ADDITIONAL_DATA ]['beacon'] = array( 'clicked' => 1 === (int) get_option( BeaconClickedAjax::OPTION_NAME, 0 ) ? 'yes' : 'no' );
45
+
46
+ return $data;
47
+ }
48
+
49
+ }
src/WPDesk/FS/TableRate/Beacon/BeaconDisplayStrategy.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class BeaconDisplayStrategy
4
+ *
5
+ * @package WPDesk\FS\TableRate
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\Beacon;
9
+
10
+ use FSVendor\WPDesk\Beacon\BeaconGetShouldShowStrategy;
11
+
12
+ /**
13
+ * Beacon display strategy.
14
+ */
15
+ class BeaconDisplayStrategy extends BeaconGetShouldShowStrategy {
16
+
17
+ /**
18
+ * BeaconDisplayStrategy constructor.
19
+ */
20
+ public function __construct() {
21
+ $conditions = array(
22
+ array(
23
+ 'page' => 'wc-settings',
24
+ 'tab' => 'shipping',
25
+ ),
26
+ );
27
+ parent::__construct( $conditions );
28
+ }
29
+
30
+ /**
31
+ * Should Beacon be visible?
32
+ *
33
+ * @return bool
34
+ */
35
+ public function shouldDisplay() {
36
+ if ( parent::shouldDisplay() ) {
37
+ if ( isset( $_GET['instance_id'] ) && ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) { // phpcs:ignore
38
+ $instance_id = sanitize_text_field( $_GET['instance_id'] ); // phpcs:ignore
39
+ try {
40
+ $shipping_method = \WC_Shipping_Zones::get_shipping_method( $instance_id );
41
+ if ( $shipping_method && $shipping_method instanceof \WPDesk_Flexible_Shipping ) {
42
+
43
+ return true;
44
+ }
45
+ } catch ( Exception $e ) {
46
+
47
+ return false;
48
+ }
49
+ }
50
+ if ( isset( $_GET['section'] ) && sanitize_key( $_GET['section'] ) === 'flexible_shipping_info' ) { // phpcs:ignore
51
+
52
+ return true;
53
+ }
54
+ }
55
+
56
+ return false;
57
+ }
58
+
59
+
60
+ }
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitd5f2137386ff93d5e872c112bcd4a0e0::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit822c39c3530b8c939e334e9c4d87a976::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -154,6 +154,10 @@ return array(
154
  'FSVendor\\WPDesk\\Helper\\Page\\SettingsPage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php',
155
  'FSVendor\\WPDesk\\Helper\\PrefixedHelperAsLibrary' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/PrefixedHelperAsLibrary.php',
156
  'FSVendor\\WPDesk\\Helper\\UpgradeSoonNotice' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/UpgradeSoonNotice.php',
 
 
 
 
157
  'FSVendor\\WPDesk\\License\\InstalledPlugins' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
158
  'FSVendor\\WPDesk\\License\\Page\\Action' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
159
  'FSVendor\\WPDesk\\License\\Page\\LicensePage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
@@ -326,6 +330,11 @@ return array(
326
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/rate-notice-implementation.php',
327
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/interface-rate.php',
328
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
 
 
 
 
 
329
  'WPDesk\\FS\\TableRate\\ContextualInfo\\Creator' => $baseDir . '/src/WPDesk/FS/TableRate/ContextualInfo/Creator.php',
330
  'WPDesk\\FS\\TableRate\\Debug\\NoShippingMethodsNotice' => $baseDir . '/src/WPDesk/FS/TableRate/Debug/NoShippingMethodsNotice.php',
331
  'WPDesk\\FS\\TableRate\\Debug\\Tracker' => $baseDir . '/src/WPDesk/FS/TableRate/Debug/Tracker.php',
154
  'FSVendor\\WPDesk\\Helper\\Page\\SettingsPage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php',
155
  'FSVendor\\WPDesk\\Helper\\PrefixedHelperAsLibrary' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/PrefixedHelperAsLibrary.php',
156
  'FSVendor\\WPDesk\\Helper\\UpgradeSoonNotice' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/UpgradeSoonNotice.php',
157
+ 'FSVendor\\WPDesk\\License\\Changelog\\Filter\\ByVersion' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php',
158
+ 'FSVendor\\WPDesk\\License\\Changelog\\Formatter' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php',
159
+ 'FSVendor\\WPDesk\\License\\Changelog\\Parser' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php',
160
+ 'FSVendor\\WPDesk\\License\\Changelog\\Parser\\Line' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php',
161
  'FSVendor\\WPDesk\\License\\InstalledPlugins' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
162
  'FSVendor\\WPDesk\\License\\Page\\Action' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
163
  'FSVendor\\WPDesk\\License\\Page\\LicensePage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
330
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/rate-notice-implementation.php',
331
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/interface-rate.php',
332
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
333
+ 'WPDesk\\FS\\TableRate\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon.php',
334
+ 'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
335
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconClickedAjax' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/BeaconClickedAjax.php',
336
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconDeactivationTracker' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/BeaconDeactivationTracker.php',
337
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconDisplayStrategy' => $baseDir . '/src/WPDesk/FS/TableRate/Beacon/BeaconDisplayStrategy.php',
338
  'WPDesk\\FS\\TableRate\\ContextualInfo\\Creator' => $baseDir . '/src/WPDesk/FS/TableRate/ContextualInfo/Creator.php',
339
  'WPDesk\\FS\\TableRate\\Debug\\NoShippingMethodsNotice' => $baseDir . '/src/WPDesk/FS/TableRate/Debug/NoShippingMethodsNotice.php',
340
  'WPDesk\\FS\\TableRate\\Debug\\Tracker' => $baseDir . '/src/WPDesk/FS/TableRate/Debug/Tracker.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitd5f2137386ff93d5e872c112bcd4a0e0
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd5f2137386ff93d5e872c112bcd4a0e0
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitd5f2137386ff93d5e872c112bcd4a0e0', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitd5f2137386ff93d5e872c112bcd4a0e0', '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\ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit822c39c3530b8c939e334e9c4d87a976
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit822c39c3530b8c939e334e9c4d87a976', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit822c39c3530b8c939e334e9c4d87a976', '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\ComposerStaticInit822c39c3530b8c939e334e9c4d87a976::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
@@ -173,6 +173,10 @@ class ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0
173
  'FSVendor\\WPDesk\\Helper\\Page\\SettingsPage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php',
174
  'FSVendor\\WPDesk\\Helper\\PrefixedHelperAsLibrary' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/PrefixedHelperAsLibrary.php',
175
  'FSVendor\\WPDesk\\Helper\\UpgradeSoonNotice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/UpgradeSoonNotice.php',
 
 
 
 
176
  'FSVendor\\WPDesk\\License\\InstalledPlugins' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
177
  'FSVendor\\WPDesk\\License\\Page\\Action' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
178
  'FSVendor\\WPDesk\\License\\Page\\LicensePage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
@@ -345,6 +349,11 @@ class ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0
345
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/rate-notice-implementation.php',
346
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/interface-rate.php',
347
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
 
 
 
 
 
348
  'WPDesk\\FS\\TableRate\\ContextualInfo\\Creator' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ContextualInfo/Creator.php',
349
  'WPDesk\\FS\\TableRate\\Debug\\NoShippingMethodsNotice' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Debug/NoShippingMethodsNotice.php',
350
  'WPDesk\\FS\\TableRate\\Debug\\Tracker' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Debug/Tracker.php',
@@ -419,10 +428,10 @@ class ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0
419
  public static function getInitializer(ClassLoader $loader)
420
  {
421
  return \Closure::bind(function () use ($loader) {
422
- $loader->prefixLengthsPsr4 = ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0::$prefixLengthsPsr4;
423
- $loader->prefixDirsPsr4 = ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0::$prefixDirsPsr4;
424
- $loader->fallbackDirsPsr4 = ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0::$fallbackDirsPsr4;
425
- $loader->classMap = ComposerStaticInitd5f2137386ff93d5e872c112bcd4a0e0::$classMap;
426
 
427
  }, null, ClassLoader::class);
428
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit822c39c3530b8c939e334e9c4d87a976
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
173
  'FSVendor\\WPDesk\\Helper\\Page\\SettingsPage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php',
174
  'FSVendor\\WPDesk\\Helper\\PrefixedHelperAsLibrary' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/PrefixedHelperAsLibrary.php',
175
  'FSVendor\\WPDesk\\Helper\\UpgradeSoonNotice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/UpgradeSoonNotice.php',
176
+ 'FSVendor\\WPDesk\\License\\Changelog\\Filter\\ByVersion' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php',
177
+ 'FSVendor\\WPDesk\\License\\Changelog\\Formatter' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php',
178
+ 'FSVendor\\WPDesk\\License\\Changelog\\Parser' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php',
179
+ 'FSVendor\\WPDesk\\License\\Changelog\\Parser\\Line' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php',
180
  'FSVendor\\WPDesk\\License\\InstalledPlugins' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
181
  'FSVendor\\WPDesk\\License\\Page\\Action' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
182
  'FSVendor\\WPDesk\\License\\Page\\LicensePage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
349
  'WPDesk\\FS\\Rate\\RateNoticeImplementation' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/rate-notice-implementation.php',
350
  'WPDesk\\FS\\Rate\\RateNoticeInterface' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/interface-rate.php',
351
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
352
+ 'WPDesk\\FS\\TableRate\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon.php',
353
+ 'WPDesk\\FS\\TableRate\\Beacon\\Beacon' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/Beacon.php',
354
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconClickedAjax' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/BeaconClickedAjax.php',
355
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconDeactivationTracker' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/BeaconDeactivationTracker.php',
356
+ 'WPDesk\\FS\\TableRate\\Beacon\\BeaconDisplayStrategy' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Beacon/BeaconDisplayStrategy.php',
357
  'WPDesk\\FS\\TableRate\\ContextualInfo\\Creator' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/ContextualInfo/Creator.php',
358
  'WPDesk\\FS\\TableRate\\Debug\\NoShippingMethodsNotice' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Debug/NoShippingMethodsNotice.php',
359
  'WPDesk\\FS\\TableRate\\Debug\\Tracker' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/Debug/Tracker.php',
428
  public static function getInitializer(ClassLoader $loader)
429
  {
430
  return \Closure::bind(function () use ($loader) {
431
+ $loader->prefixLengthsPsr4 = ComposerStaticInit822c39c3530b8c939e334e9c4d87a976::$prefixLengthsPsr4;
432
+ $loader->prefixDirsPsr4 = ComposerStaticInit822c39c3530b8c939e334e9c4d87a976::$prefixDirsPsr4;
433
+ $loader->fallbackDirsPsr4 = ComposerStaticInit822c39c3530b8c939e334e9c4d87a976::$fallbackDirsPsr4;
434
+ $loader->classMap = ComposerStaticInit822c39c3530b8c939e334e9c4d87a976::$classMap;
435
 
436
  }, null, ClassLoader::class);
437
  }
vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php CHANGED
@@ -287,6 +287,17 @@ if (!\class_exists('FSVendor\\WPDesk_Basic_Requirement_Checker')) {
287
  */
288
  private static function retrieve_plugins_data_in_transient()
289
  {
 
 
 
 
 
 
 
 
 
 
 
290
  $plugins = \get_transient(self::PLUGIN_INFO_TRANSIENT_NAME);
291
  if ($plugins === \false) {
292
  if (!\function_exists('get_plugins')) {
@@ -515,7 +526,7 @@ if (!\class_exists('FSVendor\\WPDesk_Basic_Requirement_Checker')) {
515
  /**
516
  * Triggers the transient delete after plugin deactivated
517
  *
518
- *@return void
519
  */
520
  public function transient_delete_on_plugin_version_changed()
521
  {
287
  */
288
  private static function retrieve_plugins_data_in_transient()
289
  {
290
+ static $never_executed = \true;
291
+ if ($never_executed) {
292
+ $never_executed = \false;
293
+ /** Required when WC starts later and these data should be in cache */
294
+ \add_filter('extra_plugin_headers', function ($headers = array()) {
295
+ $headers[] = 'WC tested up to';
296
+ $headers[] = 'WC requires at least';
297
+ $headers[] = 'Woo';
298
+ return \array_unique($headers);
299
+ });
300
+ }
301
  $plugins = \get_transient(self::PLUGIN_INFO_TRANSIENT_NAME);
302
  if ($plugins === \false) {
303
  if (!\function_exists('get_plugins')) {
526
  /**
527
  * Triggers the transient delete after plugin deactivated
528
  *
529
+ * @return void
530
  */
531
  public function transient_delete_on_plugin_version_changed()
532
  {
vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/Beacon.php CHANGED
@@ -31,6 +31,10 @@ class Beacon
31
  * @var string
32
  */
33
  protected $confirmation_message;
 
 
 
 
34
  /**
35
  * Beacon constructor.
36
  *
@@ -38,13 +42,14 @@ class Beacon
38
  * @param BeaconShouldShowStrategy $strategy When to display beacon.
39
  * @param string $assets_url With ending /
40
  */
41
- public function __construct($beacon_id, \FSVendor\WPDesk\Beacon\BeaconShouldShowStrategy $strategy, $assets_url, $beacon_search_elements_class = 'hs-beacon-search')
42
  {
43
  $this->beacon_id = $beacon_id;
44
  $this->activation_strategy = $strategy;
45
  $this->assets_url = $assets_url;
46
  $this->beacon_search_elements_class = $beacon_search_elements_class;
47
  $this->confirmation_message = \__('When you click OK we will open our HelpScout beacon where you can find answers to your questions. This beacon will load our help articles and also potentially set cookies.', 'wp-helpscout-beacon');
 
48
  }
49
  /**
50
  * @return string
@@ -89,6 +94,7 @@ class Beacon
89
  $confirmation_message = \__('When you click OK we will open our HelpScout beacon where you can find answers to your questions. This beacon will load our help articles and also potentially set cookies.', 'wp-helpscout-beacon');
90
  $beacon_search_elements_class = $this->beacon_search_elements_class;
91
  $confirmation_message = $this->confirmation_message;
 
92
  include __DIR__ . '/templates/html-beacon-script.php';
93
  }
94
  }
31
  * @var string
32
  */
33
  protected $confirmation_message;
34
+ /**
35
+ * @var string
36
+ */
37
+ private $beacon_image_content;
38
  /**
39
  * Beacon constructor.
40
  *
42
  * @param BeaconShouldShowStrategy $strategy When to display beacon.
43
  * @param string $assets_url With ending /
44
  */
45
+ public function __construct($beacon_id, \FSVendor\WPDesk\Beacon\BeaconShouldShowStrategy $strategy, $assets_url, $beacon_search_elements_class = 'hs-beacon-search', $beacon_image_content = '')
46
  {
47
  $this->beacon_id = $beacon_id;
48
  $this->activation_strategy = $strategy;
49
  $this->assets_url = $assets_url;
50
  $this->beacon_search_elements_class = $beacon_search_elements_class;
51
  $this->confirmation_message = \__('When you click OK we will open our HelpScout beacon where you can find answers to your questions. This beacon will load our help articles and also potentially set cookies.', 'wp-helpscout-beacon');
52
+ $this->beacon_image_content = $beacon_image_content;
53
  }
54
  /**
55
  * @return string
94
  $confirmation_message = \__('When you click OK we will open our HelpScout beacon where you can find answers to your questions. This beacon will load our help articles and also potentially set cookies.', 'wp-helpscout-beacon');
95
  $beacon_search_elements_class = $this->beacon_search_elements_class;
96
  $confirmation_message = $this->confirmation_message;
97
+ $beacon_image_content = $this->beacon_image_content;
98
  include __DIR__ . '/templates/html-beacon-script.php';
99
  }
100
  }
vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/templates/html-beacon-script.php CHANGED
@@ -8,61 +8,20 @@ namespace FSVendor;
8
  * @var $beacon_id string .
9
  * @var $confirmation_message string .
10
  * @var $beacon_search_elements_class string .
 
11
  */
12
  $beacon_button_class = 'wpdesk-helpscout-beacon-button';
 
13
  if ('' !== $confirmation_message) {
14
  ?><div id="wpdesk-helpscout-beacon">
15
  <div class="wpdesk-helpscout-beacon-frame">
16
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="108px" height="59px" viewBox="0 0 108 59" enable-background="new 0 0 108 59" xml:space="preserve" style="position: fixed; bottom: 37px; right: 37px; outline: none;">
17
- <image class="<?php
18
  echo \esc_attr($beacon_button_class);
19
- ?>" id="image0" width="108" height="59" x="0" y="0" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAA7CAMAAACpM5+wAAABfGlDQ1BpY2MAACiRfZE9SMNAHMVf
20
- U6Ui9QPsUMQhQ3VqQVTEUatQhAqhVmjVweTSL2jSkKS4OAquBQc/FqsOLs66OrgKguAHiJOjk6KL
21
- lPi/pNAi1oPjfry797h7Bwj1MtOsrnFA020zlYiLmeyqGHiFH2H0YxBRmVnGnCQl0XF83cPH17sY
22
- z+p87s/Rp+YsBvhE4llmmDbxBvH0pm1w3icOsaKsEp8TR026IPEj1xWP3zgXXBZ4ZshMp+aJQ8Ri
23
- oY2VNmZFUyOeIo6omk75QsZjlfMWZ61cZc178hcGc/rKMtdpjiCBRSxBgggFVZRQho0YrTopFlK0
24
- H+/gH3b9ErkUcpXAyLGACjTIrh/8D353a+UnJ7ykYBzofnGcj1EgsAs0ao7zfew4jRPA/wxc6S1/
25
- pQ7MfJJea2mRI2BgG7i4bmnKHnC5A4SfDNmUXclPU8jngfcz+qYsMHQL9K55vTX3cfoApKmr5A1w
26
- cAiMFSh7vcO7e9p7+/dMs78fZnByomahL+IAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADq
27
- YAAAOpgAABdwnLpRPAAAAnNQTFRF8fHx8PDw7+/v7u7u2unhqdzAj9Wuf9GkcM2aX8iPT8OESMJ/
28
- gNGk6+3sxuPTldezZMqSl9i0x+TU7O7t7e7tsN3FXMeNXceNst7Gu+HMZcmSZ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5L4wcxnDTpiiLGTJxYStYMx
56
- jNuPB9HCIlonT3amtoat+FNd1Fbdz0U2YIp9pp5gFzKdK5iHfumOkur+9ZBZwAGzimhdTTha3iwd
57
- jnDl+u1wycx7LOeGh2p03Iql3yP6ff/xZ6lIx8u2RrARDWcJlrJ45OiBY2GlY38dPVLEEuLccC3P
58
- TZmsaqyUyJXKx0+c/PvU+G6/T/1z8sTxMmZVYCXUvJZ730jnpJGxuVK5XP53XIEPlmwKS4jzkH+7
59
- KSuqzaFnFotI1h74mImSTakV1n+TS46xWCBrIQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGgg
60
- R0lNUFeBDhcAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMTZUMTk6NDA6MjArMDM6MDDLEPk4
61
- AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTE2VDE5OjQwOjIwKzAzOjAwuk1BhAAAABt0RVh0
62
- aWNjOmNvcHlyaWdodABQdWJsaWMgRG9tYWlutpExWwAAACJ0RVh0aWNjOmRlc2NyaXB0aW9uAEdJ
63
- TVAgYnVpbHQtaW4gc1JHQkxnQRMAAAAVdEVYdGljYzptYW51ZmFjdHVyZXIAR0lNUEyekMoAAAAO
64
- dEVYdGljYzptb2RlbABzUkdCW2BJQwAAAABJRU5ErkJggg==" />
65
- </svg>
66
  </div>
67
  </div><?php
68
  }
8
  * @var $beacon_id string .
9
  * @var $confirmation_message string .
10
  * @var $beacon_search_elements_class string .
11
+ * @var $beacon_image_content string .
12
  */
13
  $beacon_button_class = 'wpdesk-helpscout-beacon-button';
14
+ $beacon_image_content = !empty($beacon_image_content) ? $beacon_image_content : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAA7CAMAAACpM5+wAAABfGlDQ1BpY2MAACiRfZE9SMNAHMVfU6Ui9QPsUMQhQ3VqQVTEUatQhAqhVmjVweTSL2jSkKS4OAquBQc/FqsOLs66OrgKguAHiJOjk6KLlPi/pNAi1oPjfry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AAAOdEVYdGljYzptb2RlbABzUkdCW2BJQwAAAABJRU5ErkJggg==';
15
  if ('' !== $confirmation_message) {
16
  ?><div id="wpdesk-helpscout-beacon">
17
  <div class="wpdesk-helpscout-beacon-frame">
18
+ <div style="position: fixed; bottom: 37px; right: 37px; outline: none;">
19
+ <img class="<?php
20
  echo \esc_attr($beacon_button_class);
21
+ ?>" id="image0" src="<?php
22
+ echo \esc_attr($beacon_image_content);
23
+ ?>" />
24
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  </div>
26
  </div><?php
27
  }
vendor_prefixed/wpdesk/wp-plugin-flow/src/Initialization/HelperInstanceAsFilterTrait.php CHANGED
@@ -19,7 +19,7 @@ trait HelperInstanceAsFilterTrait
19
  */
20
  private function get_helper_version()
21
  {
22
- return 3;
23
  }
24
  /**
25
  * Returns filter action name for helper instance
19
  */
20
  private function get_helper_version()
21
  {
22
+ return 4;
23
  }
24
  /**
25
  * Returns filter action name for helper instance
vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager.php CHANGED
@@ -208,6 +208,9 @@ if (!\class_exists('FSVendor\\WPDesk_API_Manager_With_Update_Flag')) {
208
  if (isset($response, $response->package) && empty($response->package)) {
209
  echo \sprintf(\__(" <a target='_blank' href='%s'>Enter a valid subscription key for automatic updates.</a>", 'flexible-shipping'), \admin_url('admin.php?page=wpdesk-licenses'));
210
  }
 
 
 
211
  }, 10, 2);
212
  }
213
  public function create_instance_id()
@@ -351,6 +354,25 @@ if (!\class_exists('FSVendor\\WPDesk_API_Manager_With_Update_Flag')) {
351
  }
352
  }
353
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  }
355
  // class Ilabs_API_Manager
356
  }
208
  if (isset($response, $response->package) && empty($response->package)) {
209
  echo \sprintf(\__(" <a target='_blank' href='%s'>Enter a valid subscription key for automatic updates.</a>", 'flexible-shipping'), \admin_url('admin.php?page=wpdesk-licenses'));
210
  }
211
+ if (isset($response->changelog) && !empty($response->changelog)) {
212
+ $this->display_changelog($plugin_data['Version'], $response->changelog);
213
+ }
214
  }, 10, 2);
215
  }
216
  public function create_instance_id()
354
  }
355
  }
356
  }
357
+ /**
358
+ * @param string $plugin_data
359
+ * @param string $response
360
+ */
361
+ private function display_changelog($plugin_version, $changelog)
362
+ {
363
+ $parser = new \FSVendor\WPDesk\License\Changelog\Parser($changelog);
364
+ $parser->parse();
365
+ $parsed_changelog = $parser->get_parsed_changelog()->getIterator();
366
+ $changes = new \FSVendor\WPDesk\License\Changelog\Filter\ByVersion($parsed_changelog, $plugin_version);
367
+ if (\iterator_count($changes) > 0) {
368
+ $changelog = new \FSVendor\WPDesk\License\Changelog\Formatter($changes);
369
+ $changelog->set_changelog_types($parser->get_types());
370
+ $formatted_changelog = $changelog->prepare_formatted_html();
371
+ if ($formatted_changelog) {
372
+ echo '<br /><br />' . $formatted_changelog;
373
+ }
374
+ }
375
+ }
376
  }
377
  // class Ilabs_API_Manager
378
  }
vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\License\Changelog\Filter;
4
+
5
+ use FilterIterator;
6
+ use Iterator;
7
+ /**
8
+ * Filters items by version.
9
+ *
10
+ * @package WPDesk\License\Changelog
11
+ */
12
+ class ByVersion extends \FilterIterator
13
+ {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $version;
18
+ /**
19
+ * Updates constructor.
20
+ *
21
+ * @param Iterator $changes
22
+ * @param string $version
23
+ */
24
+ public function __construct(\Iterator $changes, string $version)
25
+ {
26
+ parent::__construct($changes);
27
+ $this->version = $version;
28
+ }
29
+ /**
30
+ * @return bool
31
+ */
32
+ public function accept()
33
+ {
34
+ $change = $this->getInnerIterator()->current();
35
+ return (bool) \version_compare($change['version'], $this->version, '>');
36
+ }
37
+ }
vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\License\Changelog;
4
+
5
+ use Iterator;
6
+ /**
7
+ * Can format changelog.
8
+ *
9
+ * @package WPDesk\License\Changelog
10
+ */
11
+ class Formatter
12
+ {
13
+ /**
14
+ * @var Iterator
15
+ */
16
+ private $changes;
17
+ /**
18
+ * @var array
19
+ */
20
+ private $types;
21
+ /**
22
+ * Formatter constructor.
23
+ *
24
+ * @param Iterator $changes
25
+ */
26
+ public function __construct(\Iterator $changes)
27
+ {
28
+ $this->changes = $changes;
29
+ }
30
+ /**
31
+ * @param array $types
32
+ */
33
+ public function set_changelog_types(array $types)
34
+ {
35
+ $this->types = $types;
36
+ }
37
+ /**
38
+ * @return string
39
+ */
40
+ public function prepare_formatted_html()
41
+ {
42
+ $output = '';
43
+ foreach ($this->get_changes_data() as $name => $changes) {
44
+ if (empty($changes)) {
45
+ continue;
46
+ }
47
+ $output .= \sprintf("\n\n<strong>%s</strong>: <br/>* %s", $name, \implode(' <br />* ', \array_map('esc_html', $changes)));
48
+ }
49
+ return \wp_kses_post(\nl2br(\trim($output)));
50
+ }
51
+ /**
52
+ * @return array
53
+ */
54
+ private function get_changes_data()
55
+ {
56
+ $changes = [];
57
+ foreach ($this->types as $type) {
58
+ $changes[$type] = [];
59
+ }
60
+ foreach ($this->changes as $item) {
61
+ foreach ($item['changes'] as $type => $change) {
62
+ if (!isset($changes[$type])) {
63
+ $changes[$type] = [];
64
+ }
65
+ $changes[$type] = \array_merge($changes[$type], $change);
66
+ }
67
+ }
68
+ return \array_filter($changes);
69
+ }
70
+ }
vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\License\Changelog;
4
+
5
+ use ArrayObject;
6
+ use FSVendor\WPDesk\License\Changelog\Parser\Line;
7
+ /**
8
+ * Can parse changelog.
9
+ *
10
+ * @package FSVendor\WPDesk\License\Changelog
11
+ */
12
+ class Parser
13
+ {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $changelog;
18
+ /**
19
+ * @var string
20
+ */
21
+ private $changelog_parsed_data;
22
+ /**
23
+ * @var array
24
+ */
25
+ private $types = [];
26
+ /**
27
+ * Parser constructor.
28
+ *
29
+ * @param string $changelog
30
+ */
31
+ public function __construct(string $changelog)
32
+ {
33
+ $this->changelog = $changelog;
34
+ }
35
+ /**
36
+ * @return ArrayObject
37
+ */
38
+ public function get_parsed_changelog()
39
+ {
40
+ return new \ArrayObject($this->changelog_parsed_data);
41
+ }
42
+ /**
43
+ * @return Parser $this
44
+ */
45
+ public function parse()
46
+ {
47
+ $this->changelog_parsed_data = [];
48
+ $version = $type = null;
49
+ foreach ($this->get_lines() as $line) {
50
+ if (!$this->types && ($types = $line->get_types())) {
51
+ $this->types = $types;
52
+ continue;
53
+ }
54
+ if ($release = $line->get_release_details()) {
55
+ $version = $release['version'];
56
+ $type = null;
57
+ continue;
58
+ }
59
+ if ($type_details = $line->get_type_details()) {
60
+ $type = $type_details;
61
+ continue;
62
+ }
63
+ if (!$version || !$type) {
64
+ continue;
65
+ }
66
+ if (!isset($this->changelog_parsed_data[$version])) {
67
+ $this->changelog_parsed_data[$version] = ['version' => $version, 'changes' => []];
68
+ }
69
+ $this->changelog_parsed_data[$version]['changes'][$type][] = $line->get_value();
70
+ }
71
+ return $this;
72
+ }
73
+ /**
74
+ * @return array
75
+ */
76
+ public function get_types()
77
+ {
78
+ return $this->types;
79
+ }
80
+ /**
81
+ * @return Line[]
82
+ */
83
+ private function get_lines()
84
+ {
85
+ $content = \base64_decode($this->changelog);
86
+ if (!$content) {
87
+ return [];
88
+ }
89
+ return \array_map(function ($line) {
90
+ return new \FSVendor\WPDesk\License\Changelog\Parser\Line($line);
91
+ }, \array_filter(\preg_split("/\r\n|\n|\r/", \wp_kses_post($content))));
92
+ }
93
+ }
vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\License\Changelog\Parser;
4
+
5
+ /**
6
+ * Can parse single changelog line.
7
+ *
8
+ * @package WPDesk\License\Changelog\Parser
9
+ */
10
+ class Line
11
+ {
12
+ /**
13
+ * @var string
14
+ */
15
+ private $line;
16
+ /**
17
+ * Line constructor.
18
+ *
19
+ * @param string $line
20
+ */
21
+ public function __construct(string $line)
22
+ {
23
+ $this->line = $line;
24
+ }
25
+ /**
26
+ * @return array
27
+ */
28
+ public function get_release_details()
29
+ {
30
+ \preg_match('/## \\[(.*)\\] - (.*)/', $this->line, $output_array);
31
+ if (!isset($output_array[1], $output_array[2])) {
32
+ return [];
33
+ }
34
+ return ['version' => $output_array[1], 'date' => $output_array[2]];
35
+ }
36
+ /**
37
+ * @return string
38
+ */
39
+ public function get_type_details()
40
+ {
41
+ \preg_match('/### (.*)/', $this->line, $output_array);
42
+ if (!isset($output_array[1])) {
43
+ return '';
44
+ }
45
+ return $output_array[1];
46
+ }
47
+ /**
48
+ * @return array
49
+ */
50
+ public function get_types()
51
+ {
52
+ \preg_match('/##### (.*)/', $this->line, $output_array);
53
+ if (!isset($output_array[1])) {
54
+ return [];
55
+ }
56
+ return \wp_parse_list($output_array[1]);
57
+ }
58
+ /**
59
+ * @return string
60
+ */
61
+ public function get_value()
62
+ {
63
+ return \ltrim($this->line, '- ');
64
+ }
65
+ }