Flexible Shipping for WooCommerce - Version 3.7.0

Version Description

  • 2019-07-28 =
  • Flexible Shipping Connect has been removed
Download this release

Release Info

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

Code changes from version 3.6.4 to 3.7.0

Files changed (251) hide show
  1. assets/css/admin.css +0 -7
  2. assets/js/admin_saas_platform.js +0 -405
  3. assets/js/admin_saas_platform.min.js +0 -1
  4. assets/js/checkout.js +0 -3
  5. classes/class-flexible-shipping-plugin.php +31 -70
  6. classes/table-rate/flexible-shipping-settings.php +118 -0
  7. classes/table-rate/logger/{class-saas-logger-downloader.php → class-logger-downloader.php} +2 -2
  8. classes/table-rate/logger/class-logger-factory.php +3 -1
  9. classes/table-rate/logger/{class-saas-logger-settings.php → class-logger-settings.php} +6 -17
  10. classes/table-rate/settings/shipping-method-form.php +0 -4
  11. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php → classes/table-rate/views/html-shipping-settings-advanced.php +0 -0
  12. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php → classes/table-rate/views/html-shipping-settings-info-description.php +39 -29
  13. composer.lock +690 -258
  14. flexible-shipping.php +3 -3
  15. lang/flexible-shipping-pl_PL.mo +0 -0
  16. lang/flexible-shipping-pl_PL.po +1557 -1860
  17. readme.txt +4 -1
  18. vendor/autoload.php +1 -1
  19. vendor/composer/autoload_classmap.php +3 -200
  20. vendor/composer/autoload_psr4.php +0 -2
  21. vendor/composer/autoload_real.php +7 -7
  22. vendor/composer/autoload_static.php +7 -214
  23. vendor/composer/installed.json +0 -141
  24. vendor/psr/simple-cache/.editorconfig +0 -12
  25. vendor/psr/simple-cache/LICENSE.md +0 -21
  26. vendor/psr/simple-cache/composer.json +0 -25
  27. vendor/psr/simple-cache/src/CacheException.php +0 -10
  28. vendor/psr/simple-cache/src/CacheInterface.php +0 -114
  29. vendor/psr/simple-cache/src/InvalidArgumentException.php +0 -13
  30. vendor/wpdesk/wp-saas-platform-client/changelog.txt +0 -33
  31. vendor/wpdesk/wp-saas-platform-client/composer.json +0 -37
  32. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php +0 -111
  33. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php +0 -41
  34. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php +0 -35
  35. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php +0 -215
  36. vendor/wpdesk/wp-saas-platform-client/src/ApiClient/RequestCacheInfoResolver.php +0 -138
  37. vendor/wpdesk/wp-saas-platform-client/src/Authentication/JWTSaasToken.php +0 -73
  38. vendor/wpdesk/wp-saas-platform-client/src/Authentication/JWTToken.php +0 -81
  39. vendor/wpdesk/wp-saas-platform-client/src/Authentication/NullToken.php +0 -54
  40. vendor/wpdesk/wp-saas-platform-client/src/Authentication/Token.php +0 -32
  41. vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheDispatcher.php +0 -116
  42. vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheInfoResolver.php +0 -55
  43. vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheItemCreator.php +0 -22
  44. vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheItemVerifier.php +0 -23
  45. vendor/wpdesk/wp-saas-platform-client/src/Cache/HowToCache.php +0 -72
  46. vendor/wpdesk/wp-saas-platform-client/src/Cache/WordpressCache.php +0 -165
  47. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlClient.php +0 -206
  48. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlExceptionFactory.php +0 -37
  49. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlException.php +0 -15
  50. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlTimedOutException.php +0 -8
  51. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClient.php +0 -58
  52. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientFactory.php +0 -19
  53. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientRequestException.php +0 -12
  54. vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientResponse.php +0 -62
  55. vendor/wpdesk/wp-saas-platform-client/src/Model/AbstractModel.php +0 -230
  56. vendor/wpdesk/wp-saas-platform-client/src/Model/KeyInfo.php +0 -41
  57. vendor/wpdesk/wp-saas-platform-client/src/Model/Label/Label.php +0 -47
  58. vendor/wpdesk/wp-saas-platform-client/src/Model/LoginData.php +0 -41
  59. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientCollectionPoint.php +0 -89
  60. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientMapLocation.php +0 -38
  61. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchRequest.php +0 -52
  62. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchResponse.php +0 -34
  63. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleRequest.php +0 -23
  64. vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleResponse.php +0 -34
  65. vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/RateRequest.php +0 -10
  66. vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/RateResponse.php +0 -32
  67. vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/SingleRate.php +0 -44
  68. vendor/wpdesk/wp-saas-platform-client/src/Model/Register.php +0 -52
  69. vendor/wpdesk/wp-saas-platform-client/src/Model/Reset.php +0 -19
  70. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Actor.php +0 -79
  71. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Address.php +0 -142
  72. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientCommodity.php +0 -163
  73. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientMoney.php +0 -40
  74. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientWeight.php +0 -50
  75. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package.php +0 -87
  76. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package/Dimensions.php +0 -42
  77. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentAdminContext.php +0 -97
  78. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentRequest.php +0 -195
  79. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentResponse.php +0 -120
  80. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopData.php +0 -43
  81. vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopFlow.php +0 -113
  82. vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/SendDocumentsResponse.php +0 -23
  83. vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocument.php +0 -193
  84. vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocumentRequest.php +0 -74
  85. vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingPlan.php +0 -92
  86. vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingService.php +0 -119
  87. vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSetting.php +0 -111
  88. vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSettingTest.php +0 -7
  89. vendor/wpdesk/wp-saas-platform-client/src/Model/Shop.php +0 -31
  90. vendor/wpdesk/wp-saas-platform-client/src/Model/Status.php +0 -65
  91. vendor/wpdesk/wp-saas-platform-client/src/Model/Token.php +0 -19
  92. vendor/wpdesk/wp-saas-platform-client/src/Model/User.php +0 -70
  93. vendor/wpdesk/wp-saas-platform-client/src/Persistence/PersistentContainerFactory.php +0 -19
  94. vendor/wpdesk/wp-saas-platform-client/src/Platform.php +0 -577
  95. vendor/wpdesk/wp-saas-platform-client/src/PlatformAdminContext.php +0 -70
  96. vendor/wpdesk/wp-saas-platform-client/src/PlatformFactory.php +0 -51
  97. vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php +0 -223
  98. vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryWordpressOptions.php +0 -16
  99. vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/HttpClientOptions.php +0 -11
  100. vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/PersistenceOptions.php +0 -11
  101. vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/PlatformUrlOptions.php +0 -11
  102. vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/SerializerOptions.php +0 -11
  103. vendor/wpdesk/wp-saas-platform-client/src/Request/AuthRequest.php +0 -53
  104. vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyInfoRequest.php +0 -28
  105. vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyResetRequest.php +0 -23
  106. vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/RegisterRequest.php +0 -29
  107. vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/TokenRequest.php +0 -26
  108. vendor/wpdesk/wp-saas-platform-client/src/Request/BasicRequest.php +0 -54
  109. vendor/wpdesk/wp-saas-platform-client/src/Request/Fields/GetFieldsRequest.php +0 -45
  110. vendor/wpdesk/wp-saas-platform-client/src/Request/Label/PostLabelRequest.php +0 -36
  111. vendor/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/GetSingleRequest.php +0 -33
  112. vendor/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/PostSearchRequest.php +0 -38
  113. vendor/wpdesk/wp-saas-platform-client/src/Request/Rate/PostRateRequest.php +0 -36
  114. vendor/wpdesk/wp-saas-platform-client/src/Request/Request.php +0 -27
  115. vendor/wpdesk/wp-saas-platform-client/src/Request/Shipment/GetUserListShipmentRequest.php +0 -27
  116. vendor/wpdesk/wp-saas-platform-client/src/Request/Shipment/PostShipmentRequest.php +0 -36
  117. vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentCancel/PostCancelRequest.php +0 -39
  118. vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/DeleteShipmentDocumentRequest.php +0 -35
  119. vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/PostShipmentDocumentRequest.php +0 -45
  120. vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocumentsSend/PostSendRequest.php +0 -41
  121. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingPlan/PutShippingPlanRequest.php +0 -30
  122. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetListRequest.php +0 -14
  123. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetServiceRequest.php +0 -29
  124. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/GetSettingsRequest.php +0 -38
  125. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PostSettingsRequest.php +0 -30
  126. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PutSettingsRequest.php +0 -36
  127. vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/Test/GetSettingsTestRequest.php +0 -37
  128. vendor/wpdesk/wp-saas-platform-client/src/Request/Status/GetStatusRequest.php +0 -49
  129. vendor/wpdesk/wp-saas-platform-client/src/Request/Traits/SettingsItemRequestHelper.php +0 -28
  130. vendor/wpdesk/wp-saas-platform-client/src/Request/Users/GetUserRequest.php +0 -28
  131. vendor/wpdesk/wp-saas-platform-client/src/Response/ApiResponse.php +0 -35
  132. vendor/wpdesk/wp-saas-platform-client/src/Response/AuthApiResponse.php +0 -14
  133. vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyInfoResponse.php +0 -37
  134. vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyResetResponse.php +0 -22
  135. vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/RegisterResponse.php +0 -59
  136. vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/TokenResponse.php +0 -56
  137. vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyMessageFromResponse.php +0 -19
  138. vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyStatusFromResponse.php +0 -19
  139. vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/TriedExtractDataFromErrorResponse.php +0 -19
  140. vendor/wpdesk/wp-saas-platform-client/src/Response/Fields/GetFieldsResponse.php +0 -19
  141. vendor/wpdesk/wp-saas-platform-client/src/Response/Label/PostLabelResponse.php +0 -20
  142. vendor/wpdesk/wp-saas-platform-client/src/Response/Maintenance/MaintenanceResponseContext.php +0 -50
  143. vendor/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/GetSingleResponse.php +0 -23
  144. vendor/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/PostSearchResponse.php +0 -35
  145. vendor/wpdesk/wp-saas-platform-client/src/Response/ProtectedResponse.php +0 -27
  146. vendor/wpdesk/wp-saas-platform-client/src/Response/Rate/PostRateResponse.php +0 -32
  147. vendor/wpdesk/wp-saas-platform-client/src/Response/RawResponse.php +0 -126
  148. vendor/wpdesk/wp-saas-platform-client/src/Response/Response.php +0 -49
  149. vendor/wpdesk/wp-saas-platform-client/src/Response/Shipment/GetListShipmentAdminContextResponse.php +0 -29
  150. vendor/wpdesk/wp-saas-platform-client/src/Response/Shipment/PostShipmentResponse.php +0 -30
  151. vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentCancel/PostCancelResponse.php +0 -11
  152. vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/DeleteShipmentDocumentResponse.php +0 -11
  153. vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/PostShipmentDocumentResponse.php +0 -21
  154. vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocumentsSend/PostSendResponse.php +0 -21
  155. vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServiceResponse.php +0 -20
  156. vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServicesListResponse.php +0 -30
  157. vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/GetSettingsResponse.php +0 -32
  158. vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/Test/GetSettingsTestResponse.php +0 -36
  159. vendor/wpdesk/wp-saas-platform-client/src/Response/Status/GetStatusResponse.php +0 -20
  160. vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/ApiResponseDecorator.php +0 -155
  161. vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/AuthApiResponseDecorator.php +0 -38
  162. vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/PagedListImplementation.php +0 -44
  163. vendor/wpdesk/wp-saas-platform-client/src/Response/Users/GetUserResponse.php +0 -20
  164. vendor/wpdesk/wp-saas-platform-client/src/Serializer/Exception/CannotUnserializeException.php +0 -13
  165. vendor/wpdesk/wp-saas-platform-client/src/Serializer/JsonSerializer.php +0 -46
  166. vendor/wpdesk/wp-saas-platform-client/src/Serializer/Serializer.php +0 -24
  167. vendor/wpdesk/wp-saas-platform-client/src/Serializer/SerializerFactory.php +0 -18
  168. vendor/wpdesk/wp-wpdesk-connect/.gitignore +0 -5
  169. vendor/wpdesk/wp-wpdesk-connect/CHANGELOG.md +0 -11
  170. vendor/wpdesk/wp-wpdesk-connect/apigen.neon +0 -27
  171. vendor/wpdesk/wp-wpdesk-connect/composer.json +0 -34
  172. vendor/wpdesk/wp-wpdesk-connect/phpunit-integration.xml +0 -28
  173. vendor/wpdesk/wp-wpdesk-connect/phpunit-unit.xml +0 -21
  174. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/class-uk-states.php +0 -154
  175. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-request-fields.php +0 -135
  176. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php +0 -208
  177. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php +0 -220
  178. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-upload-dir.php +0 -42
  179. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments.php +0 -125
  180. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php +0 -48
  181. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php +0 -68
  182. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox.php +0 -168
  183. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php +0 -227
  184. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php +0 -768
  185. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php +0 -32
  186. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-connection-error.php +0 -3
  187. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-fieldset-replicable.php +0 -2
  188. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-fieldset.php +0 -61
  189. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php +0 -76
  190. vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-single-attachment.php +0 -39
  191. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php +0 -153
  192. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-checkout.php +0 -166
  193. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-shipment.php +0 -123
  194. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-checkout.php +0 -71
  195. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-shipment.php +0 -63
  196. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when.php +0 -70
  197. vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout/class-checkout-ajax-request-data.php +0 -119
  198. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-money-formatter.php +0 -44
  199. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-add-shipping-handler.php +0 -43
  200. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-auth-params.php +0 -34
  201. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php +0 -23
  202. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php +0 -75
  203. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php +0 -93
  204. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php +0 -81
  205. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php +0 -616
  206. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-country-state-field.php +0 -118
  207. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-custom-services-setting.php +0 -170
  208. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-default-value-compute-handler.php +0 -51
  209. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php +0 -71
  210. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php +0 -74
  211. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php +0 -622
  212. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-maintenance-mode-exception.php +0 -37
  213. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-message-stock-metadata-handler.php +0 -41
  214. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php +0 -55
  215. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-factory.php +0 -55
  216. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-links.php +0 -197
  217. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-registration-second-notice.php +0 -88
  218. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-service-settings-not-found-exception.php +0 -7
  219. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php +0 -145
  220. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php +0 -436
  221. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-auto-create.php +0 -74
  222. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php +0 -66
  223. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php +0 -93
  224. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-method-integration-settings.php +0 -369
  225. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php +0 -445
  226. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php +0 -789
  227. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php +0 -520
  228. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php +0 -157
  229. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php +0 -442
  230. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-sass-settings-integration-checkbox.php +0 -48
  231. vendor/wpdesk/wp-wpdesk-connect/src/saas/class-shipping-zone-data-extractor.php +0 -50
  232. vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax-request-data.php +0 -21
  233. vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php +0 -81
  234. vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php +0 -66
  235. vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php +0 -126
  236. vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php +0 -174
  237. vendor/wpdesk/wp-wpdesk-connect/src/saas/interface-saas-connection-aware.php +0 -22
  238. vendor/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-saas-tracker.php +0 -192
  239. vendor/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-shipment-counter.php +0 -91
  240. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php +0 -63
  241. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-connection-status.php +0 -36
  242. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php +0 -46
  243. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php +0 -180
  244. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-second-notice.php +0 -7
  245. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-fallback-message.php +0 -1
  246. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-free-shipping.php +0 -1
  247. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-message-stock.php +0 -1
  248. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php +0 -45
  249. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php +0 -50
  250. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-settings-connect-script.php +0 -15
  251. vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-settings-long-row.php +0 -6
assets/css/admin.css CHANGED
@@ -281,13 +281,6 @@ table.flexible_shipping_method_rules tfoot th {
281
  color: #006799;
282
  }
283
 
284
- /* integration settings */
285
-
286
- span.flexible_shipping_saas_connection_error {
287
- color: #a00;
288
- font-weight: bold;
289
- }
290
-
291
  /* Order shipping */
292
  .fs-order-item-fallback {
293
  margin-top: .5em;
281
  color: #006799;
282
  }
283
 
 
 
 
 
 
 
 
284
  /* Order shipping */
285
  .fs-order-item-fallback {
286
  margin-top: .5em;
assets/js/admin_saas_platform.js DELETED
@@ -1,405 +0,0 @@
1
- function flexible_shipping_saas_integration_options(integration) {
2
- var integration_class = '.' + integration;
3
- jQuery('.flexible_shipping_method_rules').css('display', 'table-row');
4
- if (jQuery('#woocommerce_flexible_shipping_method_integration').val() == integration) {
5
- jQuery(integration_class).closest('tr').css('display', 'table-row');
6
- }
7
- else {
8
- jQuery(integration_class).closest('tr').css('display', 'none');
9
- }
10
- flexible_shipping_saas_rates_type_options();
11
- }
12
-
13
- function flexible_shipping_saas_rates_type_options() {
14
- if ( jQuery('#woocommerce_flexible_shipping_method_integration').length ) {
15
- var integration_class = '.' + jQuery('#woocommerce_flexible_shipping_method_integration').val();
16
- if ( integration_class !== '.' ) {
17
- var rates_type_value = jQuery('.fs-rates-type'+integration_class).val();
18
- jQuery(integration_class).each(function (index) {
19
- var closest_tr = jQuery(this).closest('tr');
20
- if ('custom' === rates_type_value) {
21
- if (!jQuery(this).hasClass('fs-method')) {
22
- closest_tr.css('display', 'none');
23
- } else {
24
- closest_tr.css('display', 'table-row');
25
- }
26
- }
27
- if ('live' === rates_type_value) {
28
- if (!jQuery(this).hasClass('fs-live')) {
29
- closest_tr.css('display', 'none');
30
- } else {
31
- closest_tr.css('display', 'table-row');
32
- }
33
- }
34
- });
35
- // force elements show/hide
36
- jQuery(window).trigger('resize');
37
- jQuery(integration_class).each(function (index) {
38
- if ('checkbox' === jQuery(this).attr('type')) {
39
- jQuery(this).trigger('change');
40
- }
41
- });
42
- }
43
- }
44
- }
45
-
46
- function flexible_shipping_saas_click_action(fs_action, element, event ) {
47
- let id = jQuery(element).attr('data-id');
48
- if ( typeof id !== 'undefined' ) {
49
- event.stopImmediatePropagation();
50
- event.preventDefault();
51
- let element_id = fs_id(element);
52
- fs_ajax( element, element_id, fs_action );
53
- }
54
- }
55
-
56
- function flexible_shipping_saas_checkbox_dependent_field(checkbox) {
57
- var dependend_field_id = jQuery(checkbox).data('dependent-field-id');
58
- if (typeof dependend_field_id !== 'undefined' && jQuery(checkbox).is(':visible')) {
59
- var dependend_field = jQuery('#'+dependend_field_id);
60
- if (jQuery(checkbox).is(':checked')) {
61
- dependend_field.closest('tr').css('display','table-row');
62
- } else {
63
- dependend_field.closest('tr').css('display','none');
64
- }
65
- }
66
- var dependend_row_class = jQuery(checkbox).data('dependent-row-class');
67
- if (typeof dependend_row_class !== 'undefined' ) {
68
- var dependend_row = jQuery('.' + dependend_row_class);
69
- if ( jQuery(checkbox).is(':visible') ) {
70
- if (jQuery(checkbox).is(':checked')) {
71
- dependend_row.css('display', 'table-row');
72
- } else {
73
- dependend_row.css('display', 'none');
74
- }
75
- } else {
76
- dependend_row.css('display', 'table-row');
77
- }
78
- }
79
- }
80
-
81
- function fs_select2() {
82
- let elements = jQuery( '.fs_select2' );
83
- if ( elements.length ) {
84
- if (jQuery.fn.selectWoo) {
85
- elements.selectWoo();
86
- } else {
87
- elements.select2();
88
- }
89
- }
90
- }
91
-
92
- function flexible_shipping_saas_add_attachment( element, event ) {
93
- event.stopImmediatePropagation();
94
- event.preventDefault();
95
-
96
- flexible_shipping_saas_choose_attachment( element, event );
97
- }
98
-
99
-
100
- function flexible_shipping_saas_send_attachments( element, event ) {
101
- event.stopImmediatePropagation();
102
- event.preventDefault();
103
-
104
- var el = jQuery(element);
105
-
106
- var shipment_id = el.data('shipment_id');
107
-
108
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
109
-
110
- var nonce = jQuery('#flexible_shipping_shipment_nonce_' + shipment_id).val();
111
-
112
- jQuery.ajax({
113
- url: fs_admin.ajax_url,
114
- type: 'POST',
115
- data: {
116
- action: 'flexible_shipping_send_attachments_for_shipment',
117
- nonce: nonce,
118
- shipment_id: shipment_id,
119
- },
120
- dataType: 'json',
121
- }).done(function (response) {
122
- if (response) {
123
- if (response == '0') {
124
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
125
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Invalid response: 0");
126
- }
127
- else if (response.status == 'success') {
128
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible-shipping-shipment-attachments').replaceWith(response.content);
129
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
130
- if ( typeof response.message != 'undefined' ) {
131
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
132
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
133
- }
134
- }
135
- else {
136
- if ( typeof response.content !== 'undefined' ) {
137
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').removeClass("flexible_shipping_shipment_message_error");
138
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible-shipping-shipment-attachments').html(response.content);
139
- }
140
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
141
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
142
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
143
- }
144
- }
145
- else {
146
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
147
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
148
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Request failed: invalid method?");
149
- }
150
- }).always(function () {
151
- }).fail(function (jqXHR, textStatus, errorThrown ) {
152
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
153
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
154
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(errorThrown);
155
- })
156
- }
157
-
158
- function flexible_shipping_saas_delete_attachment( element, event ) {
159
- event.stopImmediatePropagation();
160
- event.preventDefault();
161
-
162
- var el = jQuery(element);
163
-
164
- var shipment_id = el.data('shipment_id');
165
- var saas_attachment_id = el.data('saas_attachment_id');
166
-
167
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
168
-
169
- var nonce = jQuery('#flexible_shipping_shipment_nonce_' + shipment_id).val();
170
-
171
- jQuery.ajax({
172
- url: fs_admin.ajax_url,
173
- type: 'POST',
174
- data: {
175
- action: 'flexible_shipping_delete_attachment_for_shipment',
176
- nonce: nonce,
177
- shipment_id: shipment_id,
178
- saas_attachment_id: saas_attachment_id,
179
- },
180
- dataType: 'json',
181
- }).done(function (response) {
182
- if (response) {
183
- if (response == '0') {
184
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
185
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Invalid response: 0");
186
- }
187
- else if (response.status == 'success') {
188
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible-shipping-shipment-attachments').replaceWith(response.content);
189
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
190
- if ( typeof response.message != 'undefined' ) {
191
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
192
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
193
- }
194
- }
195
- else {
196
- if ( typeof response.content !== 'undefined' ) {
197
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').removeClass("flexible_shipping_shipment_message_error");
198
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible-shipping-shipment-attachments').html(response.content);
199
- }
200
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
201
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
202
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
203
- }
204
- }
205
- else {
206
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
207
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
208
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Request failed: invalid method?");
209
- }
210
- }).always(function () {
211
- }).fail(function (jqXHR, textStatus, errorThrown ) {
212
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
213
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
214
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(errorThrown);
215
- })
216
- }
217
-
218
-
219
- var downloadable_file_frame;
220
- var el_content;
221
- var el_attachment_id;
222
- var el_attachment_filename;
223
- var el_shipment_id;
224
- var el_attachment_type;
225
-
226
- function flexible_shipping_saas_choose_attachment( element, event ) {
227
- event.stopImmediatePropagation();
228
- event.preventDefault();
229
-
230
- var el = jQuery(element);
231
-
232
- el_content = el.closest('.flexible-shipping-shipment-attachments');
233
- el_attachment_id = el_content.find('.flexible-shipping-shipment-attachments-attachment-id');
234
- el_attachment_filename = el_content.find('.flexible-shipping-shipment-attachments-filename');
235
- el_shipment_id = el.data('shipment_id');
236
- el_attachment_type = el_content.find('.flexible-shipping-shipment-attachments-type').val();
237
-
238
- // If the media frame already exists, reopen it.
239
- if ( downloadable_file_frame ) {
240
- downloadable_file_frame.open();
241
- return;
242
- }
243
-
244
- var downloadable_file_states = [
245
- // Main states.
246
- new wp.media.controller.Library({
247
- library: wp.media.query(),
248
- multiple: true,
249
- title: el.data('choose'),
250
- priority: 20,
251
- filterable: 'uploaded'
252
- })
253
- ];
254
-
255
- // Create the media frame.
256
- downloadable_file_frame = wp.media.frames.downloadable_file = wp.media({
257
- // Set the title of the modal.
258
- title: el.data('choose'),
259
- library: {
260
- type: ''
261
- },
262
- button: {
263
- text: el.data('update')
264
- },
265
- multiple: true,
266
- states: downloadable_file_states
267
- });
268
-
269
- // When an image is selected, run a callback.
270
- downloadable_file_frame.on( 'select', function() {
271
- var attachment_id = '';
272
- var file_path = '';
273
- var file_name = '';
274
- var selection = downloadable_file_frame.state().get( 'selection' );
275
-
276
- selection.map( function( attachment ) {
277
- attachment = attachment.toJSON();
278
-
279
- if ( attachment.id ) {
280
- attachment_id = attachment.id;
281
- }
282
- if ( attachment.url ) {
283
- file_path = attachment.url;
284
- }
285
- if ( attachment.filename ) {
286
- file_name = attachment.filename;
287
- }
288
-
289
- el_attachment_filename.val(file_name).change();
290
- el_attachment_id.val(attachment_id).change();
291
-
292
- el.attr( 'disabled', true );
293
-
294
- flexible_shipping_saas_add_attachment_to_shipment( el_shipment_id, attachment_id, el_attachment_type );
295
-
296
- el.attr( 'disabled', false );
297
-
298
- });
299
-
300
- });
301
-
302
- // Set post to 0 and set our custom type.
303
- downloadable_file_frame.on( 'ready', function() {
304
- downloadable_file_frame.uploader.options.uploader.params = {
305
- type: 'shipment'
306
- };
307
- });
308
-
309
- // Finally, open the modal.
310
- downloadable_file_frame.open();
311
- }
312
-
313
-
314
- function flexible_shipping_saas_add_attachment_to_shipment( shipment_id, attachment_id, attachment_type ) {
315
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
316
-
317
- var nonce = jQuery('#flexible_shipping_shipment_nonce_' + shipment_id).val();
318
-
319
- jQuery.ajax({
320
- url: fs_admin.ajax_url,
321
- type: 'POST',
322
- data: {
323
- action: 'flexible_shipping_add_attachment_to_shipment',
324
- nonce: nonce,
325
- shipment_id: shipment_id,
326
- attachment_id: attachment_id,
327
- attachment_type: attachment_type,
328
- },
329
- dataType: 'json',
330
- }).done(function (response) {
331
- if (response) {
332
- if (response == '0') {
333
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
334
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Invalid response: 0");
335
- }
336
- else if (response.status == 'success') {
337
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible-shipping-shipment-attachments').replaceWith(response.content);
338
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').hide();
339
- if ( typeof response.message != 'undefined' ) {
340
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
341
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
342
- }
343
- }
344
- else {
345
- if ( typeof response.content !== 'undefined' ) {
346
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').removeClass("flexible_shipping_shipment_message_error");
347
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_content').html(response.content);
348
- }
349
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
350
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
351
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(response.message);
352
- }
353
- }
354
- else {
355
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
356
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
357
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html("Request failed: invalid method?");
358
- }
359
- }).always(function () {
360
- }).fail(function (jqXHR, textStatus, errorThrown ) {
361
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').addClass("flexible_shipping_shipment_message_error");
362
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').show();
363
- jQuery('#flexible_shipping_shipment_' + shipment_id + ' .flexible_shipping_shipment_attachment_message').html(errorThrown);
364
- })
365
- }
366
-
367
-
368
- jQuery(document).on('click','.fs-saas-button-create', function( event ) {
369
- flexible_shipping_saas_click_action( 'send', this, event );
370
- });
371
-
372
- jQuery(document).on('click','.fs-saas-button-save', function(e) {
373
- flexible_shipping_saas_click_action( 'save', this, event );
374
- });
375
-
376
- jQuery(document).on('click','.fs-saas-button-cancel-created', function( e ) {
377
- flexible_shipping_saas_click_action( 'cancel', this, event );
378
- });
379
-
380
- jQuery(document).on('change', '.fs-rates-type', function( e ) {
381
- flexible_shipping_saas_rates_type_options();
382
- });
383
- jQuery(document).on('change', 'input[type=checkbox]', function( e ) {
384
- flexible_shipping_saas_checkbox_dependent_field(this);
385
- });
386
-
387
-
388
- jQuery(document).on('click','.fs-saas-button-add-attachment', function( e ) {
389
- flexible_shipping_saas_add_attachment( this, e );
390
- });
391
- jQuery(document).on('click','.fs-saas-button-delete-attachment', function( e ) {
392
- flexible_shipping_saas_delete_attachment( this, e );
393
- });
394
- jQuery(document).on('click','.fs-saas-button-send-attachments', function( e ) {
395
- flexible_shipping_saas_send_attachments( this, e );
396
- });
397
- jQuery(document).on('mouseover','.flexible_shipping_shipment_attachment_message', function( e ) {
398
- // jQuery(this).hide();
399
- });
400
-
401
-
402
- jQuery(document).ready(function() {
403
- fs_select2();
404
- });
405
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/admin_saas_platform.min.js DELETED
@@ -1 +0,0 @@
1
- function flexible_shipping_saas_integration_options(b){var a="."+b;jQuery(".flexible_shipping_method_rules").css("display","table-row");if(jQuery("#woocommerce_flexible_shipping_method_integration").val()==b){jQuery(a).closest("tr").css("display","table-row")}else{jQuery(a).closest("tr").css("display","none")}flexible_shipping_saas_rates_type_options()}function flexible_shipping_saas_rates_type_options(){if(jQuery("#woocommerce_flexible_shipping_method_integration").length){var a="."+jQuery("#woocommerce_flexible_shipping_method_integration").val();if(a!=="."){var b=jQuery(".fs-rates-type"+a).val();jQuery(a).each(function(c){var d=jQuery(this).closest("tr");if("custom"===b){if(!jQuery(this).hasClass("fs-method")){d.css("display","none")}else{d.css("display","table-row")}}if("live"===b){if(!jQuery(this).hasClass("fs-live")){d.css("display","none")}else{d.css("display","table-row")}}});jQuery(window).trigger("resize");jQuery(a).each(function(c){if("checkbox"===jQuery(this).attr("type")){jQuery(this).trigger("change")}})}}}function flexible_shipping_saas_click_action(c,a,b){let id=jQuery(a).attr("data-id");if(typeof id!=="undefined"){b.stopImmediatePropagation();b.preventDefault();let element_id=fs_id(a);fs_ajax(a,element_id,c)}}function flexible_shipping_saas_checkbox_dependent_field(c){var a=jQuery(c).data("dependent-field-id");if(typeof a!=="undefined"&&jQuery(c).is(":visible")){var e=jQuery("#"+a);if(jQuery(c).is(":checked")){e.closest("tr").css("display","table-row")}else{e.closest("tr").css("display","none")}}var b=jQuery(c).data("dependent-row-class");if(typeof b!=="undefined"){var d=jQuery("."+b);if(jQuery(c).is(":visible")){if(jQuery(c).is(":checked")){d.css("display","table-row")}else{d.css("display","none")}}else{d.css("display","table-row")}}}function fs_select2(){let elements=jQuery(".fs_select2");if(elements.length){if(jQuery.fn.selectWoo){elements.selectWoo()}else{elements.select2()}}}function flexible_shipping_saas_add_attachment(a,b){b.stopImmediatePropagation();b.preventDefault();flexible_shipping_saas_choose_attachment(a,b)}function flexible_shipping_saas_send_attachments(a,d){d.stopImmediatePropagation();d.preventDefault();var c=jQuery(a);var e=c.data("shipment_id");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").hide();var b=jQuery("#flexible_shipping_shipment_nonce_"+e).val();jQuery.ajax({url:fs_admin.ajax_url,type:"POST",data:{action:"flexible_shipping_send_attachments_for_shipment",nonce:b,shipment_id:e},dataType:"json"}).done(function(f){if(f){if(f=="0"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").html("Invalid response: 0")}else{if(f.status=="success"){jQuery("#flexible_shipping_shipment_"+e+" .flexible-shipping-shipment-attachments").replaceWith(f.content);jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").hide();if(typeof f.message!="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").html(f.message)}}else{if(typeof f.content!=="undefined"){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").removeClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible-shipping-shipment-attachments").html(f.content)}jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").html(f.message)}}}else{jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").html("Request failed: invalid method?")}}).always(function(){}).fail(function(f,h,g){jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+e+" .flexible_shipping_shipment_attachment_message").html(g)})}function flexible_shipping_saas_delete_attachment(b,e){e.stopImmediatePropagation();e.preventDefault();var d=jQuery(b);var f=d.data("shipment_id");var a=d.data("saas_attachment_id");jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").hide();var c=jQuery("#flexible_shipping_shipment_nonce_"+f).val();jQuery.ajax({url:fs_admin.ajax_url,type:"POST",data:{action:"flexible_shipping_delete_attachment_for_shipment",nonce:c,shipment_id:f,saas_attachment_id:a},dataType:"json"}).done(function(g){if(g){if(g=="0"){jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").html("Invalid response: 0")}else{if(g.status=="success"){jQuery("#flexible_shipping_shipment_"+f+" .flexible-shipping-shipment-attachments").replaceWith(g.content);jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").hide();if(typeof g.message!="undefined"){jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").html(g.message)}}else{if(typeof g.content!=="undefined"){jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").removeClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+f+" .flexible-shipping-shipment-attachments").html(g.content)}jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").html(g.message)}}}else{jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").html("Request failed: invalid method?")}}).always(function(){}).fail(function(g,i,h){jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+f+" .flexible_shipping_shipment_attachment_message").html(h)})}var downloadable_file_frame;var el_content;var el_attachment_id;var el_attachment_filename;var el_shipment_id;var el_attachment_type;function flexible_shipping_saas_choose_attachment(a,c){c.stopImmediatePropagation();c.preventDefault();var b=jQuery(a);el_content=b.closest(".flexible-shipping-shipment-attachments");el_attachment_id=el_content.find(".flexible-shipping-shipment-attachments-attachment-id");el_attachment_filename=el_content.find(".flexible-shipping-shipment-attachments-filename");el_shipment_id=b.data("shipment_id");el_attachment_type=el_content.find(".flexible-shipping-shipment-attachments-type").val();if(downloadable_file_frame){downloadable_file_frame.open();return}var d=[new wp.media.controller.Library({library:wp.media.query(),multiple:true,title:b.data("choose"),priority:20,filterable:"uploaded"})];downloadable_file_frame=wp.media.frames.downloadable_file=wp.media({title:b.data("choose"),library:{type:""},button:{text:b.data("update")},multiple:true,states:d});downloadable_file_frame.on("select",function(){var e="";var f="";var h="";var g=downloadable_file_frame.state().get("selection");g.map(function(i){i=i.toJSON();if(i.id){e=i.id}if(i.url){f=i.url}if(i.filename){h=i.filename}el_attachment_filename.val(h).change();el_attachment_id.val(e).change();b.attr("disabled",true);flexible_shipping_saas_add_attachment_to_shipment(el_shipment_id,e,el_attachment_type);b.attr("disabled",false)})});downloadable_file_frame.on("ready",function(){downloadable_file_frame.uploader.options.uploader.params={type:"shipment"}});downloadable_file_frame.open()}function flexible_shipping_saas_add_attachment_to_shipment(d,a,b){jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").hide();var c=jQuery("#flexible_shipping_shipment_nonce_"+d).val();jQuery.ajax({url:fs_admin.ajax_url,type:"POST",data:{action:"flexible_shipping_add_attachment_to_shipment",nonce:c,shipment_id:d,attachment_id:a,attachment_type:b},dataType:"json"}).done(function(e){if(e){if(e=="0"){jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").html("Invalid response: 0")}else{if(e.status=="success"){jQuery("#flexible_shipping_shipment_"+d+" .flexible-shipping-shipment-attachments").replaceWith(e.content);jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").hide();if(typeof e.message!="undefined"){jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").html(e.message)}}else{if(typeof e.content!=="undefined"){jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").removeClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_content").html(e.content)}jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").html(e.message)}}}else{jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").html("Request failed: invalid method?")}}).always(function(){}).fail(function(e,g,f){jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").addClass("flexible_shipping_shipment_message_error");jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").show();jQuery("#flexible_shipping_shipment_"+d+" .flexible_shipping_shipment_attachment_message").html(f)})}jQuery(document).on("click",".fs-saas-button-create",function(a){flexible_shipping_saas_click_action("send",this,a)});jQuery(document).on("click",".fs-saas-button-save",function(a){flexible_shipping_saas_click_action("save",this,event)});jQuery(document).on("click",".fs-saas-button-cancel-created",function(a){flexible_shipping_saas_click_action("cancel",this,event)});jQuery(document).on("change",".fs-rates-type",function(a){flexible_shipping_saas_rates_type_options()});jQuery(document).on("change","input[type=checkbox]",function(a){flexible_shipping_saas_checkbox_dependent_field(this)});jQuery(document).on("click",".fs-saas-button-add-attachment",function(a){flexible_shipping_saas_add_attachment(this,a)});jQuery(document).on("click",".fs-saas-button-delete-attachment",function(a){flexible_shipping_saas_delete_attachment(this,a)});jQuery(document).on("click",".fs-saas-button-send-attachments",function(a){flexible_shipping_saas_send_attachments(this,a)});jQuery(document).on("mouseover",".flexible_shipping_shipment_attachment_message",function(a){});jQuery(document).ready(function(){fs_select2()});
 
assets/js/checkout.js DELETED
@@ -1,3 +0,0 @@
1
- jQuery(document).on('change', '.flexible-shipping-collection-point-select', function () {
2
- jQuery(document.body).trigger('update_checkout');
3
- });
 
 
 
classes/class-flexible-shipping-plugin.php CHANGED
@@ -5,11 +5,12 @@
5
  * @package Flexible Shippign
6
  */
7
 
 
 
8
  use WPDesk\ABTesting\ABVariant;
9
  use WPDesk\Logger\WPDeskLoggerFactory;
10
  use WPDesk\Mutex\WordpressPostMutex;
11
  use WPDesk\Notice\AjaxHandler;
12
- use WPDesk\Notice\Notice;
13
  use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
14
  use WPDesk\PluginBuilder\Plugin\HookableCollection;
15
  use WPDesk\PluginBuilder\Plugin\HookableParent;
@@ -59,13 +60,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
59
  */
60
  private $renderer;
61
 
62
- /**
63
- * SaaS platform links,
64
- *
65
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
66
- */
67
- private $saas_platform_links;
68
-
69
  /**
70
  * Is order processed on checkout?
71
  *
@@ -95,8 +89,20 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
95
  public function __construct( WPDesk_Plugin_Info $plugin_info ) {
96
  $this->plugin_info = $plugin_info;
97
  parent::__construct( $this->plugin_info );
 
 
98
 
99
- $this->logger = WPDesk_Flexible_Shipping_Logger_Factory::create_logger();
 
 
 
 
 
 
 
 
 
 
100
  }
101
 
102
 
@@ -130,48 +136,17 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
130
 
131
  $this->add_hookable( new WPDesk_Flexible_Shipping_Add_Shipping() );
132
 
133
- $connection = new WPDesk_Flexible_Shipping_SaaS_Connection( $this->logger, $this->saas_platform_links );
134
- $this->add_hookable( $connection );
135
-
136
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_User_Registration( $connection, $this->saas_platform_links ) );
137
-
138
- $integration_checkbox = new WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox( $connection );
139
- $this->add_hookable( $integration_checkbox );
140
-
141
- $services_manager = new WPDesk_Flexible_Shipping_SaaS_Services_Manager( $connection, $this->saas_platform_links, $this->renderer, $integration_checkbox, $this->logger );
142
- $this->add_hookable( $services_manager );
143
-
144
- if ( $services_manager->is_require_uk_states() ) {
145
- $this->add_hookable( new WPDesk_Flexible_Shipping_UK_States() );
146
- }
147
-
148
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax( $connection ) );
149
-
150
  $this->add_hookable( new WPDesk_Flexible_Shipping_Shorcode_Unit_Weight() );
151
  $this->add_hookable( new WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension() );
152
 
153
  $this->add_hookable( new AjaxHandler( trailingslashit( $this->get_plugin()->get_plugin_url() ) . 'vendor/wpdesk/wp-notice/assets' ) );
154
 
155
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Live_Rates_Fallback_Metadata_Handler() );
156
-
157
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Message_Stock_Metadata_Handler() );
158
-
159
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Free_Shipping_Metadata_Handler() );
160
-
161
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Logger_Downloader( new WPDeskLoggerFactory() ) );
162
-
163
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Tracker( $connection, $services_manager ) );
164
-
165
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Collection_Points_Map_Loader() );
166
-
167
- $this->add_hookable( new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Upload_Dir() );
168
-
169
- $this->add_hookable( new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax() );
170
-
171
  $this->add_hookable( new WPDesk_Flexible_Shipping_Pointer_Messages( $this->variant ) );
172
 
173
  $this->add_hookable( new WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data() );
174
 
 
 
175
  }
176
 
177
  /**
@@ -205,15 +180,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
205
  $resolver->appendResolver( new WPThemeResolver( $this->get_template_path() ) );
206
  $resolver->appendResolver( new DirResolver( trailingslashit( $this->plugin_path ) . 'templates' ) );
207
  $this->renderer = new WPDesk\View\Renderer\SimplePhpRenderer( $resolver );
208
- WPDesk_Flexible_Shipping_Shipment_Saas::set_renderer( $this->renderer );
209
- }
210
-
211
- /**
212
- * Init platform links.
213
- */
214
- private function init_platform_links() {
215
- $this->saas_platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
216
- WPDesk_Flexible_Shipping_Shipment_Saas::set_platform_links( $this->saas_platform_links );
217
  }
218
 
219
  /**
@@ -221,7 +187,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
221
  */
222
  public function init() {
223
  $this->init_base_variables();
224
- $this->init_platform_links();
225
  $this->init_renderer();
226
  $this->load_dependencies();
227
  $this->hooks();
@@ -289,7 +254,8 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
289
  * @return array
290
  */
291
  public function woocommerce_shipping_methods_filter( $methods ) {
292
- $methods['flexible_shipping'] = WPDesk_Flexible_Shipping::class;
 
293
 
294
  return $methods;
295
  }
@@ -356,7 +322,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
356
  $order_shipping_methods = $order->get_shipping_methods();
357
  foreach ( $order_shipping_methods as $shipping_id => $shipping_method ) {
358
  if ( isset( $shipping_method['item_meta'] )
359
- && isset( $shipping_method['item_meta']['_fs_method'] )
360
  ) {
361
  $fs_method = $shipping_method['item_meta']['_fs_method'];
362
  if ( ! empty( $fs_method['method_integration'] ) ) {
@@ -384,8 +350,8 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
384
  $order_shipping_methods = $order->get_shipping_methods();
385
  foreach ( $order_shipping_methods as $shipping_id => $shipping_method ) {
386
  if ( isset( $shipping_method['item_meta'] )
387
- && isset( $shipping_method['item_meta']['_fs_method'] )
388
- && isset( $shipping_method['item_meta']['_fs_method'][0] )
389
  ) {
390
  $fs_method = unserialize( $shipping_method['item_meta']['_fs_method'][0] );
391
  if ( ! empty( $fs_method['method_integration'] ) ) {
@@ -400,9 +366,9 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
400
  /**
401
  * Set appropriate default FS method if no method chosen.
402
  *
403
- * @param string $default Default shipping method in frontend.
404
  * @param WC_Shipping_Rate[] $available_methods Available methods in frontend.
405
- * @param string|bool|null $chosen_method If false or null then no method is chosen.
406
  *
407
  * @return string
408
  */
@@ -470,7 +436,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
470
  array(
471
  'ajax_url' => admin_url( 'admin-ajax.php' ),
472
  'notice_not_good_enought' => sprintf(
473
- // Translators: link.
474
  __( 'How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s', 'flexible-shipping' ),
475
  '<a class="button close-fs-rate-notice" target="_blank" href="' . esc_url( $notice_url ) . '">',
476
  '</a>'
@@ -485,9 +451,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
485
  wp_enqueue_media();
486
  }
487
 
488
- wp_register_script( 'fs_admin_saas_platform', trailingslashit( $this->get_plugin_assets_url() ) . 'js/admin_saas_platform' . $suffix . '.js', array( 'jquery' ), $this->scripts_version );
489
- wp_enqueue_script( 'fs_admin_saas_platform' );
490
-
491
  wp_register_script( 'fs_ap_conditional_logic', trailingslashit( $this->get_plugin_assets_url() ) . 'js/ap_conditional_logic' . $suffix . '.js', array( 'jquery' ), $this->scripts_version );
492
  wp_enqueue_script( 'fs_ap_conditional_logic' );
493
 
@@ -510,8 +473,6 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
510
  */
511
  public function wp_enqueue_scripts() {
512
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
513
- wp_register_script( 'fs_saas_checkout', trailingslashit( $this->get_plugin_assets_url() ) . 'js/checkout' . $suffix . '.js', array( 'jquery' ), $this->scripts_version );
514
- wp_enqueue_script( 'fs_saas_checkout' );
515
  }
516
 
517
  /**
@@ -527,7 +488,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
527
 
528
  $docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
529
 
530
- $settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping&section=' . WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID );
531
 
532
  $plugin_links = array(
533
  '<a href="' . $settings_url . '">' . __(
@@ -542,9 +503,9 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
542
 
543
  if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
544
  $plugin_links[] = '<a href="' . $pro_link . $utm . '" target="_blank" style="color:#d64e07;font-weight:bold;">' . __(
545
- 'Upgrade',
546
- 'flexible-shipping'
547
- ) . '</a>';
548
  }
549
 
550
  return array_merge( $plugin_links, $links );
@@ -555,7 +516,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
555
  * WooCommerce after shipping rate action.
556
  *
557
  * @param WC_Shipping_Rate $method .
558
- * @param int $index .
559
  */
560
  public function woocommerce_after_shipping_rate( $method, $index ) {
561
  if ( 'flexible_shipping' === $method->method_id ) {
@@ -576,7 +537,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
576
  * .
577
  *
578
  * @param string $method_id .
579
- * @param array $shipping_method .
580
  *
581
  * @return string
582
  */
5
  * @package Flexible Shippign
6
  */
7
 
8
+ use Psr\Log\LoggerInterface;
9
+ use Psr\Log\NullLogger;
10
  use WPDesk\ABTesting\ABVariant;
11
  use WPDesk\Logger\WPDeskLoggerFactory;
12
  use WPDesk\Mutex\WordpressPostMutex;
13
  use WPDesk\Notice\AjaxHandler;
 
14
  use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
15
  use WPDesk\PluginBuilder\Plugin\HookableCollection;
16
  use WPDesk\PluginBuilder\Plugin\HookableParent;
60
  */
61
  private $renderer;
62
 
 
 
 
 
 
 
 
63
  /**
64
  * Is order processed on checkout?
65
  *
89
  public function __construct( WPDesk_Plugin_Info $plugin_info ) {
90
  $this->plugin_info = $plugin_info;
91
  parent::__construct( $this->plugin_info );
92
+ $this->init_logger();
93
+ }
94
 
95
+ /**
96
+ * Initialize $this->logger
97
+ *
98
+ * @return LoggerInterface
99
+ */
100
+ private function init_logger() {
101
+ $logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings();
102
+ if ( $logger_settings->is_enabled() ) {
103
+ return $this->logger = ( new WPDeskLoggerFactory() )->createWPDeskLogger( $logger_settings->get_logger_channel_name() );
104
+ }
105
+ return $this->logger = new NullLogger();
106
  }
107
 
108
 
136
 
137
  $this->add_hookable( new WPDesk_Flexible_Shipping_Add_Shipping() );
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  $this->add_hookable( new WPDesk_Flexible_Shipping_Shorcode_Unit_Weight() );
140
  $this->add_hookable( new WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension() );
141
 
142
  $this->add_hookable( new AjaxHandler( trailingslashit( $this->get_plugin()->get_plugin_url() ) . 'vendor/wpdesk/wp-notice/assets' ) );
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  $this->add_hookable( new WPDesk_Flexible_Shipping_Pointer_Messages( $this->variant ) );
145
 
146
  $this->add_hookable( new WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data() );
147
 
148
+ $this->add_hookable( new WPDesk_Flexible_Shipping_Logger_Downloader( new WPDeskLoggerFactory() ) );
149
+
150
  }
151
 
152
  /**
180
  $resolver->appendResolver( new WPThemeResolver( $this->get_template_path() ) );
181
  $resolver->appendResolver( new DirResolver( trailingslashit( $this->plugin_path ) . 'templates' ) );
182
  $this->renderer = new WPDesk\View\Renderer\SimplePhpRenderer( $resolver );
 
 
 
 
 
 
 
 
 
183
  }
184
 
185
  /**
187
  */
188
  public function init() {
189
  $this->init_base_variables();
 
190
  $this->init_renderer();
191
  $this->load_dependencies();
192
  $this->hooks();
254
  * @return array
255
  */
256
  public function woocommerce_shipping_methods_filter( $methods ) {
257
+ $methods['flexible_shipping'] = WPDesk_Flexible_Shipping::class;
258
+ $methods[ WPDesk_Flexible_Shipping_Settings::METHOD_ID ] = WPDesk_Flexible_Shipping_Settings::class;
259
 
260
  return $methods;
261
  }
322
  $order_shipping_methods = $order->get_shipping_methods();
323
  foreach ( $order_shipping_methods as $shipping_id => $shipping_method ) {
324
  if ( isset( $shipping_method['item_meta'] )
325
+ && isset( $shipping_method['item_meta']['_fs_method'] )
326
  ) {
327
  $fs_method = $shipping_method['item_meta']['_fs_method'];
328
  if ( ! empty( $fs_method['method_integration'] ) ) {
350
  $order_shipping_methods = $order->get_shipping_methods();
351
  foreach ( $order_shipping_methods as $shipping_id => $shipping_method ) {
352
  if ( isset( $shipping_method['item_meta'] )
353
+ && isset( $shipping_method['item_meta']['_fs_method'] )
354
+ && isset( $shipping_method['item_meta']['_fs_method'][0] )
355
  ) {
356
  $fs_method = unserialize( $shipping_method['item_meta']['_fs_method'][0] );
357
  if ( ! empty( $fs_method['method_integration'] ) ) {
366
  /**
367
  * Set appropriate default FS method if no method chosen.
368
  *
369
+ * @param string $default Default shipping method in frontend.
370
  * @param WC_Shipping_Rate[] $available_methods Available methods in frontend.
371
+ * @param string|bool|null $chosen_method If false or null then no method is chosen.
372
  *
373
  * @return string
374
  */
436
  array(
437
  'ajax_url' => admin_url( 'admin-ajax.php' ),
438
  'notice_not_good_enought' => sprintf(
439
+ // Translators: link.
440
  __( 'How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s', 'flexible-shipping' ),
441
  '<a class="button close-fs-rate-notice" target="_blank" href="' . esc_url( $notice_url ) . '">',
442
  '</a>'
451
  wp_enqueue_media();
452
  }
453
 
 
 
 
454
  wp_register_script( 'fs_ap_conditional_logic', trailingslashit( $this->get_plugin_assets_url() ) . 'js/ap_conditional_logic' . $suffix . '.js', array( 'jquery' ), $this->scripts_version );
455
  wp_enqueue_script( 'fs_ap_conditional_logic' );
456
 
473
  */
474
  public function wp_enqueue_scripts() {
475
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
 
 
476
  }
477
 
478
  /**
488
 
489
  $docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
490
 
491
+ $settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping&section=' . WPDesk_Flexible_Shipping_Settings::METHOD_ID );
492
 
493
  $plugin_links = array(
494
  '<a href="' . $settings_url . '">' . __(
503
 
504
  if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
505
  $plugin_links[] = '<a href="' . $pro_link . $utm . '" target="_blank" style="color:#d64e07;font-weight:bold;">' . __(
506
+ 'Upgrade',
507
+ 'flexible-shipping'
508
+ ) . '</a>';
509
  }
510
 
511
  return array_merge( $plugin_links, $links );
516
  * WooCommerce after shipping rate action.
517
  *
518
  * @param WC_Shipping_Rate $method .
519
+ * @param int $index .
520
  */
521
  public function woocommerce_after_shipping_rate( $method, $index ) {
522
  if ( 'flexible_shipping' === $method->method_id ) {
537
  * .
538
  *
539
  * @param string $method_id .
540
+ * @param array $shipping_method .
541
  *
542
  * @return string
543
  */
classes/table-rate/flexible-shipping-settings.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Mainly read only info about FS + debug mode.
5
+ */
6
+ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
7
+
8
+ const METHOD_ID = 'flexible_shipping_info';
9
+
10
+ const WOOCOMMERCE_PAGE_WC_SETTINGS = 'wc-settings';
11
+
12
+ const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
13
+
14
+ /**
15
+ * Logger settings.
16
+ *
17
+ * @var WPDesk_Flexible_Shipping_Logger_Settings
18
+ */
19
+ private $logger_settings;
20
+
21
+ /**
22
+ * WPDesk_Flexible_Shipping_Connect constructor.
23
+ *
24
+ * @param int $instance_id Instance id.
25
+ */
26
+ public function __construct(
27
+ $instance_id = 0
28
+
29
+ ) {
30
+ parent::__construct( $instance_id );
31
+ $this->id = self::METHOD_ID;
32
+ $this->enabled = 'no';
33
+ $this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
34
+
35
+ $this->supports = array(
36
+ 'settings',
37
+ );
38
+
39
+ $this->logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings( $this );
40
+
41
+ $this->init_form_fields();
42
+
43
+ add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
44
+ }
45
+
46
+ /**
47
+ * Update debug mode.
48
+ */
49
+ private function update_debug_mode() {
50
+ $this->logger_settings->update_option_from_saas_settings( $this );
51
+ }
52
+
53
+ /**
54
+ * Process admin options.
55
+ */
56
+ public function process_admin_options() {
57
+ parent::process_admin_options();
58
+ $this->update_debug_mode();
59
+
60
+ $url = admin_url( self::WOOCOMMERCE_SETTINGS_SHIPPING_URL );
61
+ $url = add_query_arg( 'section', $this->id, $url );
62
+ wp_safe_redirect( $url );
63
+ exit;
64
+ }
65
+
66
+ /**
67
+ * In settings screen?
68
+ *
69
+ * @return bool
70
+ */
71
+ public function is_in_settings() {
72
+ if ( is_admin() && isset( $_GET['page'] ) && isset( $_GET['section'] ) ) {
73
+ $page = $_GET['page'];
74
+ $section = $_GET['section'];
75
+ if ( self::WOOCOMMERCE_PAGE_WC_SETTINGS === $page && self::METHOD_ID === $section ) {
76
+ return true;
77
+ }
78
+ }
79
+
80
+ return false;
81
+ }
82
+
83
+
84
+ /**
85
+ * Initialise Settings Form Fields.
86
+ */
87
+ public function init_form_fields() {
88
+ $this->form_fields = array(
89
+ 'flexible_shipping' => array(
90
+ 'type' => 'flexible_shipping',
91
+ ),
92
+ );
93
+ $this->form_fields[] = array(
94
+ 'type' => 'title',
95
+ 'title' => __( 'Advanced settings', 'flexible-shipping' )
96
+ );
97
+ $this->form_fields = $this->logger_settings->add_fields_to_settings( $this->form_fields );
98
+
99
+ }
100
+
101
+ /**
102
+ * Generate FC connect box
103
+ *
104
+ * @param string $key Key.
105
+ * @param array $data Data.
106
+ *
107
+ * @return string
108
+ */
109
+ public function generate_flexible_shipping_html( $key, $data ) {
110
+ ob_start();
111
+ include 'views/html-shipping-settings-info-description.php';
112
+ $notice_content = ob_get_contents();
113
+ ob_end_clean();
114
+
115
+ return $notice_content;
116
+ }
117
+
118
+ }
classes/table-rate/logger/{class-saas-logger-downloader.php → class-logger-downloader.php} RENAMED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
  */
6
- class WPDesk_Flexible_Shipping_SaaS_Logger_Downloader implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
 
8
  use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
 
@@ -47,7 +47,7 @@ class WPDesk_Flexible_Shipping_SaaS_Logger_Downloader implements \WPDesk\PluginB
47
  public function handle_log_file_download() {
48
  if ( isset( $_GET[ self::GET_PARAMETER ] ) ) {
49
  if ( current_user_can( 'manage_options' ) ) {
50
- $logger_settings = new WPDesk_Flexible_Shipping_SaaS_Logger_Settings();
51
  $file_name = $this->logger_factory->getFileName( $logger_settings->get_logger_channel_name() );
52
  if ( file_exists( $file_name ) ) {
53
  header( 'Content-Type: text/plain' );
3
  /**
4
  * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
  */
6
+ class WPDesk_Flexible_Shipping_Logger_Downloader implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
 
8
  use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
 
47
  public function handle_log_file_download() {
48
  if ( isset( $_GET[ self::GET_PARAMETER ] ) ) {
49
  if ( current_user_can( 'manage_options' ) ) {
50
+ $logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings();
51
  $file_name = $this->logger_factory->getFileName( $logger_settings->get_logger_channel_name() );
52
  if ( file_exists( $file_name ) ) {
53
  header( 'Content-Type: text/plain' );
classes/table-rate/logger/class-logger-factory.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  /**
4
  * Class WPDesk_Flexible_Shipping_Logger_Factory
 
 
5
  */
6
  class WPDesk_Flexible_Shipping_Logger_Factory {
7
  const NULL_LOG_NAME = 'null-log';
@@ -20,7 +22,7 @@ class WPDesk_Flexible_Shipping_Logger_Factory {
20
  */
21
  public static function create_logger() {
22
  if ( null === self::$logger ) {
23
- $logger_settings = new WPDesk_Flexible_Shipping_SaaS_Logger_Settings();
24
 
25
  if ( $logger_settings->is_enabled() ) {
26
  self::$logger = new WPDesk_Flexible_Shipping_WooCommerce_Context_Logger(
2
 
3
  /**
4
  * Class WPDesk_Flexible_Shipping_Logger_Factory
5
+ *
6
+ * @deprecated
7
  */
8
  class WPDesk_Flexible_Shipping_Logger_Factory {
9
  const NULL_LOG_NAME = 'null-log';
22
  */
23
  public static function create_logger() {
24
  if ( null === self::$logger ) {
25
+ $logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings();
26
 
27
  if ( $logger_settings->is_enabled() ) {
28
  self::$logger = new WPDesk_Flexible_Shipping_WooCommerce_Context_Logger(
classes/table-rate/logger/{class-saas-logger-settings.php → class-logger-settings.php} RENAMED
@@ -3,12 +3,10 @@
3
  /**
4
  * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
  */
6
- class WPDesk_Flexible_Shipping_SaaS_Logger_Settings {
7
 
8
  const LOGGER_CHANNEL_NAME = 'fs';
9
 
10
- const LOGGING_CONTEXT = 'saas-flexible-shipping';
11
-
12
  const DEBUG_LOG_OPTION = 'debug_log';
13
 
14
  const OPTION_NAME = 'fs_logger_enabled';
@@ -25,16 +23,16 @@ class WPDesk_Flexible_Shipping_SaaS_Logger_Settings {
25
  /**
26
  * SaaS settings.
27
  *
28
- * @var WPDesk_Flexible_Shipping_SaaS_Settings
29
  */
30
  private $saas_settings;
31
 
32
  /**
33
  * WPDesk_Flexible_Shipping_SaaS_Logger_Settings constructor.
34
  *
35
- * @param WPDesk_Flexible_Shipping_SaaS_Settings $saas_settings SaaS settings.
36
  */
37
- public function __construct( WPDesk_Flexible_Shipping_SaaS_Settings $saas_settings = null ) {
38
  $option_value = get_option( self::OPTION_NAME, self::OPTION_VALUE_DISABLED );
39
  $this->enabled = self::OPTION_VALUE_ENABLED === $option_value;
40
 
@@ -50,15 +48,6 @@ class WPDesk_Flexible_Shipping_SaaS_Logger_Settings {
50
  return self::LOGGER_CHANNEL_NAME;
51
  }
52
 
53
- /**
54
- * Get logging context.
55
- *
56
- * @return string
57
- */
58
- public function get_logging_context() {
59
- return self::LOGGING_CONTEXT;
60
- }
61
-
62
  /**
63
  * Is enabled.
64
  *
@@ -96,12 +85,12 @@ class WPDesk_Flexible_Shipping_SaaS_Logger_Settings {
96
  'title' => __( 'Debug mode', 'flexible-shipping' ),
97
  );
98
  if ( 'yes' === $this->saas_settings->get_option( self::DEBUG_LOG_OPTION ) ) {
99
- $downloader = new WPDesk_Flexible_Shipping_SaaS_Logger_Downloader();
100
 
101
  $settings[ self::DEBUG_LOG_OPTION ]['description'] = sprintf(
102
  // Translators: URL.
103
  __( '%1$sDownload debug.log file%2$s', 'flexible-shipping' ),
104
- sprintf( '<a href="%1$s">', $downloader->get_download_url() ),
105
  '</a>'
106
  );
107
  }
3
  /**
4
  * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
  */
6
+ class WPDesk_Flexible_Shipping_Logger_Settings {
7
 
8
  const LOGGER_CHANNEL_NAME = 'fs';
9
 
 
 
10
  const DEBUG_LOG_OPTION = 'debug_log';
11
 
12
  const OPTION_NAME = 'fs_logger_enabled';
23
  /**
24
  * SaaS settings.
25
  *
26
+ * @var WPDesk_Flexible_Shipping_Settings
27
  */
28
  private $saas_settings;
29
 
30
  /**
31
  * WPDesk_Flexible_Shipping_SaaS_Logger_Settings constructor.
32
  *
33
+ * @param WPDesk_Flexible_Shipping_Settings $saas_settings SaaS settings.
34
  */
35
+ public function __construct( WPDesk_Flexible_Shipping_Settings $saas_settings = null ) {
36
  $option_value = get_option( self::OPTION_NAME, self::OPTION_VALUE_DISABLED );
37
  $this->enabled = self::OPTION_VALUE_ENABLED === $option_value;
38
 
48
  return self::LOGGER_CHANNEL_NAME;
49
  }
50
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  * Is enabled.
53
  *
85
  'title' => __( 'Debug mode', 'flexible-shipping' ),
86
  );
87
  if ( 'yes' === $this->saas_settings->get_option( self::DEBUG_LOG_OPTION ) ) {
88
+ $downloader = new WPDesk_Flexible_Shipping_Logger_Downloader();
89
 
90
  $settings[ self::DEBUG_LOG_OPTION ]['description'] = sprintf(
91
  // Translators: URL.
92
  __( '%1$sDownload debug.log file%2$s', 'flexible-shipping' ),
93
+ sprintf( '<a href="%1$s" target="_blank">', $downloader->get_download_url() ),
94
  '</a>'
95
  );
96
  }
classes/table-rate/settings/shipping-method-form.php CHANGED
@@ -21,10 +21,6 @@ foreach ( WC()->shipping->get_shipping_classes() as $shipping_class ) {
21
 
22
  $base_location = wc_get_base_location();
23
 
24
- $platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
25
-
26
- $saas_connection = new WPDesk_Flexible_Shipping_SaaS_Connection();
27
-
28
  $integrations = '';
29
 
30
  switch ( $base_location['country'] ) {
21
 
22
  $base_location = wc_get_base_location();
23
 
 
 
 
 
24
  $integrations = '';
25
 
26
  switch ( $base_location['country'] ) {
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php → classes/table-rate/views/html-shipping-settings-advanced.php RENAMED
File without changes
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php → classes/table-rate/views/html-shipping-settings-info-description.php RENAMED
@@ -1,4 +1,10 @@
1
  <?php
 
 
 
 
 
 
2
  $pl = get_locale() === 'pl_PL';
3
  $youtube_url = 'https://www.youtube.com/embed/qsFvYoiNDgU';
4
  $general_settings_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=general-settings#Ustawienia_glowne' : 'https://docs.flexibleshipping.com/article/25-general-settings/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=general-settings&utm_content=fs-configuration-flexibleshippingtablerate';
@@ -8,38 +14,42 @@ $weight_based_shipping_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping
8
  $shipping_insurance_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=shipping-insurance#Ubezpieczenie_przesylki' : 'https://docs.flexibleshipping.com/article/34-shipping-insurance/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=shipping-insurance&utm_content=fs-configuration-flexibleshippingtablerate';
9
  $conditional_cash_on_delivery_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=conditional-cash-on-delivery#Przesylka_za_pobraniem' : 'https://docs.flexibleshipping.com/article/35-conditional-cash-on-delivery/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=contitional-cash-on-delivery&utm_content=fs-configuration-flexibleshippingtablerate';
10
  ?>
 
 
 
 
11
 
12
- <div class="fs-box">
13
- <h3 class="wc-settings-sub-title"><?php _e( 'How to use Flexible Shipping?', 'flexible-shipping' ); ?></h3>
 
 
 
 
 
 
 
 
14
 
15
- <ol>
16
- <li>
17
- <?php
18
- echo sprintf(
19
- __( 'To add first Flexible Shipping method go to %sShipping zones%s and add Flexible Shipping to a shipping zone.', 'flexible-shipping' ),
20
- '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ) . '">',
21
- '</a>'
22
- );
23
- ?>
24
- </li>
25
 
26
- <li><?php _e( 'You can start the configuration by clicking the Flexible Shipping link in the Shipping methods table.', 'flexible-shipping' ); ?></li>
27
- </ol>
28
 
29
- <h4><?php _e( 'Quick Video Overview', 'flexible-shipping' ); ?></h4>
 
 
30
 
31
- <div class="flexible-shipping-video">
32
- <iframe width="688" height="387" src="<?php echo $youtube_url?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
33
- </div>
34
 
35
- <h4><?php _e( 'More resources', 'flexible-shipping' ); ?></h4>
36
-
37
- <ul>
38
- <li><a href="<?php echo $general_settings_url; ?>"><?php _e( 'General Settings', 'flexible-shipping' ); ?></a></li>
39
- <li><a href="<?php echo $adding_a_shipping_method_url; ?>"><?php _e( 'Adding a shipping method', 'flexible-shipping' ); ?></a></li>
40
- <li><a href="<?php echo $currency_support_url; ?>"><?php _e( 'Currency Support', 'flexible-shipping' ); ?></a></li>
41
- <li><a href="<?php echo $weight_based_shipping_url; ?>"><?php _e( 'Weight Based Shipping', 'flexible-shipping' ); ?></a></li>
42
- <li><a href="<?php echo $shipping_insurance_url; ?>"><?php _e( 'Shipping Insurance', 'flexible-shipping' ); ?></a></li>
43
- <li><a href="<?php echo $conditional_cash_on_delivery_url; ?>"><?php _e( 'Conditional Cash on Delivery', 'flexible-shipping' ); ?></a></li>
44
- </ul>
45
- </div>
 
1
  <?php
2
+ /**
3
+ * @var $integration_checkbox bool
4
+ * @var $show_fs_connect bool
5
+ */
6
+
7
+
8
  $pl = get_locale() === 'pl_PL';
9
  $youtube_url = 'https://www.youtube.com/embed/qsFvYoiNDgU';
10
  $general_settings_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=general-settings#Ustawienia_glowne' : 'https://docs.flexibleshipping.com/article/25-general-settings/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=general-settings&utm_content=fs-configuration-flexibleshippingtablerate';
14
  $shipping_insurance_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=shipping-insurance#Ubezpieczenie_przesylki' : 'https://docs.flexibleshipping.com/article/34-shipping-insurance/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=shipping-insurance&utm_content=fs-configuration-flexibleshippingtablerate';
15
  $conditional_cash_on_delivery_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=conditional-cash-on-delivery#Przesylka_za_pobraniem' : 'https://docs.flexibleshipping.com/article/35-conditional-cash-on-delivery/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=contitional-cash-on-delivery&utm_content=fs-configuration-flexibleshippingtablerate';
16
  ?>
17
+ </table>
18
+ <div class="fs-page-wrap">
19
+ <div class="fs-box">
20
+ <h3 class="wc-settings-sub-title"><?php _e( 'How to use Flexible Shipping?', 'flexible-shipping' ); ?></h3>
21
 
22
+ <ol>
23
+ <li>
24
+ <?php
25
+ echo sprintf(
26
+ __( 'To add first Flexible Shipping method go to %sShipping zones%s and add Flexible Shipping to a shipping zone.', 'flexible-shipping' ),
27
+ '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ) . '">',
28
+ '</a>'
29
+ );
30
+ ?>
31
+ </li>
32
 
33
+ <li><?php _e( 'You can start the configuration by clicking the Flexible Shipping link in the Shipping methods table.', 'flexible-shipping' ); ?></li>
34
+ </ol>
 
 
 
 
 
 
 
 
35
 
36
+ <h4><?php _e( 'Quick Video Overview', 'flexible-shipping' ); ?></h4>
 
37
 
38
+ <div class="flexible-shipping-video">
39
+ <iframe width="688" height="387" src="<?php echo $youtube_url?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
40
+ </div>
41
 
42
+ <h4><?php _e( 'More resources', 'flexible-shipping' ); ?></h4>
 
 
43
 
44
+ <ul>
45
+ <li><a href="<?php echo $general_settings_url; ?>"><?php _e( 'General Settings', 'flexible-shipping' ); ?></a></li>
46
+ <li><a href="<?php echo $adding_a_shipping_method_url; ?>"><?php _e( 'Adding a shipping method', 'flexible-shipping' ); ?></a></li>
47
+ <li><a href="<?php echo $currency_support_url; ?>"><?php _e( 'Currency Support', 'flexible-shipping' ); ?></a></li>
48
+ <li><a href="<?php echo $weight_based_shipping_url; ?>"><?php _e( 'Weight Based Shipping', 'flexible-shipping' ); ?></a></li>
49
+ <li><a href="<?php echo $shipping_insurance_url; ?>"><?php _e( 'Shipping Insurance', 'flexible-shipping' ); ?></a></li>
50
+ <li><a href="<?php echo $conditional_cash_on_delivery_url; ?>"><?php _e( 'Conditional Cash on Delivery', 'flexible-shipping' ); ?></a></li>
51
+ </ul>
52
+
53
+ </div>
54
+ </div>
55
+ <table>
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": "bfa44d53fb65bc95fe4722791c8ae93b",
8
  "packages": [
9
  {
10
  "name": "moneyphp/money",
@@ -213,54 +213,6 @@
213
  ],
214
  "time": "2018-11-20T15:27:04+00:00"
215
  },
216
- {
217
- "name": "psr/simple-cache",
218
- "version": "1.0.1",
219
- "source": {
220
- "type": "git",
221
- "url": "https://github.com/php-fig/simple-cache.git",
222
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
223
- },
224
- "dist": {
225
- "type": "zip",
226
- "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
227
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
228
- "shasum": ""
229
- },
230
- "require": {
231
- "php": ">=5.3.0"
232
- },
233
- "type": "library",
234
- "extra": {
235
- "branch-alias": {
236
- "dev-master": "1.0.x-dev"
237
- }
238
- },
239
- "autoload": {
240
- "psr-4": {
241
- "Psr\\SimpleCache\\": "src/"
242
- }
243
- },
244
- "notification-url": "https://packagist.org/downloads/",
245
- "license": [
246
- "MIT"
247
- ],
248
- "authors": [
249
- {
250
- "name": "PHP-FIG",
251
- "homepage": "http://www.php-fig.org/"
252
- }
253
- ],
254
- "description": "Common interfaces for simple caching",
255
- "keywords": [
256
- "cache",
257
- "caching",
258
- "psr",
259
- "psr-16",
260
- "simple-cache"
261
- ],
262
- "time": "2017-10-23T01:57:42+00:00"
263
- },
264
  {
265
  "name": "wpdesk/wp-abtesting",
266
  "version": "1.1.0",
@@ -658,50 +610,6 @@
658
  ],
659
  "time": "2019-04-08T11:33:03+00:00"
660
  },
661
- {
662
- "name": "wpdesk/wp-saas-platform-client",
663
- "version": "1.10.1",
664
- "source": {
665
- "type": "git",
666
- "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
667
- "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf"
668
- },
669
- "dist": {
670
- "type": "zip",
671
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
672
- "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
673
- "shasum": ""
674
- },
675
- "require": {
676
- "ext-curl": "*",
677
- "ext-json": "*",
678
- "php": ">=5.5",
679
- "psr/log": "^1.0.1",
680
- "psr/simple-cache": "^1.0",
681
- "wpdesk/wp-persistence": "^1.0"
682
- },
683
- "require-dev": {
684
- "10up/wp_mock": "*",
685
- "mockery/mockery": "*",
686
- "phpunit/phpunit": "<7",
687
- "squizlabs/php_codesniffer": "^3.0.2",
688
- "wp-coding-standards/wpcs": "^0.14.1"
689
- },
690
- "type": "library",
691
- "autoload": {
692
- "psr-4": {
693
- "WPDesk\\SaasPlatformClient\\": "src/"
694
- }
695
- },
696
- "notification-url": "https://packagist.org/downloads/",
697
- "authors": [
698
- {
699
- "name": "Krzysiek",
700
- "email": "krzysiek@wpdesk.pl"
701
- }
702
- ],
703
- "time": "2019-05-10T09:59:04+00:00"
704
- },
705
  {
706
  "name": "wpdesk/wp-view",
707
  "version": "1.0.2",
@@ -742,49 +650,6 @@
742
  ],
743
  "time": "2018-10-18T13:44:18+00:00"
744
  },
745
- {
746
- "name": "wpdesk/wp-wpdesk-connect",
747
- "version": "1.1.1",
748
- "source": {
749
- "type": "git",
750
- "url": "https://gitlab.com/wpdesk/wp-wpdesk-connect.git",
751
- "reference": "1a8003f4e26080551724ff6b7104651a99a7f360"
752
- },
753
- "dist": {
754
- "type": "zip",
755
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-connect/repository/archive.zip?sha=1a8003f4e26080551724ff6b7104651a99a7f360",
756
- "reference": "1a8003f4e26080551724ff6b7104651a99a7f360",
757
- "shasum": ""
758
- },
759
- "require": {
760
- "php": ">=5.6",
761
- "psr/log": "^1.1",
762
- "wpdesk/wp-builder": "^1.1",
763
- "wpdesk/wp-view": "^1.0",
764
- "wpdesk/wp-wpdesk-fs-shipment": "^1.0"
765
- },
766
- "require-dev": {
767
- "10up/wp_mock": "^0.3",
768
- "mockery/mockery": "^1.2",
769
- "phpunit/phpunit": "<7",
770
- "squizlabs/php_codesniffer": "^3.4.2",
771
- "wp-coding-standards/wpcs": "^0.14.1"
772
- },
773
- "type": "library",
774
- "autoload": {
775
- "classmap": [
776
- "src"
777
- ]
778
- },
779
- "notification-url": "https://packagist.org/downloads/",
780
- "authors": [
781
- {
782
- "name": "Krzysiek",
783
- "email": "krzysiek@wpdesk.pl"
784
- }
785
- ],
786
- "time": "2019-07-19T11:46:46+00:00"
787
- },
788
  {
789
  "name": "wpdesk/wp-wpdesk-fs-shipment",
790
  "version": "1.0.4",
@@ -992,9 +857,9 @@
992
  "authors": [
993
  {
994
  "name": "Ben Scholzen 'DASPRiD'",
 
995
  "email": "mail@dasprids.de",
996
- "homepage": "http://www.dasprids.de",
997
- "role": "Developer"
998
  }
999
  ],
1000
  "description": "BaconStringUtils contain utitilies to work with strings.",
@@ -1062,28 +927,29 @@
1062
  },
1063
  {
1064
  "name": "codeception/codeception",
1065
- "version": "2.5.6",
1066
  "source": {
1067
  "type": "git",
1068
  "url": "https://github.com/Codeception/Codeception.git",
1069
- "reference": "b83a9338296e706fab2ceb49de8a352fbca3dc98"
1070
  },
1071
  "dist": {
1072
  "type": "zip",
1073
- "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b83a9338296e706fab2ceb49de8a352fbca3dc98",
1074
- "reference": "b83a9338296e706fab2ceb49de8a352fbca3dc98",
1075
  "shasum": ""
1076
  },
1077
  "require": {
1078
  "behat/gherkin": "^4.4.0",
1079
- "codeception/phpunit-wrapper": "^6.0.9|^7.0.6",
1080
- "codeception/stub": "^2.0",
1081
  "ext-curl": "*",
1082
  "ext-json": "*",
1083
  "ext-mbstring": "*",
1084
- "facebook/webdriver": ">=1.1.3 <2.0",
1085
- "guzzlehttp/guzzle": ">=4.1.4 <7.0",
1086
- "guzzlehttp/psr7": "~1.0",
 
1087
  "php": ">=5.6.0 <8.0",
1088
  "symfony/browser-kit": ">=2.7 <5.0",
1089
  "symfony/console": ">=2.7 <5.0",
@@ -1095,7 +961,9 @@
1095
  },
1096
  "require-dev": {
1097
  "codeception/specify": "~0.3",
1098
- "facebook/graph-sdk": "~5.3",
 
 
1099
  "flow/jsonpath": "~0.2",
1100
  "monolog/monolog": "~1.8",
1101
  "pda/pheanstalk": "~3.0",
@@ -1150,7 +1018,7 @@
1150
  "functional testing",
1151
  "unit testing"
1152
  ],
1153
- "time": "2019-04-24T11:28:19+00:00"
1154
  },
1155
  {
1156
  "name": "codeception/phpunit-wrapper",
@@ -1570,9 +1438,9 @@
1570
  "authors": [
1571
  {
1572
  "name": "Franck Nijhof",
 
1573
  "email": "franck.nijhof@dealerdirect.com",
1574
- "homepage": "http://www.frenck.nl",
1575
- "role": "Developer / IT Manager"
1576
  }
1577
  ],
1578
  "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
@@ -1759,34 +1627,45 @@
1759
  },
1760
  {
1761
  "name": "facebook/webdriver",
1762
- "version": "1.3.0",
1763
  "source": {
1764
  "type": "git",
1765
  "url": "https://github.com/facebook/php-webdriver.git",
1766
- "reference": "77300c4ab2025d4316635f592ec849ca7323bd8c"
1767
  },
1768
  "dist": {
1769
  "type": "zip",
1770
- "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/77300c4ab2025d4316635f592ec849ca7323bd8c",
1771
- "reference": "77300c4ab2025d4316635f592ec849ca7323bd8c",
1772
  "shasum": ""
1773
  },
1774
  "require": {
1775
  "ext-curl": "*",
1776
- "php": "^5.5 || ~7.0",
1777
- "symfony/process": "^2.8 || ^3.1"
 
 
 
1778
  },
1779
  "require-dev": {
1780
- "friendsofphp/php-cs-fixer": "^1.11",
 
 
1781
  "php-mock/php-mock-phpunit": "^1.1",
1782
- "phpunit/phpunit": "4.6.* || ~5.0",
1783
- "satooshi/php-coveralls": "^1.0",
1784
- "squizlabs/php_codesniffer": "^2.6"
 
1785
  },
1786
  "suggest": {
1787
- "phpdocumentor/phpdocumentor": "2.*"
1788
  },
1789
  "type": "library",
 
 
 
 
 
1790
  "autoload": {
1791
  "psr-4": {
1792
  "Facebook\\WebDriver\\": "lib/"
@@ -1796,7 +1675,7 @@
1796
  "license": [
1797
  "Apache-2.0"
1798
  ],
1799
- "description": "A PHP client for WebDriver",
1800
  "homepage": "https://github.com/facebook/php-webdriver",
1801
  "keywords": [
1802
  "facebook",
@@ -1804,7 +1683,7 @@
1804
  "selenium",
1805
  "webdriver"
1806
  ],
1807
- "time": "2017-01-13T15:48:08+00:00"
1808
  },
1809
  {
1810
  "name": "gettext/gettext",
@@ -1851,9 +1730,9 @@
1851
  "authors": [
1852
  {
1853
  "name": "Oscar Otero",
 
1854
  "email": "oom@oscarotero.com",
1855
- "homepage": "http://oscarotero.com",
1856
- "role": "Developer"
1857
  }
1858
  ],
1859
  "description": "PHP gettext manager",
@@ -1905,8 +1784,8 @@
1905
  "authors": [
1906
  {
1907
  "name": "Michele Locati",
1908
- "email": "mlocati@gmail.com",
1909
- "role": "Developer"
1910
  }
1911
  ],
1912
  "description": "gettext languages with plural rules",
@@ -2260,6 +2139,555 @@
2260
  ],
2261
  "time": "2012-08-31T00:00:00+00:00"
2262
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2263
  {
2264
  "name": "illuminate/contracts",
2265
  "version": "v5.2.45",
@@ -2429,16 +2857,16 @@
2429
  },
2430
  {
2431
  "name": "lucatume/wp-browser",
2432
- "version": "2.2.19",
2433
  "source": {
2434
  "type": "git",
2435
  "url": "https://github.com/lucatume/wp-browser.git",
2436
- "reference": "abfeaf3c66ebe5a0d9c8ff6c2ac19f36e43e62e9"
2437
  },
2438
  "dist": {
2439
  "type": "zip",
2440
- "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/abfeaf3c66ebe5a0d9c8ff6c2ac19f36e43e62e9",
2441
- "reference": "abfeaf3c66ebe5a0d9c8ff6c2ac19f36e43e62e9",
2442
  "shasum": ""
2443
  },
2444
  "require": {
@@ -2493,7 +2921,7 @@
2493
  "codeception",
2494
  "wordpress"
2495
  ],
2496
- "time": "2019-08-16T16:13:50+00:00"
2497
  },
2498
  {
2499
  "name": "mck89/peast",
@@ -2889,13 +3317,13 @@
2889
  },
2890
  {
2891
  "name": "Wim Godden",
2892
- "homepage": "https://github.com/wimg",
2893
- "role": "lead"
2894
  },
2895
  {
2896
  "name": "Juliette Reinders Folmer",
2897
- "homepage": "https://github.com/jrfnl",
2898
- "role": "lead"
2899
  }
2900
  ],
2901
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
@@ -3216,8 +3644,8 @@
3216
  "authors": [
3217
  {
3218
  "name": "Sebastian Bergmann",
3219
- "email": "sb@sebastian-bergmann.de",
3220
- "role": "lead"
3221
  }
3222
  ],
3223
  "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
@@ -3264,8 +3692,8 @@
3264
  "authors": [
3265
  {
3266
  "name": "Sebastian Bergmann",
3267
- "email": "sb@sebastian-bergmann.de",
3268
- "role": "lead"
3269
  }
3270
  ],
3271
  "description": "FilterIterator implementation that filters files based on a list of suffixes.",
@@ -3306,8 +3734,8 @@
3306
  "authors": [
3307
  {
3308
  "name": "Sebastian Bergmann",
3309
- "email": "sebastian@phpunit.de",
3310
- "role": "lead"
3311
  }
3312
  ],
3313
  "description": "Simple template engine.",
@@ -3355,8 +3783,8 @@
3355
  "authors": [
3356
  {
3357
  "name": "Sebastian Bergmann",
3358
- "email": "sb@sebastian-bergmann.de",
3359
- "role": "lead"
3360
  }
3361
  ],
3362
  "description": "Utility class for timing",
@@ -3484,8 +3912,8 @@
3484
  "authors": [
3485
  {
3486
  "name": "Sebastian Bergmann",
3487
- "email": "sebastian@phpunit.de",
3488
- "role": "lead"
3489
  }
3490
  ],
3491
  "description": "The PHP Unit Testing framework.",
@@ -4201,8 +4629,8 @@
4201
  "authors": [
4202
  {
4203
  "name": "Sebastian Bergmann",
4204
- "email": "sebastian@phpunit.de",
4205
- "role": "lead"
4206
  }
4207
  ],
4208
  "description": "Library that helps with managing the version number of Git-hosted PHP projects",
@@ -4355,16 +4783,16 @@
4355
  },
4356
  {
4357
  "name": "symfony/browser-kit",
4358
- "version": "v3.4.30",
4359
  "source": {
4360
  "type": "git",
4361
  "url": "https://github.com/symfony/browser-kit.git",
4362
- "reference": "53266c9a1536e2dc673eb1efb6a6142ef84c6282"
4363
  },
4364
  "dist": {
4365
  "type": "zip",
4366
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/53266c9a1536e2dc673eb1efb6a6142ef84c6282",
4367
- "reference": "53266c9a1536e2dc673eb1efb6a6142ef84c6282",
4368
  "shasum": ""
4369
  },
4370
  "require": {
@@ -4408,20 +4836,20 @@
4408
  ],
4409
  "description": "Symfony BrowserKit Component",
4410
  "homepage": "https://symfony.com",
4411
- "time": "2019-06-09T14:27:26+00:00"
4412
  },
4413
  {
4414
  "name": "symfony/console",
4415
- "version": "v3.4.30",
4416
  "source": {
4417
  "type": "git",
4418
  "url": "https://github.com/symfony/console.git",
4419
- "reference": "12940f20a816c978860fa4925b3f1bbb27e9ac46"
4420
  },
4421
  "dist": {
4422
  "type": "zip",
4423
- "url": "https://api.github.com/repos/symfony/console/zipball/12940f20a816c978860fa4925b3f1bbb27e9ac46",
4424
- "reference": "12940f20a816c978860fa4925b3f1bbb27e9ac46",
4425
  "shasum": ""
4426
  },
4427
  "require": {
@@ -4480,20 +4908,20 @@
4480
  ],
4481
  "description": "Symfony Console Component",
4482
  "homepage": "https://symfony.com",
4483
- "time": "2019-07-24T14:46:41+00:00"
4484
  },
4485
  {
4486
  "name": "symfony/css-selector",
4487
- "version": "v3.4.30",
4488
  "source": {
4489
  "type": "git",
4490
  "url": "https://github.com/symfony/css-selector.git",
4491
- "reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf"
4492
  },
4493
  "dist": {
4494
  "type": "zip",
4495
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
4496
- "reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
4497
  "shasum": ""
4498
  },
4499
  "require": {
@@ -4533,20 +4961,20 @@
4533
  ],
4534
  "description": "Symfony CssSelector Component",
4535
  "homepage": "https://symfony.com",
4536
- "time": "2019-01-16T09:39:14+00:00"
4537
  },
4538
  {
4539
  "name": "symfony/debug",
4540
- "version": "v3.4.30",
4541
  "source": {
4542
  "type": "git",
4543
  "url": "https://github.com/symfony/debug.git",
4544
- "reference": "bc977cb2681d75988ab2d53d14c4245c6c04f82f"
4545
  },
4546
  "dist": {
4547
  "type": "zip",
4548
- "url": "https://api.github.com/repos/symfony/debug/zipball/bc977cb2681d75988ab2d53d14c4245c6c04f82f",
4549
- "reference": "bc977cb2681d75988ab2d53d14c4245c6c04f82f",
4550
  "shasum": ""
4551
  },
4552
  "require": {
@@ -4589,20 +5017,20 @@
4589
  ],
4590
  "description": "Symfony Debug Component",
4591
  "homepage": "https://symfony.com",
4592
- "time": "2019-07-23T08:39:19+00:00"
4593
  },
4594
  {
4595
  "name": "symfony/dom-crawler",
4596
- "version": "v3.4.30",
4597
  "source": {
4598
  "type": "git",
4599
  "url": "https://github.com/symfony/dom-crawler.git",
4600
- "reference": "adb96e63af6fb0cc721cc69861001d60d0133d0c"
4601
  },
4602
  "dist": {
4603
  "type": "zip",
4604
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/adb96e63af6fb0cc721cc69861001d60d0133d0c",
4605
- "reference": "adb96e63af6fb0cc721cc69861001d60d0133d0c",
4606
  "shasum": ""
4607
  },
4608
  "require": {
@@ -4646,20 +5074,20 @@
4646
  ],
4647
  "description": "Symfony DomCrawler Component",
4648
  "homepage": "https://symfony.com",
4649
- "time": "2019-05-30T15:47:52+00:00"
4650
  },
4651
  {
4652
  "name": "symfony/event-dispatcher",
4653
- "version": "v3.4.30",
4654
  "source": {
4655
  "type": "git",
4656
  "url": "https://github.com/symfony/event-dispatcher.git",
4657
- "reference": "f18fdd6cc7006441865e698420cee26bac94741f"
4658
  },
4659
  "dist": {
4660
  "type": "zip",
4661
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f18fdd6cc7006441865e698420cee26bac94741f",
4662
- "reference": "f18fdd6cc7006441865e698420cee26bac94741f",
4663
  "shasum": ""
4664
  },
4665
  "require": {
@@ -4709,20 +5137,20 @@
4709
  ],
4710
  "description": "Symfony EventDispatcher Component",
4711
  "homepage": "https://symfony.com",
4712
- "time": "2019-06-25T07:45:31+00:00"
4713
  },
4714
  {
4715
  "name": "symfony/filesystem",
4716
- "version": "v3.4.30",
4717
  "source": {
4718
  "type": "git",
4719
  "url": "https://github.com/symfony/filesystem.git",
4720
- "reference": "70adda061ef83bb7def63a17953dc41f203308a7"
4721
  },
4722
  "dist": {
4723
  "type": "zip",
4724
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/70adda061ef83bb7def63a17953dc41f203308a7",
4725
- "reference": "70adda061ef83bb7def63a17953dc41f203308a7",
4726
  "shasum": ""
4727
  },
4728
  "require": {
@@ -4759,20 +5187,20 @@
4759
  ],
4760
  "description": "Symfony Filesystem Component",
4761
  "homepage": "https://symfony.com",
4762
- "time": "2019-06-23T09:29:17+00:00"
4763
  },
4764
  {
4765
  "name": "symfony/finder",
4766
- "version": "v3.4.30",
4767
  "source": {
4768
  "type": "git",
4769
  "url": "https://github.com/symfony/finder.git",
4770
- "reference": "1e762fdf73ace6ceb42ba5a6ca280be86082364a"
4771
  },
4772
  "dist": {
4773
  "type": "zip",
4774
- "url": "https://api.github.com/repos/symfony/finder/zipball/1e762fdf73ace6ceb42ba5a6ca280be86082364a",
4775
- "reference": "1e762fdf73ace6ceb42ba5a6ca280be86082364a",
4776
  "shasum": ""
4777
  },
4778
  "require": {
@@ -4808,7 +5236,7 @@
4808
  ],
4809
  "description": "Symfony Finder Component",
4810
  "homepage": "https://symfony.com",
4811
- "time": "2019-06-28T08:02:59+00:00"
4812
  },
4813
  {
4814
  "name": "symfony/polyfill-ctype",
@@ -4929,16 +5357,16 @@
4929
  },
4930
  {
4931
  "name": "symfony/process",
4932
- "version": "v3.4.30",
4933
  "source": {
4934
  "type": "git",
4935
  "url": "https://github.com/symfony/process.git",
4936
- "reference": "d129c017e8602507688ef2c3007951a16c1a8407"
4937
  },
4938
  "dist": {
4939
  "type": "zip",
4940
- "url": "https://api.github.com/repos/symfony/process/zipball/d129c017e8602507688ef2c3007951a16c1a8407",
4941
- "reference": "d129c017e8602507688ef2c3007951a16c1a8407",
4942
  "shasum": ""
4943
  },
4944
  "require": {
@@ -4974,20 +5402,20 @@
4974
  ],
4975
  "description": "Symfony Process Component",
4976
  "homepage": "https://symfony.com",
4977
- "time": "2019-05-30T15:47:52+00:00"
4978
  },
4979
  {
4980
  "name": "symfony/yaml",
4981
- "version": "v3.4.30",
4982
  "source": {
4983
  "type": "git",
4984
  "url": "https://github.com/symfony/yaml.git",
4985
- "reference": "051d045c684148060ebfc9affb7e3f5e0899d40b"
4986
  },
4987
  "dist": {
4988
  "type": "zip",
4989
- "url": "https://api.github.com/repos/symfony/yaml/zipball/051d045c684148060ebfc9affb7e3f5e0899d40b",
4990
- "reference": "051d045c684148060ebfc9affb7e3f5e0899d40b",
4991
  "shasum": ""
4992
  },
4993
  "require": {
@@ -5033,20 +5461,20 @@
5033
  ],
5034
  "description": "Symfony Yaml Component",
5035
  "homepage": "https://symfony.com",
5036
- "time": "2019-07-24T13:01:31+00:00"
5037
  },
5038
  {
5039
  "name": "vlucas/phpdotenv",
5040
- "version": "v3.4.0",
5041
  "source": {
5042
  "type": "git",
5043
  "url": "https://github.com/vlucas/phpdotenv.git",
5044
- "reference": "5084b23845c24dbff8ac6c204290c341e4776c92"
5045
  },
5046
  "dist": {
5047
  "type": "zip",
5048
- "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5084b23845c24dbff8ac6c204290c341e4776c92",
5049
- "reference": "5084b23845c24dbff8ac6c204290c341e4776c92",
5050
  "shasum": ""
5051
  },
5052
  "require": {
@@ -5060,7 +5488,7 @@
5060
  "type": "library",
5061
  "extra": {
5062
  "branch-alias": {
5063
- "dev-master": "3.4-dev"
5064
  }
5065
  },
5066
  "autoload": {
@@ -5073,10 +5501,15 @@
5073
  "BSD-3-Clause"
5074
  ],
5075
  "authors": [
 
 
 
 
 
5076
  {
5077
  "name": "Vance Lucas",
5078
  "email": "vance@vancelucas.com",
5079
- "homepage": "http://www.vancelucas.com"
5080
  }
5081
  ],
5082
  "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
@@ -5085,20 +5518,20 @@
5085
  "env",
5086
  "environment"
5087
  ],
5088
- "time": "2019-06-15T22:40:20+00:00"
5089
  },
5090
  {
5091
  "name": "webmozart/assert",
5092
- "version": "1.4.0",
5093
  "source": {
5094
  "type": "git",
5095
  "url": "https://github.com/webmozart/assert.git",
5096
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
5097
  },
5098
  "dist": {
5099
  "type": "zip",
5100
- "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
5101
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
5102
  "shasum": ""
5103
  },
5104
  "require": {
@@ -5106,8 +5539,7 @@
5106
  "symfony/polyfill-ctype": "^1.8"
5107
  },
5108
  "require-dev": {
5109
- "phpunit/phpunit": "^4.6",
5110
- "sebastian/version": "^1.0.1"
5111
  },
5112
  "type": "library",
5113
  "extra": {
@@ -5136,7 +5568,7 @@
5136
  "check",
5137
  "validate"
5138
  ],
5139
- "time": "2018-12-25T11:19:39+00:00"
5140
  },
5141
  {
5142
  "name": "wp-cli/cache-command",
@@ -7141,16 +7573,16 @@
7141
  },
7142
  {
7143
  "name": "wpdesk/wp-codeception",
7144
- "version": "1.1.9",
7145
  "source": {
7146
  "type": "git",
7147
  "url": "https://gitlab.com/wpdesk/wp-codeception.git",
7148
- "reference": "391fd89ba8a3c9921f26169888374fda239ad11d"
7149
  },
7150
  "dist": {
7151
  "type": "zip",
7152
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-codeception/repository/archive.zip?sha=391fd89ba8a3c9921f26169888374fda239ad11d",
7153
- "reference": "391fd89ba8a3c9921f26169888374fda239ad11d",
7154
  "shasum": ""
7155
  },
7156
  "require": {
@@ -7196,7 +7628,7 @@
7196
  "codeception",
7197
  "wordpress"
7198
  ],
7199
- "time": "2019-08-09T08:33:34+00:00"
7200
  },
7201
  {
7202
  "name": "wpdesk/wp-wpdesk-composer",
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": "f68b1028a6e19d8ebab94f0a71b0fe2d",
8
  "packages": [
9
  {
10
  "name": "moneyphp/money",
213
  ],
214
  "time": "2018-11-20T15:27:04+00:00"
215
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  {
217
  "name": "wpdesk/wp-abtesting",
218
  "version": "1.1.0",
610
  ],
611
  "time": "2019-04-08T11:33:03+00:00"
612
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  {
614
  "name": "wpdesk/wp-view",
615
  "version": "1.0.2",
650
  ],
651
  "time": "2018-10-18T13:44:18+00:00"
652
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  {
654
  "name": "wpdesk/wp-wpdesk-fs-shipment",
655
  "version": "1.0.4",
857
  "authors": [
858
  {
859
  "name": "Ben Scholzen 'DASPRiD'",
860
+ "role": "Developer",
861
  "email": "mail@dasprids.de",
862
+ "homepage": "http://www.dasprids.de"
 
863
  }
864
  ],
865
  "description": "BaconStringUtils contain utitilies to work with strings.",
927
  },
928
  {
929
  "name": "codeception/codeception",
930
+ "version": "3.1.0",
931
  "source": {
932
  "type": "git",
933
  "url": "https://github.com/Codeception/Codeception.git",
934
+ "reference": "9ed9146567770e564fdd2b656edb385330f7fae7"
935
  },
936
  "dist": {
937
  "type": "zip",
938
+ "url": "https://api.github.com/repos/Codeception/Codeception/zipball/9ed9146567770e564fdd2b656edb385330f7fae7",
939
+ "reference": "9ed9146567770e564fdd2b656edb385330f7fae7",
940
  "shasum": ""
941
  },
942
  "require": {
943
  "behat/gherkin": "^4.4.0",
944
+ "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3",
945
+ "codeception/stub": "^2.0 | ^3.0",
946
  "ext-curl": "*",
947
  "ext-json": "*",
948
  "ext-mbstring": "*",
949
+ "facebook/webdriver": "^1.6.0",
950
+ "guzzlehttp/guzzle": "^6.3.0",
951
+ "guzzlehttp/psr7": "~1.4",
952
+ "hoa/console": "~3.0",
953
  "php": ">=5.6.0 <8.0",
954
  "symfony/browser-kit": ">=2.7 <5.0",
955
  "symfony/console": ">=2.7 <5.0",
961
  },
962
  "require-dev": {
963
  "codeception/specify": "~0.3",
964
+ "doctrine/annotations": "^1",
965
+ "doctrine/data-fixtures": "^1",
966
+ "doctrine/orm": "^2",
967
  "flow/jsonpath": "~0.2",
968
  "monolog/monolog": "~1.8",
969
  "pda/pheanstalk": "~3.0",
1018
  "functional testing",
1019
  "unit testing"
1020
  ],
1021
+ "time": "2019-08-18T16:44:20+00:00"
1022
  },
1023
  {
1024
  "name": "codeception/phpunit-wrapper",
1438
  "authors": [
1439
  {
1440
  "name": "Franck Nijhof",
1441
+ "role": "Developer / IT Manager",
1442
  "email": "franck.nijhof@dealerdirect.com",
1443
+ "homepage": "http://www.frenck.nl"
 
1444
  }
1445
  ],
1446
  "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
1627
  },
1628
  {
1629
  "name": "facebook/webdriver",
1630
+ "version": "1.7.1",
1631
  "source": {
1632
  "type": "git",
1633
  "url": "https://github.com/facebook/php-webdriver.git",
1634
+ "reference": "e43de70f3c7166169d0f14a374505392734160e5"
1635
  },
1636
  "dist": {
1637
  "type": "zip",
1638
+ "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/e43de70f3c7166169d0f14a374505392734160e5",
1639
+ "reference": "e43de70f3c7166169d0f14a374505392734160e5",
1640
  "shasum": ""
1641
  },
1642
  "require": {
1643
  "ext-curl": "*",
1644
+ "ext-json": "*",
1645
+ "ext-mbstring": "*",
1646
+ "ext-zip": "*",
1647
+ "php": "^5.6 || ~7.0",
1648
+ "symfony/process": "^2.8 || ^3.1 || ^4.0"
1649
  },
1650
  "require-dev": {
1651
+ "friendsofphp/php-cs-fixer": "^2.0",
1652
+ "jakub-onderka/php-parallel-lint": "^0.9.2",
1653
+ "php-coveralls/php-coveralls": "^2.0",
1654
  "php-mock/php-mock-phpunit": "^1.1",
1655
+ "phpunit/phpunit": "^5.7",
1656
+ "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
1657
+ "squizlabs/php_codesniffer": "^2.6",
1658
+ "symfony/var-dumper": "^3.3 || ^4.0"
1659
  },
1660
  "suggest": {
1661
+ "ext-SimpleXML": "For Firefox profile creation"
1662
  },
1663
  "type": "library",
1664
+ "extra": {
1665
+ "branch-alias": {
1666
+ "dev-community": "1.5-dev"
1667
+ }
1668
+ },
1669
  "autoload": {
1670
  "psr-4": {
1671
  "Facebook\\WebDriver\\": "lib/"
1675
  "license": [
1676
  "Apache-2.0"
1677
  ],
1678
+ "description": "A PHP client for Selenium WebDriver",
1679
  "homepage": "https://github.com/facebook/php-webdriver",
1680
  "keywords": [
1681
  "facebook",
1683
  "selenium",
1684
  "webdriver"
1685
  ],
1686
+ "time": "2019-06-13T08:02:18+00:00"
1687
  },
1688
  {
1689
  "name": "gettext/gettext",
1730
  "authors": [
1731
  {
1732
  "name": "Oscar Otero",
1733
+ "role": "Developer",
1734
  "email": "oom@oscarotero.com",
1735
+ "homepage": "http://oscarotero.com"
 
1736
  }
1737
  ],
1738
  "description": "PHP gettext manager",
1784
  "authors": [
1785
  {
1786
  "name": "Michele Locati",
1787
+ "role": "Developer",
1788
+ "email": "mlocati@gmail.com"
1789
  }
1790
  ],
1791
  "description": "gettext languages with plural rules",
2139
  ],
2140
  "time": "2012-08-31T00:00:00+00:00"
2141
  },
2142
+ {
2143
+ "name": "hoa/consistency",
2144
+ "version": "1.17.05.02",
2145
+ "source": {
2146
+ "type": "git",
2147
+ "url": "https://github.com/hoaproject/Consistency.git",
2148
+ "reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f"
2149
+ },
2150
+ "dist": {
2151
+ "type": "zip",
2152
+ "url": "https://api.github.com/repos/hoaproject/Consistency/zipball/fd7d0adc82410507f332516faf655b6ed22e4c2f",
2153
+ "reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f",
2154
+ "shasum": ""
2155
+ },
2156
+ "require": {
2157
+ "hoa/exception": "~1.0",
2158
+ "php": ">=5.5.0"
2159
+ },
2160
+ "require-dev": {
2161
+ "hoa/stream": "~1.0",
2162
+ "hoa/test": "~2.0"
2163
+ },
2164
+ "type": "library",
2165
+ "extra": {
2166
+ "branch-alias": {
2167
+ "dev-master": "1.x-dev"
2168
+ }
2169
+ },
2170
+ "autoload": {
2171
+ "psr-4": {
2172
+ "Hoa\\Consistency\\": "."
2173
+ },
2174
+ "files": [
2175
+ "Prelude.php"
2176
+ ]
2177
+ },
2178
+ "notification-url": "https://packagist.org/downloads/",
2179
+ "license": [
2180
+ "BSD-3-Clause"
2181
+ ],
2182
+ "authors": [
2183
+ {
2184
+ "name": "Ivan Enderlin",
2185
+ "email": "ivan.enderlin@hoa-project.net"
2186
+ },
2187
+ {
2188
+ "name": "Hoa community",
2189
+ "homepage": "https://hoa-project.net/"
2190
+ }
2191
+ ],
2192
+ "description": "The Hoa\\Consistency library.",
2193
+ "homepage": "https://hoa-project.net/",
2194
+ "keywords": [
2195
+ "autoloader",
2196
+ "callable",
2197
+ "consistency",
2198
+ "entity",
2199
+ "flex",
2200
+ "keyword",
2201
+ "library"
2202
+ ],
2203
+ "time": "2017-05-02T12:18:12+00:00"
2204
+ },
2205
+ {
2206
+ "name": "hoa/console",
2207
+ "version": "3.17.05.02",
2208
+ "source": {
2209
+ "type": "git",
2210
+ "url": "https://github.com/hoaproject/Console.git",
2211
+ "reference": "e231fd3ea70e6d773576ae78de0bdc1daf331a66"
2212
+ },
2213
+ "dist": {
2214
+ "type": "zip",
2215
+ "url": "https://api.github.com/repos/hoaproject/Console/zipball/e231fd3ea70e6d773576ae78de0bdc1daf331a66",
2216
+ "reference": "e231fd3ea70e6d773576ae78de0bdc1daf331a66",
2217
+ "shasum": ""
2218
+ },
2219
+ "require": {
2220
+ "hoa/consistency": "~1.0",
2221
+ "hoa/event": "~1.0",
2222
+ "hoa/exception": "~1.0",
2223
+ "hoa/file": "~1.0",
2224
+ "hoa/protocol": "~1.0",
2225
+ "hoa/stream": "~1.0",
2226
+ "hoa/ustring": "~4.0"
2227
+ },
2228
+ "require-dev": {
2229
+ "hoa/test": "~2.0"
2230
+ },
2231
+ "suggest": {
2232
+ "ext-pcntl": "To enable hoa://Event/Console/Window:resize.",
2233
+ "hoa/dispatcher": "To use the console kit.",
2234
+ "hoa/router": "To use the console kit."
2235
+ },
2236
+ "type": "library",
2237
+ "extra": {
2238
+ "branch-alias": {
2239
+ "dev-master": "3.x-dev"
2240
+ }
2241
+ },
2242
+ "autoload": {
2243
+ "psr-4": {
2244
+ "Hoa\\Console\\": "."
2245
+ }
2246
+ },
2247
+ "notification-url": "https://packagist.org/downloads/",
2248
+ "license": [
2249
+ "BSD-3-Clause"
2250
+ ],
2251
+ "authors": [
2252
+ {
2253
+ "name": "Ivan Enderlin",
2254
+ "email": "ivan.enderlin@hoa-project.net"
2255
+ },
2256
+ {
2257
+ "name": "Hoa community",
2258
+ "homepage": "https://hoa-project.net/"
2259
+ }
2260
+ ],
2261
+ "description": "The Hoa\\Console library.",
2262
+ "homepage": "https://hoa-project.net/",
2263
+ "keywords": [
2264
+ "autocompletion",
2265
+ "chrome",
2266
+ "cli",
2267
+ "console",
2268
+ "cursor",
2269
+ "getoption",
2270
+ "library",
2271
+ "option",
2272
+ "parser",
2273
+ "processus",
2274
+ "readline",
2275
+ "terminfo",
2276
+ "tput",
2277
+ "window"
2278
+ ],
2279
+ "time": "2017-05-02T12:26:19+00:00"
2280
+ },
2281
+ {
2282
+ "name": "hoa/event",
2283
+ "version": "1.17.01.13",
2284
+ "source": {
2285
+ "type": "git",
2286
+ "url": "https://github.com/hoaproject/Event.git",
2287
+ "reference": "6c0060dced212ffa3af0e34bb46624f990b29c54"
2288
+ },
2289
+ "dist": {
2290
+ "type": "zip",
2291
+ "url": "https://api.github.com/repos/hoaproject/Event/zipball/6c0060dced212ffa3af0e34bb46624f990b29c54",
2292
+ "reference": "6c0060dced212ffa3af0e34bb46624f990b29c54",
2293
+ "shasum": ""
2294
+ },
2295
+ "require": {
2296
+ "hoa/consistency": "~1.0",
2297
+ "hoa/exception": "~1.0"
2298
+ },
2299
+ "require-dev": {
2300
+ "hoa/test": "~2.0"
2301
+ },
2302
+ "type": "library",
2303
+ "extra": {
2304
+ "branch-alias": {
2305
+ "dev-master": "1.x-dev"
2306
+ }
2307
+ },
2308
+ "autoload": {
2309
+ "psr-4": {
2310
+ "Hoa\\Event\\": "."
2311
+ }
2312
+ },
2313
+ "notification-url": "https://packagist.org/downloads/",
2314
+ "license": [
2315
+ "BSD-3-Clause"
2316
+ ],
2317
+ "authors": [
2318
+ {
2319
+ "name": "Ivan Enderlin",
2320
+ "email": "ivan.enderlin@hoa-project.net"
2321
+ },
2322
+ {
2323
+ "name": "Hoa community",
2324
+ "homepage": "https://hoa-project.net/"
2325
+ }
2326
+ ],
2327
+ "description": "The Hoa\\Event library.",
2328
+ "homepage": "https://hoa-project.net/",
2329
+ "keywords": [
2330
+ "event",
2331
+ "library",
2332
+ "listener",
2333
+ "observer"
2334
+ ],
2335
+ "time": "2017-01-13T15:30:50+00:00"
2336
+ },
2337
+ {
2338
+ "name": "hoa/exception",
2339
+ "version": "1.17.01.16",
2340
+ "source": {
2341
+ "type": "git",
2342
+ "url": "https://github.com/hoaproject/Exception.git",
2343
+ "reference": "091727d46420a3d7468ef0595651488bfc3a458f"
2344
+ },
2345
+ "dist": {
2346
+ "type": "zip",
2347
+ "url": "https://api.github.com/repos/hoaproject/Exception/zipball/091727d46420a3d7468ef0595651488bfc3a458f",
2348
+ "reference": "091727d46420a3d7468ef0595651488bfc3a458f",
2349
+ "shasum": ""
2350
+ },
2351
+ "require": {
2352
+ "hoa/consistency": "~1.0",
2353
+ "hoa/event": "~1.0"
2354
+ },
2355
+ "require-dev": {
2356
+ "hoa/test": "~2.0"
2357
+ },
2358
+ "type": "library",
2359
+ "extra": {
2360
+ "branch-alias": {
2361
+ "dev-master": "1.x-dev"
2362
+ }
2363
+ },
2364
+ "autoload": {
2365
+ "psr-4": {
2366
+ "Hoa\\Exception\\": "."
2367
+ }
2368
+ },
2369
+ "notification-url": "https://packagist.org/downloads/",
2370
+ "license": [
2371
+ "BSD-3-Clause"
2372
+ ],
2373
+ "authors": [
2374
+ {
2375
+ "name": "Ivan Enderlin",
2376
+ "email": "ivan.enderlin@hoa-project.net"
2377
+ },
2378
+ {
2379
+ "name": "Hoa community",
2380
+ "homepage": "https://hoa-project.net/"
2381
+ }
2382
+ ],
2383
+ "description": "The Hoa\\Exception library.",
2384
+ "homepage": "https://hoa-project.net/",
2385
+ "keywords": [
2386
+ "exception",
2387
+ "library"
2388
+ ],
2389
+ "time": "2017-01-16T07:53:27+00:00"
2390
+ },
2391
+ {
2392
+ "name": "hoa/file",
2393
+ "version": "1.17.07.11",
2394
+ "source": {
2395
+ "type": "git",
2396
+ "url": "https://github.com/hoaproject/File.git",
2397
+ "reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca"
2398
+ },
2399
+ "dist": {
2400
+ "type": "zip",
2401
+ "url": "https://api.github.com/repos/hoaproject/File/zipball/35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca",
2402
+ "reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca",
2403
+ "shasum": ""
2404
+ },
2405
+ "require": {
2406
+ "hoa/consistency": "~1.0",
2407
+ "hoa/event": "~1.0",
2408
+ "hoa/exception": "~1.0",
2409
+ "hoa/iterator": "~2.0",
2410
+ "hoa/stream": "~1.0"
2411
+ },
2412
+ "require-dev": {
2413
+ "hoa/test": "~2.0"
2414
+ },
2415
+ "type": "library",
2416
+ "extra": {
2417
+ "branch-alias": {
2418
+ "dev-master": "1.x-dev"
2419
+ }
2420
+ },
2421
+ "autoload": {
2422
+ "psr-4": {
2423
+ "Hoa\\File\\": "."
2424
+ }
2425
+ },
2426
+ "notification-url": "https://packagist.org/downloads/",
2427
+ "license": [
2428
+ "BSD-3-Clause"
2429
+ ],
2430
+ "authors": [
2431
+ {
2432
+ "name": "Ivan Enderlin",
2433
+ "email": "ivan.enderlin@hoa-project.net"
2434
+ },
2435
+ {
2436
+ "name": "Hoa community",
2437
+ "homepage": "https://hoa-project.net/"
2438
+ }
2439
+ ],
2440
+ "description": "The Hoa\\File library.",
2441
+ "homepage": "https://hoa-project.net/",
2442
+ "keywords": [
2443
+ "Socket",
2444
+ "directory",
2445
+ "file",
2446
+ "finder",
2447
+ "library",
2448
+ "link",
2449
+ "temporary"
2450
+ ],
2451
+ "time": "2017-07-11T07:42:15+00:00"
2452
+ },
2453
+ {
2454
+ "name": "hoa/iterator",
2455
+ "version": "2.17.01.10",
2456
+ "source": {
2457
+ "type": "git",
2458
+ "url": "https://github.com/hoaproject/Iterator.git",
2459
+ "reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc"
2460
+ },
2461
+ "dist": {
2462
+ "type": "zip",
2463
+ "url": "https://api.github.com/repos/hoaproject/Iterator/zipball/d1120ba09cb4ccd049c86d10058ab94af245f0cc",
2464
+ "reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc",
2465
+ "shasum": ""
2466
+ },
2467
+ "require": {
2468
+ "hoa/consistency": "~1.0",
2469
+ "hoa/exception": "~1.0"
2470
+ },
2471
+ "require-dev": {
2472
+ "hoa/test": "~2.0"
2473
+ },
2474
+ "type": "library",
2475
+ "extra": {
2476
+ "branch-alias": {
2477
+ "dev-master": "2.x-dev"
2478
+ }
2479
+ },
2480
+ "autoload": {
2481
+ "psr-4": {
2482
+ "Hoa\\Iterator\\": "."
2483
+ }
2484
+ },
2485
+ "notification-url": "https://packagist.org/downloads/",
2486
+ "license": [
2487
+ "BSD-3-Clause"
2488
+ ],
2489
+ "authors": [
2490
+ {
2491
+ "name": "Ivan Enderlin",
2492
+ "email": "ivan.enderlin@hoa-project.net"
2493
+ },
2494
+ {
2495
+ "name": "Hoa community",
2496
+ "homepage": "https://hoa-project.net/"
2497
+ }
2498
+ ],
2499
+ "description": "The Hoa\\Iterator library.",
2500
+ "homepage": "https://hoa-project.net/",
2501
+ "keywords": [
2502
+ "iterator",
2503
+ "library"
2504
+ ],
2505
+ "time": "2017-01-10T10:34:47+00:00"
2506
+ },
2507
+ {
2508
+ "name": "hoa/protocol",
2509
+ "version": "1.17.01.14",
2510
+ "source": {
2511
+ "type": "git",
2512
+ "url": "https://github.com/hoaproject/Protocol.git",
2513
+ "reference": "5c2cf972151c45f373230da170ea015deecf19e2"
2514
+ },
2515
+ "dist": {
2516
+ "type": "zip",
2517
+ "url": "https://api.github.com/repos/hoaproject/Protocol/zipball/5c2cf972151c45f373230da170ea015deecf19e2",
2518
+ "reference": "5c2cf972151c45f373230da170ea015deecf19e2",
2519
+ "shasum": ""
2520
+ },
2521
+ "require": {
2522
+ "hoa/consistency": "~1.0",
2523
+ "hoa/exception": "~1.0"
2524
+ },
2525
+ "require-dev": {
2526
+ "hoa/test": "~2.0"
2527
+ },
2528
+ "type": "library",
2529
+ "extra": {
2530
+ "branch-alias": {
2531
+ "dev-master": "1.x-dev"
2532
+ }
2533
+ },
2534
+ "autoload": {
2535
+ "psr-4": {
2536
+ "Hoa\\Protocol\\": "."
2537
+ },
2538
+ "files": [
2539
+ "Wrapper.php"
2540
+ ]
2541
+ },
2542
+ "notification-url": "https://packagist.org/downloads/",
2543
+ "license": [
2544
+ "BSD-3-Clause"
2545
+ ],
2546
+ "authors": [
2547
+ {
2548
+ "name": "Ivan Enderlin",
2549
+ "email": "ivan.enderlin@hoa-project.net"
2550
+ },
2551
+ {
2552
+ "name": "Hoa community",
2553
+ "homepage": "https://hoa-project.net/"
2554
+ }
2555
+ ],
2556
+ "description": "The Hoa\\Protocol library.",
2557
+ "homepage": "https://hoa-project.net/",
2558
+ "keywords": [
2559
+ "library",
2560
+ "protocol",
2561
+ "resource",
2562
+ "stream",
2563
+ "wrapper"
2564
+ ],
2565
+ "time": "2017-01-14T12:26:10+00:00"
2566
+ },
2567
+ {
2568
+ "name": "hoa/stream",
2569
+ "version": "1.17.02.21",
2570
+ "source": {
2571
+ "type": "git",
2572
+ "url": "https://github.com/hoaproject/Stream.git",
2573
+ "reference": "3293cfffca2de10525df51436adf88a559151d82"
2574
+ },
2575
+ "dist": {
2576
+ "type": "zip",
2577
+ "url": "https://api.github.com/repos/hoaproject/Stream/zipball/3293cfffca2de10525df51436adf88a559151d82",
2578
+ "reference": "3293cfffca2de10525df51436adf88a559151d82",
2579
+ "shasum": ""
2580
+ },
2581
+ "require": {
2582
+ "hoa/consistency": "~1.0",
2583
+ "hoa/event": "~1.0",
2584
+ "hoa/exception": "~1.0",
2585
+ "hoa/protocol": "~1.0"
2586
+ },
2587
+ "require-dev": {
2588
+ "hoa/test": "~2.0"
2589
+ },
2590
+ "type": "library",
2591
+ "extra": {
2592
+ "branch-alias": {
2593
+ "dev-master": "1.x-dev"
2594
+ }
2595
+ },
2596
+ "autoload": {
2597
+ "psr-4": {
2598
+ "Hoa\\Stream\\": "."
2599
+ }
2600
+ },
2601
+ "notification-url": "https://packagist.org/downloads/",
2602
+ "license": [
2603
+ "BSD-3-Clause"
2604
+ ],
2605
+ "authors": [
2606
+ {
2607
+ "name": "Ivan Enderlin",
2608
+ "email": "ivan.enderlin@hoa-project.net"
2609
+ },
2610
+ {
2611
+ "name": "Hoa community",
2612
+ "homepage": "https://hoa-project.net/"
2613
+ }
2614
+ ],
2615
+ "description": "The Hoa\\Stream library.",
2616
+ "homepage": "https://hoa-project.net/",
2617
+ "keywords": [
2618
+ "Context",
2619
+ "bucket",
2620
+ "composite",
2621
+ "filter",
2622
+ "in",
2623
+ "library",
2624
+ "out",
2625
+ "protocol",
2626
+ "stream",
2627
+ "wrapper"
2628
+ ],
2629
+ "time": "2017-02-21T16:01:06+00:00"
2630
+ },
2631
+ {
2632
+ "name": "hoa/ustring",
2633
+ "version": "4.17.01.16",
2634
+ "source": {
2635
+ "type": "git",
2636
+ "url": "https://github.com/hoaproject/Ustring.git",
2637
+ "reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0"
2638
+ },
2639
+ "dist": {
2640
+ "type": "zip",
2641
+ "url": "https://api.github.com/repos/hoaproject/Ustring/zipball/e6326e2739178799b1fe3fdd92029f9517fa17a0",
2642
+ "reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0",
2643
+ "shasum": ""
2644
+ },
2645
+ "require": {
2646
+ "hoa/consistency": "~1.0",
2647
+ "hoa/exception": "~1.0"
2648
+ },
2649
+ "require-dev": {
2650
+ "hoa/test": "~2.0"
2651
+ },
2652
+ "suggest": {
2653
+ "ext-iconv": "ext/iconv must be present (or a third implementation) to use Hoa\\Ustring::transcode().",
2654
+ "ext-intl": "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()."
2655
+ },
2656
+ "type": "library",
2657
+ "extra": {
2658
+ "branch-alias": {
2659
+ "dev-master": "4.x-dev"
2660
+ }
2661
+ },
2662
+ "autoload": {
2663
+ "psr-4": {
2664
+ "Hoa\\Ustring\\": "."
2665
+ }
2666
+ },
2667
+ "notification-url": "https://packagist.org/downloads/",
2668
+ "license": [
2669
+ "BSD-3-Clause"
2670
+ ],
2671
+ "authors": [
2672
+ {
2673
+ "name": "Ivan Enderlin",
2674
+ "email": "ivan.enderlin@hoa-project.net"
2675
+ },
2676
+ {
2677
+ "name": "Hoa community",
2678
+ "homepage": "https://hoa-project.net/"
2679
+ }
2680
+ ],
2681
+ "description": "The Hoa\\Ustring library.",
2682
+ "homepage": "https://hoa-project.net/",
2683
+ "keywords": [
2684
+ "library",
2685
+ "search",
2686
+ "string",
2687
+ "unicode"
2688
+ ],
2689
+ "time": "2017-01-16T07:08:25+00:00"
2690
+ },
2691
  {
2692
  "name": "illuminate/contracts",
2693
  "version": "v5.2.45",
2857
  },
2858
  {
2859
  "name": "lucatume/wp-browser",
2860
+ "version": "2.2.20",
2861
  "source": {
2862
  "type": "git",
2863
  "url": "https://github.com/lucatume/wp-browser.git",
2864
+ "reference": "c84a229e7bd039d593b96428f690772bdbacd9a9"
2865
  },
2866
  "dist": {
2867
  "type": "zip",
2868
+ "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/c84a229e7bd039d593b96428f690772bdbacd9a9",
2869
+ "reference": "c84a229e7bd039d593b96428f690772bdbacd9a9",
2870
  "shasum": ""
2871
  },
2872
  "require": {
2921
  "codeception",
2922
  "wordpress"
2923
  ],
2924
+ "time": "2019-08-26T07:17:09+00:00"
2925
  },
2926
  {
2927
  "name": "mck89/peast",
3317
  },
3318
  {
3319
  "name": "Wim Godden",
3320
+ "role": "lead",
3321
+ "homepage": "https://github.com/wimg"
3322
  },
3323
  {
3324
  "name": "Juliette Reinders Folmer",
3325
+ "role": "lead",
3326
+ "homepage": "https://github.com/jrfnl"
3327
  }
3328
  ],
3329
  "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
3644
  "authors": [
3645
  {
3646
  "name": "Sebastian Bergmann",
3647
+ "role": "lead",
3648
+ "email": "sb@sebastian-bergmann.de"
3649
  }
3650
  ],
3651
  "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
3692
  "authors": [
3693
  {
3694
  "name": "Sebastian Bergmann",
3695
+ "role": "lead",
3696
+ "email": "sb@sebastian-bergmann.de"
3697
  }
3698
  ],
3699
  "description": "FilterIterator implementation that filters files based on a list of suffixes.",
3734
  "authors": [
3735
  {
3736
  "name": "Sebastian Bergmann",
3737
+ "role": "lead",
3738
+ "email": "sebastian@phpunit.de"
3739
  }
3740
  ],
3741
  "description": "Simple template engine.",
3783
  "authors": [
3784
  {
3785
  "name": "Sebastian Bergmann",
3786
+ "role": "lead",
3787
+ "email": "sb@sebastian-bergmann.de"
3788
  }
3789
  ],
3790
  "description": "Utility class for timing",
3912
  "authors": [
3913
  {
3914
  "name": "Sebastian Bergmann",
3915
+ "role": "lead",
3916
+ "email": "sebastian@phpunit.de"
3917
  }
3918
  ],
3919
  "description": "The PHP Unit Testing framework.",
4629
  "authors": [
4630
  {
4631
  "name": "Sebastian Bergmann",
4632
+ "role": "lead",
4633
+ "email": "sebastian@phpunit.de"
4634
  }
4635
  ],
4636
  "description": "Library that helps with managing the version number of Git-hosted PHP projects",
4783
  },
4784
  {
4785
  "name": "symfony/browser-kit",
4786
+ "version": "v3.4.31",
4787
  "source": {
4788
  "type": "git",
4789
  "url": "https://github.com/symfony/browser-kit.git",
4790
+ "reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0"
4791
  },
4792
  "dist": {
4793
  "type": "zip",
4794
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/1a3406a6b9b61b492592a816ca056afcc9e976c0",
4795
+ "reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0",
4796
  "shasum": ""
4797
  },
4798
  "require": {
4836
  ],
4837
  "description": "Symfony BrowserKit Component",
4838
  "homepage": "https://symfony.com",
4839
+ "time": "2019-08-26T07:52:58+00:00"
4840
  },
4841
  {
4842
  "name": "symfony/console",
4843
+ "version": "v3.4.31",
4844
  "source": {
4845
  "type": "git",
4846
  "url": "https://github.com/symfony/console.git",
4847
+ "reference": "4510f04e70344d70952566e4262a0b11df39cb10"
4848
  },
4849
  "dist": {
4850
  "type": "zip",
4851
+ "url": "https://api.github.com/repos/symfony/console/zipball/4510f04e70344d70952566e4262a0b11df39cb10",
4852
+ "reference": "4510f04e70344d70952566e4262a0b11df39cb10",
4853
  "shasum": ""
4854
  },
4855
  "require": {
4908
  ],
4909
  "description": "Symfony Console Component",
4910
  "homepage": "https://symfony.com",
4911
+ "time": "2019-08-26T07:52:58+00:00"
4912
  },
4913
  {
4914
  "name": "symfony/css-selector",
4915
+ "version": "v3.4.31",
4916
  "source": {
4917
  "type": "git",
4918
  "url": "https://github.com/symfony/css-selector.git",
4919
+ "reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41"
4920
  },
4921
  "dist": {
4922
  "type": "zip",
4923
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
4924
+ "reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
4925
  "shasum": ""
4926
  },
4927
  "require": {
4961
  ],
4962
  "description": "Symfony CssSelector Component",
4963
  "homepage": "https://symfony.com",
4964
+ "time": "2019-08-20T13:31:17+00:00"
4965
  },
4966
  {
4967
  "name": "symfony/debug",
4968
+ "version": "v3.4.31",
4969
  "source": {
4970
  "type": "git",
4971
  "url": "https://github.com/symfony/debug.git",
4972
+ "reference": "0b600300918780001e2821db77bc28b677794486"
4973
  },
4974
  "dist": {
4975
  "type": "zip",
4976
+ "url": "https://api.github.com/repos/symfony/debug/zipball/0b600300918780001e2821db77bc28b677794486",
4977
+ "reference": "0b600300918780001e2821db77bc28b677794486",
4978
  "shasum": ""
4979
  },
4980
  "require": {
5017
  ],
5018
  "description": "Symfony Debug Component",
5019
  "homepage": "https://symfony.com",
5020
+ "time": "2019-08-20T13:31:17+00:00"
5021
  },
5022
  {
5023
  "name": "symfony/dom-crawler",
5024
+ "version": "v3.4.31",
5025
  "source": {
5026
  "type": "git",
5027
  "url": "https://github.com/symfony/dom-crawler.git",
5028
+ "reference": "8558d1bc4554f5cb0b66e50377457967a8969263"
5029
  },
5030
  "dist": {
5031
  "type": "zip",
5032
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/8558d1bc4554f5cb0b66e50377457967a8969263",
5033
+ "reference": "8558d1bc4554f5cb0b66e50377457967a8969263",
5034
  "shasum": ""
5035
  },
5036
  "require": {
5074
  ],
5075
  "description": "Symfony DomCrawler Component",
5076
  "homepage": "https://symfony.com",
5077
+ "time": "2019-08-26T07:52:58+00:00"
5078
  },
5079
  {
5080
  "name": "symfony/event-dispatcher",
5081
+ "version": "v3.4.31",
5082
  "source": {
5083
  "type": "git",
5084
  "url": "https://github.com/symfony/event-dispatcher.git",
5085
+ "reference": "3e922c4c3430b9de624e8a285dada5e61e230959"
5086
  },
5087
  "dist": {
5088
  "type": "zip",
5089
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e922c4c3430b9de624e8a285dada5e61e230959",
5090
+ "reference": "3e922c4c3430b9de624e8a285dada5e61e230959",
5091
  "shasum": ""
5092
  },
5093
  "require": {
5137
  ],
5138
  "description": "Symfony EventDispatcher Component",
5139
  "homepage": "https://symfony.com",
5140
+ "time": "2019-08-23T08:05:57+00:00"
5141
  },
5142
  {
5143
  "name": "symfony/filesystem",
5144
+ "version": "v3.4.31",
5145
  "source": {
5146
  "type": "git",
5147
  "url": "https://github.com/symfony/filesystem.git",
5148
+ "reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516"
5149
  },
5150
  "dist": {
5151
  "type": "zip",
5152
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
5153
+ "reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
5154
  "shasum": ""
5155
  },
5156
  "require": {
5187
  ],
5188
  "description": "Symfony Filesystem Component",
5189
  "homepage": "https://symfony.com",
5190
+ "time": "2019-08-20T13:31:17+00:00"
5191
  },
5192
  {
5193
  "name": "symfony/finder",
5194
+ "version": "v3.4.31",
5195
  "source": {
5196
  "type": "git",
5197
  "url": "https://github.com/symfony/finder.git",
5198
+ "reference": "1fcad80b440abcd1451767349906b6f9d3961d37"
5199
  },
5200
  "dist": {
5201
  "type": "zip",
5202
+ "url": "https://api.github.com/repos/symfony/finder/zipball/1fcad80b440abcd1451767349906b6f9d3961d37",
5203
+ "reference": "1fcad80b440abcd1451767349906b6f9d3961d37",
5204
  "shasum": ""
5205
  },
5206
  "require": {
5236
  ],
5237
  "description": "Symfony Finder Component",
5238
  "homepage": "https://symfony.com",
5239
+ "time": "2019-08-14T09:39:58+00:00"
5240
  },
5241
  {
5242
  "name": "symfony/polyfill-ctype",
5357
  },
5358
  {
5359
  "name": "symfony/process",
5360
+ "version": "v3.4.31",
5361
  "source": {
5362
  "type": "git",
5363
  "url": "https://github.com/symfony/process.git",
5364
+ "reference": "d822cb654000a95b7855362c0d5b127f6a6d8baa"
5365
  },
5366
  "dist": {
5367
  "type": "zip",
5368
+ "url": "https://api.github.com/repos/symfony/process/zipball/d822cb654000a95b7855362c0d5b127f6a6d8baa",
5369
+ "reference": "d822cb654000a95b7855362c0d5b127f6a6d8baa",
5370
  "shasum": ""
5371
  },
5372
  "require": {
5402
  ],
5403
  "description": "Symfony Process Component",
5404
  "homepage": "https://symfony.com",
5405
+ "time": "2019-08-26T07:52:58+00:00"
5406
  },
5407
  {
5408
  "name": "symfony/yaml",
5409
+ "version": "v3.4.31",
5410
  "source": {
5411
  "type": "git",
5412
  "url": "https://github.com/symfony/yaml.git",
5413
+ "reference": "3dc414b7db30695bae671a1d86013d03f4ae9834"
5414
  },
5415
  "dist": {
5416
  "type": "zip",
5417
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/3dc414b7db30695bae671a1d86013d03f4ae9834",
5418
+ "reference": "3dc414b7db30695bae671a1d86013d03f4ae9834",
5419
  "shasum": ""
5420
  },
5421
  "require": {
5461
  ],
5462
  "description": "Symfony Yaml Component",
5463
  "homepage": "https://symfony.com",
5464
+ "time": "2019-08-20T13:31:17+00:00"
5465
  },
5466
  {
5467
  "name": "vlucas/phpdotenv",
5468
+ "version": "v3.5.0",
5469
  "source": {
5470
  "type": "git",
5471
  "url": "https://github.com/vlucas/phpdotenv.git",
5472
+ "reference": "95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222"
5473
  },
5474
  "dist": {
5475
  "type": "zip",
5476
+ "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222",
5477
+ "reference": "95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222",
5478
  "shasum": ""
5479
  },
5480
  "require": {
5488
  "type": "library",
5489
  "extra": {
5490
  "branch-alias": {
5491
+ "dev-master": "3.5-dev"
5492
  }
5493
  },
5494
  "autoload": {
5501
  "BSD-3-Clause"
5502
  ],
5503
  "authors": [
5504
+ {
5505
+ "name": "Graham Campbell",
5506
+ "email": "graham@alt-three.com",
5507
+ "homepage": "https://gjcampbell.co.uk/"
5508
+ },
5509
  {
5510
  "name": "Vance Lucas",
5511
  "email": "vance@vancelucas.com",
5512
+ "homepage": "https://vancelucas.com/"
5513
  }
5514
  ],
5515
  "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
5518
  "env",
5519
  "environment"
5520
  ],
5521
+ "time": "2019-08-27T17:00:38+00:00"
5522
  },
5523
  {
5524
  "name": "webmozart/assert",
5525
+ "version": "1.5.0",
5526
  "source": {
5527
  "type": "git",
5528
  "url": "https://github.com/webmozart/assert.git",
5529
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
5530
  },
5531
  "dist": {
5532
  "type": "zip",
5533
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
5534
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
5535
  "shasum": ""
5536
  },
5537
  "require": {
5539
  "symfony/polyfill-ctype": "^1.8"
5540
  },
5541
  "require-dev": {
5542
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
 
5543
  },
5544
  "type": "library",
5545
  "extra": {
5568
  "check",
5569
  "validate"
5570
  ],
5571
+ "time": "2019-08-24T08:43:50+00:00"
5572
  },
5573
  {
5574
  "name": "wp-cli/cache-command",
7573
  },
7574
  {
7575
  "name": "wpdesk/wp-codeception",
7576
+ "version": "1.1.12",
7577
  "source": {
7578
  "type": "git",
7579
  "url": "https://gitlab.com/wpdesk/wp-codeception.git",
7580
+ "reference": "ff0629b1c59d8908fcd90b2f86139e091f26af51"
7581
  },
7582
  "dist": {
7583
  "type": "zip",
7584
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-codeception/repository/archive.zip?sha=ff0629b1c59d8908fcd90b2f86139e091f26af51",
7585
+ "reference": "ff0629b1c59d8908fcd90b2f86139e091f26af51",
7586
  "shasum": ""
7587
  },
7588
  "require": {
7628
  "codeception",
7629
  "wordpress"
7630
  ],
7631
+ "time": "2019-08-26T08:35:42+00:00"
7632
  },
7633
  {
7634
  "name": "wpdesk/wp-wpdesk-composer",
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.6.4
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
@@ -43,8 +43,8 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
43
  }
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
- $plugin_version = '3.6.4';
47
- $plugin_release_timestamp = '2019-08-21 13:32';
48
 
49
  $plugin_name = 'Flexible Shipping';
50
  $plugin_class_name = 'Flexible_Shipping_Plugin';
3
  Plugin Name: Flexible Shipping
4
  Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ Version: 3.7.0
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-shipping
43
  }
44
 
45
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
46
+ $plugin_version = '3.7.0';
47
+ $plugin_release_timestamp = '2019-08-27 11:41';
48
 
49
  $plugin_name = 'Flexible Shipping';
50
  $plugin_class_name = 'Flexible_Shipping_Plugin';
lang/flexible-shipping-pl_PL.mo CHANGED
Binary file
lang/flexible-shipping-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
- "POT-Creation-Date: 2019-08-19 09:52+0200\n"
5
- "PO-Revision-Date: 2019-08-19 09:52+0200\n"
6
- "Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
@@ -20,39 +20,40 @@ msgstr ""
20
  "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
  "X-Poedit-SearchPath-1: vendor/wpdesk/wp-wpdesk-fs-shipment\n"
 
23
  "X-Poedit-SearchPathExcluded-0: *.js\n"
24
 
25
- #: classes/class-flexible-shipping-connect-shutdown-notice.php:47
 
 
 
 
26
  #, php-format
27
- msgid ""
28
- "Notice! We will shut down Connect on 22 August 2019! %1$sRead more →%2$s"
29
- msgstr "Uwaga! Zamkniemy Connect 22 sierpnia 2019! %1$sPrzeczytaj więcej →%2$s"
30
 
31
- #: classes/class-flexible-shipping-plugin.php:476
32
- #, fuzzy, php-format
33
- #| msgid ""
34
- #| "How can We make Flexible Shipping better for you? %sJust write to us.%s"
35
- msgid ""
36
- "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
37
  msgstr ""
38
  "Jak możemy sprawić, aby Flexible Shipping był lepszy? %sNapisz do nas.%s"
39
 
40
- #: classes/class-flexible-shipping-plugin.php:536
41
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:147
42
  msgid "Settings"
43
  msgstr "Ustawienia"
44
 
45
- #: classes/class-flexible-shipping-plugin.php:539
46
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:140
47
  msgid "Docs"
48
  msgstr "Docs"
49
 
50
- #: classes/class-flexible-shipping-plugin.php:540
51
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:134
52
  msgid "Support"
53
  msgstr "Wsparcie"
54
 
55
- #: classes/class-flexible-shipping-plugin.php:547
56
  msgid "Upgrade"
57
  msgstr "Kup PRO"
58
 
@@ -68,2313 +69,2009 @@ msgstr "Protokół nadania %s, %s"
68
  msgid "Shipment for order %s, %s"
69
  msgstr "Przesyłka do zamówienia %s, %s"
70
 
71
- #: classes/table-rate/abtests/class-pointer-messages.php:53
72
- msgid "Watch how to use Flexible Shipping"
73
- msgstr "Obejrzyj konfigurację Flexible Shipping"
74
 
75
- #: classes/table-rate/abtests/class-pointer-messages.php:71
76
- msgid "How to start with Flexible Shipping"
77
- msgstr "Jak zacząć z Flexible Shipping?"
78
 
79
- #: classes/table-rate/abtests/views/html-pointer-message-fs-text.php:7
 
80
  #, php-format
81
- msgid ""
82
- "To add first Flexible Shipping method go to %1$sShipping zones%2$s and add "
83
- "Flexible Shipping to a shipping zone. More info about %3$sshipping methods"
84
- "%4$s."
85
  msgstr ""
86
- "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %1$sStrefy "
87
- "wysyłki%2$s i dodaj Flexible Shipping do strefy wysyłki. Dowiedz się więcej "
88
- "o %3$smetodach wysyłki%4$s."
89
-
90
- #: classes/table-rate/bulk-actions.php:46
91
- msgid "New"
92
- msgstr "Nowa"
93
-
94
- #: classes/table-rate/bulk-actions.php:47
95
- #: classes/table-rate/bulk-actions.php:198
96
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:55
97
- msgid "Created"
98
- msgstr "Utworzona"
99
-
100
- #: classes/table-rate/bulk-actions.php:48
101
- #: classes/table-rate/bulk-actions.php:199
102
- msgid "Confirmed"
103
- msgstr "Zatwierdzona"
104
-
105
- #: classes/table-rate/bulk-actions.php:49
106
- msgid "Manifest"
107
- msgstr "Protokół nadania"
108
-
109
- #: classes/table-rate/bulk-actions.php:50
110
- msgid "Failed"
111
- msgstr "Błąd"
112
-
113
- #: classes/table-rate/bulk-actions.php:196
114
- #: classes/table-rate/bulk-actions.php:226
115
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:74
116
- msgid "Error"
117
- msgstr "Błąd"
118
-
119
- #: classes/table-rate/bulk-actions.php:197
120
- msgid "New shipment"
121
- msgstr "Nowa"
122
-
123
- #: classes/table-rate/bulk-actions.php:200
124
- msgid "Manifest created"
125
- msgstr "Protokół nadania utworzony"
126
-
127
- #: classes/table-rate/bulk-actions.php:255
128
- #: classes/table-rate/bulk-actions.php:261
129
- msgid "Shipping"
130
- msgstr "Wysyłka"
131
-
132
- #: classes/table-rate/bulk-actions.php:269
133
- msgid "Send shipment"
134
- msgstr "Nadaj przesyłkę"
135
-
136
- #: classes/table-rate/bulk-actions.php:270
137
- msgid "Get labels"
138
- msgstr "Pobierz etykiety nadawcze"
139
 
140
- #: classes/table-rate/bulk-actions.php:272
141
- msgid "Create shipping manifest"
142
- msgstr "Utwórz protokół nadania"
 
 
 
 
143
 
144
- #: classes/table-rate/bulk-actions.php:294
145
- msgid "Shipment created."
146
- msgstr "Przesyłka utworzona."
 
147
 
148
- #: classes/table-rate/bulk-actions.php:306
149
- msgid "No action performed."
150
- msgstr "Nie wykonano żadnych działań."
151
 
152
- #: classes/table-rate/bulk-actions.php:326
153
- msgid "Label downloaded."
154
- msgstr "Etykieta została pobrana."
 
155
 
156
- #: classes/table-rate/bulk-actions.php:347
 
157
  msgid ""
158
- "Unable to create temporary zip archive for labels. Check temporary folder "
159
- "configuration on server."
160
  msgstr ""
161
- "Nie można utworzyć tymczasowego archiwum zip dla etykiet. Sprawdź "
162
- "konfigurację folderu na serwerze."
163
 
164
- #: classes/table-rate/bulk-actions.php:411
165
  #, php-format
166
  msgid ""
167
- "Created manifest: %s (%s). If download not start automatically click %shere"
168
- "%s."
169
  msgstr ""
170
- "Utworzone protokoły nadania: %s (%s). Jeśli pobieranie nie rozpoczęło się "
171
- "automatycznie kliknij %stutaj%s."
172
 
173
- #: classes/table-rate/bulk-actions.php:423
174
  #, php-format
175
- msgid "Manifest creation error: %s (%s)."
176
- msgstr "Błąd podczas tworzenia protokołu nadania: %s (%s)."
177
-
178
- #: classes/table-rate/bulk-actions.php:434
179
- msgid "No manifests created."
180
- msgstr "Nie zostały utworzone protokoły nadania."
181
 
182
- #: classes/table-rate/bulk-actions.php:448
183
  #, php-format
184
- msgid "Bulk send shipment - processed orders: %d"
185
- msgstr "Masowe nadawanie przesyłek - przetworzone zamówienia: %d"
 
 
 
 
186
 
187
- #: classes/table-rate/bulk-actions.php:456
188
  #, php-format
189
- msgid "Bulk labels - processed orders: %d. No labels for processed orders."
 
 
190
  msgstr ""
191
- "Masowe pobieranie etykiet - przetworzone zamówienia: %d. Brak etykiet dla "
192
- "przetworzonych zamówień."
193
 
194
- #: classes/table-rate/bulk-actions.php:475
195
  #, php-format
196
  msgid ""
197
- "Bulk labels - processed orders: %d. If download not start automatically "
198
- "click %shere%s."
199
  msgstr ""
200
- "Masowe pobieranie etykiet - przetworzone zamówienia: %d. Jeśli pobieranie "
201
- "nie rozpoczęło się automatycznie kliknij %stutaj%s ."
202
 
203
- #: classes/table-rate/bulk-actions.php:485
204
  #, php-format
205
- msgid "Bulk shipping manifest - processed orders: %d"
206
- msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
207
-
208
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:131
209
  msgid ""
210
- "Sorry, there has been an error. The CSV is invalid or incorrect file type."
 
211
  msgstr ""
212
- "Przepraszamy, wystąpił błąd. Plik CSV jest niepoprawny lub typ pliku jest "
213
- "nieprawidłowy."
214
-
215
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:140
216
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:143
217
- msgid "import"
218
- msgstr "import"
219
 
220
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:162
221
  #, php-format
222
- msgid "Free Shipping value %1$s is not valid number. Row number %2$d."
223
- msgstr "Wartość darmowej wysyłki %1$s jest niepoprawna. Numer wiersza %2$d."
 
 
224
 
225
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:180
226
  #, php-format
227
- msgid "Maximum Cost value %1$s is not valid number. Row number %2$d."
228
- msgstr "Maksymalny koszt %1$s jest niepoprawny. Numer wiersza %2$d."
229
 
230
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:195
231
- #, php-format
232
- msgid "Invalid value for Calculation Method in row number %d."
233
- msgstr "Nieprawidłowa wartość dla Metody obliczania w wierszu %d."
 
234
 
235
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:227
236
- #, php-format
237
- msgid "%1$s value %2$s is not valid number. Row number %3$d."
238
- msgstr "%1$s wartość %2$s jest niepoprawna. Numer wiersza %3$d."
239
 
240
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:269
241
- #, php-format
242
- msgid "Error while creating shipping class: %1$s, %2$s"
243
- msgstr "Błąd podczas tworzenia klasy wysyłkowej: %1$s, %2$s"
244
 
245
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:328
246
- #, php-format
247
- msgid "Invalid value for Based On in row number %d."
248
- msgstr "Nieprawidłowa wartość dla Oparte na w wierszu %d."
249
 
250
- #: classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php:402
251
- #, php-format
252
- msgid "Shipping method %1$s imported as %2$s."
253
- msgstr "Metoda wysyłki %1$s została zaimportowana jako %2$s."
 
254
 
255
- #: classes/table-rate/functions.php:67 inc/functions.php:67
256
- #, php-format
257
- msgid "Redirecting. If page not redirects click %s here %s."
258
  msgstr ""
259
- "Przekierowywanie. Jeśli strona nie przekierowuje cię automatycznie, kliknij "
260
- "%s tu %s."
261
-
262
- #: classes/table-rate/logger/class-saas-logger-downloader.php:57
263
- msgid "File not exists!"
264
- msgstr "Plik nie istnieje!"
265
 
266
- #: classes/table-rate/logger/class-saas-logger-downloader.php:60
267
- msgid "Insufficient privileges!"
268
- msgstr "Niewystarczające uprawnienia!"
269
 
270
- #: classes/table-rate/logger/class-saas-logger-settings.php:95
271
- msgid "Enable Debug Mode"
272
- msgstr "Włącz tryb debug"
273
 
274
- #: classes/table-rate/logger/class-saas-logger-settings.php:96
275
- msgid "Debug mode"
 
 
276
  msgstr "Tryb debug"
277
 
278
- #: classes/table-rate/logger/class-saas-logger-settings.php:103
279
  #, php-format
280
- msgid "%1$sDownload debug.log file%2$s"
281
- msgstr "%1$sPobierz plik debug.log%2$s"
282
 
283
- #: classes/table-rate/multilingual.php:44
284
- #: classes/table-rate/multilingual.php:47
285
- #: classes/table-rate/multilingual.php:50
286
- #: classes/table-rate/settings/flexible-shipping.php:16
287
- #: classes/table-rate/settings/flexible-shipping.php:30
288
- #: classes/table-rate/settings/shipping-method-form.php:79
289
- #: classes/table-rate/shipping-method.php:34
290
- #: classes/table-rate/shipping-method.php:35
291
- #: classes/table-rate/shipping-method.php:53
292
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:87
293
- msgid "Flexible Shipping"
294
- msgstr "Flexible Shipping"
295
 
296
- #: classes/table-rate/settings/flexible-shipping.php:18
297
  #, php-format
298
- msgid "See how to %sconfigure Flexible Shipping%s."
299
- msgstr "Zobacz jak %sskonfigurować Flexible Shipping%s."
 
300
 
301
- #: classes/table-rate/settings/flexible-shipping.php:21
302
- #: classes/table-rate/settings/shipping-method-form.php:70
303
- #: classes/table-rate/shipping-method.php:44
304
- msgid "Enable/Disable"
305
- msgstr "Włącz/Wyłącz"
306
 
307
- #: classes/table-rate/settings/flexible-shipping.php:23
308
- msgid "Enable Flexible Shipping"
309
- msgstr "Włącz Flexible Shipping"
 
 
 
310
 
311
- #: classes/table-rate/settings/flexible-shipping.php:27
312
- msgid "Shipping title"
313
- msgstr "Tytuł"
 
 
 
314
 
315
- #: classes/table-rate/settings/flexible-shipping.php:29
316
- msgid "Visible only to admin in WooCommerce settings."
317
- msgstr "Widoczny tylko dla admina w ustawieniach WooCommerce."
318
 
319
- #: classes/table-rate/settings/flexible-shipping.php:34
320
- msgid "Tax Status"
321
- msgstr "Status podatku"
 
322
 
323
- #: classes/table-rate/settings/flexible-shipping.php:39
324
- msgid "Taxable"
325
- msgstr "Opodatkowany"
 
 
326
 
327
- #: classes/table-rate/settings/flexible-shipping.php:40
328
- msgctxt "Tax status"
329
- msgid "None"
330
- msgstr "Brak"
331
 
332
- #: classes/table-rate/settings/flexible-shipping.php:44
333
- #: classes/table-rate/settings/flexible-shipping.php:49
334
- msgid "Shipping Methods"
335
- msgstr "Metody wysyłki"
336
 
337
- #: classes/table-rate/settings/shipping-method-form.php:10
338
- msgid "Select shipment class"
339
- msgstr "Wybierz klasę wysyłkową"
 
340
 
341
- #: classes/table-rate/settings/shipping-method-form.php:25
342
- msgid ""
343
- "Integrate with DPD, DHL, InPost, eNadawca Poczta Polska, Paczka w Ruchu."
344
- msgstr "Zintegruj z DPD, DHL, InPost, eNadawca Poczta Polska, Paczka w Ruchu."
345
 
346
- #: classes/table-rate/settings/shipping-method-form.php:25
347
  #, php-format
348
- msgid "%sAdd integrations%s"
349
- msgstr "%sDodaj integracje%s"
350
 
351
- #: classes/table-rate/settings/shipping-method-form.php:28
352
- msgid "Integrate with DPD."
353
- msgstr "Zintegruj z DPD."
354
 
355
- #: classes/table-rate/settings/shipping-method-form.php:28
356
- #, php-format
357
- msgid "%sAdd integration%s"
358
- msgstr "%sDodaj integrację%s"
359
 
360
- #: classes/table-rate/settings/shipping-method-form.php:34
361
  #, php-format
362
- msgid ""
363
- "Ship your orders faster with %1$sFlexible Shipping Connect%2$s%3$s%4$sSign "
364
- "up now!%5$s"
365
- msgstr ""
366
- "Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
367
- "%4$sZarejestruj się teraz!%5$s"
368
-
369
- #: classes/table-rate/settings/shipping-method-form.php:54
370
- #: classes/table-rate/shipping-method.php:759
371
- msgid "Free"
372
- msgstr "Bezpłatnie"
373
 
374
- #: classes/table-rate/settings/shipping-method-form.php:73
375
- #: classes/table-rate/shipping-method.php:46
376
- msgid "Enable this shipment method"
377
- msgstr "Włącz metodę wysyłki"
378
 
379
- #: classes/table-rate/settings/shipping-method-form.php:76
380
- msgid "Method Title"
381
- msgstr "Tytuł metody"
 
382
 
383
- #: classes/table-rate/settings/shipping-method-form.php:78
384
- #: classes/table-rate/shipping-method.php:52
385
- msgid "This controls the title which the user sees during checkout."
386
- msgstr "Tytuł, który widzi użytkownik podczas składania zamówienia."
387
 
388
- #: classes/table-rate/settings/shipping-method-form.php:85
389
- msgid "Method Description"
390
- msgstr "Opis"
391
 
392
- #: classes/table-rate/settings/shipping-method-form.php:87
393
- msgid "This controls method description which the user sees during checkout."
394
- msgstr "Opis, który widzi użytkownik podczas składania zamówienia."
395
 
396
- #: classes/table-rate/settings/shipping-method-form.php:98
397
- msgid "Free Shipping"
398
- msgstr "Darmowa wysyłka"
399
 
400
- #: classes/table-rate/settings/shipping-method-form.php:101
401
- msgid ""
402
- "Enter a minimum order amount for free shipment. This will override the costs "
403
- "configured below."
404
- msgstr ""
405
- "Wpisz minimalną kwotę zamówienia dla bezpłatnej wysyłki. Spowoduje to "
406
- "zastąpienie reguł skonfigurowanych poniżej."
407
 
408
- #: classes/table-rate/settings/shipping-method-form.php:105
409
- msgid "Free Shipping Label"
410
- msgstr "Etykieta darmowej wysyłki"
411
 
412
- #: classes/table-rate/settings/shipping-method-form.php:108
413
- msgid "Enter additional label for shipment when free shipment available."
414
- msgstr ""
415
- "Wpisz dodatkową etykietę, która zostanie wyświetlona dla darmowej wysyłki."
416
 
417
- #: classes/table-rate/settings/shipping-method-form.php:117
418
- msgid "Rules Calculation"
419
- msgstr "Kalkulacja reguł"
 
420
 
421
- #: classes/table-rate/settings/shipping-method-form.php:119
422
- msgid ""
423
- "Select how rules will be calculated. If you choose \"sum\" the rules order "
424
- "is important."
425
- msgstr ""
426
- "Wybierz jak będą obliczane reguły. Dla sumy, kolejność reguł ma znaczenie."
427
 
428
- #: classes/table-rate/settings/shipping-method-form.php:122
429
- msgid "Sum"
430
- msgstr "Suma"
431
 
432
- #: classes/table-rate/settings/shipping-method-form.php:125
433
- #: classes/table-rate/views/html-shipping-method-settings.php:13
434
- msgid "Visibility"
435
- msgstr "Wyświetlanie"
436
 
437
- #: classes/table-rate/settings/shipping-method-form.php:128
438
- #: classes/table-rate/views/html-shipping-method-settings.php:46
439
- msgid "Show only for logged in users"
440
- msgstr "Pokaż tylko dla zalogowanych użytkowników"
441
 
442
- #: classes/table-rate/settings/shipping-method-form.php:131
443
- #: classes/table-rate/views/html-shipping-method-settings.php:14
444
- msgid "Default"
445
- msgstr "Domyślnie"
446
 
447
- #: classes/table-rate/settings/shipping-method-form.php:134
448
- msgid ""
449
- "Check the box to set this option as the default selected choice on the cart "
450
- "page."
451
  msgstr ""
452
- "Zaznacz, aby ustawić tę metodę wysyłki jako domyślną przy składaniu "
453
- "zamówienia."
454
-
455
- #: classes/table-rate/settings/shipping-method-form.php:137
456
- #: classes/table-rate/views/html-orders-filter-form.php:5
457
- #: classes/table-rate/views/html-shipping-method-settings.php:15
458
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:161
459
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/filter-form.php:5
460
- msgid "Integration"
461
- msgstr "Integracja"
462
 
463
- #: classes/table-rate/settings/shipping-method-form.php:139
464
- msgid "Select integration. "
465
- msgstr "Wybierz integrację. "
466
 
467
- #: classes/table-rate/settings/shipping-method-form.php:142
468
- #: classes/table-rate/views/html-shipping-method-rules.php:7
469
- msgid "None"
470
- msgstr "Brak"
471
 
472
- #: classes/table-rate/settings/shipping-method-form.php:153
473
- msgid "Rules"
474
- msgstr "Reguły"
475
 
476
- #: classes/table-rate/settings/shipping-method-form.php:174
477
- msgid "Shipping Zone"
478
- msgstr "Strefa wysyłki"
479
 
480
- #: classes/table-rate/settings/shipping-method-form.php:188
481
  #, php-format
482
- msgid "See how to %sconfigure shipment methods%s."
483
- msgstr "Zobacz jak %sskonfigurować metody wysyłki %s."
 
 
 
 
484
 
485
- #: classes/table-rate/shipping-method.php:50
486
- msgid "Shipping Title"
487
- msgstr "Tytuł"
 
488
 
489
- #: classes/table-rate/shipping-method.php:122
490
- #: classes/table-rate/views/html-shipping-method-rules.php:240
491
- msgid "Add New"
492
- msgstr "Dodaj nową"
493
 
494
- #: classes/table-rate/shipping-method.php:401
495
- msgid "New Shipping Method"
496
- msgstr "Nowa metoda wysyłki"
497
 
498
- #: classes/table-rate/shipping-method.php:404
499
- msgid "Edit Shipping Method"
500
- msgstr "Edytuj metodę wysyłki"
501
 
502
- #: classes/table-rate/shipping-method.php:414
503
- #: classes/table-rate/shipping-method.php:456
504
  #, php-format
505
- msgid "Shipping method %s added."
506
- msgstr "Metoda wysyłki dodana: %s."
 
 
 
507
 
508
- #: classes/table-rate/shipping-method.php:439
509
- #, php-format
510
- msgid "Shipping method %s deleted."
511
- msgstr "Metoda wysyłki usunięta: %s."
512
 
513
- #: classes/table-rate/shipping-method.php:442
514
- msgid "Shipping method not found."
515
- msgstr "Metoda wysyłki nie znaleziona."
516
 
517
- #: classes/table-rate/shipping-method.php:468
518
- #, php-format
519
- msgid "Shipping method %s updated."
520
- msgstr "Metoda wysyłki zaktualizowana: %s."
521
 
522
- #: classes/table-rate/views/html-ads.php:4
523
- msgid "Get Flexible Shipping PRO!"
524
- msgstr "Kup Flexible Shipping PRO!"
525
-
526
- #: classes/table-rate/views/html-ads.php:13
527
- msgid "Shipping Classes support"
528
- msgstr "Wsparcie klas wysyłkowych"
529
-
530
- #: classes/table-rate/views/html-ads.php:14
531
- msgid "Product count based costs"
532
- msgstr "Koszty oparte o liczbę produktów w koszyku"
533
-
534
- #: classes/table-rate/views/html-ads.php:15
535
- msgid "Stopping, Cancelling a rule"
536
- msgstr "Zatrzymywanie, anulowanie reguł"
537
-
538
- #: classes/table-rate/views/html-ads.php:16
539
- msgid "Additional calculation methods"
540
- msgstr "Dodatkowe rodzaje obliczania kosztów"
541
 
542
- #: classes/table-rate/views/html-ads.php:19
543
- msgid "Upgrade Now &rarr;"
544
- msgstr "Zaktualizuj do wersji PRO &rarr;"
 
 
 
 
545
 
546
- #: classes/table-rate/views/html-column-shipping-shipping.php:11
547
- msgid "Get label for: "
548
- msgstr "Pobierz etykietę dla "
 
 
 
 
 
 
549
 
550
- #: classes/table-rate/views/html-column-shipping-shipping.php:14
551
- msgid "Track shipment for: "
552
- msgstr "Śledź przesyłkę "
553
 
554
- #: classes/table-rate/views/html-custom-services.php:14
555
- msgid "Code"
556
- msgstr "Kod"
 
 
 
 
 
 
557
 
558
- #: classes/table-rate/views/html-custom-services.php:15
559
- msgid "Name"
560
- msgstr "Nazwa"
 
561
 
562
- #: classes/table-rate/views/html-custom-services.php:17
563
- #: classes/table-rate/views/html-shipping-method-settings.php:12
564
- msgid "Enabled"
565
- msgstr "Włączona"
 
 
 
 
 
566
 
567
- #: classes/table-rate/views/html-custom-services.php:37
568
  msgid ""
569
- "Drag and drop the services to control their display order. Confirm by "
570
- "clicking Save changes button below."
571
  msgstr ""
572
- "Przeciągnij i upuść usługę, aby zmienić kolejność wyświetlania. Zatwierdź "
573
- "zmiany klikając Zapisz zmiany poniżej."
574
 
575
- #: classes/table-rate/views/html-orders-filter-form.php:4
576
- #: classes/table-rate/views/html-orders-filter-form.php:12
577
- msgid "All shippings"
578
- msgstr "Wszystkie przesyłki"
 
 
 
 
579
 
580
- #: classes/table-rate/views/html-orders-filter-form.php:13
581
- msgid "Shipment status"
582
- msgstr "Status przesyłki"
 
 
 
 
 
 
 
583
 
584
- #: classes/table-rate/views/html-shipping-method-rules.php:8
585
- msgid "Price"
586
- msgstr "Cena"
587
 
588
- #: classes/table-rate/views/html-shipping-method-rules.php:9
589
- msgid "Weight"
590
- msgstr "Waga"
591
 
592
- #: classes/table-rate/views/html-shipping-method-rules.php:61
593
  #, php-format
594
- msgid ""
595
- "Check %sFlexible Shipping PRO &rarr;%s to add advanced rules based on "
596
- "shipment classes, product/item count or additional handling fees/insurance."
597
- msgstr ""
598
- "Sprawdź %sFlexible Shipping PRO &rarr;%s, aby dodawać zaawansowane reguły "
599
- "oparte o klasy wysyłkowe, liczbę produktów/pozycji lub naliczać dodatkowe "
600
- "koszty obsługi/ubezpieczenia."
601
 
602
- #: classes/table-rate/views/html-shipping-method-rules.php:72
603
- msgid "Based on"
604
- msgstr "Oparte na"
 
605
 
606
- #: classes/table-rate/views/html-shipping-method-rules.php:73
607
- msgid "Shipping cost will be calculated based on the selected parameter."
608
- msgstr "Koszty wysyłki będą obliczane w oparciu o wybrany parametr."
 
609
 
610
- #: classes/table-rate/views/html-shipping-method-rules.php:76
611
- msgid "Min"
612
- msgstr "Min"
 
613
 
614
- #: classes/table-rate/views/html-shipping-method-rules.php:77
615
- msgid ""
616
- "Enter minimum value for the &quot;Based on&quot; parameter. Value based on "
617
- "the price will be calculated by WooCommerce tax settings &quot;Display "
618
- "prices during cart and checkout&quot;"
619
  msgstr ""
620
- "Wpisz minimalną wartość dla parametru &quot;Oparte na&quot;. Wartość oparta "
621
- "na cenie zostanie obliczona wg. ustawienia podatków WooCommerce &quot;"
622
- "Wyświetlanie cen w koszyku i zamówieniu&quot;"
623
 
624
- #: classes/table-rate/views/html-shipping-method-rules.php:80
625
- msgid "Max"
626
- msgstr "Maks"
 
 
 
 
 
627
 
628
- #: classes/table-rate/views/html-shipping-method-rules.php:81
 
629
  msgid ""
630
- "Enter maximum value for the &quot;Based on&quot; parameter. Value based on "
631
- "the price will be calculated by WooCommerce tax settings &quot;Display "
632
- "prices during cart and checkout&quot;"
633
  msgstr ""
634
- "Wpisz maksymalną wartość dla parametru &quot;Oparte na&quot;. Wartość oparta "
635
- "na cenie zostanie obliczona wg. ustawienia podatków WooCommerce &quot;"
636
- "Wyświetlanie cen w koszyku i zamówieniu&quot;"
637
-
638
- #: classes/table-rate/views/html-shipping-method-rules.php:84
639
- msgid "Cost per<br/>order"
640
- msgstr "Koszt na<br/>zamówienie"
641
 
642
- #: classes/table-rate/views/html-shipping-method-rules.php:85
643
- msgid "Enter shipment cost for this rule."
644
- msgstr "Wpisz koszt wysyłki dla tej reguły."
 
645
 
646
- #: classes/table-rate/views/html-shipping-method-rules.php:160
647
- msgid "Insert rule"
648
- msgstr "Dodaj regułę"
 
649
 
650
- #: classes/table-rate/views/html-shipping-method-rules.php:161
651
- msgid "Delete selected rules"
652
- msgstr "Usuń wybrane reguły"
 
 
 
 
 
 
 
 
 
653
 
654
- #: classes/table-rate/views/html-shipping-method-rules.php:211
655
- msgid "No rows selected."
656
- msgstr "Nie wybrano wierszy."
657
 
658
- #: classes/table-rate/views/html-shipping-method-rules.php:216
659
- msgid "Are you sure?"
660
- msgstr "Na pewno?"
 
 
 
 
661
 
662
- #: classes/table-rate/views/html-shipping-method-rules.php:231
663
- #: classes/table-rate/views/html-shipping-method-settings.php:106
664
- msgid "Shipping Zones"
665
- msgstr "Strefy wysyłki"
666
 
667
- #: classes/table-rate/views/html-shipping-method-settings.php:11
668
- msgid "Title"
669
- msgstr "Tytuł"
 
670
 
671
- #: classes/table-rate/views/html-shipping-method-settings.php:16
672
- msgid "Select all"
673
- msgstr "Zaznacz wszystkie"
674
 
675
- #: classes/table-rate/views/html-shipping-method-settings.php:39
676
- #: classes/table-rate/views/html-shipping-method-settings.php:46
677
- #: classes/table-rate/views/html-shipping-method-settings.php:53
678
- msgid "yes"
679
- msgstr "tak"
680
 
681
- #: classes/table-rate/views/html-shipping-method-settings.php:48
682
- msgid "Show for all users"
683
- msgstr "Pokaż dla wszystkich użytkowników"
684
 
685
- #: classes/table-rate/views/html-shipping-method-settings.php:69
686
  msgid ""
687
- "Drag and drop the above shipment methods to control their display order. "
688
- "Confirm by clicking Save changes button below."
689
  msgstr ""
690
- "Przeciągnij i upuść metody wysyłki, aby ustawić ich kolejność wyświetlania. "
691
- "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
692
 
693
- #: classes/table-rate/views/html-shipping-method-settings.php:74
694
- msgid "Remove selected"
695
- msgstr "Usuń zaznaczone"
696
 
697
- #: classes/table-rate/views/html-shipping-method-settings.php:78
698
- msgid "Cancel import"
699
- msgstr "Anuluj import"
700
 
701
- #: classes/table-rate/views/html-shipping-method-settings.php:79
702
- #: classes/table-rate/views/html-shipping-method-settings.php:80
703
- msgid "Import"
704
- msgstr "Importuj"
705
 
706
- #: classes/table-rate/views/html-shipping-method-settings.php:155
707
- msgid "Please select shipment methods to remove"
708
- msgstr "Proszę wybrać metody wysyłki do usunięcia"
709
 
710
- #: classes/table-rate/views/html-shipping-method-settings.php:187
711
- msgid "Select file to import"
712
- msgstr "Wybierz plik do importu"
 
 
713
 
714
- #: classes/tracker/tracker.php:221
715
- msgid "Opt-in"
716
- msgstr "Opt-in"
717
-
718
- #: classes/tracker/tracker.php:224
719
- msgid "Opt-out"
720
- msgstr "Opt-out"
721
-
722
- #: templates/email/after_order_table.php:12
723
- #: templates/myaccount/after_order_table.php:12
724
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:7
725
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:47
726
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:51
727
- msgid "Shipment"
728
- msgstr "Przesyłka"
729
-
730
- #: templates/email/after_order_table.php:15
731
- #: templates/myaccount/after_order_table.php:15
732
- msgid "Track shipment: "
733
- msgstr "Śledź przesyłkę: "
734
-
735
- #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:65
736
- msgid "Test"
737
- msgstr "Test"
738
-
739
- #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:75
740
- #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:77
741
- msgid "Input"
742
- msgstr "Input"
743
 
744
- #: vendor/lucatume/wp-browser/src/data/plugins/internationalized-plugin.php:11
745
- msgid "This is a dummy plugin"
746
- msgstr ""
 
747
 
748
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:42
749
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:72
750
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:80
751
- msgid "There was an error when reading this WXR file"
752
- msgstr ""
753
 
754
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:43
755
- msgid ""
756
- "Details are shown above. The importer will now try again with a different "
757
- "parser..."
758
- msgstr ""
759
 
760
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:84
761
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:89
762
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:306
763
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:495
764
  msgid ""
765
- "This does not appear to be a WXR file, missing/invalid WXR version number"
 
 
766
  msgstr ""
 
 
 
767
 
768
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:132
769
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:141
770
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:192
771
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:196
772
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:205
773
- msgid "Sorry, there has been an error."
774
- msgstr ""
775
 
776
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:133
777
- msgid "The file does not exist, please try again."
778
- msgstr ""
779
 
780
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:176
781
- msgid "All done."
782
- msgstr ""
783
 
784
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:176
785
- msgid "Have fun!"
786
- msgstr ""
787
 
788
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:177
789
- msgid "Remember to update the passwords and roles of imported users."
790
- msgstr ""
791
 
792
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:197
793
- #, php-format
794
  msgid ""
795
- "The export file could not be found at <code>%s</code>. It is likely that "
796
- "this was caused by a permissions problem."
797
  msgstr ""
 
 
798
 
799
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:213
800
  #, php-format
801
- msgid ""
802
- "This WXR file (version %s) may not be supported by this version of the "
803
- "importer. Please consider updating."
804
- msgstr ""
805
 
806
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:238
807
  #, php-format
808
- msgid ""
809
- "Failed to import author %s. Their posts will be attributed to the current "
810
- "user."
811
- msgstr ""
812
 
813
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:264
814
- msgid "Assign Authors"
815
- msgstr ""
816
 
817
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:265
818
- msgid ""
819
- "To make it easier for you to edit and save the imported content, you may "
820
- "want to reassign the author of the imported item to an existing user of this "
821
- "site. For example, you may want to import all the entries as <code>admin</"
822
- "code>s entries."
823
- msgstr ""
824
 
825
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:267
826
- #, php-format
827
  msgid ""
828
- "If a new user is created by WordPress, a new password will be randomly "
829
- "generated and the new user&#8217;s role will be set as %s. Manually changing "
830
- "the new user&#8217;s details will be necessary."
831
- msgstr ""
832
-
833
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:277
834
- #, fuzzy
835
- #| msgid "Attachments"
836
- msgid "Import Attachments"
837
- msgstr "Załączniki"
838
-
839
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:280
840
- msgid "Download and import file attachments"
841
- msgstr ""
842
-
843
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:284
844
- msgid "Submit"
845
- msgstr ""
846
-
847
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:297
848
- #, fuzzy
849
- #| msgid "Import"
850
- msgid "Import author:"
851
- msgstr "Importuj"
852
-
853
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:308
854
- msgid "or create new user with login name:"
855
- msgstr ""
856
-
857
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:311
858
- msgid "as a new user:"
859
- msgstr ""
860
-
861
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:319
862
- msgid "assign posts to an existing user:"
863
- msgstr ""
864
-
865
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:321
866
- msgid "or assign posts to an existing user:"
867
  msgstr ""
 
868
 
869
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:322
870
- #, fuzzy
871
- #| msgid "Select"
872
- msgid "- Select -"
873
- msgstr "Wybierz"
874
 
875
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:372
876
  #, php-format
877
  msgid ""
878
- "Failed to create new user for %s. Their posts will be attributed to the "
879
- "current user."
 
880
  msgstr ""
 
 
 
881
 
882
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:424
883
  #, php-format
884
- msgid "Failed to import category %s"
 
 
 
885
  msgstr ""
 
 
 
886
 
887
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:467
888
  #, php-format
889
- msgid "Failed to import post tag %s"
 
 
890
  msgstr ""
 
 
891
 
892
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:516
893
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:738
894
- #, fuzzy, php-format
895
- #| msgid "Select file to import"
896
- msgid "Failed to import %s %s"
897
- msgstr "Wybierz plik do importu"
898
-
899
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:605
900
  #, php-format
901
- msgid "Failed to import &#8220;%s&#8221;: Invalid post type %s"
 
 
 
902
  msgstr ""
 
 
 
903
 
904
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:642
905
  #, php-format
906
- msgid "%s &#8220;%s&#8221; already exists."
907
- msgstr ""
908
 
909
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:704
910
- #, php-format
911
- msgid "Failed to import %s &#8220;%s&#8221;"
912
- msgstr ""
 
 
913
 
914
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:869
915
- msgid "Menu item skipped due to missing menu slug"
916
- msgstr ""
917
 
918
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:876
919
- #, php-format
920
- msgid "Menu item skipped due to invalid menu slug: %s"
921
- msgstr ""
922
 
923
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:939
924
- msgid "Fetching attachments is not enabled"
925
- msgstr ""
926
 
927
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:952
928
- msgid "Invalid file type"
929
- msgstr ""
930
 
931
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:996
932
- msgid "Remote server did not respond"
933
- msgstr ""
934
 
935
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1002
936
- #, php-format
937
- msgid "Remote server returned error response %1$d %2$s"
938
- msgstr ""
939
 
940
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1009
941
- msgid "Remote file is incorrect size"
 
 
942
  msgstr ""
 
 
943
 
944
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1014
945
- #, fuzzy
946
- #| msgid "Label downloaded."
947
- msgid "Zero size file downloaded"
948
- msgstr "Etykieta została pobrana."
 
949
 
950
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1020
951
- #, php-format
952
- msgid "Remote file is too large, limit is %s"
 
 
953
  msgstr ""
 
 
954
 
955
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1119
956
- msgid "Import WordPress"
957
- msgstr ""
 
 
 
958
 
959
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1126
960
- #, php-format
961
  msgid ""
962
- "A new version of this importer is available. Please update to version %s to "
963
- "ensure compatibility with newer export files."
964
  msgstr ""
 
 
 
 
 
 
 
 
 
965
 
966
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1141
 
967
  msgid ""
968
- "Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;ll import "
969
- "the posts, pages, comments, custom fields, categories, and tags into this "
970
- "site."
971
  msgstr ""
 
 
 
972
 
973
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1142
974
- msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
975
- msgstr ""
 
976
 
977
- #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1216
978
  msgid ""
979
- "Import <strong>posts, pages, comments, custom fields, categories, and tags</"
980
- "strong> from a WordPress export file."
981
- msgstr ""
982
-
983
- #: vendor/lucatume/wp-browser/src/data/themedir1/internationalized-theme/functions.php:7
984
- msgid "This is a dummy theme"
985
- msgstr ""
986
-
987
- #: vendor/wp-cli/core-command/src/Core_Command.php:441
988
- #: vendor/wp-cli/core-command/src/Core_Command.php:515
989
- #, php-format
990
- msgctxt "Default network name"
991
- msgid "%s Sites"
992
  msgstr ""
 
 
993
 
994
- #: vendor/wp-cli/core-command/src/Core_Command.php:673
995
- msgid "Wildcard DNS may not be configured correctly."
996
- msgstr ""
 
 
 
997
 
998
- #: vendor/wp-cli/entity-command/src/Site_Command.php:125
999
- msgid "Uncategorized"
 
 
 
1000
  msgstr ""
 
 
1001
 
1002
- #: vendor/wp-cli/entity-command/src/Site_Command.php:128
1003
- msgctxt "Default category slug"
1004
- msgid "Uncategorized"
1005
- msgstr ""
1006
 
1007
- #: vendor/wp-cli/export-command/src/WP_Export_File_Writer.php:32
1008
- #: vendor/wp-cli/export-command/src/WP_Export_Split_Files_Writer.php:51
1009
- msgid "WP Export: error writing to export file."
1010
- msgstr ""
1011
 
1012
- #: vendor/wp-cli/export-command/src/WP_Export_XML_Over_HTTP.php:20
1013
- #: vendor/wp-cli/export-command/src/WP_Export_XML_Over_HTTP.php:25
1014
- msgid "Export Error"
1015
- msgstr ""
1016
 
1017
- #: vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php:639
1018
- msgid " Try again"
 
 
1019
  msgstr ""
 
 
1020
 
1021
- #: vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php:645
1022
- msgid "API error. Try Again."
 
 
 
1023
  msgstr ""
 
 
1024
 
1025
- #: vendor/wp-cli/media-command/src/Media_Command.php:145
1026
- msgid "image"
1027
- msgid_plural "images"
1028
- msgstr[0] ""
1029
- msgstr[1] ""
1030
- msgstr[2] ""
1031
 
1032
- #: vendor/wp-cli/wp-cli/php/utils-wp.php:196
1033
- msgid "Inactive Widgets"
1034
- msgstr ""
1035
 
1036
- #: vendor/wp-cli/wp-cli/php/utils-wp.php:199
1037
  msgid ""
1038
- "Drag widgets here to remove them from the sidebar but keep their settings."
 
1039
  msgstr ""
 
1040
 
1041
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:168
1042
  #, php-format
1043
  msgid ""
1044
- "The &#8220;%s&#8221; plugin cannot run on PHP versions older than %s. Please "
1045
- "contact your host and ask them to upgrade."
1046
  msgstr ""
1047
- "Wtyczka &#8220;%s&#8221; nie może działać w wersjach PHP starszych niż %s. "
1048
- "Skontaktuj się z administratorem hostingu i poproś o aktualizację."
1049
 
1050
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:172
1051
- #, php-format
1052
  msgid ""
1053
- "The &#8220;%s&#8221; plugin cannot run on WordPress versions older than %s. "
1054
- "Please update WordPress."
1055
  msgstr ""
1056
- "Wtyczka &#8220;%s&#8221; nie może działać w wersjach WordPress starszych niż "
1057
- "%s. Prosimy o aktualizację WordPress."
1058
 
1059
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:176
1060
- #, php-format
1061
- msgid ""
1062
- "The &#8220;%s&#8221; plugin cannot run on WooCommerce versions older than "
1063
- "%s. Please update WooCommerce."
 
 
 
1064
  msgstr ""
1065
- "Wtyczka &#8220;%s&#8221; nie może działać w wersjach WooCommerce starszych "
1066
- "niż %s. Prosimy o aktualizację WooCommerce."
1067
 
1068
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:180
1069
- #, php-format
 
 
 
 
 
 
 
 
1070
  msgid ""
1071
- "The &#8220;%s&#8221; plugin cannot run without OpenSSL module version at "
1072
- "least %s. Please update OpenSSL module."
 
1073
  msgstr ""
1074
- "Wtyczka &#8220;%s&#8221; nie może działać bez aktywacji OpenSSL co najmniej "
1075
- "w wersji %s. Zaktualizuj wersję OpenSSL."
 
1076
 
1077
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1078
  #, php-format
1079
  msgid ""
1080
- "The &#8220;%s&#8221; plugin cannot run without %s active. Please install and "
1081
- "activate %s plugin."
1082
  msgstr ""
1083
- "Wtyczka &#8220;%s&#8221; nie może działać bez aktywacji %s. Zainstaluj i "
1084
- "aktywuj wtyczkę %s."
1085
 
1086
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:304
 
 
 
 
 
 
 
 
 
 
 
 
1087
  #, php-format
1088
  msgid ""
1089
- "The &#8220;%s&#8221; plugin cannot run without %s php module installed. "
1090
- "Please contact your host and ask them to install %s."
1091
  msgstr ""
1092
- "Wtyczka &#8220;%s&#8221; nie może działać bez modułu php: %s. Skontaktuj się "
1093
- "z administratorem hostingu i poproś o instalację %s."
1094
 
1095
- #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:332
1096
- #, php-format
1097
- msgid ""
1098
- "The &#8220;%s&#8221; plugin cannot run without %s php setting set to %s. "
1099
- "Please contact your host and ask them to set %s."
 
1100
  msgstr ""
1101
- "Wtyczka &#8220;%s&#8221; nie może działać bez ustawienia php %s ustawionego "
1102
- "na %s. Skontaktuj się z administratorem hostingu i poproś o ustawienie %s."
1103
 
1104
- #: vendor/wpdesk/wp-logs/src/WP/WPCapture.php:25
1105
  #, php-format
1106
  msgid ""
1107
- "Can not enable WP Desk Debug log! Cannot create directory %s or this "
1108
- "directory is not writeable!"
1109
  msgstr ""
 
 
1110
 
1111
- #: vendor/wpdesk/wp-logs/src/WP/WPCapture.php:44
1112
- #, php-format
1113
- msgid "Can not enable WP Desk Debug log! Cannot create file %s!"
1114
- msgstr ""
1115
 
1116
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:70
1117
- #, fuzzy
1118
- #| msgid "Enabled"
1119
- msgid "Disabled"
1120
- msgstr "Włączona"
1121
 
1122
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:71
1123
- msgid "Emergency"
 
 
1124
  msgstr ""
 
 
1125
 
1126
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:72
1127
- msgid "Alert"
1128
- msgstr ""
 
1129
 
1130
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:73
1131
- msgid "Critical"
 
 
 
 
1132
  msgstr ""
 
 
1133
 
1134
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:75
1135
- msgid "Warning"
 
 
 
1136
  msgstr ""
 
 
1137
 
1138
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:76
1139
- msgid "Notice"
1140
- msgstr ""
 
1141
 
1142
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:77
1143
- msgid "Info"
1144
- msgstr ""
 
1145
 
1146
- #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:78
1147
- #, fuzzy
1148
- #| msgid "Debug mode"
1149
- msgid "Debug"
1150
- msgstr "Tryb debug"
1151
 
1152
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:98
1153
- #, php-format
1154
- msgid "%1$s Shipment plan exceeded. %2$sPlease upgrade your plan →%3$s"
1155
- msgstr "%1$s Przekroczono plan FS Connect %2$sProszę zmień swój plan →%3$s"
1156
 
1157
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:124
1158
- msgid "Shipment cannot be saved for this status!"
1159
- msgstr "Przesyłki nie można zapisać w tym statusie!"
 
1160
 
1161
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:131
1162
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:52
1163
- msgid "Saved"
1164
- msgstr "Zapisano"
1165
 
1166
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:152
1167
- #, php-format
1168
- msgid "Shipment created.%1$sFS Connect plan usage: %2$s/%3$s shipments"
1169
- msgstr ""
1170
- "Przesyłka utworzona.%1$sWykorzystanie planu FS Connect: %2$s/%3$s przesyłek"
1171
 
1172
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:193
1173
- msgid "Canceled"
1174
- msgstr "Anulowana"
 
1175
 
1176
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:59
1177
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:124
1178
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:175
1179
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:22
1180
- msgid "Unknown error!"
1181
- msgstr "Nieznany błąd!"
1182
 
1183
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:63
1184
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:128
1185
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:179
1186
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:25
1187
- msgid "Nonce verification error! Invalid request."
1188
- msgstr "Błąd weryfikacji nonce! Nieprawidłowe żądanie."
1189
 
1190
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:74
1191
- msgid "Attachment type not selected!"
1192
- msgstr "Typ załącznika nie został wybrany!"
1193
 
1194
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:76
1195
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:155
1196
- msgid "Attachment not found!"
1197
- msgstr "Załącznik nie został znaleziony!"
 
 
 
 
 
 
 
 
1198
 
1199
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:78
1200
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:136
1201
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:186
1202
- msgid "Shipment not found!"
1203
- msgstr "Przesyłka nie została znaleziona!"
1204
 
1205
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:107
1206
- msgid "Attachment added"
1207
- msgstr "Załącznik został dodany"
1208
 
1209
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:153
1210
- msgid "Attachment deleted"
1211
- msgstr "Załącznik został usunięty"
 
 
1212
 
1213
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:197
1214
  #, php-format
1215
- msgid "Unable to send documents: %1$s"
1216
- msgstr "Nie można wysłać dokumentów: %1$s"
 
 
 
 
 
 
1217
 
1218
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:207
1219
- msgid "Attachments send"
1220
- msgstr "Załączniki zostały wysłane"
 
1221
 
1222
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php:42
1223
  #, php-format
1224
- msgid "%1$s notice"
1225
- msgstr "%1$s komunikat"
1226
 
1227
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php:37
1228
- msgid "Attachments"
1229
- msgstr "Załączniki"
1230
 
1231
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php:191
1232
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:385
1233
- msgid "UPS! Something is wrong!"
1234
- msgstr "UPS! Nie działa poprawnie!"
1235
 
1236
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:253
1237
- #, php-format
1238
- msgid "There was problems on checkout: %1$s"
1239
- msgstr "Pojawił się problem na stronie zamówienia: %1$s"
 
 
1240
 
1241
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:348
1242
- #, php-format
1243
- msgid "%1$s Shipment %2$s was created."
1244
- msgstr "%1$s Przesyłka %2$s została utworzona."
1245
 
1246
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:366
1247
- #, php-format
1248
- msgid "%1$s Shipment %2$s was canceled."
1249
- msgstr "%1$s Przesyłka %2$s została anulowana."
1250
 
1251
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:620
1252
- msgid "Label is not avaliable for this shipment."
1253
- msgstr "Etykieta nie jest dostępna dla tej przesyłki."
1254
 
1255
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:3
1256
- msgid "Create"
1257
- msgstr "Utwórz"
1258
 
1259
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:4
1260
- msgid "Save"
1261
- msgstr "Zapisz"
1262
 
1263
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:11
1264
- msgid "Get Label"
1265
- msgstr "Pobierz etykietę"
1266
 
1267
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:15
1268
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/column-actions.php:2
1269
- #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:77
1270
- msgid "Cancel"
1271
- msgstr "Anuluj"
1272
 
1273
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:22
1274
- msgid "Track:"
1275
- msgstr "Śledź:"
1276
 
1277
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:22
1278
- msgid "Click to track shipment"
1279
- msgstr "Kliknij, aby śledzić przesyłkę"
1280
 
1281
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:27
1282
- #, php-format
1283
- msgid "%1$sShipping charges:%2$s %3$s"
1284
- msgstr "%1$sKoszt przesyłki:%2$s %3$s"
1285
 
1286
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:31
1287
- #, php-format
1288
- msgid "%1$sShipment status:%2$s %3$s"
1289
- msgstr "%1$s Status przesyłki: %2$s %3$s"
 
 
1290
 
1291
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:23
1292
- msgid "Type"
1293
- msgstr "Typ"
1294
 
1295
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:24
1296
- msgid "Filename"
1297
- msgstr "Nazwa pliku"
 
 
 
 
1298
 
1299
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:25
1300
- msgid "Sent"
1301
- msgstr "Wysłany"
1302
 
1303
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:37
1304
- msgid "No"
1305
- msgstr "Nie"
1306
 
1307
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:37
1308
- msgid "Yes"
1309
- msgstr ""
1310
- "T\n"
1311
- "ak"
1312
 
1313
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:46
1314
- msgid "Send"
1315
- msgstr "Wysłany"
1316
 
1317
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:72
1318
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/views/html-order-add_shipping-metabox.php:15
1319
- msgid "Add"
1320
- msgstr "Dodaj"
1321
-
1322
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-single-attachment.php:35
1323
- msgid "Delete"
1324
- msgstr "Usuń"
1325
-
1326
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php:123
1327
- msgid "Select point from map"
1328
- msgstr "Wybierz punkt z mapy"
1329
 
1330
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php:17
1331
- #, php-format
1332
- msgid ""
1333
- "The Connect Key that you entered is invalid. Please enter a valid key. "
1334
- "%1$sGet your Connect Key →%2$s"
1335
- msgstr ""
1336
- "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
1337
- "klucz. %1$sPobierz swój klucz Connect →%2$s"
1338
 
1339
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:67
1340
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:127
1341
- msgid "Enable"
1342
- msgstr "Włącz"
1343
 
1344
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:68
1345
- msgid "Cache"
1346
- msgstr "Cache"
1347
 
1348
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:69
1349
- msgid "Enables Flexible Shipping Connect cache. Disable only for debugging."
1350
- msgstr "Włącza cache Flexible Shipping Connect. Wyłącz tylko do debugowania."
 
 
1351
 
1352
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:55
1353
- msgid "Something go wrong!"
1354
- msgstr "Coś poszło nie tak!"
 
 
 
 
1355
 
1356
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:61
 
 
 
1357
  #, php-format
 
 
 
 
1358
  msgid ""
1359
- "Invalid response from Flexible Shipping Connect platform. Response code: "
1360
- "%1$s."
1361
  msgstr ""
1362
- "Nieprawidłowa odpowiedź Flexible Shipping Connect. Kod odpowiedzi: %1$s."
1363
-
1364
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:69
1365
- msgid "OK"
1366
- msgstr "OK"
1367
-
1368
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:63
1369
- msgid "Checking..."
1370
- msgstr "Sprawdzanie…"
1371
-
1372
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:67
1373
- msgid "Something go wrong! (AJAX)"
1374
- msgstr "Coś poszło nie tak! (AJAX)"
1375
-
1376
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:70
1377
- msgid "Add credentials"
1378
- msgstr "Dodaj ustawienia"
1379
 
1380
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:257
1381
  msgid ""
1382
- "Your store has been connected to Flexible Shipping Connect. Choose from the "
1383
- "available shipping integrations below."
 
1384
  msgstr ""
1385
- "Twój sklep został podłączony do Flexible Shipping Connect. Wybierz jedną z "
1386
- "dostępnych poniżej integracji wysyłkowych."
1387
 
1388
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:267
1389
  msgid ""
1390
- "You are now disconnected from Flexible Shipping Connect. All shipping "
1391
- "services have been disabled. To use Flexible Shipping Connect again, please "
1392
- "enter a valid Connect Key."
1393
  msgstr ""
1394
- "Zostałeś teraz odłączony od Flexible Shipping Connect. Wszystkie integracje "
1395
- "wysyłkowe zostały wyłączone. Aby ponownie użyć Flexible Shipping Connect, "
1396
- "wprowadź ważny klucz Connect."
1397
 
1398
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:277
1399
- msgid "Your store is already connected to Flexible Shipping Connect!"
1400
- msgstr "Twój sklep jest już podłączony do Flexible Shipping Connect!"
1401
 
1402
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:288
1403
- #, php-format
1404
- msgid ""
1405
- "Your store (%1$s) is already registered on another account. You can register "
1406
- "your domain only on one account. If you have questions, %2$scontact us%3$s."
1407
- msgstr ""
1408
- "Twój sklep (%1$s) jest już zarejestrowany na innym koncie. Możesz "
1409
- "zarejestrować swoją domenę tylko na jednym koncie. Jeśli masz pytania, "
1410
- "%2$sskontaktuj się z nami%3$s."
1411
 
1412
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:337
1413
- #, php-format
1414
- msgid "Message from platform: %1$s%2$s%3$s"
1415
- msgstr "Komunikat z platformy: %1$s%2$s%3$s"
1416
 
1417
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:349
1418
- #, php-format
1419
- msgid ""
1420
- "FS Connect is undergoing maintenance. To get more information about the "
1421
- "platform status check %1$sstatus.flexibleshipping.com &rarr;%2$s%3$s"
1422
- msgstr ""
1423
- "FS Connect jest w trakcie konserwacji. Aby uzyskać więcej informacji na "
1424
- "temat statusu platformy sprawdź %1$sstatus.flexibleshipping.com &rarr;%2$s"
1425
- "%3$s"
1426
 
1427
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:373
1428
- msgid ""
1429
- "There are some connection problems. Please try again in a few minutes. "
1430
- "Thanks!"
1431
- msgstr ""
1432
- "Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
1433
 
1434
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:379
1435
- #, php-format
1436
- msgid ""
1437
- "To get more information about the platform status check %1$sstatus."
1438
- "flexibleshipping.com &rarr;%2$s"
1439
- msgstr ""
1440
- "Aby uzyskać więcej informacji na temat statusu platformy sprawdź %1$sstatus."
1441
- "flexibleshipping.com &rarr;%2$s"
1442
 
1443
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:404
1444
- #, php-format
1445
- msgid ""
1446
- "The Connect Key that you entered is invalid. Please enter a valid key. "
1447
- "%1$sRegister%3$s for a new key or log in to %2$syour account%3$s to get your "
1448
- "key."
1449
- msgstr ""
1450
- "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
1451
- "klucz. %1$sZarejestruj się%3$s lub zaloguj na %2$sistniejące konto%3$s, aby "
1452
- "otrzymać klucz."
1453
 
1454
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:585
1455
- msgid "Disconnect"
1456
- msgstr "Rozłącz"
1457
 
1458
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:589
1459
- msgid "Connect"
1460
- msgstr "Połącz"
1461
 
1462
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php:36
1463
- #, php-format
1464
- msgid "%1$s (free shipping)"
1465
- msgstr "%1$s (darmowa wysyłka)"
1466
 
1467
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php:37
1468
  #, php-format
1469
- msgid "%1$s (fallback)"
1470
- msgstr "%1$s (stawka awaryjna)"
 
 
 
1471
 
1472
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:460
1473
- #, php-format
1474
- msgid "Flexible Shipping Fallback (%1$s): %2$s"
1475
- msgstr "Stawka awaryjna Flexible Shipping (%1$s): %2$s"
1476
 
1477
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:513
1478
  #, php-format
1479
- msgid "Invalid live rates response! Error code: %1$s"
1480
- msgstr "Nieprawidłowa odpowiedź dla stawek live! Kod błędu: %1$s"
 
 
 
1481
 
1482
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:532
1483
- #, php-format
1484
- msgid "Live rates response exception %1$s; %2$s occurred while sending request"
1485
- msgstr ""
1486
- "Zwrócony komunikat błędu dla stawek live: %1$s. Kod błędu dla przesłanego "
1487
- "żądania: %2$s"
1488
 
1489
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php:47
 
1490
  #, php-format
1491
- msgid "Do not you see your courier? %1$sCheck planned integrations →%2$s"
1492
- msgstr "Nie widzisz swojego kuriera? %1$sSprawdź planowane integracje →%2$s"
 
 
 
1493
 
1494
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:78
1495
- msgid "Invalid requireWordpressPluginVersion capability!"
1496
- msgstr "Invalid requireWordpressPluginVersion capability!"
 
1497
 
1498
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:83
1499
- #, php-format
1500
- msgid ""
1501
- "This integration requires Flexible Shipping Plugin in version %1$s or newer!"
1502
- msgstr ""
1503
- "Ta integracja wymaga wtyczki Flexible Shipping w wersji %1$s lub nowszej!"
1504
 
1505
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:92
1506
  #, php-format
1507
- msgid "Go to %s settings</a>"
1508
- msgstr "Przejdź do ustawień %s</a>"
 
 
 
1509
 
1510
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:110
1511
- #, php-format
1512
- msgid "%1$s%2$s (new)%3$s"
1513
- msgstr "%1$s%2$s (nowość)%3$s"
1514
-
1515
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:251
1516
- msgid "Connect Services"
1517
- msgstr "Usługi Connect"
1518
-
1519
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:252
1520
- msgid ""
1521
- "Enable services to automate shipping and print labels with Flexible Shipping "
1522
- "Connect."
1523
- msgstr ""
1524
- "Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
1525
- "Shipping Connect."
1526
-
1527
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:305
1528
- msgid "Advanced settings"
1529
- msgstr "Ustawienia zaawansowane"
1530
-
1531
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php:59
1532
- msgid "Order status changed automatically by Flexible Shipping Plugin."
1533
- msgstr ""
1534
- "Status zamówienia zmieniony automatycznie przez wtyczkę Flexible Shipping."
1535
-
1536
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:37
1537
- msgid "Create shipments"
1538
- msgstr "Utwórz przesyłkę"
1539
-
1540
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:42
1541
- msgid "Manually"
1542
- msgstr "Manualnie"
1543
-
1544
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:43
1545
- msgid "Automatically"
1546
- msgstr "Automatycznie"
1547
-
1548
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:45
1549
- msgid ""
1550
- "Choose to create shipments manually or automatically based on the order "
1551
- "status."
1552
- msgstr ""
1553
- "Wybierz opcję ręcznego lub automatycznego tworzenia przesyłek w oparciu o "
1554
- "status zamówienia."
1555
-
1556
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:49
1557
- msgid "Order status"
1558
- msgstr "Status zamówienia"
1559
-
1560
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:54
1561
- msgid "Select order status for automatic shipment creation."
1562
- msgstr "Wybierz status zamówienia do automatycznego tworzenia przesyłek."
1563
-
1564
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:58
1565
- msgid "Complete order"
1566
- msgstr "Zamówienie zrealizowane"
1567
-
1568
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:61
1569
- msgid "Enable automatic order status change"
1570
- msgstr "Włącz automatyczną zmianę statusu zamówienia"
1571
-
1572
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:63
1573
- msgid "Automatically change order status to completed after creating shipment."
1574
- msgstr ""
1575
- "Automatyczna zmiana statusu zamówienia na zrealizowane po utworzeniu "
1576
- "przesyłki."
1577
-
1578
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php:247
1579
- msgid "Invalid format - contact with flexibleshipping.com administrator."
1580
- msgstr "Invalid format - contact with flexibleshipping.com administrator."
1581
-
1582
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php:254
1583
- #, php-format
1584
- msgid "Ups, something is wrong. Error code: %1$s."
1585
- msgstr "Ups, coś poszło nie tak. Kod błędu: %1$s."
1586
-
1587
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:546
1588
- msgid "Rates type"
1589
- msgstr "Typ stawek"
1590
-
1591
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:550
1592
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:562
1593
- msgid "Custom"
1594
- msgstr "Własne"
1595
-
1596
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:554
1597
- #, php-format
1598
- msgid ""
1599
- "Choose custom rates to set a custom shipping cost (this method will be the "
1600
- "selected %1$s service). Choose live rates if you want to present services "
1601
- "and rates for the customer's address."
1602
- msgstr ""
1603
- "Wybierz własne stawki, aby ustawić niestandardowe koszty wysyłki (metodą "
1604
- "wysyłki będzie wybrana usługa %1$s). Wybierz stawki Live, jeśli chcesz "
1605
- "prezentować usługi i stawki wg. adresu klienta."
1606
-
1607
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:561
1608
- msgid "Live"
1609
- msgstr "Live"
1610
-
1611
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:580
1612
- msgid "Custom services"
1613
- msgstr "Usługi"
1614
-
1615
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:584
1616
- msgid "Enable services custom settings"
1617
- msgstr "Włącz własne ustawienia usług"
1618
-
1619
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:626
1620
- msgid "Fallback"
1621
- msgstr "Stawka awaryjna"
1622
-
1623
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:627
1624
- msgid "Enable fallback"
1625
- msgstr "Włącz stawkę awaryjną"
1626
-
1627
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:629
1628
- msgid ""
1629
- "Enable to offer flat rate cost for shipping so that the user can still "
1630
- "checkout, if API returns no matching rates."
1631
- msgstr ""
1632
- "Włącz, aby oferować płaską stawkę wysyłki. Klient będzie mógł zrealizować "
1633
- "zamówienia jeśli API nie zwróci żadnych usług."
1634
-
1635
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:762
1636
- #, php-format
1637
- msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
1638
- msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
1639
-
1640
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php:173
1641
- #, php-format
1642
- msgid "%1$sYour settings have been saved.%2$s"
1643
- msgstr "%1$sUstawienia zostały zapisane.%2$s"
1644
-
1645
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php:102
1646
- msgid "Services"
1647
- msgstr "Usługi"
1648
-
1649
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:128
1650
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:129
1651
- msgid "Flexible Shipping Connect Registration"
1652
- msgstr "Rejestracja Flexible Shipping Connect"
1653
-
1654
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:203
1655
- msgid ""
1656
- "There are some connection problems. Please try again in few minutes. Thanks!"
1657
- msgstr ""
1658
- "Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
1659
-
1660
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:212
1661
- msgid "Please enter a valid email!"
1662
- msgstr "Proszę podać poprawny adres e-mail!"
1663
-
1664
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:225
1665
- #, php-format
1666
- msgid ""
1667
- "%1$sAccount created, please check your email and click the activation link "
1668
- "to connect (%3$s).%2$s If you haven't received the email, please %4$scontact "
1669
- "us%5$s."
1670
- msgstr ""
1671
- "%1$sUtworzono konto, sprawdź swój e-mail i kliknij link aktywacyjny, aby się "
1672
- "połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
1673
- "z nami%5$s."
1674
-
1675
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:249
1676
- #, php-format
1677
- msgid ""
1678
- "Your store (%1$s) is already registered with another account! You can "
1679
- "register your domain with one account. If you have questions, %2$scontact us"
1680
- "%3$s."
1681
- msgstr ""
1682
- "Twój sklep (%1$s) jest już zarejestrowany na innym koncie! Możesz "
1683
- "zarejestrować swoją domenę za pomocą jednego konta. Jeśli masz pytania, "
1684
- "%2$sskontaktuj się z nami%3$s."
1685
-
1686
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:271
1687
- #, php-format
1688
- msgid ""
1689
- "Our demo does not support Flexible Shipping Connect registration. Try FS "
1690
- "Connect for free. %1$sCheck now →%2$s"
1691
- msgstr ""
1692
- "Nasze demo nie obsługuje rejestracji Flexible Shipping Connect. Wypróbuj FS "
1693
- "Connect za darmo. %1$sSprawdź teraz →%2$s"
1694
-
1695
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:298
1696
- #, php-format
1697
- msgid ""
1698
- "Account with this email is already registered! We emailed your Connect Key "
1699
- "to %1$s.<br>Enter your key %2$shere%4$s. You can also get your key by "
1700
- "logging to %3$syour account%4$s."
1701
- msgstr ""
1702
- "Konto z tym e-mailem jest już zarejestrowane! Wysłaliśmy wiadomość e-mail z "
1703
- "kluczem Connect do %1$s.<br>Wpisz klucz %2$stutaj%4$s. Możesz również "
1704
- "uzyskać klucz logując się na %3$sswoje konto%4$s."
1705
-
1706
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:316
1707
- #, php-format
1708
- msgid "Unknown response code from Flexible Shipping Connect API (%s)."
1709
- msgstr "Nieznany kod odpowiedzi z API Flexible Shipping Connect (%s)."
1710
-
1711
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php:76
1712
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:219
1713
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:243
1714
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:190
1715
- msgid "Invalid nonce!"
1716
- msgstr "Błąd weryfikacji nonce!"
1717
-
1718
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php:47
1719
- msgid "Points can not be found. Check the shipping address."
1720
- msgstr "Nie można znaleźć punktów. Sprawdź adres wysyłki."
1721
-
1722
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php:48
1723
- msgid "It's your location"
1724
- msgstr "Twoja lokalizacja"
1725
-
1726
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php:79
1727
- msgid "Cannot get data for this address!"
1728
- msgstr "Nie można uzyskać danych dla tego adresu!"
1729
-
1730
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php:4
1731
- msgid "Select point"
1732
- msgstr "Wybierz punkt"
1733
-
1734
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php:116
1735
- msgid "Select"
1736
- msgstr "Wybierz"
1737
-
1738
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:4
1739
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:5
1740
- msgid "Print Labels"
1741
- msgstr "Drukuj etykiety"
1742
-
1743
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:6
1744
- msgid ""
1745
- "Download printable PDF shipping labels directly from WooCommerce orders list "
1746
- "in bulk or one by one from order details."
1747
- msgstr ""
1748
- "Pobieraj etykiety wysyłkowe bezpośrednio z listy zamówień WooCommerce lub "
1749
- "edycji zamówienia."
1750
-
1751
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:10
1752
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:11
1753
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:90
1754
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:91
1755
- msgid "Calculate Rates"
1756
- msgstr "Obliczaj stawki"
1757
-
1758
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:12
1759
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:92
1760
- msgid ""
1761
- "Calculate shipping rates in real time, and get available service types and "
1762
- "expected delivery time based on customer's address."
1763
- msgstr ""
1764
- "Obliczaj stawki wysyłki w czasie rzeczywistym i otrzymuj dostępne rodzaje "
1765
- "usług w oparciu o adres klienta."
1766
-
1767
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:16
1768
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:17
1769
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:96
1770
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:97
1771
- msgid "Track Parcels"
1772
- msgstr "Śledź przesyłki"
1773
 
1774
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:18
1775
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:98
1776
- msgid ""
1777
- "Always keep your customers (and yourself) up to date with automatic "
1778
- "confirmation emails with tracking link and delivery status."
1779
- msgstr ""
1780
- "Przekazuj linki do śledzenia przesyłki w automatycznych mailach "
1781
- "transakcyjnych do klientów."
1782
 
1783
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:22
1784
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:23
1785
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:102
1786
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:103
1787
- msgid "Automate Shipping"
1788
- msgstr "Automatyzuj wysyłkę"
1789
 
1790
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:24
1791
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:104
1792
  msgid ""
1793
- "Automatically create shipments and print labels based on order status. "
1794
- "Change order status after shipment creation."
 
1795
  msgstr ""
1796
- "Twórz przesyłki automatycznie i drukuj etykiety na podstawie statusu "
1797
- "zamówienia. Status zamówienia zmieni się automatycznie po utworzeniu "
1798
- "przesyłki."
1799
 
1800
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:28
1801
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:29
1802
- msgid "Create Shipments"
1803
- msgstr "Twórz przesyłki"
1804
 
1805
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:30
1806
- msgid ""
1807
- "Create shipments with predefined services, sizes and weights automatically "
1808
- "filled in from order items."
1809
- msgstr ""
1810
- "Twórz przesyłki z ustawionymi usługami, rozmiarami i wagami automatycznie "
1811
- "wypełnionymi z pozycji zamówienia."
1812
 
1813
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:34
1814
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:35
1815
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:108
1816
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:109
1817
- msgid "Manage Orders"
1818
- msgstr "Zarządzaj zamówieniami"
1819
 
1820
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:36
1821
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:110
1822
- msgid ""
1823
- "Get a complete overview of your orders and shipments in your WooCommerce "
1824
- "dashboard with shipments statuses and filters."
1825
- msgstr ""
1826
- "Zyskaj możliwość kompletnego zarządzania zamówieniami i przesyłkami "
1827
- "bezpośrednio z panelu WooCommerce za pomocą statusów i filtrów."
1828
 
1829
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:43
1830
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:19
1831
- msgid "Ship your orders faster with Flexible Shipping Connect"
1832
- msgstr "Wysyłaj zamówienia szybciej z Flexible Shipping Connect"
1833
 
1834
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:62
1835
- msgid "Sign up now!"
1836
- msgstr "Zarejestruj się teraz!"
1837
 
1838
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:9
1839
- msgid "Flexible Shipping Connect"
1840
- msgstr "Flexible Shipping Connect"
 
1841
 
1842
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:16
1843
- #, php-format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1844
  msgid ""
1845
- "Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s."
 
1846
  msgstr ""
1847
- "Dowiedz się więcej o możliwościach związanych z %1$sFlexible Shipping Connect"
1848
- "%2$s."
1849
 
1850
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:26
1851
  #, php-format
1852
  msgid ""
1853
- "%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
1854
- "%2$syour account%3$s to get your key."
1855
  msgstr ""
1856
- "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
1857
- "%2$sswojego konta%3$s, aby otrzymać klucz."
1858
 
1859
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:33
1860
- msgid "Check how to start with FS Connect &rarr;"
1861
- msgstr "Sprawdź jak zacząć z FS Connect &rarr;"
 
1862
 
1863
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:5
1864
- msgid "Welcome to new Flexible Shipping Connect installation guide."
1865
- msgstr "Witamy w przewodniku o nowym Flexible Shipping Connect."
1866
 
1867
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:7
1868
- msgid ""
1869
- "To complete the installation please click the Sign up for Connect button "
1870
- "below."
1871
- msgstr ""
1872
- "Aby zakończyć instalację, kliknij poniżej przycisk Zarejestruj się w Connect."
1873
 
1874
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:9
1875
  #, php-format
1876
- msgid ""
1877
- "The %saccount is free (no credit card needed)%s and allows you to send "
1878
- "packages directly from here!"
1879
  msgstr ""
1880
- "Konto %sjest bezpłatne (nie wymaga karty kredytowej) %s i pozwala na "
1881
- "nadawanie paczek bezpośrednio z panelu WooCommerce!"
1882
 
1883
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:11
 
1884
  msgid ""
1885
- "If you want to learn more about other benefits, you may click one of the "
1886
- "tabs on the left."
1887
  msgstr ""
1888
- "Jeśli chcesz dowiedzieć się więcej o innych korzyściach, możesz kliknąć "
1889
- "jedną z zakładek po lewej stronie."
1890
 
1891
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:35
1892
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:41
1893
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:47
1894
- msgid "soon!"
1895
- msgstr "wkrótce!"
1896
 
1897
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:56
1898
- msgid "Using Flexible Shipping Connect, you can send packages via:"
 
1899
  msgstr ""
1900
- "Korzystając z Flexible Shipping Connect, możesz wysyłać paczki za "
1901
- "pośrednictwem:"
1902
 
1903
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:77
1904
- msgid "Read more about possible integrations &rarr;"
1905
- msgstr "Przeczytaj więcej o możliwych integracjach &rarr;"
 
1906
 
1907
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:84
1908
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:85
1909
- msgid "Create & Print Labels"
1910
- msgstr "Twórz i drukuj etykiety"
1911
 
1912
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:86
1913
- msgid ""
1914
- "Create shipments with predefined services, sizes and weights automatically "
1915
- "filled in from order items. Download printable PDF shipping labels directly "
1916
- "from WooCommerce orders list in bulk or one by one from order details."
1917
- msgstr ""
1918
- "Twórz przesyłki z ustawionymi usługami, rozmiarami i wagami automatycznie "
1919
- "wypełnionymi z pozycji zamówienia. Pobieraj etykiety wysyłkowe bezpośrednio "
1920
- "z listy zamówień WooCommerce lub edycji zamówienia."
1921
 
1922
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:114
1923
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:115
1924
- msgid "Couriers"
1925
- msgstr "Kurierzy"
1926
 
1927
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:164
1928
- msgid "Sign up for Connect"
1929
- msgstr "Zarejestruj się w Connect"
 
1930
 
1931
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:166
1932
- msgid "Start quick tour"
1933
- msgstr "Rozpocznij przewodnik"
 
1934
 
1935
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:166
1936
- msgid "Next feature"
1937
- msgstr "Następna funkcja"
 
1938
 
1939
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-second-notice.php:3
1940
  #, php-format
1941
- msgid ""
1942
- "You never sign up to Flexible Shipping Connect. You may finish the "
1943
- "registration process here %1$sSign up for Connect%2$s"
1944
- msgstr ""
1945
- "Nie zarejestrowałeś się w Flexible Shipping Connect. Możesz dokończyć proces "
1946
- "rejestracji tutaj %1$sZarejestruj się w Connect%2$s"
1947
 
1948
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-fallback-message.php:1
1949
- msgid "Fallback:"
1950
- msgstr "Stawka awaryjna:"
1951
 
1952
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-free-shipping.php:1
1953
- msgid "Free shipping"
1954
- msgstr "Darmowa wysyłka"
1955
 
1956
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-message-stock.php:1
1957
- msgid "Additional info:"
1958
- msgstr "Dodatkowe informacje:"
1959
 
1960
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:4
 
 
 
 
1961
  #, php-format
1962
- msgid ""
1963
- "You are connected. %1$sGo to Flexible Shipping Connect settings &rarr;%2$s"
1964
- msgstr ""
1965
- "Jesteś połączony. %1$sPrzejdź do ustawień Flexible Shipping Connect &rarr;"
1966
- "%2$s"
 
 
 
 
 
 
 
 
 
 
 
 
1967
 
1968
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:10
1969
- msgid "Join Flexible Shipping Connect Now!"
1970
- msgstr "Dołącz do Flexible Shipping Connect!"
1971
 
1972
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:16
1973
- msgid "Sign up for automatic shipments, label printing, live rates and more!"
1974
- msgstr ""
1975
- "Zarejestruj się, aby automatyzować przesyłkę, drukować etykiety, pobierać "
1976
- "stawki i wiele więcej!"
1977
 
1978
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:18
1979
- #, php-format
1980
- msgid ""
1981
- "By signing up, you agree to the %1$sTerms of Service%3$s and to %2$sPrivacy "
1982
- "Policy%3$s"
1983
- msgstr ""
1984
- "Rejestrując się, zgadzasz się na %1$sTerms of Service%3$s i %2$sPrivacy "
1985
- "Policy%3$s"
1986
 
1987
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:23
1988
- msgid "Sign Up"
1989
- msgstr "Zarejestruj się"
1990
 
1991
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php:6
1992
- msgid "Connect Key"
1993
- msgstr "Klucz Connect"
 
1994
 
1995
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php:22
 
 
 
 
 
 
 
 
 
1996
  msgid ""
1997
- "Are you sure you want do disconnect your store from Flexible Shipping "
1998
- "Connect?\\n\\nAll shipping services will be disabled."
1999
- msgstr ""
2000
- "Czy jesteś pewien, że chcesz odłączyć swój sklep od Flexible Shipping "
2001
- "Connect?\\n\\nWszystkie integracje wysyłkowe zostaną wyłączone."
2002
 
2003
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:13
2004
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:20
2005
- msgid "How to use Flexible Shipping?"
2006
- msgstr "Jak używać Flexible Shipping?"
2007
 
2008
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:19
2009
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:26
 
 
 
2010
  #, php-format
2011
- msgid ""
2012
- "To add first Flexible Shipping method go to %sShipping zones%s and add "
2013
- "Flexible Shipping to a shipping zone."
2014
- msgstr ""
2015
- "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %sStrefy "
2016
- "wysyłki%s i dodaj Flexible Shipping do strefy wysyłki."
2017
 
2018
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:26
2019
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:33
2020
  msgid ""
2021
- "You can start the configuration by clicking the Flexible Shipping link in "
2022
- "the Shipping methods table."
2023
  msgstr ""
2024
- "Możesz rozpocząć konfigurację klikając na link Flexible Shipping w tabeli "
2025
- "”Metody wysyłki”."
2026
 
2027
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:29
2028
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:36
2029
- msgid "Quick Video Overview"
2030
- msgstr "Krótki przewodnik video"
2031
 
2032
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:35
2033
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:42
2034
- msgid "More resources"
2035
- msgstr "Więcej informacji"
2036
 
2037
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:38
2038
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:45
2039
- msgid "General Settings"
2040
- msgstr "Ustawienia główne"
2041
 
2042
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:39
2043
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:46
2044
- msgid "Adding a shipping method"
2045
- msgstr "Dodawanie metody wysyłki"
2046
 
2047
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:40
2048
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:47
2049
- msgid "Currency Support"
2050
- msgstr "Waluty"
2051
 
2052
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:41
2053
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:48
2054
- msgid "Weight Based Shipping"
2055
- msgstr "Koszt na wagę"
2056
 
2057
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:42
2058
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:49
2059
- msgid "Shipping Insurance"
2060
- msgstr "Ubezpieczenie przesyłki"
2061
 
2062
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:43
2063
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:50
2064
- msgid "Conditional Cash on Delivery"
2065
- msgstr "Przesyłka za pobraniem"
 
 
 
2066
 
2067
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:54
2068
- msgid "Integrations"
2069
- msgstr "Integracja"
2070
 
2071
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:59
2072
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:63
2073
- msgid "FS Connect"
2074
- msgstr "FS Connect"
2075
 
2076
- #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:65
2077
- msgid "Enable integration with Flexible Shipping Connect"
2078
- msgstr "Włącz integrację z Flexible Shipping Connect"
2079
 
2080
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:164
2081
- #, php-format
2082
  msgid ""
2083
- "Flexible Shipping has changed the calculation method for shipping rules. "
2084
- "Currently, the cart value for rules based on price is determined by "
2085
- "WooCommerce tax option \"Display prices during cart and checkout\". You "
2086
- "should check the %ssettings%s."
2087
  msgstr ""
2088
- "Flexible Shipping: zaktualizowane zostały metody obliczania reguł wysyłki. "
2089
- "Aktualnie dla reguł opartych na cenie wartość koszyka zostanie obliczona na "
2090
- "podstawie ustawienia podatków WooCommerce ”Wyświetlanie cen w sklepie”. "
2091
- "Sprawdź %sustawienia podatków%s."
2092
 
2093
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:181
2094
- msgid ""
2095
- "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
2096
- msgstr ""
2097
- "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
2098
 
2099
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:196
2100
- msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
2101
- msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
 
2102
 
2103
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:211
2104
- msgid ""
2105
- "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
2106
- msgstr ""
2107
- "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
2108
 
2109
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:223
2110
- #, php-format
 
 
 
 
2111
  msgid ""
2112
- "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
2113
- "on %splugins page%s. Read about big changes in Flexible Shipping on %sour "
2114
- "blog →%s"
2115
  msgstr ""
2116
- "Masz włączony WooCommerce Flexible Shipping w wersji starszej niż 1.4. "
2117
- "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
2118
- "Shipping na %snaszym blogu →%s"
2119
 
2120
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:38
2121
- #, php-format
2122
- msgid "Shipment for order %1$s, %2$s"
2123
- msgstr "Przesyłka do zamówienia %s, %s"
2124
 
2125
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:53
2126
- #, php-format
2127
- msgid "Added new shipment via metabox. Shipment ID: %s"
2128
- msgstr "Dodano nową przesyłkę. Numer przesyłki: %s"
2129
 
2130
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:104
2131
- msgid "Select integration"
2132
- msgstr "Wybierz integrację"
2133
 
2134
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:113
2135
- msgid "Add shipping"
2136
- msgstr "Dodaj przesyłkę"
2137
 
2138
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:60
2139
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:62
2140
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:64
2141
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:97
2142
- msgid "Shipping Manifests"
2143
- msgstr "Protokoły nadania"
2144
 
2145
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:61
2146
- msgid "Shipping Manifest"
2147
- msgstr "Protokół nadania"
2148
 
2149
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:65
2150
- msgid "View Shipping Manifests"
2151
- msgstr "Wyświetl protokół nadania"
 
2152
 
2153
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:66
2154
- msgid "Add new Shipping Manifest"
2155
- msgstr "Dodaj nowy Protokół nadania"
2156
 
2157
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:67
2158
- msgid "Add new Shipping Manifests"
2159
- msgstr "Dodaj nowe protokoły nadania"
2160
 
2161
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:68
2162
- msgid "Edit Shipping Manifest"
2163
- msgstr "Edytuj protokół nadania"
 
 
2164
 
2165
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:69
2166
- msgid "Save Shipping Manifest"
2167
- msgstr "Zapisz protokół nadania"
 
2168
 
2169
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:70
2170
- msgid "Search Shipping Manifests"
2171
- msgstr "Szukaj protokół nadania"
 
 
 
 
 
2172
 
2173
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:71
2174
- msgid "Shipping Manifests not found"
2175
- msgstr "Nie znaleziono protokołów nadania"
2176
 
2177
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:72
2178
- msgid "Shipping Manifests not found in trash"
2179
- msgstr "Nie znaleziono protokołów nadania w koszu"
2180
 
2181
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:74
2182
- msgid "Shipping Manifests."
2183
- msgstr "Protokoły nadania."
2184
 
2185
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:116
2186
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:50
2187
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:52
2188
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:54
2189
- msgid "Shipments"
2190
- msgstr "Przesyłki"
2191
 
2192
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:160
2193
- msgid "Date"
2194
- msgstr "Data"
2195
 
2196
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:162
2197
- msgid "Number"
2198
- msgstr "Numer"
2199
 
2200
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:163
2201
- msgid "Shipments count"
2202
- msgstr "Liczba przesyłek"
2203
 
2204
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:164
2205
- msgid "Actions"
2206
- msgstr "Akcje"
2207
 
2208
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/column-actions.php:1
2209
- msgid "Download"
2210
- msgstr "Pobierz"
2211
 
2212
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/filter-form.php:4
2213
- msgid "All manifests"
2214
- msgstr "Wszystkie protokoły nadania"
2215
 
2216
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:10
2217
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:50
2218
- msgid "Order"
2219
- msgstr "Zamówienie"
2220
 
2221
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:29
2222
- msgid "No shipment id!"
2223
- msgstr "Brak id przesyłki!"
 
 
 
 
2224
 
2225
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:33
2226
- msgid "No data!"
2227
- msgstr "Brak danych!"
 
2228
 
2229
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:25
2230
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:17
2231
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:17
2232
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:19
2233
- #, php-format
2234
- msgid "%1$sOk, you deserved it%2$s"
2235
- msgstr "%1$sTak, zasługujecie na nią%2$s"
2236
 
2237
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:30
2238
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:22
2239
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:22
2240
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:24
2241
- #, php-format
2242
- msgid "%1$sNope, maybe later%2$s"
2243
- msgstr "%1$sNie, może później%2$s"
2244
 
2245
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:35
2246
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:27
2247
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:27
2248
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:29
2249
- #, php-format
2250
- msgid "%1$sI already did%2$s"
2251
- msgstr "%1$sJuż to zrobiłem/am%2$s"
2252
 
2253
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:59
 
2254
  msgid ""
2255
- "Awesome, you've been using Flexible Shipping for more than 2 weeks. May I "
2256
- "ask you to give it a 5-star rating on WordPress?"
2257
  msgstr ""
2258
- "Fantastycznie, korzystasz z Flexible Shipping już ponad dwa tygodnie. Czy "
2259
- "mogę Cię prosić o wystawienie 5-gwiazdkowej oceny?"
 
2260
 
2261
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:59
2262
- msgid ""
2263
- "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could "
2264
- "you please do me a BIG favor and give it a 5-star rating on WordPress? ~ "
2265
- "Peter"
2266
- msgstr ""
2267
- "Fantastycznie, korzystasz z Flexible Shipping już ponad 2 tygodnie. Czy "
2268
- "możesz wyświadczyć mi wielką przysługę i wystawić 5-gwiazdkową ocenę? ~ Piotr"
 
 
 
2269
 
2270
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:57
2271
  msgid ""
2272
- "Awesome, you just crossed the 100 orders on Flexible Shipping method. Could "
2273
- "you please do me a BIG favor and give it a 5-star rating on WordPress? ~ "
2274
- "Peter"
2275
  msgstr ""
2276
- "Fantastycznie, przekroczyłeś 100 zamówień z metodą wysyłki Flexible "
2277
- "Shipping. Czy możesz wyświadczyć mi wielką przysługę i wystawić 5-gwiazdkową "
2278
- "ocenę? ~Piotr"
2279
 
2280
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php:300
2281
- msgid "Please override shipping_column method!"
2282
- msgstr "Proszę nadpisać metodę shipping_column!"
2283
 
2284
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:55
2285
- msgid "View Shipments"
2286
- msgstr "Wyświetl przesyłki"
 
 
 
 
 
 
2287
 
2288
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:56
2289
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:57
2290
- msgid "Add new Shipment"
2291
- msgstr "Dodaj nową przesyłkę"
2292
 
2293
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:58
2294
- msgid "Edit Shipment"
2295
- msgstr "Edytuj przesyłkę"
2296
 
2297
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:59
2298
- msgid "Save Shipment"
2299
- msgstr "Zapisz przesyłkę"
2300
 
2301
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:60
2302
- msgid "Search Shipments"
2303
- msgstr "Szukaj przesyłek"
2304
 
2305
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:61
2306
- msgid "Shipment not found"
2307
- msgstr "Nie znaleziono przesyłki"
2308
 
2309
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:62
2310
- msgid "Shipment not found in trash"
2311
- msgstr "Nie znaleziono przesyłki w koszu"
2312
 
2313
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:64
2314
- msgid "Shipments."
2315
- msgstr "Przesyłki."
 
2316
 
2317
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:84
2318
- msgctxt "Shipment status"
2319
- msgid "New"
2320
- msgstr "Nowa"
2321
 
2322
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:89
2323
- #, php-format
2324
- msgid "New <span class=\"count\">(%s)</span>"
2325
- msgid_plural "New <span class=\"count\">(%s)</span>"
2326
- msgstr[0] "Nowa <span class=\"count\">(%s)</span>"
2327
- msgstr[1] "Nowa <span class=\"count\">(%s)</span>"
2328
- msgstr[2] "Nowa <span class=\"count\">(%s)</span>"
2329
 
2330
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:92
2331
- msgctxt "Shipment status"
2332
- msgid "Created"
2333
- msgstr "Utworzona"
 
2334
 
2335
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:97
2336
- #, php-format
2337
- msgid "Created <span class=\"count\">(%s)</span>"
2338
- msgid_plural "Created <span class=\"count\">(%s)</span>"
2339
- msgstr[0] "Utworzona <span class=\"count\">(%s)</span>"
2340
- msgstr[1] "Utworzona <span class=\"count\">(%s)</span>"
2341
- msgstr[2] "Utworzona <span class=\"count\">(%s)</span>"
2342
 
2343
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:100
2344
- msgctxt "Shipment status"
2345
- msgid "Confirmed"
2346
- msgstr "Zatwierdzona"
 
 
 
2347
 
2348
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:105
2349
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:113
2350
- #, php-format
2351
- msgid "Confirmed <span class=\"count\">(%s)</span>"
2352
- msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
2353
- msgstr[0] "Zatwierdzona <span class=\"count\">(%s)</span>"
2354
- msgstr[1] "Zatwierdzona <span class=\"count\">(%s)</span>"
2355
- msgstr[2] "Zatwierdzona <span class=\"count\">(%s)</span>"
2356
 
2357
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:108
2358
- msgctxt "Shipment status"
2359
- msgid "Manifest created"
2360
- msgstr "Protokół nadania utworzony"
2361
 
2362
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:116
2363
- msgctxt "Shipment status"
2364
- msgid "Failed"
2365
- msgstr "Błąd"
2366
 
2367
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:121
2368
- #, php-format
2369
- msgid "Failed <span class=\"count\">(%s)</span>"
2370
- msgid_plural "Failed <span class=\"count\">(%s)</span>"
2371
- msgstr[0] "Błąd <span class=\"count\">(%s)</span>"
2372
- msgstr[1] "Błąd <span class=\"count\">(%s)</span>"
2373
- msgstr[2] "Błąd <span class=\"count\">(%s)</span>"
2374
 
2375
- #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:136
2376
- msgid "Shipment data"
2377
- msgstr "Dane przesyłki"
2378
 
2379
  #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:7
2380
  #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:5
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Flexible Shipping\n"
4
+ "POT-Creation-Date: 2019-07-03 13:44+0200\n"
5
+ "PO-Revision-Date: 2019-08-28 12:50+0200\n"
6
+ "Last-Translator: Krzysztof Dyszczyk <krzysztof.dyszczyk@gmail.com>\n"
7
  "Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: flexible-shipping.php\n"
15
  "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
20
  "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
  "X-Poedit-SearchPath-1: vendor/wpdesk/wp-wpdesk-fs-shipment\n"
23
+ "X-Poedit-SearchPath-2: vendor/wpdesk/wp-wpdesk-fs-table-rate\n"
24
  "X-Poedit-SearchPathExcluded-0: *.js\n"
25
 
26
+ #: classes/class-flexible-shipping-plugin.php:101
27
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:30
28
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:20
29
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:20
30
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:23
31
  #, php-format
32
+ msgid "%1$sNope, maybe later%2$s"
33
+ msgstr "%1$sNie, może później%2$s"
 
34
 
35
+ #: classes/class-flexible-shipping-plugin.php:438
36
+ #, php-format
37
+ msgid "How can We make Flexible Shipping better for you? %sJust write to us.%s"
 
 
 
38
  msgstr ""
39
  "Jak możemy sprawić, aby Flexible Shipping był lepszy? %sNapisz do nas.%s"
40
 
41
+ #: classes/class-flexible-shipping-plugin.php:486
42
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:147
43
  msgid "Settings"
44
  msgstr "Ustawienia"
45
 
46
+ #: classes/class-flexible-shipping-plugin.php:488
47
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:140
48
  msgid "Docs"
49
  msgstr "Docs"
50
 
51
+ #: classes/class-flexible-shipping-plugin.php:489
52
  #: vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:134
53
  msgid "Support"
54
  msgstr "Wsparcie"
55
 
56
+ #: classes/class-flexible-shipping-plugin.php:495
57
  msgid "Upgrade"
58
  msgstr "Kup PRO"
59
 
69
  msgid "Shipment for order %s, %s"
70
  msgstr "Przesyłka do zamówienia %s, %s"
71
 
72
+ #: classes/tracker/tracker.php:221
73
+ msgid "Opt-in"
74
+ msgstr "Opt-in"
75
 
76
+ #: classes/tracker/tracker.php:224
77
+ msgid "Opt-out"
78
+ msgstr "Opt-out"
79
 
80
+ #: inc/functions.php:67
81
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/functions.php:67
82
  #, php-format
83
+ msgid "Redirecting. If page not redirects click %s here %s."
 
 
 
84
  msgstr ""
85
+ "Przekierowywanie. Jeśli strona nie przekierowuje cię automatycznie, kliknij "
86
+ "%s tu %s."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
88
+ #: templates/email/after_order_table.php:12
89
+ #: templates/myaccount/after_order_table.php:12
90
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:7
91
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:47
92
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:51
93
+ msgid "Shipment"
94
+ msgstr "Przesyłka"
95
 
96
+ #: templates/email/after_order_table.php:15
97
+ #: templates/myaccount/after_order_table.php:15
98
+ msgid "Track shipment: "
99
+ msgstr "Śledź przesyłkę: "
100
 
101
+ #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:65
102
+ msgid "Test"
103
+ msgstr "Test"
104
 
105
+ #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:75
106
+ #: vendor/10up/wp_mock/tests/FunctionMocksTest.php:77
107
+ msgid "Input"
108
+ msgstr "Input"
109
 
110
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:168
111
+ #, php-format
112
  msgid ""
113
+ "The &#8220;%s&#8221; plugin cannot run on PHP versions older than %s. Please "
114
+ "contact your host and ask them to upgrade."
115
  msgstr ""
116
+ "Wtyczka &#8220;%s&#8221; nie może działać w wersjach PHP starszych niż %s. "
117
+ "Skontaktuj się z administratorem hostingu i poproś o aktualizację."
118
 
119
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:172
120
  #, php-format
121
  msgid ""
122
+ "The &#8220;%s&#8221; plugin cannot run on WordPress versions older than %s. "
123
+ "Please update WordPress."
124
  msgstr ""
125
+ "Wtyczka &#8220;%s&#8221; nie może działać w wersjach WordPress starszych niż "
126
+ "%s. Prosimy o aktualizację WordPress."
127
 
128
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:176
129
  #, php-format
130
+ msgid ""
131
+ "The &#8220;%s&#8221; plugin cannot run on WooCommerce versions older than "
132
+ "%s. Please update WooCommerce."
133
+ msgstr ""
134
+ "Wtyczka &#8220;%s&#8221; nie może działać w wersjach WooCommerce starszych "
135
+ "niż %s. Prosimy o aktualizację WooCommerce."
136
 
137
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:180
138
  #, php-format
139
+ msgid ""
140
+ "The &#8220;%s&#8221; plugin cannot run without OpenSSL module version at "
141
+ "least %s. Please update OpenSSL module."
142
+ msgstr ""
143
+ "Wtyczka &#8220;%s&#8221; nie może działać bez aktywacji OpenSSL co najmniej "
144
+ "w wersji %s. Zaktualizuj wersję OpenSSL."
145
 
146
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:268
147
  #, php-format
148
+ msgid ""
149
+ "The &#8220;%s&#8221; plugin cannot run without %s active. Please install and "
150
+ "activate %s plugin."
151
  msgstr ""
152
+ "Wtyczka &#8220;%s&#8221; nie może działać bez aktywacji %s. Zainstaluj i "
153
+ "aktywuj wtyczkę %s."
154
 
155
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:304
156
  #, php-format
157
  msgid ""
158
+ "The &#8220;%s&#8221; plugin cannot run without %s php module installed. "
159
+ "Please contact your host and ask them to install %s."
160
  msgstr ""
161
+ "Wtyczka &#8220;%s&#8221; nie może działać bez modułu php: %s. Skontaktuj się "
162
+ "z administratorem hostingu i poproś o instalację %s."
163
 
164
+ #: vendor/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php:332
165
  #, php-format
 
 
 
 
166
  msgid ""
167
+ "The &#8220;%s&#8221; plugin cannot run without %s php setting set to %s. "
168
+ "Please contact your host and ask them to set %s."
169
  msgstr ""
170
+ "Wtyczka &#8220;%s&#8221; nie może działać bez ustawienia php %s ustawionego "
171
+ "na %s. Skontaktuj się z administratorem hostingu i poproś o ustawienie %s."
 
 
 
 
 
172
 
173
+ #: vendor/wpdesk/wp-logs/src/WP/WPCapture.php:25
174
  #, php-format
175
+ msgid ""
176
+ "Can not enable WP Desk Debug log! Cannot create directory %s or this "
177
+ "directory is not writeable!"
178
+ msgstr ""
179
 
180
+ #: vendor/wpdesk/wp-logs/src/WP/WPCapture.php:44
181
  #, php-format
182
+ msgid "Can not enable WP Desk Debug log! Cannot create file %s!"
183
+ msgstr ""
184
 
185
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:70
186
+ #, fuzzy
187
+ #| msgid "Enabled"
188
+ msgid "Disabled"
189
+ msgstr "Włączona"
190
 
191
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:71
192
+ msgid "Emergency"
193
+ msgstr ""
 
194
 
195
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:72
196
+ msgid "Alert"
197
+ msgstr ""
 
198
 
199
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:73
200
+ msgid "Critical"
201
+ msgstr ""
 
202
 
203
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:74
204
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:196
205
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:226
206
+ msgid "Error"
207
+ msgstr "Błąd"
208
 
209
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:75
210
+ msgid "Warning"
 
211
  msgstr ""
 
 
 
 
 
 
212
 
213
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:76
214
+ msgid "Notice"
215
+ msgstr ""
216
 
217
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:77
218
+ msgid "Info"
219
+ msgstr ""
220
 
221
+ #: vendor/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php:78
222
+ #, fuzzy
223
+ #| msgid "Debug mode"
224
+ msgid "Debug"
225
  msgstr "Tryb debug"
226
 
227
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:98
228
  #, php-format
229
+ msgid "%1$s Shipment plan exceeded. %2$sPlease upgrade your plan →%3$s"
230
+ msgstr "%1$s Przekroczono plan FS Connect %2$sProszę zmień swój plan →%3$s"
231
 
232
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:124
233
+ msgid "Shipment cannot be saved for this status!"
234
+ msgstr "Przesyłki nie można zapisać w tym statusie!"
235
+
236
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:131
237
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:52
238
+ msgid "Saved"
239
+ msgstr "Zapisano"
 
 
 
 
240
 
241
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:152
242
  #, php-format
243
+ msgid "Shipment created.%1$sFS Connect plan usage: %2$s/%3$s shipments"
244
+ msgstr ""
245
+ "Przesyłka utworzona.%1$sWykorzystanie planu FS Connect: %2$s/%3$s przesyłek"
246
 
247
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php:193
248
+ msgid "Canceled"
249
+ msgstr "Anulowana"
 
 
250
 
251
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:59
252
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:124
253
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:175
254
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:22
255
+ msgid "Unknown error!"
256
+ msgstr "Nieznany błąd!"
257
 
258
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:63
259
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:128
260
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:179
261
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:25
262
+ msgid "Nonce verification error! Invalid request."
263
+ msgstr "Błąd weryfikacji nonce! Nieprawidłowe żądanie."
264
 
265
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:74
266
+ msgid "Attachment type not selected!"
267
+ msgstr "Typ załącznika nie został wybrany!"
268
 
269
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:76
270
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:155
271
+ msgid "Attachment not found!"
272
+ msgstr "Załącznik nie został znaleziony!"
273
 
274
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:78
275
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:136
276
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:186
277
+ msgid "Shipment not found!"
278
+ msgstr "Przesyłka nie została znaleziona!"
279
 
280
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:107
281
+ msgid "Attachment added"
282
+ msgstr "Załącznik został dodany"
 
283
 
284
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:153
285
+ msgid "Attachment deleted"
286
+ msgstr "Załącznik został usunięty"
 
287
 
288
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:197
289
+ #, php-format
290
+ msgid "Unable to send documents: %1$s"
291
+ msgstr "Nie można wysłać dokumentów: %1$s"
292
 
293
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php:207
294
+ msgid "Attachments send"
295
+ msgstr "Załączniki zostały wysłane"
 
296
 
297
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php:42
298
  #, php-format
299
+ msgid "%1$s notice"
300
+ msgstr "%1$s komunikat"
301
 
302
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php:37
303
+ msgid "Attachments"
304
+ msgstr "Załączniki"
305
 
306
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php:191
307
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:372
308
+ msgid "UPS! Something is wrong!"
309
+ msgstr "UPS! Nie działa poprawnie!"
310
 
311
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:242
312
  #, php-format
313
+ msgid "There was problems on checkout: %1$s"
314
+ msgstr "Pojawił się problem na stronie zamówienia: %1$s"
 
 
 
 
 
 
 
 
 
315
 
316
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:335
317
+ #, php-format
318
+ msgid "%1$s Shipment %2$s was created."
319
+ msgstr "%1$s Przesyłka %2$s została utworzona."
320
 
321
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:353
322
+ #, php-format
323
+ msgid "%1$s Shipment %2$s was canceled."
324
+ msgstr "%1$s Przesyłka %2$s została anulowana."
325
 
326
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php:607
327
+ msgid "Label is not avaliable for this shipment."
328
+ msgstr "Etykieta nie jest dostępna dla tej przesyłki."
 
329
 
330
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:3
331
+ msgid "Create"
332
+ msgstr "Utwórz"
333
 
334
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:4
335
+ msgid "Save"
336
+ msgstr "Zapisz"
337
 
338
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:11
339
+ msgid "Get Label"
340
+ msgstr "Pobierz etykietę"
341
 
342
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:15
343
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/column-actions.php:2
344
+ #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-deactivate.php:77
345
+ msgid "Cancel"
346
+ msgstr "Anuluj"
 
 
347
 
348
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:22
349
+ msgid "Track:"
350
+ msgstr "Śledź:"
351
 
352
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:22
353
+ msgid "Click to track shipment"
354
+ msgstr "Kliknij, aby śledzić przesyłkę"
 
355
 
356
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:27
357
+ #, php-format
358
+ msgid "%1$sShipping charges:%2$s %3$s"
359
+ msgstr "%1$sKoszt przesyłki:%2$s %3$s"
360
 
361
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php:31
362
+ #, php-format
363
+ msgid "%1$sShipment status:%2$s %3$s"
364
+ msgstr "%1$s Status przesyłki: %2$s %3$s"
 
 
365
 
366
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:23
367
+ msgid "Type"
368
+ msgstr "Typ"
369
 
370
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:24
371
+ msgid "Filename"
372
+ msgstr "Nazwa pliku"
 
373
 
374
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:25
375
+ msgid "Sent"
376
+ msgstr "Wysłany"
 
377
 
378
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:37
379
+ msgid "No"
380
+ msgstr "Nie"
 
381
 
382
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:37
383
+ msgid "Yes"
 
 
384
  msgstr ""
385
+ "T\n"
386
+ "ak"
 
 
 
 
 
 
 
 
387
 
388
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:46
389
+ msgid "Send"
390
+ msgstr "Wysłany"
391
 
392
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php:72
393
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/views/html-order-add_shipping-metabox.php:15
394
+ msgid "Add"
395
+ msgstr "Dodaj"
396
 
397
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-single-attachment.php:35
398
+ msgid "Delete"
399
+ msgstr "Usuń"
400
 
401
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php:123
402
+ msgid "Select point from map"
403
+ msgstr "Wybierz punkt z mapy"
404
 
405
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php:17
406
  #, php-format
407
+ msgid ""
408
+ "The Connect Key that you entered is invalid. Please enter a valid key. "
409
+ "%1$sGet your Connect Key →%2$s"
410
+ msgstr ""
411
+ "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
412
+ "klucz. %1$sPobierz swój klucz Connect →%2$s"
413
 
414
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:67
415
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:127
416
+ msgid "Enable"
417
+ msgstr "Włącz"
418
 
419
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:68
420
+ msgid "Cache"
421
+ msgstr "Cache"
 
422
 
423
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php:69
424
+ msgid "Enables Flexible Shipping Connect cache. Disable only for debugging."
425
+ msgstr "Włącza cache Flexible Shipping Connect. Wyłącz tylko do debugowania."
426
 
427
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:55
428
+ msgid "Something go wrong!"
429
+ msgstr "Coś poszło nie tak!"
430
 
431
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:61
 
432
  #, php-format
433
+ msgid ""
434
+ "Invalid response from Flexible Shipping Connect platform. Response code: "
435
+ "%1$s."
436
+ msgstr ""
437
+ "Nieprawidłowa odpowiedź Flexible Shipping Connect. Kod odpowiedzi: %1$s."
438
 
439
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php:69
440
+ msgid "OK"
441
+ msgstr "OK"
 
442
 
443
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:63
444
+ msgid "Checking..."
445
+ msgstr "Sprawdzanie…"
446
 
447
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:67
448
+ msgid "Something go wrong! (AJAX)"
449
+ msgstr "Coś poszło nie tak! (AJAX)"
 
450
 
451
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php:70
452
+ msgid "Add credentials"
453
+ msgstr "Dodaj ustawienia"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
 
455
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:250
456
+ msgid ""
457
+ "Your store has been connected to Flexible Shipping Connect. Choose from the "
458
+ "available shipping integrations below."
459
+ msgstr ""
460
+ "Twój sklep został podłączony do Flexible Shipping Connect. Wybierz jedną z "
461
+ "dostępnych poniżej integracji wysyłkowych."
462
 
463
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:260
464
+ msgid ""
465
+ "You are now disconnected from Flexible Shipping Connect. All shipping "
466
+ "services have been disabled. To use Flexible Shipping Connect again, please "
467
+ "enter a valid Connect Key."
468
+ msgstr ""
469
+ "Zostałeś teraz odłączony od Flexible Shipping Connect. Wszystkie integracje "
470
+ "wysyłkowe zostały wyłączone. Aby ponownie użyć Flexible Shipping Connect, "
471
+ "wprowadź ważny klucz Connect."
472
 
473
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:270
474
+ msgid "Your store is already connected to Flexible Shipping Connect!"
475
+ msgstr "Twój sklep jest już podłączony do Flexible Shipping Connect!"
476
 
477
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:281
478
+ #, php-format
479
+ msgid ""
480
+ "Your store (%1$s) is already registered on another account. You can register "
481
+ "your domain only on one account. If you have questions, %2$scontact us%3$s."
482
+ msgstr ""
483
+ "Twój sklep (%1$s) jest już zarejestrowany na innym koncie. Możesz "
484
+ "zarejestrować swoją domenę tylko na jednym koncie. Jeśli masz pytania, "
485
+ "%2$sskontaktuj się z nami%3$s."
486
 
487
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:330
488
+ #, php-format
489
+ msgid "Message from platform: %1$s%2$s%3$s"
490
+ msgstr "Komunikat z platformy: %1$s%2$s%3$s"
491
 
492
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:342
493
+ #, php-format
494
+ msgid ""
495
+ "FS Connect is undergoing maintenance. To get more information about the "
496
+ "platform status check %1$sstatus.flexibleshipping.com &rarr;%2$s%3$s"
497
+ msgstr ""
498
+ "FS Connect jest w trakcie konserwacji. Aby uzyskać więcej informacji na "
499
+ "temat statusu platformy sprawdź %1$sstatus.flexibleshipping.com &rarr;%2$s"
500
+ "%3$s"
501
 
502
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:366
503
  msgid ""
504
+ "There are some connection problems. Please try again in a few minutes. "
505
+ "Thanks!"
506
  msgstr ""
507
+ "Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
 
508
 
509
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:372
510
+ #, php-format
511
+ msgid ""
512
+ "To get more information about the platform status check %1$sstatus."
513
+ "flexibleshipping.com &rarr;%2$s"
514
+ msgstr ""
515
+ "Aby uzyskać więcej informacji na temat statusu platformy sprawdź %1$sstatus."
516
+ "flexibleshipping.com &rarr;%2$s"
517
 
518
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:397
519
+ #, php-format
520
+ msgid ""
521
+ "The Connect Key that you entered is invalid. Please enter a valid key. "
522
+ "%1$sRegister%3$s for a new key or log in to %2$syour account%3$s to get your "
523
+ "key."
524
+ msgstr ""
525
+ "Wprowadzony klucz Connect jest nieprawidłowy. Proszę wprowadzić prawidłowy "
526
+ "klucz. %1$sZarejestruj się%3$s lub zaloguj na %2$sistniejące konto%3$s, aby "
527
+ "otrzymać klucz."
528
 
529
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:578
530
+ msgid "Disconnect"
531
+ msgstr "Rozłącz"
532
 
533
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php:582
534
+ msgid "Connect"
535
+ msgstr "Połącz"
536
 
537
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php:36
538
  #, php-format
539
+ msgid "%1$s (free shipping)"
540
+ msgstr "%1$s (darmowa wysyłka)"
 
 
 
 
 
541
 
542
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php:37
543
+ #, php-format
544
+ msgid "%1$s (fallback)"
545
+ msgstr "%1$s (stawka awaryjna)"
546
 
547
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:460
548
+ #, php-format
549
+ msgid "Flexible Shipping Fallback (%1$s): %2$s"
550
+ msgstr "Stawka awaryjna Flexible Shipping (%1$s): %2$s"
551
 
552
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:513
553
+ #, php-format
554
+ msgid "Invalid live rates response! Error code: %1$s"
555
+ msgstr "Nieprawidłowa odpowiedź dla stawek live! Kod błędu: %1$s"
556
 
557
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php:532
558
+ #, php-format
559
+ msgid "Live rates response exception %1$s; %2$s occurred while sending request"
 
 
560
  msgstr ""
561
+ "Zwrócony komunikat błędu dla stawek live: %1$s. Kod błędu dla przesłanego "
562
+ "żądania: %2$s"
 
563
 
564
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php:47
565
+ #, php-format
566
+ msgid "Do not you see your courier? %1$sCheck planned integrations →%2$s"
567
+ msgstr "Nie widzisz swojego kuriera? %1$sSprawdź planowane integracje →%2$s"
568
+
569
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:78
570
+ msgid "Invalid requireWordpressPluginVersion capability!"
571
+ msgstr "Invalid requireWordpressPluginVersion capability!"
572
 
573
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:83
574
+ #, php-format
575
  msgid ""
576
+ "This integration requires Flexible Shipping Plugin in version %1$s or newer!"
 
 
577
  msgstr ""
578
+ "Ta integracja wymaga wtyczki Flexible Shipping w wersji %1$s lub nowszej!"
 
 
 
 
 
 
579
 
580
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:92
581
+ #, php-format
582
+ msgid "Go to %s settings</a>"
583
+ msgstr "Przejdź do ustawień %s</a>"
584
 
585
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php:110
586
+ #, php-format
587
+ msgid "%1$s%2$s (new)%3$s"
588
+ msgstr "%1$s%2$s (nowość)%3$s"
589
 
590
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:87
591
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/multilingual.php:44
592
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/multilingual.php:47
593
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/multilingual.php:50
594
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:16
595
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:30
596
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:79
597
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:34
598
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:35
599
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:53
600
+ msgid "Flexible Shipping"
601
+ msgstr "Flexible Shipping"
602
 
603
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:251
604
+ msgid "Connect Services"
605
+ msgstr "Usługi Connect"
606
 
607
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:252
608
+ msgid ""
609
+ "Enable services to automate shipping and print labels with Flexible Shipping "
610
+ "Connect."
611
+ msgstr ""
612
+ "Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
613
+ "Shipping Connect."
614
 
615
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php:305
616
+ msgid "Advanced settings"
617
+ msgstr "Ustawienia zaawansowane"
 
618
 
619
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php:59
620
+ msgid "Order status changed automatically by Flexible Shipping Plugin."
621
+ msgstr ""
622
+ "Status zamówienia zmieniony automatycznie przez wtyczkę Flexible Shipping."
623
 
624
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:37
625
+ msgid "Create shipments"
626
+ msgstr "Utwórz przesyłkę"
627
 
628
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:42
629
+ msgid "Manually"
630
+ msgstr "Manualnie"
 
 
631
 
632
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:43
633
+ msgid "Automatically"
634
+ msgstr "Automatycznie"
635
 
636
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:45
637
  msgid ""
638
+ "Choose to create shipments manually or automatically based on the order "
639
+ "status."
640
  msgstr ""
641
+ "Wybierz opcję ręcznego lub automatycznego tworzenia przesyłek w oparciu o "
642
+ "status zamówienia."
643
 
644
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:49
645
+ msgid "Order status"
646
+ msgstr "Status zamówienia"
647
 
648
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:54
649
+ msgid "Select order status for automatic shipment creation."
650
+ msgstr "Wybierz status zamówienia do automatycznego tworzenia przesyłek."
651
 
652
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:58
653
+ msgid "Complete order"
654
+ msgstr "Zamówienie zrealizowane"
 
655
 
656
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:61
657
+ msgid "Enable automatic order status change"
658
+ msgstr "Włącz automatyczną zmianę statusu zamówienia"
659
 
660
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php:63
661
+ msgid "Automatically change order status to completed after creating shipment."
662
+ msgstr ""
663
+ "Automatyczna zmiana statusu zamówienia na zrealizowane po utworzeniu "
664
+ "przesyłki."
665
 
666
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php:247
667
+ msgid "Invalid format - contact with flexibleshipping.com administrator."
668
+ msgstr "Invalid format - contact with flexibleshipping.com administrator."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
669
 
670
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php:254
671
+ #, php-format
672
+ msgid "Ups, something is wrong. Error code: %1$s."
673
+ msgstr "Ups, coś poszło nie tak. Kod błędu: %1$s."
674
 
675
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:546
676
+ msgid "Rates type"
677
+ msgstr "Typ stawek"
 
 
678
 
679
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:550
680
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:562
681
+ msgid "Custom"
682
+ msgstr "Własne"
 
683
 
684
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:554
685
+ #, php-format
 
 
686
  msgid ""
687
+ "Choose custom rates to set a custom shipping cost (this method will be the "
688
+ "selected %1$s service). Choose live rates if you want to present services "
689
+ "and rates for the customer's address."
690
  msgstr ""
691
+ "Wybierz własne stawki, aby ustawić niestandardowe koszty wysyłki (metodą "
692
+ "wysyłki będzie wybrana usługa %1$s). Wybierz stawki Live, jeśli chcesz "
693
+ "prezentować usługi i stawki wg. adresu klienta."
694
 
695
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:561
696
+ msgid "Live"
697
+ msgstr "Live"
 
 
 
 
698
 
699
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:580
700
+ msgid "Custom services"
701
+ msgstr "Usługi"
702
 
703
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:584
704
+ msgid "Enable services custom settings"
705
+ msgstr "Włącz własne ustawienia usług"
706
 
707
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:626
708
+ msgid "Fallback"
709
+ msgstr "Stawka awaryjna"
710
 
711
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:627
712
+ msgid "Enable fallback"
713
+ msgstr "Włącz stawkę awaryjną"
714
 
715
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:629
 
716
  msgid ""
717
+ "Enable to offer flat rate cost for shipping so that the user can still "
718
+ "checkout, if API returns no matching rates."
719
  msgstr ""
720
+ "Włącz, aby oferować płaską stawkę wysyłki. Klient będzie mógł zrealizować "
721
+ "zamówienia jeśli API nie zwróci żadnych usług."
722
 
723
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php:762
724
  #, php-format
725
+ msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
726
+ msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
 
 
727
 
728
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php:173
729
  #, php-format
730
+ msgid "%1$sYour settings have been saved.%2$s"
731
+ msgstr "%1$sUstawienia zostały zapisane.%2$s"
 
 
732
 
733
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php:102
734
+ msgid "Services"
735
+ msgstr "Usługi"
736
 
737
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:128
738
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:129
739
+ msgid "Flexible Shipping Connect Registration"
740
+ msgstr "Rejestracja Flexible Shipping Connect"
 
 
 
741
 
742
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:203
 
743
  msgid ""
744
+ "There are some connection problems. Please try again in few minutes. Thanks!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
745
  msgstr ""
746
+ "Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
747
 
748
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:212
749
+ msgid "Please enter a valid email!"
750
+ msgstr "Proszę podać poprawny adres e-mail!"
 
 
751
 
752
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:225
753
  #, php-format
754
  msgid ""
755
+ "%1$sAccount created, please check your email and click the activation link "
756
+ "to connect (%3$s).%2$s If you haven't received the email, please %4$scontact "
757
+ "us%5$s."
758
  msgstr ""
759
+ "%1$sUtworzono konto, sprawdź swój e-mail i kliknij link aktywacyjny, aby się "
760
+ "połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
761
+ "z nami%5$s."
762
 
763
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:249
764
  #, php-format
765
+ msgid ""
766
+ "Your store (%1$s) is already registered with another account! You can "
767
+ "register your domain with one account. If you have questions, %2$scontact us"
768
+ "%3$s."
769
  msgstr ""
770
+ "Twój sklep (%1$s) jest już zarejestrowany na innym koncie! Możesz "
771
+ "zarejestrować swoją domenę za pomocą jednego konta. Jeśli masz pytania, "
772
+ "%2$sskontaktuj się z nami%3$s."
773
 
774
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:271
775
  #, php-format
776
+ msgid ""
777
+ "Our demo does not support Flexible Shipping Connect registration. Try FS "
778
+ "Connect for free. %1$sCheck now →%2$s"
779
  msgstr ""
780
+ "Nasze demo nie obsługuje rejestracji Flexible Shipping Connect. Wypróbuj FS "
781
+ "Connect za darmo. %1$sSprawdź teraz →%2$s"
782
 
783
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:298
 
 
 
 
 
 
 
784
  #, php-format
785
+ msgid ""
786
+ "Account with this email is already registered! We emailed your Connect Key "
787
+ "to %1$s.<br>Enter your key %2$shere%4$s. You can also get your key by "
788
+ "logging to %3$syour account%4$s."
789
  msgstr ""
790
+ "Konto z tym e-mailem jest już zarejestrowane! Wysłaliśmy wiadomość e-mail z "
791
+ "kluczem Connect do %1$s.<br>Wpisz klucz %2$stutaj%4$s. Możesz również "
792
+ "uzyskać klucz logując się na %3$sswoje konto%4$s."
793
 
794
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php:316
795
  #, php-format
796
+ msgid "Unknown response code from Flexible Shipping Connect API (%s)."
797
+ msgstr "Nieznany kod odpowiedzi z API Flexible Shipping Connect (%s)."
798
 
799
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php:76
800
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:219
801
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:243
802
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:190
803
+ msgid "Invalid nonce!"
804
+ msgstr "Błąd weryfikacji nonce!"
805
 
806
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php:47
807
+ msgid "Points can not be found. Check the shipping address."
808
+ msgstr "Nie można znaleźć punktów. Sprawdź adres wysyłki."
809
 
810
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php:48
811
+ msgid "It's your location"
812
+ msgstr "Twoja lokalizacja"
 
813
 
814
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php:79
815
+ msgid "Cannot get data for this address!"
816
+ msgstr "Nie można uzyskać danych dla tego adresu!"
817
 
818
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php:4
819
+ msgid "Select point"
820
+ msgstr "Wybierz punkt"
821
 
822
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php:116
823
+ msgid "Select"
824
+ msgstr "Wybierz"
825
 
826
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:4
827
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:5
828
+ msgid "Print Labels"
829
+ msgstr "Drukuj etykiety"
830
 
831
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:6
832
+ msgid ""
833
+ "Download printable PDF shipping labels directly from WooCommerce orders list "
834
+ "in bulk or one by one from order details."
835
  msgstr ""
836
+ "Pobieraj etykiety wysyłkowe bezpośrednio z listy zamówień WooCommerce lub "
837
+ "edycji zamówienia."
838
 
839
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:10
840
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:11
841
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:90
842
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:91
843
+ msgid "Calculate Rates"
844
+ msgstr "Obliczaj stawki"
845
 
846
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:12
847
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:92
848
+ msgid ""
849
+ "Calculate shipping rates in real time, and get available service types and "
850
+ "expected delivery time based on customer's address."
851
  msgstr ""
852
+ "Obliczaj stawki wysyłki w czasie rzeczywistym i otrzymuj dostępne rodzaje "
853
+ "usług w oparciu o adres klienta."
854
 
855
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:16
856
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:17
857
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:96
858
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:97
859
+ msgid "Track Parcels"
860
+ msgstr "Śledź przesyłki"
861
 
862
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:18
863
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:98
864
  msgid ""
865
+ "Always keep your customers (and yourself) up to date with automatic "
866
+ "confirmation emails with tracking link and delivery status."
867
  msgstr ""
868
+ "Przekazuj linki do śledzenia przesyłki w automatycznych mailach "
869
+ "transakcyjnych do klientów."
870
+
871
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:22
872
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:23
873
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:102
874
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:103
875
+ msgid "Automate Shipping"
876
+ msgstr "Automatyzuj wysyłkę"
877
 
878
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:24
879
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:104
880
  msgid ""
881
+ "Automatically create shipments and print labels based on order status. "
882
+ "Change order status after shipment creation."
 
883
  msgstr ""
884
+ "Twórz przesyłki automatycznie i drukuj etykiety na podstawie statusu "
885
+ "zamówienia. Status zamówienia zmieni się automatycznie po utworzeniu "
886
+ "przesyłki."
887
 
888
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:28
889
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:29
890
+ msgid "Create Shipments"
891
+ msgstr "Twórz przesyłki"
892
 
893
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:30
894
  msgid ""
895
+ "Create shipments with predefined services, sizes and weights automatically "
896
+ "filled in from order items."
 
 
 
 
 
 
 
 
 
 
 
897
  msgstr ""
898
+ "Twórz przesyłki z ustawionymi usługami, rozmiarami i wagami automatycznie "
899
+ "wypełnionymi z pozycji zamówienia."
900
 
901
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:34
902
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:35
903
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:108
904
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:109
905
+ msgid "Manage Orders"
906
+ msgstr "Zarządzaj zamówieniami"
907
 
908
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:36
909
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:110
910
+ msgid ""
911
+ "Get a complete overview of your orders and shipments in your WooCommerce "
912
+ "dashboard with shipments statuses and filters."
913
  msgstr ""
914
+ "Zyskaj możliwość kompletnego zarządzania zamówieniami i przesyłkami "
915
+ "bezpośrednio z panelu WooCommerce za pomocą statusów i filtrów."
916
 
917
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:43
918
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:19
919
+ msgid "Ship your orders faster with Flexible Shipping Connect"
920
+ msgstr "Wysyłaj zamówienia szybciej z Flexible Shipping Connect"
921
 
922
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php:62
923
+ msgid "Sign up now!"
924
+ msgstr "Zarejestruj się teraz!"
 
925
 
926
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:9
927
+ msgid "Flexible Shipping Connect"
928
+ msgstr "Flexible Shipping Connect"
 
929
 
930
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:16
931
+ #, php-format
932
+ msgid ""
933
+ "Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s."
934
  msgstr ""
935
+ "Dowiedz się więcej o możliwościach związanych z %1$sFlexible Shipping Connect"
936
+ "%2$s."
937
 
938
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:26
939
+ #, php-format
940
+ msgid ""
941
+ "%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
942
+ "%2$syour account%3$s to get your key."
943
  msgstr ""
944
+ "%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
945
+ "%2$sswojego konta%3$s, aby otrzymać klucz."
946
 
947
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php:33
948
+ msgid "Check how to start with FS Connect &rarr;"
949
+ msgstr "Sprawdź jak zacząć z FS Connect &rarr;"
 
 
 
950
 
951
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:5
952
+ msgid "Welcome to new Flexible Shipping Connect installation guide."
953
+ msgstr "Witamy w przewodniku o nowym Flexible Shipping Connect."
954
 
955
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:7
956
  msgid ""
957
+ "To complete the installation please click the Sign up for Connect button "
958
+ "below."
959
  msgstr ""
960
+ "Aby zakończyć instalację, kliknij poniżej przycisk Zarejestruj się w Connect."
961
 
962
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:9
963
  #, php-format
964
  msgid ""
965
+ "The %saccount is free (no credit card needed)%s and allows you to send "
966
+ "packages directly from here!"
967
  msgstr ""
968
+ "Konto %sjest bezpłatne (nie wymaga karty kredytowej) %s i pozwala na "
969
+ "nadawanie paczek bezpośrednio z panelu WooCommerce!"
970
 
971
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:11
 
972
  msgid ""
973
+ "If you want to learn more about other benefits, you may click one of the "
974
+ "tabs on the left."
975
  msgstr ""
976
+ "Jeśli chcesz dowiedzieć się więcej o innych korzyściach, możesz kliknąć "
977
+ "jedną z zakładek po lewej stronie."
978
 
979
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:35
980
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:41
981
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:47
982
+ msgid "soon!"
983
+ msgstr "wkrótce!"
984
+
985
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:56
986
+ msgid "Using Flexible Shipping Connect, you can send packages via:"
987
  msgstr ""
988
+ "Korzystając z Flexible Shipping Connect, możesz wysyłać paczki za "
989
+ "pośrednictwem:"
990
 
991
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:77
992
+ msgid "Read more about possible integrations &rarr;"
993
+ msgstr "Przeczytaj więcej o możliwych integracjach &rarr;"
994
+
995
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:84
996
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:85
997
+ msgid "Create & Print Labels"
998
+ msgstr "Twórz i drukuj etykiety"
999
+
1000
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:86
1001
  msgid ""
1002
+ "Create shipments with predefined services, sizes and weights automatically "
1003
+ "filled in from order items. Download printable PDF shipping labels directly "
1004
+ "from WooCommerce orders list in bulk or one by one from order details."
1005
  msgstr ""
1006
+ "Twórz przesyłki z ustawionymi usługami, rozmiarami i wagami automatycznie "
1007
+ "wypełnionymi z pozycji zamówienia. Pobieraj etykiety wysyłkowe bezpośrednio "
1008
+ "z listy zamówień WooCommerce lub edycji zamówienia."
1009
 
1010
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:114
1011
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:115
1012
+ msgid "Couriers"
1013
+ msgstr "Kurierzy"
1014
+
1015
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:164
1016
+ msgid "Sign up for Connect"
1017
+ msgstr "Zarejestruj się w Connect"
1018
+
1019
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:166
1020
+ msgid "Start quick tour"
1021
+ msgstr "Rozpocznij przewodnik"
1022
+
1023
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php:166
1024
+ msgid "Next feature"
1025
+ msgstr "Następna funkcja"
1026
+
1027
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-second-notice.php:3
1028
  #, php-format
1029
  msgid ""
1030
+ "You never sign up to Flexible Shipping Connect. You may finish the "
1031
+ "registration process here %1$sSign up for Connect%2$s"
1032
  msgstr ""
1033
+ "Nie zarejestrowałeś się w Flexible Shipping Connect. Możesz dokończyć proces "
1034
+ "rejestracji tutaj %1$sZarejestruj się w Connect%2$s"
1035
 
1036
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-fallback-message.php:1
1037
+ msgid "Fallback:"
1038
+ msgstr "Stawka awaryjna:"
1039
+
1040
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-free-shipping.php:1
1041
+ msgid "Free shipping"
1042
+ msgstr "Darmowa wysyłka"
1043
+
1044
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-message-stock.php:1
1045
+ msgid "Additional info:"
1046
+ msgstr "Dodatkowe informacje:"
1047
+
1048
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:4
1049
  #, php-format
1050
  msgid ""
1051
+ "You are connected. %1$sGo to Flexible Shipping Connect settings &rarr;%2$s"
 
1052
  msgstr ""
1053
+ "Jesteś połączony. %1$sPrzejdź do ustawień Flexible Shipping Connect &rarr;"
1054
+ "%2$s"
1055
 
1056
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:10
1057
+ msgid "Join Flexible Shipping Connect Now!"
1058
+ msgstr "Dołącz do Flexible Shipping Connect!"
1059
+
1060
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:16
1061
+ msgid "Sign up for automatic shipments, label printing, live rates and more!"
1062
  msgstr ""
1063
+ "Zarejestruj się, aby automatyzować przesyłkę, drukować etykiety, pobierać "
1064
+ "stawki i wiele więcej!"
1065
 
1066
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:18
1067
  #, php-format
1068
  msgid ""
1069
+ "By signing up, you agree to the %1$sTerms of Service%3$s and to %2$sPrivacy "
1070
+ "Policy%3$s"
1071
  msgstr ""
1072
+ "Rejestrując się, zgadzasz się na %1$sTerms of Service%3$s i %2$sPrivacy "
1073
+ "Policy%3$s"
1074
 
1075
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php:23
1076
+ msgid "Sign Up"
1077
+ msgstr "Zarejestruj się"
 
1078
 
1079
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php:6
1080
+ msgid "Connect Key"
1081
+ msgstr "Klucz Connect"
 
 
1082
 
1083
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php:22
1084
+ msgid ""
1085
+ "Are you sure you want do disconnect your store from Flexible Shipping "
1086
+ "Connect?\\n\\nAll shipping services will be disabled."
1087
  msgstr ""
1088
+ "Czy jesteś pewien, że chcesz odłączyć swój sklep od Flexible Shipping "
1089
+ "Connect?\\n\\nWszystkie integracje wysyłkowe zostaną wyłączone."
1090
 
1091
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:13
1092
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:16
1093
+ msgid "How to use Flexible Shipping?"
1094
+ msgstr "Jak używać Flexible Shipping?"
1095
 
1096
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:19
1097
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:22
1098
+ #, php-format
1099
+ msgid ""
1100
+ "To add first Flexible Shipping method go to %sShipping zones%s and add "
1101
+ "Flexible Shipping to a shipping zone."
1102
  msgstr ""
1103
+ "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %sStrefy "
1104
+ "wysyłki%s i dodaj Flexible Shipping do strefy wysyłki."
1105
 
1106
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:26
1107
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:29
1108
+ msgid ""
1109
+ "You can start the configuration by clicking the Flexible Shipping link in "
1110
+ "the Shipping methods table."
1111
  msgstr ""
1112
+ "Możesz rozpocząć konfigurację klikając na link Flexible Shipping w tabeli "
1113
+ "”Metody wysyłki”."
1114
 
1115
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:29
1116
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:32
1117
+ msgid "Quick Video Overview"
1118
+ msgstr "Krótki przewodnik video"
1119
 
1120
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:35
1121
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:38
1122
+ msgid "More resources"
1123
+ msgstr "Więcej informacji"
1124
 
1125
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:38
1126
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:41
1127
+ msgid "General Settings"
1128
+ msgstr "Ustawienia główne"
 
1129
 
1130
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:39
1131
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:42
1132
+ msgid "Adding a shipping method"
1133
+ msgstr "Dodawanie metody wysyłki"
1134
 
1135
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:40
1136
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:43
1137
+ msgid "Currency Support"
1138
+ msgstr "Waluty"
1139
 
1140
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:41
1141
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:44
1142
+ msgid "Weight Based Shipping"
1143
+ msgstr "Koszt na wagę"
1144
 
1145
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:42
1146
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:45
1147
+ msgid "Shipping Insurance"
1148
+ msgstr "Ubezpieczenie przesyłki"
 
1149
 
1150
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description-body.php:43
1151
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:46
1152
+ msgid "Conditional Cash on Delivery"
1153
+ msgstr "Przesyłka za pobraniem"
1154
 
1155
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:49
1156
+ msgid "Integrations"
1157
+ msgstr "Integracja"
 
 
 
1158
 
1159
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:54
1160
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:58
1161
+ msgid "FS Connect"
1162
+ msgstr "FS Connect"
 
 
1163
 
1164
+ #: vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-shipping-method-info-description.php:60
1165
+ msgid "Enable integration with Flexible Shipping Connect"
1166
+ msgstr "Włącz integrację z Flexible Shipping Connect"
1167
 
1168
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:164
1169
+ #, php-format
1170
+ msgid ""
1171
+ "Flexible Shipping has changed the calculation method for shipping rules. "
1172
+ "Currently, the cart value for rules based on price is determined by "
1173
+ "WooCommerce tax option \"Display prices during cart and checkout\". You "
1174
+ "should check the %ssettings%s."
1175
+ msgstr ""
1176
+ "Flexible Shipping: zaktualizowane zostały metody obliczania reguł wysyłki. "
1177
+ "Aktualnie dla reguł opartych na cenie wartość koszyka zostanie obliczona na "
1178
+ "podstawie ustawienia podatków WooCommerce ”Wyświetlanie cen w sklepie”. "
1179
+ "Sprawdź %sustawienia podatków%s."
1180
 
1181
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:181
1182
+ msgid ""
1183
+ "Flexible Shipping requires at least version 2.7 of Active Payments plugin."
1184
+ msgstr ""
1185
+ "Flexible Shipping wymaga wtyczki Aktywne płatności w wersji co najmniej 2.7."
1186
 
1187
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:196
1188
+ msgid "Flexible Shipping requires at least version 1.2 of eNadawca plugin."
1189
+ msgstr "Flexible Shipping wymaga wtyczki eNadawca w wersji co najmniej 1.2."
1190
 
1191
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:211
1192
+ msgid ""
1193
+ "Flexible Shipping requires at least version 1.1 of Paczka w Ruchu plugin."
1194
+ msgstr ""
1195
+ "Flexible Shipping wymaga wtyczki Paczka w Ruchu w wersji co najmniej 1.1."
1196
 
1197
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php:223
1198
  #, php-format
1199
+ msgid ""
1200
+ "You are using WooCommerce Flexible Shipping below 1.4. Please deactivate it "
1201
+ "on %splugins page%s. Read about big changes in Flexible Shipping on %sour "
1202
+ "blog →%s"
1203
+ msgstr ""
1204
+ "Masz włączony WooCommerce Flexible Shipping w wersji starszej niż 1.4. "
1205
+ "Wyłącz go na %sstronie wtyczek%s. Przeczytaj o dużej zmianie we Flexible "
1206
+ "Shipping na %snaszym blogu →%s"
1207
 
1208
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:38
1209
+ #, php-format
1210
+ msgid "Shipment for order %1$s, %2$s"
1211
+ msgstr "Przesyłka do zamówienia %s, %s"
1212
 
1213
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:53
1214
  #, php-format
1215
+ msgid "Added new shipment via metabox. Shipment ID: %s"
1216
+ msgstr "Dodano nową przesyłkę. Numer przesyłki: %s"
1217
 
1218
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:104
1219
+ msgid "Select integration"
1220
+ msgstr "Wybierz integrację"
1221
 
1222
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/class-order-add-shipping.php:113
1223
+ msgid "Add shipping"
1224
+ msgstr "Dodaj przesyłkę"
 
1225
 
1226
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:60
1227
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:62
1228
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:64
1229
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:97
1230
+ msgid "Shipping Manifests"
1231
+ msgstr "Protokoły nadania"
1232
 
1233
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:61
1234
+ msgid "Shipping Manifest"
1235
+ msgstr "Protokół nadania"
 
1236
 
1237
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:65
1238
+ msgid "View Shipping Manifests"
1239
+ msgstr "Wyświetl protokół nadania"
 
1240
 
1241
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:66
1242
+ msgid "Add new Shipping Manifest"
1243
+ msgstr "Dodaj nowy Protokół nadania"
1244
 
1245
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:67
1246
+ msgid "Add new Shipping Manifests"
1247
+ msgstr "Dodaj nowe protokoły nadania"
1248
 
1249
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:68
1250
+ msgid "Edit Shipping Manifest"
1251
+ msgstr "Edytuj protokół nadania"
1252
 
1253
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:69
1254
+ msgid "Save Shipping Manifest"
1255
+ msgstr "Zapisz protokół nadania"
1256
 
1257
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:70
1258
+ msgid "Search Shipping Manifests"
1259
+ msgstr "Szukaj protokół nadania"
 
 
1260
 
1261
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:71
1262
+ msgid "Shipping Manifests not found"
1263
+ msgstr "Nie znaleziono protokołów nadania"
1264
 
1265
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:72
1266
+ msgid "Shipping Manifests not found in trash"
1267
+ msgstr "Nie znaleziono protokołów nadania w koszu"
1268
 
1269
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:74
1270
+ msgid "Shipping Manifests."
1271
+ msgstr "Protokoły nadania."
 
1272
 
1273
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:116
1274
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:50
1275
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:52
1276
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:54
1277
+ msgid "Shipments"
1278
+ msgstr "Przesyłki"
1279
 
1280
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:160
1281
+ msgid "Date"
1282
+ msgstr "Data"
1283
 
1284
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:161
1285
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/filter-form.php:5
1286
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:137
1287
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-orders-filter-form.php:5
1288
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:15
1289
+ msgid "Integration"
1290
+ msgstr "Integracja"
1291
 
1292
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:162
1293
+ msgid "Number"
1294
+ msgstr "Numer"
1295
 
1296
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:163
1297
+ msgid "Shipments count"
1298
+ msgstr "Liczba przesyłek"
1299
 
1300
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php:164
1301
+ msgid "Actions"
1302
+ msgstr "Akcje"
 
 
1303
 
1304
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/column-actions.php:1
1305
+ msgid "Download"
1306
+ msgstr "Pobierz"
1307
 
1308
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/filter-form.php:4
1309
+ msgid "All manifests"
1310
+ msgstr "Wszystkie protokoły nadania"
 
 
 
 
 
 
 
 
 
1311
 
1312
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:10
1313
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/manifest/views/manifest-metabox.php:50
1314
+ msgid "Order"
1315
+ msgstr "Zamówienie"
 
 
 
 
1316
 
1317
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:29
1318
+ msgid "No shipment id!"
1319
+ msgstr "Brak id przesyłki!"
 
1320
 
1321
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:33
1322
+ msgid "No data!"
1323
+ msgstr "Brak danych!"
1324
 
1325
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php:55
1326
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:47
1327
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:198
1328
+ msgid "Created"
1329
+ msgstr "Utworzona"
1330
 
1331
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:25
1332
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:15
1333
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:15
1334
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:18
1335
+ #, php-format
1336
+ msgid "%1$sOk, you deserved it%2$s"
1337
+ msgstr "%1$sTak, zasługujecie na nią%2$s"
1338
 
1339
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/abstract-rate.php:35
1340
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:25
1341
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:25
1342
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:28
1343
  #, php-format
1344
+ msgid "%1$sI already did%2$s"
1345
+ msgstr "%1$sJuż to zrobiłem/am%2$s"
1346
+
1347
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/first-rate-notice.php:38
1348
  msgid ""
1349
+ "Awesome, you've been using Flexible Shipping for more than 2 weeks. May I "
1350
+ "ask you to give it a 5-star rating on WordPress?"
1351
  msgstr ""
1352
+ "Fantastycznie, korzystasz z Flexible Shipping już ponad dwa tygodnie. Czy "
1353
+ "mogę Cię prosić o wystawienie 5-gwiazdkowej oceny?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1354
 
1355
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/second-rate-notice.php:38
1356
  msgid ""
1357
+ "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could "
1358
+ "you please do me a BIG favor and give it a 5-star rating on WordPress? ~ "
1359
+ "Peter"
1360
  msgstr ""
1361
+ "Fantastycznie, korzystasz z Flexible Shipping już ponad 2 tygodnie. Czy "
1362
+ "możesz wyświadczyć mi wielką przysługę i wystawić 5-gwiazdkową ocenę? ~ Piotr"
1363
 
1364
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/rate-notices/third-rate-notice.php:41
1365
  msgid ""
1366
+ "Awesome, you just crossed the 100 orders on Flexible Shipping method. Could "
1367
+ "you please do me a BIG favor and give it a 5-star rating on WordPress? ~ "
1368
+ "Peter"
1369
  msgstr ""
1370
+ "Fantastycznie, przekroczyłeś 100 zamówień z metodą wysyłki Flexible "
1371
+ "Shipping. Czy możesz wyświadczyć mi wielką przysługę i wystawić 5-gwiazdkową "
1372
+ "ocenę? ~Piotr"
1373
 
1374
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php:300
1375
+ msgid "Please override shipping_column method!"
1376
+ msgstr "Proszę nadpisać metodę shipping_column!"
1377
 
1378
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:55
1379
+ msgid "View Shipments"
1380
+ msgstr "Wyświetl przesyłki"
 
 
 
 
 
 
1381
 
1382
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:56
1383
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:57
1384
+ msgid "Add new Shipment"
1385
+ msgstr "Dodaj nową przesyłkę"
1386
 
1387
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:58
1388
+ msgid "Edit Shipment"
1389
+ msgstr "Edytuj przesyłkę"
 
 
 
 
 
 
1390
 
1391
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:59
1392
+ msgid "Save Shipment"
1393
+ msgstr "Zapisz przesyłkę"
 
 
 
1394
 
1395
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:60
1396
+ msgid "Search Shipments"
1397
+ msgstr "Szukaj przesyłek"
 
 
 
 
 
1398
 
1399
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:61
1400
+ msgid "Shipment not found"
1401
+ msgstr "Nie znaleziono przesyłki"
 
 
 
 
 
 
 
1402
 
1403
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:62
1404
+ msgid "Shipment not found in trash"
1405
+ msgstr "Nie znaleziono przesyłki w koszu"
1406
 
1407
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:64
1408
+ msgid "Shipments."
1409
+ msgstr "Przesyłki."
1410
 
1411
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:84
1412
+ msgctxt "Shipment status"
1413
+ msgid "New"
1414
+ msgstr "Nowa"
1415
 
1416
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:89
1417
  #, php-format
1418
+ msgid "New <span class=\"count\">(%s)</span>"
1419
+ msgid_plural "New <span class=\"count\">(%s)</span>"
1420
+ msgstr[0] "Nowa <span class=\"count\">(%s)</span>"
1421
+ msgstr[1] "Nowa <span class=\"count\">(%s)</span>"
1422
+ msgstr[2] "Nowa <span class=\"count\">(%s)</span>"
1423
 
1424
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:92
1425
+ msgctxt "Shipment status"
1426
+ msgid "Created"
1427
+ msgstr "Utworzona"
1428
 
1429
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:97
1430
  #, php-format
1431
+ msgid "Created <span class=\"count\">(%s)</span>"
1432
+ msgid_plural "Created <span class=\"count\">(%s)</span>"
1433
+ msgstr[0] "Utworzona <span class=\"count\">(%s)</span>"
1434
+ msgstr[1] "Utworzona <span class=\"count\">(%s)</span>"
1435
+ msgstr[2] "Utworzona <span class=\"count\">(%s)</span>"
1436
 
1437
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:100
1438
+ msgctxt "Shipment status"
1439
+ msgid "Confirmed"
1440
+ msgstr "Zatwierdzona"
 
 
1441
 
1442
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:105
1443
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:113
1444
  #, php-format
1445
+ msgid "Confirmed <span class=\"count\">(%s)</span>"
1446
+ msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
1447
+ msgstr[0] "Zatwierdzona <span class=\"count\">(%s)</span>"
1448
+ msgstr[1] "Zatwierdzona <span class=\"count\">(%s)</span>"
1449
+ msgstr[2] "Zatwierdzona <span class=\"count\">(%s)</span>"
1450
 
1451
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:108
1452
+ msgctxt "Shipment status"
1453
+ msgid "Manifest created"
1454
+ msgstr "Protokół nadania utworzony"
1455
 
1456
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:116
1457
+ msgctxt "Shipment status"
1458
+ msgid "Failed"
1459
+ msgstr "Błąd"
 
 
1460
 
1461
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:121
1462
  #, php-format
1463
+ msgid "Failed <span class=\"count\">(%s)</span>"
1464
+ msgid_plural "Failed <span class=\"count\">(%s)</span>"
1465
+ msgstr[0] "Błąd <span class=\"count\">(%s)</span>"
1466
+ msgstr[1] "Błąd <span class=\"count\">(%s)</span>"
1467
+ msgstr[2] "Błąd <span class=\"count\">(%s)</span>"
1468
 
1469
+ #: vendor/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php:136
1470
+ msgid "Shipment data"
1471
+ msgstr "Dane przesyłki"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1472
 
1473
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/abtests/class-pointer-messages.php:53
1474
+ msgid "Watch how to use Flexible Shipping"
1475
+ msgstr "Obejrzyj konfigurację Flexible Shipping"
 
 
 
 
 
1476
 
1477
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/abtests/class-pointer-messages.php:71
1478
+ msgid "How to start with Flexible Shipping"
1479
+ msgstr "Jak zacząć z Flexible Shipping?"
 
 
 
1480
 
1481
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/abtests/views/html-pointer-message-fs-text.php:7
1482
+ #, php-format
1483
  msgid ""
1484
+ "To add first Flexible Shipping method go to %1$sShipping zones%2$s and add "
1485
+ "Flexible Shipping to a shipping zone. More info about %3$sshipping methods"
1486
+ "%4$s."
1487
  msgstr ""
1488
+ "Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %1$sStrefy "
1489
+ "wysyłki%2$s i dodaj Flexible Shipping do strefy wysyłki. Dowiedz się więcej "
1490
+ "o %3$smetodach wysyłki%4$s."
1491
 
1492
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:46
1493
+ msgid "New"
1494
+ msgstr "Nowa"
 
1495
 
1496
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:48
1497
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:199
1498
+ msgid "Confirmed"
1499
+ msgstr "Zatwierdzona"
 
 
 
1500
 
1501
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:49
1502
+ msgid "Manifest"
1503
+ msgstr "Protokół nadania"
 
 
 
1504
 
1505
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:50
1506
+ msgid "Failed"
1507
+ msgstr "Błąd"
 
 
 
 
 
1508
 
1509
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:197
1510
+ msgid "New shipment"
1511
+ msgstr "Nowa"
 
1512
 
1513
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:200
1514
+ msgid "Manifest created"
1515
+ msgstr "Protokół nadania utworzony"
1516
 
1517
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:255
1518
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:261
1519
+ msgid "Shipping"
1520
+ msgstr "Wysyłka"
1521
 
1522
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:269
1523
+ msgid "Send shipment"
1524
+ msgstr "Nadaj przesyłkę"
1525
+
1526
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:270
1527
+ msgid "Get labels"
1528
+ msgstr "Pobierz etykiety nadawcze"
1529
+
1530
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:272
1531
+ msgid "Create shipping manifest"
1532
+ msgstr "Utwórz protokół nadania"
1533
+
1534
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:294
1535
+ msgid "Shipment created."
1536
+ msgstr "Przesyłka utworzona."
1537
+
1538
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:306
1539
+ msgid "No action performed."
1540
+ msgstr "Nie wykonano żadnych działań."
1541
+
1542
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:326
1543
+ msgid "Label downloaded."
1544
+ msgstr "Etykieta została pobrana."
1545
+
1546
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:347
1547
  msgid ""
1548
+ "Unable to create temporary zip archive for labels. Check temporary folder "
1549
+ "configuration on server."
1550
  msgstr ""
1551
+ "Nie można utworzyć tymczasowego archiwum zip dla etykiet. Sprawdź "
1552
+ "konfigurację folderu na serwerze."
1553
 
1554
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:411
1555
  #, php-format
1556
  msgid ""
1557
+ "Created manifest: %s (%s). If download not start automatically click %shere"
1558
+ "%s."
1559
  msgstr ""
1560
+ "Utworzone protokoły nadania: %s (%s). Jeśli pobieranie nie rozpoczęło się "
1561
+ "automatycznie kliknij %stutaj%s."
1562
 
1563
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:423
1564
+ #, php-format
1565
+ msgid "Manifest creation error: %s (%s)."
1566
+ msgstr "Błąd podczas tworzenia protokołu nadania: %s (%s)."
1567
 
1568
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:434
1569
+ msgid "No manifests created."
1570
+ msgstr "Nie zostały utworzone protokoły nadania."
1571
 
1572
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:448
1573
+ #, php-format
1574
+ msgid "Bulk send shipment - processed orders: %d"
1575
+ msgstr "Masowe nadawanie przesyłek - przetworzone zamówienia: %d"
 
 
1576
 
1577
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:456
1578
  #, php-format
1579
+ msgid "Bulk labels - processed orders: %d. No labels for processed orders."
 
 
1580
  msgstr ""
1581
+ "Masowe pobieranie etykiet - przetworzone zamówienia: %d. Brak etykiet dla "
1582
+ "przetworzonych zamówień."
1583
 
1584
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:475
1585
+ #, php-format
1586
  msgid ""
1587
+ "Bulk labels - processed orders: %d. If download not start automatically "
1588
+ "click %shere%s."
1589
  msgstr ""
1590
+ "Masowe pobieranie etykiet - przetworzone zamówienia: %d. Jeśli pobieranie "
1591
+ "nie rozpoczęło się automatycznie kliknij %stutaj%s ."
1592
 
1593
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/bulk-actions.php:485
1594
+ #, php-format
1595
+ msgid "Bulk shipping manifest - processed orders: %d"
1596
+ msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
 
1597
 
1598
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:86
1599
+ msgid ""
1600
+ "Sorry, there has been an error. The CSV is invalid or incorrect file type."
1601
  msgstr ""
1602
+ "Przepraszamy, wystąpił błąd. Plik CSV jest niepoprawny lub typ pliku jest "
1603
+ "nieprawidłowy."
1604
 
1605
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:92
1606
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:94
1607
+ msgid "import"
1608
+ msgstr "import"
1609
 
1610
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:105
1611
+ #, php-format
1612
+ msgid "Free Shipping value %1$s is not valid number. Row number %2$d."
1613
+ msgstr "Wartość darmowej wysyłki %1$s jest niepoprawna. Numer wiersza %2$d."
1614
 
1615
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:112
1616
+ #, php-format
1617
+ msgid "Maximum Cost value %1$s is not valid number. Row number %2$d."
1618
+ msgstr "Maksymalny koszt %1$s jest niepoprawny. Numer wiersza %2$d."
 
 
 
 
 
1619
 
1620
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:124
1621
+ #, php-format
1622
+ msgid "Invalid value for Calculation Method in row number %d."
1623
+ msgstr "Nieprawidłowa wartość dla Metody obliczania w wierszu %d."
1624
 
1625
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:154
1626
+ #, php-format
1627
+ msgid "%1$s value %2$s is not valid number. Row number %3$d."
1628
+ msgstr "%1$s wartość %2$s jest niepoprawna. Numer wiersza %3$d."
1629
 
1630
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:191
1631
+ #, php-format
1632
+ msgid "Error while creating shipping class: %1$s, %2$s"
1633
+ msgstr "Błąd podczas tworzenia klasy wysyłkowej: %1$s, %2$s"
1634
 
1635
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:224
1636
+ #, php-format
1637
+ msgid "Invalid value for Based On in row number %d."
1638
+ msgstr "Nieprawidłowa wartość dla Oparte na w wierszu %d."
1639
 
1640
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/csv/class-csv-importer.php:291
1641
  #, php-format
1642
+ msgid "Shipping method %1$s imported as %2$s."
1643
+ msgstr "Metoda wysyłki %1$s została zaimportowana jako %2$s."
 
 
 
 
1644
 
1645
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/logger/class-saas-logger-downloader.php:57
1646
+ msgid "File not exists!"
1647
+ msgstr "Plik nie istnieje!"
1648
 
1649
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/logger/class-saas-logger-downloader.php:60
1650
+ msgid "Insufficient privileges!"
1651
+ msgstr "Niewystarczające uprawnienia!"
1652
 
1653
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/logger/class-saas-logger-settings.php:95
1654
+ msgid "Enable Debug Mode"
1655
+ msgstr "Włącz tryb debug"
1656
 
1657
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/logger/class-saas-logger-settings.php:96
1658
+ msgid "Debug mode"
1659
+ msgstr "Tryb debug"
1660
+
1661
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/logger/class-saas-logger-settings.php:103
1662
  #, php-format
1663
+ msgid "%1$sDownload debug.log file%2$s"
1664
+ msgstr "%1$sPobierz plik debug.log%2$s"
1665
+
1666
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:18
1667
+ #, php-format
1668
+ msgid "See how to %sconfigure Flexible Shipping%s."
1669
+ msgstr "Zobacz jak %sskonfigurować Flexible Shipping%s."
1670
+
1671
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:21
1672
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:70
1673
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:44
1674
+ msgid "Enable/Disable"
1675
+ msgstr "Włącz/Wyłącz"
1676
+
1677
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:23
1678
+ msgid "Enable Flexible Shipping"
1679
+ msgstr "Włącz Flexible Shipping"
1680
 
1681
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:27
1682
+ msgid "Shipping title"
1683
+ msgstr "Tytuł"
1684
 
1685
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:29
1686
+ msgid "Visible only to admin in WooCommerce settings."
1687
+ msgstr "Widoczny tylko dla admina w ustawieniach WooCommerce."
 
 
1688
 
1689
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:34
1690
+ msgid "Tax Status"
1691
+ msgstr "Status podatku"
 
 
 
 
 
1692
 
1693
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:39
1694
+ msgid "Taxable"
1695
+ msgstr "Opodatkowany"
1696
 
1697
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:40
1698
+ msgctxt "Tax status"
1699
+ msgid "None"
1700
+ msgstr "Brak"
1701
 
1702
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:44
1703
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/flexible-shipping.php:49
1704
+ msgid "Shipping Methods"
1705
+ msgstr "Metody wysyłki"
1706
+
1707
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:10
1708
+ msgid "Select shipment class"
1709
+ msgstr "Wybierz klasę wysyłkową"
1710
+
1711
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:25
1712
  msgid ""
1713
+ "Integrate with DPD, DHL, InPost, eNadawca Poczta Polska, Paczka w Ruchu."
1714
+ msgstr "Zintegruj z DPD, DHL, InPost, eNadawca Poczta Polska, Paczka w Ruchu."
 
 
 
1715
 
1716
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:25
1717
+ #, php-format
1718
+ msgid "%sAdd integrations%s"
1719
+ msgstr "%sDodaj integracje%s"
1720
 
1721
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:28
1722
+ msgid "Integrate with DPD."
1723
+ msgstr "Zintegruj z DPD."
1724
+
1725
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:28
1726
  #, php-format
1727
+ msgid "%sAdd integration%s"
1728
+ msgstr "%sDodaj integrację%s"
 
 
 
 
1729
 
1730
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:34
1731
+ #, php-format
1732
  msgid ""
1733
+ "Ship your orders faster with %1$sFlexible Shipping Connect%2$s%3$s%4$sSign "
1734
+ "up now!%5$s"
1735
  msgstr ""
1736
+ "Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
1737
+ "%4$sZarejestruj się teraz!%5$s"
1738
 
1739
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:54
1740
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:759
1741
+ msgid "Free"
1742
+ msgstr "Bezpłatnie"
1743
 
1744
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:73
1745
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:46
1746
+ msgid "Enable this shipment method"
1747
+ msgstr "Włącz tę metodę wysyłki"
1748
 
1749
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:76
1750
+ msgid "Method Title"
1751
+ msgstr "Tytuł metody"
 
1752
 
1753
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:78
1754
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:52
1755
+ msgid "This controls the title which the user sees during checkout."
1756
+ msgstr "Tytuł, który widzi użytkownik podczas składania zamówienia."
1757
 
1758
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:85
1759
+ msgid "Method Description"
1760
+ msgstr "Opis"
 
1761
 
1762
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:87
1763
+ msgid "This controls method description which the user sees during checkout."
1764
+ msgstr "Opis, który widzi użytkownik podczas składania zamówienia."
 
1765
 
1766
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:98
1767
+ msgid "Free Shipping"
1768
+ msgstr "Darmowa wysyłka"
 
1769
 
1770
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:101
1771
+ msgid ""
1772
+ "Enter a minimum order amount for free shipment. This will override the costs "
1773
+ "configured below."
1774
+ msgstr ""
1775
+ "Wpisz minimalną kwotę zamówienia dla bezpłatnej wysyłki. Spowoduje to "
1776
+ "zastąpienie reguł skonfigurowanych poniżej."
1777
 
1778
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:105
1779
+ msgid "Free Shipping Label"
1780
+ msgstr "Etykieta darmowej wysyłki"
1781
 
1782
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:108
1783
+ msgid "Enter additional label for shipment when free shipment available."
1784
+ msgstr ""
1785
+ "Wpisz dodatkową etykietę, która zostanie wyświetlona dla darmowej wysyłki."
1786
 
1787
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:117
1788
+ msgid "Calculation Method"
1789
+ msgstr "Metoda obliczania"
1790
 
1791
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:119
 
1792
  msgid ""
1793
+ "Select how rules will be calculated. If you choose \"sum\" the rules order "
1794
+ "is important."
 
 
1795
  msgstr ""
1796
+ "Wybierz jak będą obliczane reguły. Dla sumy, kolejność reguł ma znaczenie."
 
 
 
1797
 
1798
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:122
1799
+ msgid "Sum"
1800
+ msgstr "Suma"
 
 
1801
 
1802
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:125
1803
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:13
1804
+ msgid "Visibility"
1805
+ msgstr "Wyświetlanie"
1806
 
1807
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:128
1808
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:46
1809
+ msgid "Show only for logged in users"
1810
+ msgstr "Pokaż tylko dla zalogowanych użytkowników"
 
1811
 
1812
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:131
1813
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:14
1814
+ msgid "Default"
1815
+ msgstr "Domyślnie"
1816
+
1817
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:134
1818
  msgid ""
1819
+ "Check the box to set this option as the default selected choice on the cart "
1820
+ "page."
 
1821
  msgstr ""
1822
+ "Zaznacz, aby ustawić metodę wysyłki jako domyślną przy składaniu "
1823
+ "zamówienia."
 
1824
 
1825
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:139
1826
+ msgid "Select integration. "
1827
+ msgstr "Wybierz integrację. "
 
1828
 
1829
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:142
1830
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:7
1831
+ msgid "None"
1832
+ msgstr "Brak"
1833
 
1834
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:153
1835
+ msgid "Rules"
1836
+ msgstr "Reguły"
1837
 
1838
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:174
1839
+ msgid "Shipping Zone"
1840
+ msgstr "Strefa wysyłki"
1841
 
1842
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/settings/shipping-method-form.php:188
1843
+ #, php-format
1844
+ msgid "See how to %sconfigure shipment methods%s."
1845
+ msgstr "Zobacz jak %sskonfigurować metody wysyłki %s."
 
 
1846
 
1847
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:50
1848
+ msgid "Shipping Title"
1849
+ msgstr "Tytuł"
1850
 
1851
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:122
1852
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:240
1853
+ msgid "Add New"
1854
+ msgstr "Dodaj nową"
1855
 
1856
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:401
1857
+ msgid "New Shipping Method"
1858
+ msgstr "Nowa metoda wysyłki"
1859
 
1860
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:404
1861
+ msgid "Edit Shipping Method"
1862
+ msgstr "Edytuj metodę wysyłki"
1863
 
1864
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:414
1865
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:456
1866
+ #, php-format
1867
+ msgid "Shipping method %s added."
1868
+ msgstr "Metoda wysyłki dodana: %s."
1869
 
1870
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:439
1871
+ #, php-format
1872
+ msgid "Shipping method %s deleted."
1873
+ msgstr "Metoda wysyłki usunięta: %s."
1874
 
1875
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:442
1876
+ msgid "Shipping method not found."
1877
+ msgstr "Metoda wysyłki nie znaleziona."
1878
+
1879
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/shipping-method.php:468
1880
+ #, php-format
1881
+ msgid "Shipping method %s updated."
1882
+ msgstr "Metoda wysyłki zaktualizowana: %s."
1883
 
1884
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:4
1885
+ msgid "Get Flexible Shipping PRO!"
1886
+ msgstr "Kup Flexible Shipping PRO!"
1887
 
1888
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:13
1889
+ msgid "Shipping Classes support"
1890
+ msgstr "Wsparcie klas wysyłkowych"
1891
 
1892
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:14
1893
+ msgid "Product count based costs"
1894
+ msgstr "Koszty oparte o liczbę produktów w koszyku"
1895
 
1896
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:15
1897
+ msgid "Stopping, Cancelling a rule"
1898
+ msgstr "Zatrzymywanie, anulowanie reguł"
 
 
 
1899
 
1900
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:16
1901
+ msgid "Additional calculation methods"
1902
+ msgstr "Dodatkowe rodzaje obliczania kosztów"
1903
 
1904
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-ads.php:19
1905
+ msgid "Upgrade Now &rarr;"
1906
+ msgstr "Zaktualizuj do wersji PRO &rarr;"
1907
 
1908
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-column-shipping-shipping.php:11
1909
+ msgid "Get label for: "
1910
+ msgstr "Pobierz etykietę dla "
1911
 
1912
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-column-shipping-shipping.php:14
1913
+ msgid "Track shipment for: "
1914
+ msgstr "Śledź przesyłkę "
1915
 
1916
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-custom-services.php:14
1917
+ msgid "Code"
1918
+ msgstr "Kod"
1919
 
1920
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-custom-services.php:15
1921
+ msgid "Name"
1922
+ msgstr "Nazwa"
1923
 
1924
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-custom-services.php:17
1925
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:12
1926
+ msgid "Enabled"
1927
+ msgstr "Włączona"
1928
 
1929
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-custom-services.php:37
1930
+ msgid ""
1931
+ "Drag and drop the services to control their display order. Confirm by "
1932
+ "clicking Save changes button below."
1933
+ msgstr ""
1934
+ "Przeciągnij i upuść usługę, aby zmienić kolejność wyświetlania. Zatwierdź "
1935
+ "zmiany klikając Zapisz zmiany poniżej."
1936
 
1937
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-orders-filter-form.php:4
1938
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-orders-filter-form.php:12
1939
+ msgid "All shippings"
1940
+ msgstr "Wszystkie przesyłki"
1941
 
1942
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-orders-filter-form.php:13
1943
+ msgid "Shipment status"
1944
+ msgstr "Status przesyłki"
 
 
 
 
1945
 
1946
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:8
1947
+ msgid "Price"
1948
+ msgstr "Cena"
 
 
 
 
1949
 
1950
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:9
1951
+ msgid "Weight"
1952
+ msgstr "Waga"
 
 
 
 
1953
 
1954
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:61
1955
+ #, php-format
1956
  msgid ""
1957
+ "Check %sFlexible Shipping PRO &rarr;%s to add advanced rules based on "
1958
+ "shipment classes, product/item count or additional handling fees/insurance."
1959
  msgstr ""
1960
+ "Sprawdź %sFlexible Shipping PRO &rarr;%s, aby dodawać zaawansowane reguły "
1961
+ "oparte o klasy wysyłkowe, liczbę produktów/pozycji lub naliczać dodatkowe "
1962
+ "koszty obsługi/ubezpieczenia."
1963
 
1964
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:72
1965
+ msgid "Based on"
1966
+ msgstr "Oparte na"
1967
+
1968
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:73
1969
+ msgid "Shipping cost will be calculated based on the selected parameter."
1970
+ msgstr "Koszty wysyłki będą obliczane w oparciu o wybrany parametr."
1971
+
1972
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:76
1973
+ msgid "Min"
1974
+ msgstr "Min"
1975
 
1976
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:77
1977
  msgid ""
1978
+ "Enter minimum value for the &quot;Based on&quot; parameter. Value based on "
1979
+ "the price will be calculated by WooCommerce tax settings &quot;Display "
1980
+ "prices during cart and checkout&quot;"
1981
  msgstr ""
1982
+ "Wpisz minimalną wartość dla parametru &quot;Oparte na&quot;. Wartość oparta "
1983
+ "na cenie zostanie obliczona wg. ustawienia podatków WooCommerce &quot;"
1984
+ "Wyświetlanie cen w koszyku i zamówieniu&quot;"
1985
 
1986
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:80
1987
+ msgid "Max"
1988
+ msgstr "Maks"
1989
 
1990
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:81
1991
+ msgid ""
1992
+ "Enter maximum value for the &quot;Based on&quot; parameter. Value based on "
1993
+ "the price will be calculated by WooCommerce tax settings &quot;Display "
1994
+ "prices during cart and checkout&quot;"
1995
+ msgstr ""
1996
+ "Wpisz maksymalną wartość dla parametru &quot;Oparte na&quot;. Wartość oparta "
1997
+ "na cenie zostanie obliczona wg. ustawienia podatków WooCommerce &quot;"
1998
+ "Wyświetlanie cen w koszyku i zamówieniu&quot;"
1999
 
2000
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:84
2001
+ msgid "Cost per<br/>order"
2002
+ msgstr "Koszt na<br/>zamówienie"
 
2003
 
2004
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:85
2005
+ msgid "Enter shipment cost for this rule."
2006
+ msgstr "Wpisz koszt wysyłki dla tej reguły."
2007
 
2008
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:160
2009
+ msgid "Insert rule"
2010
+ msgstr "Dodaj regułę"
2011
 
2012
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:161
2013
+ msgid "Delete selected rules"
2014
+ msgstr "Usuń wybrane reguły"
2015
 
2016
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:211
2017
+ msgid "No rows selected."
2018
+ msgstr "Nie wybrano wierszy."
2019
 
2020
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:216
2021
+ msgid "Are you sure?"
2022
+ msgstr "Na pewno?"
2023
 
2024
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-rules.php:231
2025
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:106
2026
+ msgid "Shipping Zones"
2027
+ msgstr "Strefy wysyłki"
2028
 
2029
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:11
2030
+ msgid "Title"
2031
+ msgstr "Tytuł"
 
2032
 
2033
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:16
2034
+ msgid "Select all"
2035
+ msgstr "Zaznacz wszystkie"
 
 
 
 
2036
 
2037
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:39
2038
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:46
2039
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:53
2040
+ msgid "yes"
2041
+ msgstr "tak"
2042
 
2043
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:48
2044
+ msgid "Show for all users"
2045
+ msgstr "Pokaż dla wszystkich użytkowników"
 
 
 
 
2046
 
2047
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:69
2048
+ msgid ""
2049
+ "Drag and drop the above shipment methods to control their display order. "
2050
+ "Confirm by clicking Save changes button below."
2051
+ msgstr ""
2052
+ "Przeciągnij i upuść metody wysyłki, aby ustawić ich kolejność wyświetlania. "
2053
+ "Potwierdź przez kliknięcie przycisku Zapisz zmiany poniżej."
2054
 
2055
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:74
2056
+ msgid "Remove selected"
2057
+ msgstr "Usuń zaznaczone"
 
 
 
 
 
2058
 
2059
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:78
2060
+ msgid "Cancel import"
2061
+ msgstr "Anuluj import"
 
2062
 
2063
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:79
2064
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:80
2065
+ msgid "Import"
2066
+ msgstr "Importuj"
2067
 
2068
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:155
2069
+ msgid "Please select shipment methods to remove"
2070
+ msgstr "Proszę wybrać metody wysyłki do usunięcia"
 
 
 
 
2071
 
2072
+ #: vendor/wpdesk/wp-wpdesk-fs-table-rate/src/views/html-shipping-method-settings.php:187
2073
+ msgid "Select file to import"
2074
+ msgstr "Wybierz plik do importu"
2075
 
2076
  #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-connect.php:7
2077
  #: vendor/wpdesk/wp-wpdesk-tracker/src/views/tracker-notice.php:5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.2.2
7
- Stable tag: 3.6.4
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -175,6 +175,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
175
 
176
  == Changelog ==
177
 
 
 
 
178
  = 3.6.4 - 2019-08-21 =
179
  * Remove connect shutdown notice
180
  * Removed Connect Sign up ability in shipping method settings
4
  Tags: table rate, table rate shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes
5
  Requires at least: 4.5
6
  Tested up to: 5.2.2
7
+ Stable tag: 3.7.0
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
175
 
176
  == Changelog ==
177
 
178
+ = 3.7.0 - 2019-07-28 =
179
+ * Flexible Shipping Connect has been removed
180
+
181
  = 3.6.4 - 2019-08-21 =
182
  * Remove connect shutdown notice
183
  * Removed Connect Sign up ability in shipping method settings
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit944579f5165f615ad6f418376061726e::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit25c860bdf5dcdb89cb2d96a770df9dd6::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -151,9 +151,6 @@ return array(
151
  'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
152
  'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
153
  'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
154
- 'Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php',
155
- 'Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php',
156
- 'Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php',
157
  'WPDesk\\ABTesting\\ABTest' => $vendorDir . '/wpdesk/wp-abtesting/src/ABTest.php',
158
  'WPDesk\\ABTesting\\ABTest\\EqualGroupsRandomABTest' => $vendorDir . '/wpdesk/wp-abtesting/src/ABTest/EqualGroupsRandomABTest.php',
159
  'WPDesk\\ABTesting\\ABVariant' => $vendorDir . '/wpdesk/wp-abtesting/src/ABVariant.php',
@@ -213,142 +210,6 @@ return array(
213
  'WPDesk\\Pointer\\PointerMessage' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
214
  'WPDesk\\Pointer\\PointerPosition' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
215
  'WPDesk\\Pointer\\PointersScripts' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
216
- 'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
217
- 'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
218
- 'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
219
- 'WPDesk\\SaasPlatformClient\\ApiClient\\ClientImplementation' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php',
220
- 'WPDesk\\SaasPlatformClient\\ApiClient\\RequestCacheInfoResolver' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/RequestCacheInfoResolver.php',
221
- 'WPDesk\\SaasPlatformClient\\Authentication\\JWTSaasToken' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Authentication/JWTSaasToken.php',
222
- 'WPDesk\\SaasPlatformClient\\Authentication\\JWTToken' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Authentication/JWTToken.php',
223
- 'WPDesk\\SaasPlatformClient\\Authentication\\NullToken' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Authentication/NullToken.php',
224
- 'WPDesk\\SaasPlatformClient\\Authentication\\Token' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Authentication/Token.php',
225
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheDispatcher' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/CacheDispatcher.php',
226
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheInfoResolver' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/CacheInfoResolver.php',
227
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheItemCreator' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/CacheItemCreator.php',
228
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheItemVerifier' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/CacheItemVerifier.php',
229
- 'WPDesk\\SaasPlatformClient\\Cache\\HowToCache' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/HowToCache.php',
230
- 'WPDesk\\SaasPlatformClient\\Cache\\WordpressCache' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Cache/WordpressCache.php',
231
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\CurlClient' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlClient.php',
232
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\CurlExceptionFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlExceptionFactory.php',
233
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\Exception\\CurlException' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlException.php',
234
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\Exception\\CurlTimedOutException' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlTimedOutException.php',
235
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClient' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClient.php',
236
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientFactory.php',
237
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientRequestException' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientRequestException.php',
238
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientResponse.php',
239
- 'WPDesk\\SaasPlatformClient\\Model\\AbstractModel' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/AbstractModel.php',
240
- 'WPDesk\\SaasPlatformClient\\Model\\KeyInfo' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/KeyInfo.php',
241
- 'WPDesk\\SaasPlatformClient\\Model\\Label\\Label' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Label/Label.php',
242
- 'WPDesk\\SaasPlatformClient\\Model\\LoginData' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/LoginData.php',
243
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\ClientCollectionPoint' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientCollectionPoint.php',
244
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\ClientMapLocation' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientMapLocation.php',
245
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SearchRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchRequest.php',
246
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SearchResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchResponse.php',
247
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SingleRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleRequest.php',
248
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SingleResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleResponse.php',
249
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\RateRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Rate/RateRequest.php',
250
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\RateResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Rate/RateResponse.php',
251
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\SingleRate' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Rate/SingleRate.php',
252
- 'WPDesk\\SaasPlatformClient\\Model\\Register' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Register.php',
253
- 'WPDesk\\SaasPlatformClient\\Model\\Reset' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Reset.php',
254
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\SendDocumentsResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/SendDocumentsResponse.php',
255
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\ShipmentDocument' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocument.php',
256
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\ShipmentDocumentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocumentRequest.php',
257
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Actor' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Actor.php',
258
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Address' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Address.php',
259
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientCommodity' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientCommodity.php',
260
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientMoney' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientMoney.php',
261
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientWeight' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientWeight.php',
262
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Package' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package.php',
263
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Package\\Dimensions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package/Dimensions.php',
264
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentAdminContext' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentAdminContext.php',
265
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentRequest.php',
266
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentResponse.php',
267
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShopData' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopData.php',
268
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShopFlow' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopFlow.php',
269
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingPlan' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShippingPlan.php',
270
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingService' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShippingService.php',
271
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingServiceSetting' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSetting.php',
272
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingServiceSettingTest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSettingTest.php',
273
- 'WPDesk\\SaasPlatformClient\\Model\\Shop' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Shop.php',
274
- 'WPDesk\\SaasPlatformClient\\Model\\Status' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Status.php',
275
- 'WPDesk\\SaasPlatformClient\\Model\\Token' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/Token.php',
276
- 'WPDesk\\SaasPlatformClient\\Model\\User' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Model/User.php',
277
- 'WPDesk\\SaasPlatformClient\\Persistence\\PersistentContainerFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Persistence/PersistentContainerFactory.php',
278
- 'WPDesk\\SaasPlatformClient\\Platform' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Platform.php',
279
- 'WPDesk\\SaasPlatformClient\\PlatformAdminContext' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformAdminContext.php',
280
- 'WPDesk\\SaasPlatformClient\\PlatformFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformFactory.php',
281
- 'WPDesk\\SaasPlatformClient\\PlatformFactoryOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php',
282
- 'WPDesk\\SaasPlatformClient\\PlatformFactoryWordpressOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformFactoryWordpressOptions.php',
283
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\HttpClientOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformOption/HttpClientOptions.php',
284
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\PersistenceOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformOption/PersistenceOptions.php',
285
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\PlatformUrlOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformOption/PlatformUrlOptions.php',
286
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\SerializerOptions' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/PlatformOption/SerializerOptions.php',
287
- 'WPDesk\\SaasPlatformClient\\Request\\AuthRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/AuthRequest.php',
288
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\ConnectKeyInfoRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyInfoRequest.php',
289
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\ConnectKeyResetRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyResetRequest.php',
290
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\RegisterRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/RegisterRequest.php',
291
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\TokenRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/TokenRequest.php',
292
- 'WPDesk\\SaasPlatformClient\\Request\\BasicRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/BasicRequest.php',
293
- 'WPDesk\\SaasPlatformClient\\Request\\Fields\\GetFieldsRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Fields/GetFieldsRequest.php',
294
- 'WPDesk\\SaasPlatformClient\\Request\\Label\\PostLabelRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Label/PostLabelRequest.php',
295
- 'WPDesk\\SaasPlatformClient\\Request\\ParcelCollectionPoints\\GetSingleRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/GetSingleRequest.php',
296
- 'WPDesk\\SaasPlatformClient\\Request\\ParcelCollectionPoints\\PostSearchRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/PostSearchRequest.php',
297
- 'WPDesk\\SaasPlatformClient\\Request\\Rate\\PostRateRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Rate/PostRateRequest.php',
298
- 'WPDesk\\SaasPlatformClient\\Request\\Request' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Request.php',
299
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentCancel\\PostCancelRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentCancel/PostCancelRequest.php',
300
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocument\\DeleteShipmentDocumentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/DeleteShipmentDocumentRequest.php',
301
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocument\\PostShipmentDocumentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/PostShipmentDocumentRequest.php',
302
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocumentsSend\\PostSendRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocumentsSend/PostSendRequest.php',
303
- 'WPDesk\\SaasPlatformClient\\Request\\Shipment\\GetUserListShipmentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Shipment/GetUserListShipmentRequest.php',
304
- 'WPDesk\\SaasPlatformClient\\Request\\Shipment\\PostShipmentRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Shipment/PostShipmentRequest.php',
305
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingPlan\\PutShippingPlanRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingPlan/PutShippingPlanRequest.php',
306
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\GetSettingsRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/GetSettingsRequest.php',
307
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\PostSettingsRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PostSettingsRequest.php',
308
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\PutSettingsRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PutSettingsRequest.php',
309
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\Test\\GetSettingsTestRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/Test/GetSettingsTestRequest.php',
310
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServices\\GetListRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetListRequest.php',
311
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServices\\GetServiceRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetServiceRequest.php',
312
- 'WPDesk\\SaasPlatformClient\\Request\\Status\\GetStatusRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Status/GetStatusRequest.php',
313
- 'WPDesk\\SaasPlatformClient\\Request\\Traits\\SettingsItemRequestHelper' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Traits/SettingsItemRequestHelper.php',
314
- 'WPDesk\\SaasPlatformClient\\Request\\Users\\GetUserRequest' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Request/Users/GetUserRequest.php',
315
- 'WPDesk\\SaasPlatformClient\\Response\\ApiResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ApiResponse.php',
316
- 'WPDesk\\SaasPlatformClient\\Response\\AuthApiResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/AuthApiResponse.php',
317
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\ConnectKeyInfoResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyInfoResponse.php',
318
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\ConnectKeyResetResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyResetResponse.php',
319
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\RegisterResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/RegisterResponse.php',
320
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\TokenResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/TokenResponse.php',
321
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\EmptyMessageFromResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyMessageFromResponse.php',
322
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\EmptyStatusFromResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyStatusFromResponse.php',
323
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\TriedExtractDataFromErrorResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Exception/TriedExtractDataFromErrorResponse.php',
324
- 'WPDesk\\SaasPlatformClient\\Response\\Fields\\GetFieldsResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Fields/GetFieldsResponse.php',
325
- 'WPDesk\\SaasPlatformClient\\Response\\Label\\PostLabelResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Label/PostLabelResponse.php',
326
- 'WPDesk\\SaasPlatformClient\\Response\\Maintenance\\MaintenanceResponseContext' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Maintenance/MaintenanceResponseContext.php',
327
- 'WPDesk\\SaasPlatformClient\\Response\\ParcelCollectionPoints\\GetSingleResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/GetSingleResponse.php',
328
- 'WPDesk\\SaasPlatformClient\\Response\\ParcelCollectionPoints\\PostSearchResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/PostSearchResponse.php',
329
- 'WPDesk\\SaasPlatformClient\\Response\\ProtectedResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ProtectedResponse.php',
330
- 'WPDesk\\SaasPlatformClient\\Response\\Rate\\PostRateResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Rate/PostRateResponse.php',
331
- 'WPDesk\\SaasPlatformClient\\Response\\RawResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/RawResponse.php',
332
- 'WPDesk\\SaasPlatformClient\\Response\\Response' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Response.php',
333
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentCancel\\PostCancelResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentCancel/PostCancelResponse.php',
334
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocument\\DeleteShipmentDocumentResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/DeleteShipmentDocumentResponse.php',
335
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocument\\PostShipmentDocumentResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/PostShipmentDocumentResponse.php',
336
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocumentsSend\\PostSendResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocumentsSend/PostSendResponse.php',
337
- 'WPDesk\\SaasPlatformClient\\Response\\Shipment\\GetListShipmentAdminContextResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Shipment/GetListShipmentAdminContextResponse.php',
338
- 'WPDesk\\SaasPlatformClient\\Response\\Shipment\\PostShipmentResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Shipment/PostShipmentResponse.php',
339
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServicesSettings\\GetSettingsResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/GetSettingsResponse.php',
340
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServicesSettings\\Test\\GetSettingsTestResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/Test/GetSettingsTestResponse.php',
341
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServices\\GetShippingServiceResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServiceResponse.php',
342
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServices\\GetShippingServicesListResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServicesListResponse.php',
343
- 'WPDesk\\SaasPlatformClient\\Response\\Status\\GetStatusResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Status/GetStatusResponse.php',
344
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\ApiResponseDecorator' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Traits/ApiResponseDecorator.php',
345
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\AuthApiResponseDecorator' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Traits/AuthApiResponseDecorator.php',
346
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\PagedListImplementation' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Traits/PagedListImplementation.php',
347
- 'WPDesk\\SaasPlatformClient\\Response\\Users\\GetUserResponse' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Response/Users/GetUserResponse.php',
348
- 'WPDesk\\SaasPlatformClient\\Serializer\\Exception\\CannotUnserializeException' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Serializer/Exception/CannotUnserializeException.php',
349
- 'WPDesk\\SaasPlatformClient\\Serializer\\JsonSerializer' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Serializer/JsonSerializer.php',
350
- 'WPDesk\\SaasPlatformClient\\Serializer\\Serializer' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Serializer/Serializer.php',
351
- 'WPDesk\\SaasPlatformClient\\Serializer\\SerializerFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/Serializer/SerializerFactory.php',
352
  'WPDesk\\View\\Renderer\\LoadTemplatePlugin' => $vendorDir . '/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
353
  'WPDesk\\View\\Renderer\\Renderer' => $vendorDir . '/wpdesk/wp-view/src/Renderer/Renderer.php',
354
  'WPDesk\\View\\Renderer\\SimplePhpRenderer' => $vendorDir . '/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
@@ -369,90 +230,32 @@ return array(
369
  'WPDesk_Flexible_Shipping_Admin_Notices' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php',
370
  'WPDesk_Flexible_Shipping_Bulk_Actions' => $baseDir . '/classes/table-rate/bulk-actions.php',
371
  'WPDesk_Flexible_Shipping_Cancel_Shipment_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-cancel-shipment-exception.php',
372
- 'WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout/class-checkout-ajax-request-data.php',
373
  'WPDesk_Flexible_Shipping_Csv_Importer' => $baseDir . '/classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php',
374
  'WPDesk_Flexible_Shipping_Csv_Importer_Exception' => $baseDir . '/classes/table-rate/csv/class-csv-importer-exception.php',
375
  'WPDesk_Flexible_Shipping_Export' => $baseDir . '/classes/table-rate/csv/flexible-shipping-export.php',
376
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-get-label-exception.php',
377
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-label-not-available-exception.php',
 
378
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
 
379
  'WPDesk_Flexible_Shipping_Manifest' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest.php',
380
  'WPDesk_Flexible_Shipping_Manifest_FS' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest-fs.php',
381
  'WPDesk_Flexible_Shipping_Manifest_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/interface-manifest.php',
382
  'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => $baseDir . '/classes/tracker/class-method-created-tracker-deactivation-data.php',
383
- 'WPDesk_Flexible_Shipping_Money_Formatter' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-money-formatter.php',
384
  'WPDesk_Flexible_Shipping_Multicurrency' => $baseDir . '/classes/table-rate/multicurrency.php',
385
  'WPDesk_Flexible_Shipping_Multilingual' => $baseDir . '/classes/table-rate/multilingual.php',
386
  'WPDesk_Flexible_Shipping_Pointer_Messages' => $baseDir . '/classes/table-rate/abtests/class-pointer-messages.php',
387
- 'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-add-shipping-handler.php',
388
- 'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-auth-params.php',
389
- 'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-factory.php',
390
- 'WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php',
391
- 'WPDesk_Flexible_Shipping_SaaS_Cache_Settings' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php',
392
- 'WPDesk_Flexible_Shipping_SaaS_Checkout_Field_Collection_Points' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php',
393
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php',
394
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax-request-data.php',
395
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Map_Loader' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php',
396
- 'WPDesk_Flexible_Shipping_SaaS_Connection' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php',
397
- 'WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php',
398
- 'WPDesk_Flexible_Shipping_SaaS_Connection_Status_Field' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php',
399
- 'WPDesk_Flexible_Shipping_SaaS_Country_State_Field' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-country-state-field.php',
400
- 'WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-custom-services-setting.php',
401
- 'WPDesk_Flexible_Shipping_SaaS_Default_Value_Compute_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-default-value-compute-handler.php',
402
- 'WPDesk_Flexible_Shipping_SaaS_Free_Shipping_Metadata_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php',
403
- 'WPDesk_Flexible_Shipping_SaaS_Live_Rates_Fallback_Metadata_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php',
404
- 'WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php',
405
- 'WPDesk_Flexible_Shipping_SaaS_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-saas-logger-downloader.php',
406
- 'WPDesk_Flexible_Shipping_SaaS_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-saas-logger-settings.php',
407
- 'WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-maintenance-mode-exception.php',
408
- 'WPDesk_Flexible_Shipping_SaaS_Message_Stock_Metadata_Handler' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-message-stock-metadata-handler.php',
409
- 'WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php',
410
- 'WPDesk_Flexible_Shipping_SaaS_Platform_Links' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-links.php',
411
- 'WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-registration-second-notice.php',
412
- 'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-service-settings-not-found-exception.php',
413
- 'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php',
414
- 'WPDesk_Flexible_Shipping_SaaS_Settings' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php',
415
- 'WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-sass-settings-integration-checkbox.php',
416
- 'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php',
417
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-auto-create.php',
418
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php',
419
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php',
420
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-checkout.php',
421
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Shipment' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-shipment.php',
422
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when.php',
423
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-checkout.php',
424
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-shipment.php',
425
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-method-integration-settings.php',
426
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php',
427
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php',
428
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php',
429
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Services' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php',
430
- 'WPDesk_Flexible_Shipping_SaaS_Tracker' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-saas-tracker.php',
431
- 'WPDesk_Flexible_Shipping_SaaS_User_Registration' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php',
432
- 'WPDesk_Flexible_Shipping_Saas_Connection_Aware' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/interface-saas-connection-aware.php',
433
  'WPDesk_Flexible_Shipping_Send_Shipment_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-send-shipment-exception.php',
 
434
  'WPDesk_Flexible_Shipping_Shipment' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php',
435
  'WPDesk_Flexible_Shipping_Shipment_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php',
436
  'WPDesk_Flexible_Shipping_Shipment_CPT' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php',
437
- 'WPDesk_Flexible_Shipping_Shipment_Counter' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-shipment-counter.php',
438
  'WPDesk_Flexible_Shipping_Shipment_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/interface-shipment.php',
439
  'WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-shipment-plan-exceeded-exception.php',
440
- 'WPDesk_Flexible_Shipping_Shipment_Request_Fields' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-request-fields.php',
441
- 'WPDesk_Flexible_Shipping_Shipment_Saas' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php',
442
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php',
443
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments.php',
444
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php',
445
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Upload_Dir' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-upload-dir.php',
446
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php',
447
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Metabox' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox.php',
448
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php',
449
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Send' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php',
450
  'WPDesk_Flexible_Shipping_Shipping_Manifest_CPT' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php',
451
- 'WPDesk_Flexible_Shipping_Shipping_Zone_Data_Extractor' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas/class-shipping-zone-data-extractor.php',
452
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => $baseDir . '/classes/table-rate/class-shortcode-unit-dimension.php',
453
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => $baseDir . '/classes/table-rate/class-shortcode-unit-weight.php',
454
  'WPDesk_Flexible_Shipping_Tracker' => $baseDir . '/classes/tracker/tracker.php',
455
- 'WPDesk_Flexible_Shipping_UK_States' => $vendorDir . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/class-uk-states.php',
456
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
457
  'WPDesk_Logger' => $vendorDir . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
458
  'WPDesk_Logger_Factory' => $vendorDir . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
151
  'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
152
  'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
153
  'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
 
 
 
154
  'WPDesk\\ABTesting\\ABTest' => $vendorDir . '/wpdesk/wp-abtesting/src/ABTest.php',
155
  'WPDesk\\ABTesting\\ABTest\\EqualGroupsRandomABTest' => $vendorDir . '/wpdesk/wp-abtesting/src/ABTest/EqualGroupsRandomABTest.php',
156
  'WPDesk\\ABTesting\\ABVariant' => $vendorDir . '/wpdesk/wp-abtesting/src/ABVariant.php',
210
  'WPDesk\\Pointer\\PointerMessage' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
211
  'WPDesk\\Pointer\\PointerPosition' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
212
  'WPDesk\\Pointer\\PointersScripts' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  'WPDesk\\View\\Renderer\\LoadTemplatePlugin' => $vendorDir . '/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
214
  'WPDesk\\View\\Renderer\\Renderer' => $vendorDir . '/wpdesk/wp-view/src/Renderer/Renderer.php',
215
  'WPDesk\\View\\Renderer\\SimplePhpRenderer' => $vendorDir . '/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
230
  'WPDesk_Flexible_Shipping_Admin_Notices' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php',
231
  'WPDesk_Flexible_Shipping_Bulk_Actions' => $baseDir . '/classes/table-rate/bulk-actions.php',
232
  'WPDesk_Flexible_Shipping_Cancel_Shipment_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-cancel-shipment-exception.php',
 
233
  'WPDesk_Flexible_Shipping_Csv_Importer' => $baseDir . '/classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php',
234
  'WPDesk_Flexible_Shipping_Csv_Importer_Exception' => $baseDir . '/classes/table-rate/csv/class-csv-importer-exception.php',
235
  'WPDesk_Flexible_Shipping_Export' => $baseDir . '/classes/table-rate/csv/flexible-shipping-export.php',
236
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-get-label-exception.php',
237
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-label-not-available-exception.php',
238
+ 'WPDesk_Flexible_Shipping_Logger_Downloader' => $baseDir . '/classes/table-rate/logger/class-logger-downloader.php',
239
  'WPDesk_Flexible_Shipping_Logger_Factory' => $baseDir . '/classes/table-rate/logger/class-logger-factory.php',
240
+ 'WPDesk_Flexible_Shipping_Logger_Settings' => $baseDir . '/classes/table-rate/logger/class-logger-settings.php',
241
  'WPDesk_Flexible_Shipping_Manifest' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest.php',
242
  'WPDesk_Flexible_Shipping_Manifest_FS' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest-fs.php',
243
  'WPDesk_Flexible_Shipping_Manifest_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/interface-manifest.php',
244
  'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => $baseDir . '/classes/tracker/class-method-created-tracker-deactivation-data.php',
 
245
  'WPDesk_Flexible_Shipping_Multicurrency' => $baseDir . '/classes/table-rate/multicurrency.php',
246
  'WPDesk_Flexible_Shipping_Multilingual' => $baseDir . '/classes/table-rate/multilingual.php',
247
  'WPDesk_Flexible_Shipping_Pointer_Messages' => $baseDir . '/classes/table-rate/abtests/class-pointer-messages.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  'WPDesk_Flexible_Shipping_Send_Shipment_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-send-shipment-exception.php',
249
+ 'WPDesk_Flexible_Shipping_Settings' => $baseDir . '/classes/table-rate/flexible-shipping-settings.php',
250
  'WPDesk_Flexible_Shipping_Shipment' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php',
251
  'WPDesk_Flexible_Shipping_Shipment_Ajax' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php',
252
  'WPDesk_Flexible_Shipping_Shipment_CPT' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php',
 
253
  'WPDesk_Flexible_Shipping_Shipment_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/interface-shipment.php',
254
  'WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-shipment-plan-exceeded-exception.php',
 
 
 
 
 
 
 
 
 
 
255
  'WPDesk_Flexible_Shipping_Shipping_Manifest_CPT' => $vendorDir . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php',
 
256
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => $baseDir . '/classes/table-rate/class-shortcode-unit-dimension.php',
257
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => $baseDir . '/classes/table-rate/class-shortcode-unit-weight.php',
258
  'WPDesk_Flexible_Shipping_Tracker' => $baseDir . '/classes/tracker/tracker.php',
 
259
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
260
  'WPDesk_Logger' => $vendorDir . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
261
  'WPDesk_Logger_Factory' => $vendorDir . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
vendor/composer/autoload_psr4.php CHANGED
@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
  'WPDesk\\View\\' => array($vendorDir . '/wpdesk/wp-view/src'),
10
- 'WPDesk\\SaasPlatformClient\\' => array($vendorDir . '/wpdesk/wp-saas-platform-client/src'),
11
  'WPDesk\\Pointer\\' => array($vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer'),
12
  'WPDesk\\PluginBuilder\\' => array($vendorDir . '/wpdesk/wp-builder/src'),
13
  'WPDesk\\Persistence\\' => array($vendorDir . '/wpdesk/wp-persistence/src'),
@@ -15,7 +14,6 @@ return array(
15
  'WPDesk\\Mutex\\' => array($vendorDir . '/wpdesk/wp-mutex/src/WPDesk/Mutex'),
16
  'WPDesk\\Logger\\' => array($vendorDir . '/wpdesk/wp-logs/src'),
17
  'WPDesk\\ABTesting\\' => array($vendorDir . '/wpdesk/wp-abtesting/src'),
18
- 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
19
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
20
  'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
21
  'Money\\' => array($vendorDir . '/moneyphp/money/src'),
7
 
8
  return array(
9
  'WPDesk\\View\\' => array($vendorDir . '/wpdesk/wp-view/src'),
 
10
  'WPDesk\\Pointer\\' => array($vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer'),
11
  'WPDesk\\PluginBuilder\\' => array($vendorDir . '/wpdesk/wp-builder/src'),
12
  'WPDesk\\Persistence\\' => array($vendorDir . '/wpdesk/wp-persistence/src'),
14
  'WPDesk\\Mutex\\' => array($vendorDir . '/wpdesk/wp-mutex/src/WPDesk/Mutex'),
15
  'WPDesk\\Logger\\' => array($vendorDir . '/wpdesk/wp-logs/src'),
16
  'WPDesk\\ABTesting\\' => array($vendorDir . '/wpdesk/wp-abtesting/src'),
 
17
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
18
  'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
19
  'Money\\' => array($vendorDir . '/moneyphp/money/src'),
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit944579f5165f615ad6f418376061726e
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit944579f5165f615ad6f418376061726e
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit944579f5165f615ad6f418376061726e', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit944579f5165f615ad6f418376061726e', '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\ComposerStaticInit944579f5165f615ad6f418376061726e::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit944579f5165f615ad6f418376061726e
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit944579f5165f615ad6f418376061726e::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire944579f5165f615ad6f418376061726e($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire944579f5165f615ad6f418376061726e($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit25c860bdf5dcdb89cb2d96a770df9dd6
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit25c860bdf5dcdb89cb2d96a770df9dd6', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit25c860bdf5dcdb89cb2d96a770df9dd6', '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\ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire25c860bdf5dcdb89cb2d96a770df9dd6($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire25c860bdf5dcdb89cb2d96a770df9dd6($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit944579f5165f615ad6f418376061726e
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
@@ -15,7 +15,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
15
  'W' =>
16
  array (
17
  'WPDesk\\View\\' => 12,
18
- 'WPDesk\\SaasPlatformClient\\' => 26,
19
  'WPDesk\\Pointer\\' => 15,
20
  'WPDesk\\PluginBuilder\\' => 21,
21
  'WPDesk\\Persistence\\' => 19,
@@ -26,7 +25,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
26
  ),
27
  'P' =>
28
  array (
29
- 'Psr\\SimpleCache\\' => 16,
30
  'Psr\\Log\\' => 8,
31
  ),
32
  'M' =>
@@ -41,10 +39,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
41
  array (
42
  0 => __DIR__ . '/..' . '/wpdesk/wp-view/src',
43
  ),
44
- 'WPDesk\\SaasPlatformClient\\' =>
45
- array (
46
- 0 => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src',
47
- ),
48
  'WPDesk\\Pointer\\' =>
49
  array (
50
  0 => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer',
@@ -73,10 +67,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
73
  array (
74
  0 => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src',
75
  ),
76
- 'Psr\\SimpleCache\\' =>
77
- array (
78
- 0 => __DIR__ . '/..' . '/psr/simple-cache/src',
79
- ),
80
  'Psr\\Log\\' =>
81
  array (
82
  0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
@@ -237,9 +227,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
237
  'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
238
  'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
239
  'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
240
- 'Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php',
241
- 'Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php',
242
- 'Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php',
243
  'WPDesk\\ABTesting\\ABTest' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABTest.php',
244
  'WPDesk\\ABTesting\\ABTest\\EqualGroupsRandomABTest' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABTest/EqualGroupsRandomABTest.php',
245
  'WPDesk\\ABTesting\\ABVariant' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABVariant.php',
@@ -299,142 +286,6 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
299
  'WPDesk\\Pointer\\PointerMessage' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
300
  'WPDesk\\Pointer\\PointerPosition' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
301
  'WPDesk\\Pointer\\PointersScripts' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
302
- 'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
303
- 'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
304
- 'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
305
- 'WPDesk\\SaasPlatformClient\\ApiClient\\ClientImplementation' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php',
306
- 'WPDesk\\SaasPlatformClient\\ApiClient\\RequestCacheInfoResolver' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/RequestCacheInfoResolver.php',
307
- 'WPDesk\\SaasPlatformClient\\Authentication\\JWTSaasToken' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Authentication/JWTSaasToken.php',
308
- 'WPDesk\\SaasPlatformClient\\Authentication\\JWTToken' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Authentication/JWTToken.php',
309
- 'WPDesk\\SaasPlatformClient\\Authentication\\NullToken' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Authentication/NullToken.php',
310
- 'WPDesk\\SaasPlatformClient\\Authentication\\Token' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Authentication/Token.php',
311
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheDispatcher' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/CacheDispatcher.php',
312
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheInfoResolver' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/CacheInfoResolver.php',
313
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheItemCreator' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/CacheItemCreator.php',
314
- 'WPDesk\\SaasPlatformClient\\Cache\\CacheItemVerifier' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/CacheItemVerifier.php',
315
- 'WPDesk\\SaasPlatformClient\\Cache\\HowToCache' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/HowToCache.php',
316
- 'WPDesk\\SaasPlatformClient\\Cache\\WordpressCache' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Cache/WordpressCache.php',
317
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\CurlClient' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlClient.php',
318
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\CurlExceptionFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlExceptionFactory.php',
319
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\Exception\\CurlException' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlException.php',
320
- 'WPDesk\\SaasPlatformClient\\HttpClient\\Curl\\Exception\\CurlTimedOutException' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlTimedOutException.php',
321
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClient' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClient.php',
322
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientFactory.php',
323
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientRequestException' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientRequestException.php',
324
- 'WPDesk\\SaasPlatformClient\\HttpClient\\HttpClientResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientResponse.php',
325
- 'WPDesk\\SaasPlatformClient\\Model\\AbstractModel' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/AbstractModel.php',
326
- 'WPDesk\\SaasPlatformClient\\Model\\KeyInfo' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/KeyInfo.php',
327
- 'WPDesk\\SaasPlatformClient\\Model\\Label\\Label' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Label/Label.php',
328
- 'WPDesk\\SaasPlatformClient\\Model\\LoginData' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/LoginData.php',
329
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\ClientCollectionPoint' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientCollectionPoint.php',
330
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\ClientMapLocation' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientMapLocation.php',
331
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SearchRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchRequest.php',
332
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SearchResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchResponse.php',
333
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SingleRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleRequest.php',
334
- 'WPDesk\\SaasPlatformClient\\Model\\ParcelCollectionPoints\\SingleResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleResponse.php',
335
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\RateRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Rate/RateRequest.php',
336
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\RateResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Rate/RateResponse.php',
337
- 'WPDesk\\SaasPlatformClient\\Model\\Rate\\SingleRate' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Rate/SingleRate.php',
338
- 'WPDesk\\SaasPlatformClient\\Model\\Register' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Register.php',
339
- 'WPDesk\\SaasPlatformClient\\Model\\Reset' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Reset.php',
340
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\SendDocumentsResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/SendDocumentsResponse.php',
341
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\ShipmentDocument' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocument.php',
342
- 'WPDesk\\SaasPlatformClient\\Model\\ShipmentDocument\\ShipmentDocumentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocumentRequest.php',
343
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Actor' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Actor.php',
344
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Address' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Address.php',
345
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientCommodity' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientCommodity.php',
346
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientMoney' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientMoney.php',
347
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ClientWeight' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientWeight.php',
348
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Package' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package.php',
349
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\Package\\Dimensions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package/Dimensions.php',
350
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentAdminContext' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentAdminContext.php',
351
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentRequest.php',
352
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShipmentResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentResponse.php',
353
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShopData' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopData.php',
354
- 'WPDesk\\SaasPlatformClient\\Model\\Shipment\\ShopFlow' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopFlow.php',
355
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingPlan' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShippingPlan.php',
356
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingService' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShippingService.php',
357
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingServiceSetting' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSetting.php',
358
- 'WPDesk\\SaasPlatformClient\\Model\\ShippingServiceSettingTest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSettingTest.php',
359
- 'WPDesk\\SaasPlatformClient\\Model\\Shop' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Shop.php',
360
- 'WPDesk\\SaasPlatformClient\\Model\\Status' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Status.php',
361
- 'WPDesk\\SaasPlatformClient\\Model\\Token' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/Token.php',
362
- 'WPDesk\\SaasPlatformClient\\Model\\User' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Model/User.php',
363
- 'WPDesk\\SaasPlatformClient\\Persistence\\PersistentContainerFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Persistence/PersistentContainerFactory.php',
364
- 'WPDesk\\SaasPlatformClient\\Platform' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Platform.php',
365
- 'WPDesk\\SaasPlatformClient\\PlatformAdminContext' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformAdminContext.php',
366
- 'WPDesk\\SaasPlatformClient\\PlatformFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformFactory.php',
367
- 'WPDesk\\SaasPlatformClient\\PlatformFactoryOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php',
368
- 'WPDesk\\SaasPlatformClient\\PlatformFactoryWordpressOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformFactoryWordpressOptions.php',
369
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\HttpClientOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformOption/HttpClientOptions.php',
370
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\PersistenceOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformOption/PersistenceOptions.php',
371
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\PlatformUrlOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformOption/PlatformUrlOptions.php',
372
- 'WPDesk\\SaasPlatformClient\\PlatformOption\\SerializerOptions' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/PlatformOption/SerializerOptions.php',
373
- 'WPDesk\\SaasPlatformClient\\Request\\AuthRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/AuthRequest.php',
374
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\ConnectKeyInfoRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyInfoRequest.php',
375
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\ConnectKeyResetRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyResetRequest.php',
376
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\RegisterRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/RegisterRequest.php',
377
- 'WPDesk\\SaasPlatformClient\\Request\\Authentication\\TokenRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Authentication/TokenRequest.php',
378
- 'WPDesk\\SaasPlatformClient\\Request\\BasicRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/BasicRequest.php',
379
- 'WPDesk\\SaasPlatformClient\\Request\\Fields\\GetFieldsRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Fields/GetFieldsRequest.php',
380
- 'WPDesk\\SaasPlatformClient\\Request\\Label\\PostLabelRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Label/PostLabelRequest.php',
381
- 'WPDesk\\SaasPlatformClient\\Request\\ParcelCollectionPoints\\GetSingleRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/GetSingleRequest.php',
382
- 'WPDesk\\SaasPlatformClient\\Request\\ParcelCollectionPoints\\PostSearchRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/PostSearchRequest.php',
383
- 'WPDesk\\SaasPlatformClient\\Request\\Rate\\PostRateRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Rate/PostRateRequest.php',
384
- 'WPDesk\\SaasPlatformClient\\Request\\Request' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Request.php',
385
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentCancel\\PostCancelRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentCancel/PostCancelRequest.php',
386
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocument\\DeleteShipmentDocumentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/DeleteShipmentDocumentRequest.php',
387
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocument\\PostShipmentDocumentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/PostShipmentDocumentRequest.php',
388
- 'WPDesk\\SaasPlatformClient\\Request\\ShipmentDocumentsSend\\PostSendRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocumentsSend/PostSendRequest.php',
389
- 'WPDesk\\SaasPlatformClient\\Request\\Shipment\\GetUserListShipmentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Shipment/GetUserListShipmentRequest.php',
390
- 'WPDesk\\SaasPlatformClient\\Request\\Shipment\\PostShipmentRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Shipment/PostShipmentRequest.php',
391
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingPlan\\PutShippingPlanRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingPlan/PutShippingPlanRequest.php',
392
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\GetSettingsRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/GetSettingsRequest.php',
393
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\PostSettingsRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PostSettingsRequest.php',
394
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\PutSettingsRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PutSettingsRequest.php',
395
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServicesSettings\\Test\\GetSettingsTestRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/Test/GetSettingsTestRequest.php',
396
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServices\\GetListRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetListRequest.php',
397
- 'WPDesk\\SaasPlatformClient\\Request\\ShippingServices\\GetServiceRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetServiceRequest.php',
398
- 'WPDesk\\SaasPlatformClient\\Request\\Status\\GetStatusRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Status/GetStatusRequest.php',
399
- 'WPDesk\\SaasPlatformClient\\Request\\Traits\\SettingsItemRequestHelper' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Traits/SettingsItemRequestHelper.php',
400
- 'WPDesk\\SaasPlatformClient\\Request\\Users\\GetUserRequest' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Request/Users/GetUserRequest.php',
401
- 'WPDesk\\SaasPlatformClient\\Response\\ApiResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ApiResponse.php',
402
- 'WPDesk\\SaasPlatformClient\\Response\\AuthApiResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/AuthApiResponse.php',
403
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\ConnectKeyInfoResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyInfoResponse.php',
404
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\ConnectKeyResetResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyResetResponse.php',
405
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\RegisterResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/RegisterResponse.php',
406
- 'WPDesk\\SaasPlatformClient\\Response\\Authentication\\TokenResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Authentication/TokenResponse.php',
407
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\EmptyMessageFromResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyMessageFromResponse.php',
408
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\EmptyStatusFromResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyStatusFromResponse.php',
409
- 'WPDesk\\SaasPlatformClient\\Response\\Exception\\TriedExtractDataFromErrorResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Exception/TriedExtractDataFromErrorResponse.php',
410
- 'WPDesk\\SaasPlatformClient\\Response\\Fields\\GetFieldsResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Fields/GetFieldsResponse.php',
411
- 'WPDesk\\SaasPlatformClient\\Response\\Label\\PostLabelResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Label/PostLabelResponse.php',
412
- 'WPDesk\\SaasPlatformClient\\Response\\Maintenance\\MaintenanceResponseContext' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Maintenance/MaintenanceResponseContext.php',
413
- 'WPDesk\\SaasPlatformClient\\Response\\ParcelCollectionPoints\\GetSingleResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/GetSingleResponse.php',
414
- 'WPDesk\\SaasPlatformClient\\Response\\ParcelCollectionPoints\\PostSearchResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/PostSearchResponse.php',
415
- 'WPDesk\\SaasPlatformClient\\Response\\ProtectedResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ProtectedResponse.php',
416
- 'WPDesk\\SaasPlatformClient\\Response\\Rate\\PostRateResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Rate/PostRateResponse.php',
417
- 'WPDesk\\SaasPlatformClient\\Response\\RawResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/RawResponse.php',
418
- 'WPDesk\\SaasPlatformClient\\Response\\Response' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Response.php',
419
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentCancel\\PostCancelResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentCancel/PostCancelResponse.php',
420
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocument\\DeleteShipmentDocumentResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/DeleteShipmentDocumentResponse.php',
421
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocument\\PostShipmentDocumentResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/PostShipmentDocumentResponse.php',
422
- 'WPDesk\\SaasPlatformClient\\Response\\ShipmentDocumentsSend\\PostSendResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocumentsSend/PostSendResponse.php',
423
- 'WPDesk\\SaasPlatformClient\\Response\\Shipment\\GetListShipmentAdminContextResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Shipment/GetListShipmentAdminContextResponse.php',
424
- 'WPDesk\\SaasPlatformClient\\Response\\Shipment\\PostShipmentResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Shipment/PostShipmentResponse.php',
425
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServicesSettings\\GetSettingsResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/GetSettingsResponse.php',
426
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServicesSettings\\Test\\GetSettingsTestResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/Test/GetSettingsTestResponse.php',
427
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServices\\GetShippingServiceResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServiceResponse.php',
428
- 'WPDesk\\SaasPlatformClient\\Response\\ShippingServices\\GetShippingServicesListResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServicesListResponse.php',
429
- 'WPDesk\\SaasPlatformClient\\Response\\Status\\GetStatusResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Status/GetStatusResponse.php',
430
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\ApiResponseDecorator' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Traits/ApiResponseDecorator.php',
431
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\AuthApiResponseDecorator' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Traits/AuthApiResponseDecorator.php',
432
- 'WPDesk\\SaasPlatformClient\\Response\\Traits\\PagedListImplementation' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Traits/PagedListImplementation.php',
433
- 'WPDesk\\SaasPlatformClient\\Response\\Users\\GetUserResponse' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Response/Users/GetUserResponse.php',
434
- 'WPDesk\\SaasPlatformClient\\Serializer\\Exception\\CannotUnserializeException' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Serializer/Exception/CannotUnserializeException.php',
435
- 'WPDesk\\SaasPlatformClient\\Serializer\\JsonSerializer' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Serializer/JsonSerializer.php',
436
- 'WPDesk\\SaasPlatformClient\\Serializer\\Serializer' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Serializer/Serializer.php',
437
- 'WPDesk\\SaasPlatformClient\\Serializer\\SerializerFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/Serializer/SerializerFactory.php',
438
  'WPDesk\\View\\Renderer\\LoadTemplatePlugin' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
439
  'WPDesk\\View\\Renderer\\Renderer' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/Renderer.php',
440
  'WPDesk\\View\\Renderer\\SimplePhpRenderer' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
@@ -455,90 +306,32 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
455
  'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php',
456
  'WPDesk_Flexible_Shipping_Bulk_Actions' => __DIR__ . '/../..' . '/classes/table-rate/bulk-actions.php',
457
  'WPDesk_Flexible_Shipping_Cancel_Shipment_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-cancel-shipment-exception.php',
458
- 'WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout/class-checkout-ajax-request-data.php',
459
  'WPDesk_Flexible_Shipping_Csv_Importer' => __DIR__ . '/../..' . '/classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php',
460
  'WPDesk_Flexible_Shipping_Csv_Importer_Exception' => __DIR__ . '/../..' . '/classes/table-rate/csv/class-csv-importer-exception.php',
461
  'WPDesk_Flexible_Shipping_Export' => __DIR__ . '/../..' . '/classes/table-rate/csv/flexible-shipping-export.php',
462
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-get-label-exception.php',
463
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-label-not-available-exception.php',
 
464
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
 
465
  'WPDesk_Flexible_Shipping_Manifest' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest.php',
466
  'WPDesk_Flexible_Shipping_Manifest_FS' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest-fs.php',
467
  'WPDesk_Flexible_Shipping_Manifest_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/interface-manifest.php',
468
  'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/tracker/class-method-created-tracker-deactivation-data.php',
469
- 'WPDesk_Flexible_Shipping_Money_Formatter' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-money-formatter.php',
470
  'WPDesk_Flexible_Shipping_Multicurrency' => __DIR__ . '/../..' . '/classes/table-rate/multicurrency.php',
471
  'WPDesk_Flexible_Shipping_Multilingual' => __DIR__ . '/../..' . '/classes/table-rate/multilingual.php',
472
  'WPDesk_Flexible_Shipping_Pointer_Messages' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-pointer-messages.php',
473
- 'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-add-shipping-handler.php',
474
- 'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-auth-params.php',
475
- 'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-factory.php',
476
- 'WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php',
477
- 'WPDesk_Flexible_Shipping_SaaS_Cache_Settings' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php',
478
- 'WPDesk_Flexible_Shipping_SaaS_Checkout_Field_Collection_Points' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php',
479
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php',
480
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax-request-data.php',
481
- 'WPDesk_Flexible_Shipping_SaaS_Collection_Points_Map_Loader' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php',
482
- 'WPDesk_Flexible_Shipping_SaaS_Connection' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php',
483
- 'WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php',
484
- 'WPDesk_Flexible_Shipping_SaaS_Connection_Status_Field' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php',
485
- 'WPDesk_Flexible_Shipping_SaaS_Country_State_Field' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-country-state-field.php',
486
- 'WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-custom-services-setting.php',
487
- 'WPDesk_Flexible_Shipping_SaaS_Default_Value_Compute_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-default-value-compute-handler.php',
488
- 'WPDesk_Flexible_Shipping_SaaS_Free_Shipping_Metadata_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php',
489
- 'WPDesk_Flexible_Shipping_SaaS_Live_Rates_Fallback_Metadata_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php',
490
- 'WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php',
491
- 'WPDesk_Flexible_Shipping_SaaS_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-saas-logger-downloader.php',
492
- 'WPDesk_Flexible_Shipping_SaaS_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-saas-logger-settings.php',
493
- 'WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-maintenance-mode-exception.php',
494
- 'WPDesk_Flexible_Shipping_SaaS_Message_Stock_Metadata_Handler' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-message-stock-metadata-handler.php',
495
- 'WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php',
496
- 'WPDesk_Flexible_Shipping_SaaS_Platform_Links' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-links.php',
497
- 'WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-registration-second-notice.php',
498
- 'WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-service-settings-not-found-exception.php',
499
- 'WPDesk_Flexible_Shipping_SaaS_Services_Manager' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php',
500
- 'WPDesk_Flexible_Shipping_SaaS_Settings' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php',
501
- 'WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-sass-settings-integration-checkbox.php',
502
- 'WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php',
503
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-auto-create.php',
504
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php',
505
- 'WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php',
506
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-checkout.php',
507
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Shipment' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-shipment.php',
508
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when.php',
509
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-checkout.php',
510
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-shipment.php',
511
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-method-integration-settings.php',
512
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php',
513
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php',
514
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php',
515
- 'WPDesk_Flexible_Shipping_SaaS_Shipping_Services' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php',
516
- 'WPDesk_Flexible_Shipping_SaaS_Tracker' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-saas-tracker.php',
517
- 'WPDesk_Flexible_Shipping_SaaS_User_Registration' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php',
518
- 'WPDesk_Flexible_Shipping_Saas_Connection_Aware' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/interface-saas-connection-aware.php',
519
  'WPDesk_Flexible_Shipping_Send_Shipment_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-send-shipment-exception.php',
 
520
  'WPDesk_Flexible_Shipping_Shipment' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php',
521
  'WPDesk_Flexible_Shipping_Shipment_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php',
522
  'WPDesk_Flexible_Shipping_Shipment_CPT' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php',
523
- 'WPDesk_Flexible_Shipping_Shipment_Counter' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-shipment-counter.php',
524
  'WPDesk_Flexible_Shipping_Shipment_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/interface-shipment.php',
525
  'WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-shipment-plan-exceeded-exception.php',
526
- 'WPDesk_Flexible_Shipping_Shipment_Request_Fields' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-request-fields.php',
527
- 'WPDesk_Flexible_Shipping_Shipment_Saas' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php',
528
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php',
529
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments.php',
530
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php',
531
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Upload_Dir' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-upload-dir.php',
532
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php',
533
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Metabox' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox.php',
534
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php',
535
- 'WPDesk_Flexible_Shipping_Shipment_Saas_Send' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php',
536
  'WPDesk_Flexible_Shipping_Shipping_Manifest_CPT' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php',
537
- 'WPDesk_Flexible_Shipping_Shipping_Zone_Data_Extractor' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas/class-shipping-zone-data-extractor.php',
538
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-dimension.php',
539
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-weight.php',
540
  'WPDesk_Flexible_Shipping_Tracker' => __DIR__ . '/../..' . '/classes/tracker/tracker.php',
541
- 'WPDesk_Flexible_Shipping_UK_States' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/class-uk-states.php',
542
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
543
  'WPDesk_Logger' => __DIR__ . '/..' . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
544
  'WPDesk_Logger_Factory' => __DIR__ . '/..' . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
@@ -575,9 +368,9 @@ class ComposerStaticInit944579f5165f615ad6f418376061726e
575
  public static function getInitializer(ClassLoader $loader)
576
  {
577
  return \Closure::bind(function () use ($loader) {
578
- $loader->prefixLengthsPsr4 = ComposerStaticInit944579f5165f615ad6f418376061726e::$prefixLengthsPsr4;
579
- $loader->prefixDirsPsr4 = ComposerStaticInit944579f5165f615ad6f418376061726e::$prefixDirsPsr4;
580
- $loader->classMap = ComposerStaticInit944579f5165f615ad6f418376061726e::$classMap;
581
 
582
  }, null, ClassLoader::class);
583
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6
8
  {
9
  public static $files = array (
10
  '0509b34a4bd7aebefeac629c9dc8a978' => __DIR__ . '/..' . '/wpdesk/wp-notice/src/WPDesk/notice-functions.php',
15
  'W' =>
16
  array (
17
  'WPDesk\\View\\' => 12,
 
18
  'WPDesk\\Pointer\\' => 15,
19
  'WPDesk\\PluginBuilder\\' => 21,
20
  'WPDesk\\Persistence\\' => 19,
25
  ),
26
  'P' =>
27
  array (
 
28
  'Psr\\Log\\' => 8,
29
  ),
30
  'M' =>
39
  array (
40
  0 => __DIR__ . '/..' . '/wpdesk/wp-view/src',
41
  ),
 
 
 
 
42
  'WPDesk\\Pointer\\' =>
43
  array (
44
  0 => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer',
67
  array (
68
  0 => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src',
69
  ),
 
 
 
 
70
  'Psr\\Log\\' =>
71
  array (
72
  0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
227
  'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
228
  'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
229
  'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
 
 
 
230
  'WPDesk\\ABTesting\\ABTest' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABTest.php',
231
  'WPDesk\\ABTesting\\ABTest\\EqualGroupsRandomABTest' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABTest/EqualGroupsRandomABTest.php',
232
  'WPDesk\\ABTesting\\ABVariant' => __DIR__ . '/..' . '/wpdesk/wp-abtesting/src/ABVariant.php',
286
  'WPDesk\\Pointer\\PointerMessage' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
287
  'WPDesk\\Pointer\\PointerPosition' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
288
  'WPDesk\\Pointer\\PointersScripts' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  'WPDesk\\View\\Renderer\\LoadTemplatePlugin' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
290
  'WPDesk\\View\\Renderer\\Renderer' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/Renderer.php',
291
  'WPDesk\\View\\Renderer\\SimplePhpRenderer' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
306
  'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/admin-notices.php',
307
  'WPDesk_Flexible_Shipping_Bulk_Actions' => __DIR__ . '/../..' . '/classes/table-rate/bulk-actions.php',
308
  'WPDesk_Flexible_Shipping_Cancel_Shipment_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-cancel-shipment-exception.php',
 
309
  'WPDesk_Flexible_Shipping_Csv_Importer' => __DIR__ . '/../..' . '/classes/table-rate/csv/class-wpdesk-flexible-shipping-csv-importer.php',
310
  'WPDesk_Flexible_Shipping_Csv_Importer_Exception' => __DIR__ . '/../..' . '/classes/table-rate/csv/class-csv-importer-exception.php',
311
  'WPDesk_Flexible_Shipping_Export' => __DIR__ . '/../..' . '/classes/table-rate/csv/flexible-shipping-export.php',
312
  'WPDesk_Flexible_Shipping_Get_Label_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-get-label-exception.php',
313
  'WPDesk_Flexible_Shipping_Label_Not_Available_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-label-not-available-exception.php',
314
+ 'WPDesk_Flexible_Shipping_Logger_Downloader' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-downloader.php',
315
  'WPDesk_Flexible_Shipping_Logger_Factory' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-factory.php',
316
+ 'WPDesk_Flexible_Shipping_Logger_Settings' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-logger-settings.php',
317
  'WPDesk_Flexible_Shipping_Manifest' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest.php',
318
  'WPDesk_Flexible_Shipping_Manifest_FS' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/class-manifest-fs.php',
319
  'WPDesk_Flexible_Shipping_Manifest_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/interface-manifest.php',
320
  'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/tracker/class-method-created-tracker-deactivation-data.php',
 
321
  'WPDesk_Flexible_Shipping_Multicurrency' => __DIR__ . '/../..' . '/classes/table-rate/multicurrency.php',
322
  'WPDesk_Flexible_Shipping_Multilingual' => __DIR__ . '/../..' . '/classes/table-rate/multilingual.php',
323
  'WPDesk_Flexible_Shipping_Pointer_Messages' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-pointer-messages.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  'WPDesk_Flexible_Shipping_Send_Shipment_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-send-shipment-exception.php',
325
+ 'WPDesk_Flexible_Shipping_Settings' => __DIR__ . '/../..' . '/classes/table-rate/flexible-shipping-settings.php',
326
  'WPDesk_Flexible_Shipping_Shipment' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/class-shipment.php',
327
  'WPDesk_Flexible_Shipping_Shipment_Ajax' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/metabox/ajax.php',
328
  'WPDesk_Flexible_Shipping_Shipment_CPT' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/cpt-shipment.php',
 
329
  'WPDesk_Flexible_Shipping_Shipment_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/shipment/interface-shipment.php',
330
  'WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/exception/class-shipment-plan-exceeded-exception.php',
 
 
 
 
 
 
 
 
 
 
331
  'WPDesk_Flexible_Shipping_Shipping_Manifest_CPT' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-fs-shipment/src/manifest/cpt-shipping-manifest.php',
 
332
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Dimension' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-dimension.php',
333
  'WPDesk_Flexible_Shipping_Shorcode_Unit_Weight' => __DIR__ . '/../..' . '/classes/table-rate/class-shortcode-unit-weight.php',
334
  'WPDesk_Flexible_Shipping_Tracker' => __DIR__ . '/../..' . '/classes/tracker/tracker.php',
 
335
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
336
  'WPDesk_Logger' => __DIR__ . '/..' . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
337
  'WPDesk_Logger_Factory' => __DIR__ . '/..' . '/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
368
  public static function getInitializer(ClassLoader $loader)
369
  {
370
  return \Closure::bind(function () use ($loader) {
371
+ $loader->prefixLengthsPsr4 = ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6::$prefixLengthsPsr4;
372
+ $loader->prefixDirsPsr4 = ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6::$prefixDirsPsr4;
373
+ $loader->classMap = ComposerStaticInit25c860bdf5dcdb89cb2d96a770df9dd6::$classMap;
374
 
375
  }, null, ClassLoader::class);
376
  }
vendor/composer/installed.json CHANGED
@@ -212,56 +212,6 @@
212
  "psr-3"
213
  ]
214
  },
215
- {
216
- "name": "psr/simple-cache",
217
- "version": "1.0.1",
218
- "version_normalized": "1.0.1.0",
219
- "source": {
220
- "type": "git",
221
- "url": "https://github.com/php-fig/simple-cache.git",
222
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
223
- },
224
- "dist": {
225
- "type": "zip",
226
- "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
227
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
228
- "shasum": ""
229
- },
230
- "require": {
231
- "php": ">=5.3.0"
232
- },
233
- "time": "2017-10-23T01:57:42+00:00",
234
- "type": "library",
235
- "extra": {
236
- "branch-alias": {
237
- "dev-master": "1.0.x-dev"
238
- }
239
- },
240
- "installation-source": "dist",
241
- "autoload": {
242
- "psr-4": {
243
- "Psr\\SimpleCache\\": "src/"
244
- }
245
- },
246
- "notification-url": "https://packagist.org/downloads/",
247
- "license": [
248
- "MIT"
249
- ],
250
- "authors": [
251
- {
252
- "name": "PHP-FIG",
253
- "homepage": "http://www.php-fig.org/"
254
- }
255
- ],
256
- "description": "Common interfaces for simple caching",
257
- "keywords": [
258
- "cache",
259
- "caching",
260
- "psr",
261
- "psr-16",
262
- "simple-cache"
263
- ]
264
- },
265
  {
266
  "name": "wpdesk/wp-abtesting",
267
  "version": "1.1.0",
@@ -677,52 +627,6 @@
677
  "wordpress"
678
  ]
679
  },
680
- {
681
- "name": "wpdesk/wp-saas-platform-client",
682
- "version": "1.10.1",
683
- "version_normalized": "1.10.1.0",
684
- "source": {
685
- "type": "git",
686
- "url": "https://gitlab.com/wpdesk/wp-saas-platform-client.git",
687
- "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf"
688
- },
689
- "dist": {
690
- "type": "zip",
691
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-saas-platform-client/repository/archive.zip?sha=1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
692
- "reference": "1a29f986a9bfb60f4a6a72a3faa76742e09095bf",
693
- "shasum": ""
694
- },
695
- "require": {
696
- "ext-curl": "*",
697
- "ext-json": "*",
698
- "php": ">=5.5",
699
- "psr/log": "^1.0.1",
700
- "psr/simple-cache": "^1.0",
701
- "wpdesk/wp-persistence": "^1.0"
702
- },
703
- "require-dev": {
704
- "10up/wp_mock": "*",
705
- "mockery/mockery": "*",
706
- "phpunit/phpunit": "<7",
707
- "squizlabs/php_codesniffer": "^3.0.2",
708
- "wp-coding-standards/wpcs": "^0.14.1"
709
- },
710
- "time": "2019-05-10T09:59:04+00:00",
711
- "type": "library",
712
- "installation-source": "dist",
713
- "autoload": {
714
- "psr-4": {
715
- "WPDesk\\SaasPlatformClient\\": "src/"
716
- }
717
- },
718
- "notification-url": "https://packagist.org/downloads/",
719
- "authors": [
720
- {
721
- "name": "Krzysiek",
722
- "email": "krzysiek@wpdesk.pl"
723
- }
724
- ]
725
- },
726
  {
727
  "name": "wpdesk/wp-view",
728
  "version": "1.0.2",
@@ -765,51 +669,6 @@
765
  }
766
  ]
767
  },
768
- {
769
- "name": "wpdesk/wp-wpdesk-connect",
770
- "version": "1.1.1",
771
- "version_normalized": "1.1.1.0",
772
- "source": {
773
- "type": "git",
774
- "url": "https://gitlab.com/wpdesk/wp-wpdesk-connect.git",
775
- "reference": "1a8003f4e26080551724ff6b7104651a99a7f360"
776
- },
777
- "dist": {
778
- "type": "zip",
779
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-connect/repository/archive.zip?sha=1a8003f4e26080551724ff6b7104651a99a7f360",
780
- "reference": "1a8003f4e26080551724ff6b7104651a99a7f360",
781
- "shasum": ""
782
- },
783
- "require": {
784
- "php": ">=5.6",
785
- "psr/log": "^1.1",
786
- "wpdesk/wp-builder": "^1.1",
787
- "wpdesk/wp-view": "^1.0",
788
- "wpdesk/wp-wpdesk-fs-shipment": "^1.0"
789
- },
790
- "require-dev": {
791
- "10up/wp_mock": "^0.3",
792
- "mockery/mockery": "^1.2",
793
- "phpunit/phpunit": "<7",
794
- "squizlabs/php_codesniffer": "^3.4.2",
795
- "wp-coding-standards/wpcs": "^0.14.1"
796
- },
797
- "time": "2019-07-19T11:46:46+00:00",
798
- "type": "library",
799
- "installation-source": "dist",
800
- "autoload": {
801
- "classmap": [
802
- "src"
803
- ]
804
- },
805
- "notification-url": "https://packagist.org/downloads/",
806
- "authors": [
807
- {
808
- "name": "Krzysiek",
809
- "email": "krzysiek@wpdesk.pl"
810
- }
811
- ]
812
- },
813
  {
814
  "name": "wpdesk/wp-wpdesk-fs-shipment",
815
  "version": "1.0.4",
212
  "psr-3"
213
  ]
214
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  {
216
  "name": "wpdesk/wp-abtesting",
217
  "version": "1.1.0",
627
  "wordpress"
628
  ]
629
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
630
  {
631
  "name": "wpdesk/wp-view",
632
  "version": "1.0.2",
669
  }
670
  ]
671
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  {
673
  "name": "wpdesk/wp-wpdesk-fs-shipment",
674
  "version": "1.0.4",
vendor/psr/simple-cache/.editorconfig DELETED
@@ -1,12 +0,0 @@
1
- ; This file is for unifying the coding style for different editors and IDEs.
2
- ; More information at http://editorconfig.org
3
-
4
- root = true
5
-
6
- [*]
7
- charset = utf-8
8
- indent_size = 4
9
- indent_style = space
10
- end_of_line = lf
11
- insert_final_newline = true
12
- trim_trailing_whitespace = true
 
 
 
 
 
 
 
 
 
 
 
 
vendor/psr/simple-cache/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- # The MIT License (MIT)
2
-
3
- Copyright (c) 2016 PHP Framework Interoperability Group
4
-
5
- > Permission is hereby granted, free of charge, to any person obtaining a copy
6
- > of this software and associated documentation files (the "Software"), to deal
7
- > in the Software without restriction, including without limitation the rights
8
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- > copies of the Software, and to permit persons to whom the Software is
10
- > furnished to do so, subject to the following conditions:
11
- >
12
- > The above copyright notice and this permission notice shall be included in
13
- > all copies or substantial portions of the Software.
14
- >
15
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- > THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/psr/simple-cache/composer.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "name": "psr/simple-cache",
3
- "description": "Common interfaces for simple caching",
4
- "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"],
5
- "license": "MIT",
6
- "authors": [
7
- {
8
- "name": "PHP-FIG",
9
- "homepage": "http://www.php-fig.org/"
10
- }
11
- ],
12
- "require": {
13
- "php": ">=5.3.0"
14
- },
15
- "autoload": {
16
- "psr-4": {
17
- "Psr\\SimpleCache\\": "src/"
18
- }
19
- },
20
- "extra": {
21
- "branch-alias": {
22
- "dev-master": "1.0.x-dev"
23
- }
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/psr/simple-cache/src/CacheException.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- namespace Psr\SimpleCache;
4
-
5
- /**
6
- * Interface used for all types of exceptions thrown by the implementing library.
7
- */
8
- interface CacheException
9
- {
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/psr/simple-cache/src/CacheInterface.php DELETED
@@ -1,114 +0,0 @@
1
- <?php
2
-
3
- namespace Psr\SimpleCache;
4
-
5
- interface CacheInterface
6
- {
7
- /**
8
- * Fetches a value from the cache.
9
- *
10
- * @param string $key The unique key of this item in the cache.
11
- * @param mixed $default Default value to return if the key does not exist.
12
- *
13
- * @return mixed The value of the item from the cache, or $default in case of cache miss.
14
- *
15
- * @throws \Psr\SimpleCache\InvalidArgumentException
16
- * MUST be thrown if the $key string is not a legal value.
17
- */
18
- public function get($key, $default = null);
19
-
20
- /**
21
- * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
22
- *
23
- * @param string $key The key of the item to store.
24
- * @param mixed $value The value of the item to store, must be serializable.
25
- * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
26
- * the driver supports TTL then the library may set a default value
27
- * for it or let the driver take care of that.
28
- *
29
- * @return bool True on success and false on failure.
30
- *
31
- * @throws \Psr\SimpleCache\InvalidArgumentException
32
- * MUST be thrown if the $key string is not a legal value.
33
- */
34
- public function set($key, $value, $ttl = null);
35
-
36
- /**
37
- * Delete an item from the cache by its unique key.
38
- *
39
- * @param string $key The unique cache key of the item to delete.
40
- *
41
- * @return bool True if the item was successfully removed. False if there was an error.
42
- *
43
- * @throws \Psr\SimpleCache\InvalidArgumentException
44
- * MUST be thrown if the $key string is not a legal value.
45
- */
46
- public function delete($key);
47
-
48
- /**
49
- * Wipes clean the entire cache's keys.
50
- *
51
- * @return bool True on success and false on failure.
52
- */
53
- public function clear();
54
-
55
- /**
56
- * Obtains multiple cache items by their unique keys.
57
- *
58
- * @param iterable $keys A list of keys that can obtained in a single operation.
59
- * @param mixed $default Default value to return for keys that do not exist.
60
- *
61
- * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
62
- *
63
- * @throws \Psr\SimpleCache\InvalidArgumentException
64
- * MUST be thrown if $keys is neither an array nor a Traversable,
65
- * or if any of the $keys are not a legal value.
66
- */
67
- public function getMultiple($keys, $default = null);
68
-
69
- /**
70
- * Persists a set of key => value pairs in the cache, with an optional TTL.
71
- *
72
- * @param iterable $values A list of key => value pairs for a multiple-set operation.
73
- * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
74
- * the driver supports TTL then the library may set a default value
75
- * for it or let the driver take care of that.
76
- *
77
- * @return bool True on success and false on failure.
78
- *
79
- * @throws \Psr\SimpleCache\InvalidArgumentException
80
- * MUST be thrown if $values is neither an array nor a Traversable,
81
- * or if any of the $values are not a legal value.
82
- */
83
- public function setMultiple($values, $ttl = null);
84
-
85
- /**
86
- * Deletes multiple cache items in a single operation.
87
- *
88
- * @param iterable $keys A list of string-based keys to be deleted.
89
- *
90
- * @return bool True if the items were successfully removed. False if there was an error.
91
- *
92
- * @throws \Psr\SimpleCache\InvalidArgumentException
93
- * MUST be thrown if $keys is neither an array nor a Traversable,
94
- * or if any of the $keys are not a legal value.
95
- */
96
- public function deleteMultiple($keys);
97
-
98
- /**
99
- * Determines whether an item is present in the cache.
100
- *
101
- * NOTE: It is recommended that has() is only to be used for cache warming type purposes
102
- * and not to be used within your live applications operations for get/set, as this method
103
- * is subject to a race condition where your has() will return true and immediately after,
104
- * another script can remove it making the state of your app out of date.
105
- *
106
- * @param string $key The cache item key.
107
- *
108
- * @return bool
109
- *
110
- * @throws \Psr\SimpleCache\InvalidArgumentException
111
- * MUST be thrown if the $key string is not a legal value.
112
- */
113
- public function has($key);
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/psr/simple-cache/src/InvalidArgumentException.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- namespace Psr\SimpleCache;
4
-
5
- /**
6
- * Exception interface for invalid cache arguments.
7
- *
8
- * When an invalid argument is passed it must throw an exception which implements
9
- * this interface
10
- */
11
- interface InvalidArgumentException extends CacheException
12
- {
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/changelog.txt DELETED
@@ -1,33 +0,0 @@
1
- = 1.10.1 - 2019-05-10 =
2
- * Fixed NullToken handling in JWTSaasToken
3
-
4
- = 1.9.1 - 2019-03-05 =
5
- * Added email to actor
6
-
7
- = 1.9.0 - 2019-03-05 =
8
- * Added collection points
9
-
10
- = 1.8.0 - 2019-02-11 =
11
- * Customs values
12
-
13
- = 1.7.1 - 2019-02-11 =
14
- * Persistence container moved to library
15
-
16
- = 1.7.0 - 2019-01-16 =
17
- * Changed public methods -> protected in ShipmentResponse
18
- * Changed shipment cost to be nullable
19
-
20
- = 1.6.5 - 2019-01-04 =
21
- * Added messageStock to rate response
22
-
23
- = 1.6.4 - 2018-12-18 =
24
- * Added label file extension
25
-
26
- = 1.6.3 - 2018-12-10 =
27
- * Added support for domain not allowed response code: 462
28
-
29
- = 1.6.2 - 2018-12-06 =
30
- * Added support for platform version hash in response headers
31
-
32
- = 1.6 - 2018-12-06 =
33
- * Added default request headers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/composer.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "name": "wpdesk/wp-saas-platform-client",
3
- "authors": [
4
- {
5
- "name": "Krzysiek",
6
- "email": "krzysiek@wpdesk.pl"
7
- }
8
- ],
9
- "require": {
10
- "php": ">=5.5",
11
- "ext-curl": "*",
12
- "ext-json": "*",
13
- "psr/log": "^1.0.1",
14
- "psr/simple-cache": "^1.0",
15
- "wpdesk/wp-persistence": "^1.0"
16
- },
17
- "require-dev": {
18
- "phpunit/phpunit": "<7",
19
- "wp-coding-standards/wpcs": "^0.14.1",
20
- "squizlabs/php_codesniffer": "^3.0.2",
21
- "mockery/mockery": "*",
22
- "10up/wp_mock": "*"
23
- },
24
- "autoload": {
25
- "psr-4": {
26
- "WPDesk\\SaasPlatformClient\\": "src/"
27
- }
28
- },
29
- "autoload-dev": {
30
- },
31
- "scripts": {
32
- "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
33
- "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
34
- "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
35
- "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage"
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\ApiClient;
4
-
5
- use Psr\SimpleCache\CacheInterface;
6
- use WPDesk\SaasPlatformClient\Cache\CacheDispatcher;
7
- use WPDesk\SaasPlatformClient\Cache\CacheItemCreator;
8
- use WPDesk\SaasPlatformClient\Cache\CacheItemVerifier;
9
- use WPDesk\SaasPlatformClient\HttpClient\HttpClient;
10
- use WPDesk\SaasPlatformClient\Request\Request;
11
- use WPDesk\SaasPlatformClient\Response\Response;
12
- use WPDesk\SaasPlatformClient\Serializer\Serializer;
13
-
14
- class CachedClient implements Client, CacheItemCreator, CacheItemVerifier
15
- {
16
-
17
- /** @var Client */
18
- private $client;
19
-
20
- /** @var CacheInterface */
21
- private $cache;
22
-
23
- /**
24
- * @var CacheDispatcher
25
- */
26
- private $cacheDispatcher;
27
-
28
- /**
29
- * CachedClient constructor.
30
- * @param Client $decorated Decorated client
31
- * @param CacheInterface $cache
32
- */
33
- public function __construct(Client $decorated, CacheInterface $cache)
34
- {
35
- $this->client = $decorated;
36
- $this->cache = $cache;
37
- $this->cacheDispatcher = new CacheDispatcher($cache, [new RequestCacheInfoResolver()]);
38
- }
39
-
40
- /**
41
- * Create item to cache.
42
- *
43
- * @param Request $request
44
- * @return Response
45
- */
46
- public function createCacheItem($request)
47
- {
48
- return $this->client->sendRequest($request);
49
- }
50
-
51
- /**
52
- * Verify cache item.
53
- *
54
- * @param $object
55
- * @return Response;
56
- */
57
- public function getVerifiedItemOrNull($object)
58
- {
59
- if ($object instanceof Response) {
60
- return $object;
61
- }
62
- return null;
63
- }
64
-
65
- /**
66
- * Send request.
67
- *
68
- * @param Request $request
69
- * @return mixed|Response
70
- * @throws \Psr\SimpleCache\InvalidArgumentException
71
- */
72
- public function sendRequest(Request $request)
73
- {
74
- $response = $this->cacheDispatcher->dispatch($request, $this, $this);
75
- return $response;
76
- }
77
-
78
- /**
79
- * @return HttpClient
80
- */
81
- public function getHttpClient()
82
- {
83
- return $this->client->getHttpClient();
84
- }
85
-
86
- /**
87
- * @param HttpClient $client
88
- * @return mixed
89
- */
90
- public function setHttpClient(HttpClient $client)
91
- {
92
- return $this->client->setHttpClient($client);
93
- }
94
-
95
- /**
96
- * @return Serializer
97
- */
98
- public function getSerializer()
99
- {
100
- return $this->client->getSerializer();
101
- }
102
-
103
- /**
104
- * @return string
105
- */
106
- public function getApiUrl()
107
- {
108
- return $this->client->getApiUrl();
109
- }
110
-
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\ApiClient;
4
-
5
- use WPDesk\SaasPlatformClient\HttpClient\HttpClient;
6
- use WPDesk\SaasPlatformClient\Request\Request;
7
- use WPDesk\SaasPlatformClient\Response\Response;
8
- use WPDesk\SaasPlatformClient\Serializer\Serializer;
9
-
10
- interface Client
11
- {
12
- /**
13
- * Send given request trough HttpClient
14
- *
15
- * @param Request $request
16
- * @return Response
17
- */
18
- public function sendRequest(Request $request);
19
-
20
- /**
21
- * @return HttpClient
22
- */
23
- public function getHttpClient();
24
-
25
- /**
26
- * @param HttpClient $client
27
- */
28
- public function setHttpClient(HttpClient $client);
29
-
30
- /**
31
- * @return Serializer
32
- */
33
- public function getSerializer();
34
-
35
- /**
36
- * Returns api url. Always without ending /
37
- *
38
- * @return string
39
- */
40
- public function getApiUrl();
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\ApiClient;
4
-
5
- use WPDesk\SaasPlatformClient\Cache\WordpressCache;
6
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientFactory;
7
- use WPDesk\SaasPlatformClient\PlatformFactoryOptions;
8
- use WPDesk\SaasPlatformClient\Serializer\SerializerFactory;
9
-
10
- class ClientFactory
11
- {
12
- /**
13
- * @param PlatformFactoryOptions $options
14
- * @return Client
15
- */
16
- public function createClient(PlatformFactoryOptions $options)
17
- {
18
- $httpClientFactory = new HttpClientFactory();
19
- $serializerFactory = new SerializerFactory();
20
-
21
- $client = new ClientImplementation(
22
- $httpClientFactory->createClient($options),
23
- $serializerFactory->createSerializer($options),
24
- $options->getLogger(),
25
- $options->getApiUrl(),
26
- $options->getDefaultRequestHeaders()
27
- );
28
-
29
- if ($options->isCachedClient()) {
30
- $client = new CachedClient($client, new WordpressCache());
31
- }
32
-
33
- return $client;
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/ClientImplementation.php DELETED
@@ -1,215 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\ApiClient;
4
-
5
- use Psr\Log\LoggerAwareInterface;
6
- use Psr\Log\LoggerInterface;
7
- use WPDesk\SaasPlatformClient\HttpClient\HttpClient;
8
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientResponse;
9
- use WPDesk\SaasPlatformClient\Platform;
10
- use WPDesk\SaasPlatformClient\Request\Request;
11
- use WPDesk\SaasPlatformClient\Response\RawResponse;
12
- use WPDesk\SaasPlatformClient\Response\Response;
13
- use WPDesk\SaasPlatformClient\Serializer\Serializer;
14
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientRequestException;
15
-
16
- class ClientImplementation implements Client, LoggerAwareInterface
17
- {
18
- const CLIENT_VERSION = '1.9.1';
19
-
20
- const DEFAULT_TIMEOUT = 30;
21
-
22
- /** @var HttpClient */
23
- private $client;
24
-
25
- /** @var Serializer */
26
- private $serializer;
27
-
28
- /** @var LoggerInterface */
29
- private $logger;
30
-
31
- /** @var string */
32
- private $apiUrl;
33
-
34
- /** @var array */
35
- private $defaultRequestHeaders;
36
-
37
- /**
38
- * Client constructor.
39
- * @param HttpClient $client
40
- * @param Serializer $serializer
41
- * @param LoggerInterface $logger
42
- * @param string $apiUri
43
- * @param array $defaultRequestHeaders
44
- */
45
- public function __construct(
46
- HttpClient $client,
47
- Serializer $serializer,
48
- LoggerInterface $logger,
49
- $apiUri,
50
- array $defaultRequestHeaders
51
- ) {
52
- $this->client = $client;
53
- $this->serializer = $serializer;
54
- $this->logger = $logger;
55
- $this->apiUrl = $apiUri;
56
- $this->defaultRequestHeaders = $defaultRequestHeaders;
57
- }
58
-
59
- /**
60
- * Send given request trough HttpClient
61
- *
62
- * @param Request $request
63
- * @throws HttpClientRequestException
64
- * @return Response
65
- */
66
- public function sendRequest(Request $request)
67
- {
68
- $this->logger->debug("Sends request with METHOD: {$request->getMethod()}; to ENDPOINT {$request->getEndpoint()}",
69
- $this->getLoggerContext());
70
- try {
71
- $httpResponse = $this->client->send(
72
- $fullUrl = $this->prepareFullUrl($request),
73
- $method = $request->getMethod(),
74
- $body = $this->prepareRequestBody($request),
75
- $headers = $this->prepareRequestHeaders($request), self::DEFAULT_TIMEOUT
76
- );
77
-
78
- $this->logger->debug(
79
- "Sent request with: URL: {$fullUrl};\n METHOD: {$method};\n BODY: {$body};\n"
80
- . "HEADERS: " . json_encode($headers) . "\n\n and got response as CODE: {$httpResponse->getResponseCode()};\n"
81
- . "with RESPONSE BODY {$httpResponse->getBody()}",
82
- $this->getLoggerContext());
83
-
84
-
85
- return $this->mapHttpResponseToApiResponse($httpResponse);
86
- } catch (HttpClientRequestException $e) {
87
- $this->logger->error("Exception {$e->getMessage()}; {$e->getCode()} occurred while sending request");
88
- throw $e;
89
- }
90
- }
91
-
92
- /**
93
- * Returns full request url with endpoint
94
- *
95
- * @param Request $request
96
- * @return string
97
- */
98
- private function prepareFullUrl(Request $request)
99
- {
100
- $endpoint = $request->getEndpoint();
101
- if (strpos('http', $endpoint) === 0) {
102
- return $endpoint;
103
- }
104
- return $this->getApiUrl() . $endpoint;
105
- }
106
-
107
- /**
108
- * Map response from http client to api response using serializer
109
- *
110
- * @param HttpClientResponse $response
111
- * @return RawResponse
112
- */
113
- private function mapHttpResponseToApiResponse(HttpClientResponse $response)
114
- {
115
- $apiResponse = new RawResponse(
116
- $this->serializer->unserialize($response->getBody()),
117
- $response->getResponseCode(),
118
- $response->getHeaders()
119
- );
120
-
121
- return $apiResponse;
122
- }
123
-
124
- /**
125
- * Prepare serialized request body
126
- *
127
- * @param Request $request
128
- * @return string
129
- */
130
- private function prepareRequestBody(Request $request)
131
- {
132
- return $this->serializer->serialize($request->getBody());
133
- }
134
-
135
- /**
136
- * Prepares array of http headers
137
- *
138
- * @param Request $request
139
- * @return array
140
- */
141
- private function prepareRequestHeaders(Request $request)
142
- {
143
- $headers = array(
144
- 'User-Agent' => 'saas-client-' . self::CLIENT_VERSION,
145
- 'Accept-Encoding' => '*',
146
- 'Content-Type' => $this->serializer->getMime()
147
- );
148
- $headers = array_merge($this->defaultRequestHeaders, $headers);
149
- return array_merge($headers, $request->getHeaders());
150
- }
151
-
152
- /**
153
- * @return HttpClient
154
- */
155
- public function getHttpClient()
156
- {
157
- return $this->client;
158
- }
159
-
160
- /**
161
- * @param HttpClient $client
162
- */
163
- public function setHttpClient(HttpClient $client)
164
- {
165
- $this->client = $client;
166
- }
167
-
168
- /**
169
- * @return Serializer
170
- */
171
- public function getSerializer()
172
- {
173
- return $this->serializer;
174
- }
175
-
176
- /**
177
- * Returns api url. Always without ending /
178
- *
179
- * @return string
180
- */
181
- public function getApiUrl()
182
- {
183
- return trim($this->apiUrl, '/');
184
- }
185
-
186
- /**
187
- * Sets logger
188
- *
189
- * @param LoggerInterface $logger
190
- */
191
- public function setLogger(LoggerInterface $logger)
192
- {
193
- $this->logger = $logger;
194
- }
195
-
196
- /**
197
- * Returns logger context for
198
- *
199
- * @param string $additional_context Optional additional context
200
- * @return array
201
- */
202
- protected function getLoggerContext($additional_context = '')
203
- {
204
- $context = [
205
- Platform::LIBARY_LOGIN_CONTEXT,
206
- self::class
207
- ];
208
- if ($additional_context !== '') {
209
- $context[] = $additional_context;
210
- }
211
- return $context;
212
- }
213
-
214
-
215
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/ApiClient/RequestCacheInfoResolver.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\ApiClient;
4
-
5
- use WPDesk\SaasPlatformClient\Cache\CacheInfoResolver;
6
- use WPDesk\SaasPlatformClient\Cache\HowToCache;
7
- use WPDesk\SaasPlatformClient\Request\Authentication\ConnectKeyInfoRequest;
8
- use WPDesk\SaasPlatformClient\Request\BasicRequest;
9
- use WPDesk\SaasPlatformClient\Request\Request;
10
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\PutSettingsRequest;
11
- use WPDesk\SaasPlatformClient\Request\Status\GetStatusRequest;
12
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
13
-
14
- class RequestCacheInfoResolver implements CacheInfoResolver
15
- {
16
-
17
- const DEFAULT_CACHE_TTL = 86400; //24 hours
18
- const CACHE_TTL_ONE_MINUTE = 60;
19
-
20
- const OPTION_FS_SAAS_PLATFORM_VERSION_HASH = 'fs-saas-platform-version-hash';
21
-
22
- /**
23
- *
24
- * @param Request $request
25
- *
26
- * @return bool
27
- */
28
- private function prepareCacheKey($request)
29
- {
30
- return md5($request->getEndpoint());
31
- }
32
-
33
- /**
34
- *
35
- * @param Request $request
36
- *
37
- * @return bool
38
- */
39
- public function isSupported($request)
40
- {
41
- if ($request instanceof BasicRequest) {
42
- return true;
43
- }
44
- return false;
45
- }
46
-
47
- /**
48
- *
49
- * @param Request $request
50
- *
51
- * @return bool
52
- */
53
- public function shouldCache($request)
54
- {
55
- if ($request instanceof ConnectKeyInfoRequest) {
56
- return false;
57
- }
58
- if ($request instanceof GetStatusRequest) {
59
- return false;
60
- }
61
- if ($request instanceof BasicRequest) {
62
- if ('GET' === $request->getMethod()) {
63
- return true;
64
- }
65
- }
66
- return false;
67
- }
68
-
69
- /**
70
- *
71
- * @param Request $request
72
- *
73
- * @return HowToCache
74
- */
75
- public function prepareHowToCache($request)
76
- {
77
- $howToCache = new HowToCache($this->prepareCacheKey($request), self::DEFAULT_CACHE_TTL);
78
- return $howToCache;
79
- }
80
-
81
- /**
82
- * @param ApiResponse $response
83
- *
84
- * @return bool
85
- */
86
- private function isPlatformVersionFromResponseChanged(ApiResponse $response)
87
- {
88
- $stored_hash = get_option(self::OPTION_FS_SAAS_PLATFORM_VERSION_HASH, '');
89
- if ($stored_hash !== $response->getPlatformVersionHash()) {
90
- return true;
91
- }
92
- return false;
93
- }
94
-
95
- /**
96
- * @param ApiResponse $response
97
- */
98
- private function storePlatformVersionHashFromResponse(ApiResponse $response)
99
- {
100
- update_option(self::OPTION_FS_SAAS_PLATFORM_VERSION_HASH, $response->getPlatformVersionHash());
101
- }
102
-
103
- /**
104
- *
105
- * @param Request $request
106
- * @param mixed $item
107
- *
108
- * @return bool
109
- */
110
- public function shouldClearCache($request, $item)
111
- {
112
- if ($request instanceof PutSettingsRequest) {
113
- return true;
114
- }
115
- if ($item instanceof ApiResponse && $this->isPlatformVersionFromResponseChanged($item)) {
116
- $this->storePlatformVersionHashFromResponse($item);
117
- return true;
118
- }
119
- return false;
120
- }
121
-
122
- /**
123
- *
124
- * @param Request $request
125
- * @param mixed $item
126
- *
127
- * @return string[]
128
- */
129
- public function shouldClearKeys($request, $item)
130
- {
131
- if ('GET' !== $request->getMethod()) {
132
- return [$this->prepareCacheKey($request)];
133
- }
134
- return [];
135
- }
136
-
137
-
138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Authentication/JWTSaasToken.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Authentication;
4
-
5
- class JWTSaasToken implements Token
6
- {
7
- const SHOP_ID_PARAM = 'shop';
8
- const ROLES_PARAM = 'roles';
9
-
10
- const SHOP_ROLE = 'ROLE_SHOP';
11
-
12
-
13
- /** @var Token */
14
- private $token;
15
-
16
- /**
17
- * @param Token $token
18
- */
19
- public function __construct(Token $token)
20
- {
21
- $this->token = $token;
22
- }
23
-
24
- public function getAuthString()
25
- {
26
- return $this->token->getAuthString();
27
- }
28
-
29
- public function isExpired()
30
- {
31
- return $this->token->isExpired();
32
- }
33
-
34
- public function isSignatureValid()
35
- {
36
- return $this->token->isSignatureValid();
37
- }
38
-
39
- public function __toString()
40
- {
41
- return $this->token->__toString();
42
- }
43
-
44
- /**
45
- * If there is shop id in the token
46
- *
47
- * @return bool
48
- */
49
- public function hasShopId()
50
- {
51
- if ($this->token instanceof JWTToken) {
52
- $info = $this->token->getDecodedPublicTokenInfo();
53
- return !empty($info[self::SHOP_ID_PARAM]) && !empty($info[self::ROLES_PARAM]) &&
54
- in_array(self::SHOP_ROLE, $info[self::ROLES_PARAM], true);
55
- }
56
- return false;
57
-
58
- }
59
-
60
- /**
61
- * Get shop id from token
62
- *
63
- * @return int
64
- */
65
- public function getShopId()
66
- {
67
- if ($this->token instanceof JWTToken && $this->hasShopId()) {
68
- $info = $this->token->getDecodedPublicTokenInfo();
69
- return (int)$info[self::SHOP_ID_PARAM];
70
- }
71
- return 0;
72
- }
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Authentication/JWTToken.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Authentication;
4
-
5
- class JWTToken implements Token
6
- {
7
- const CONSIDER_EXPIRED_WHEN_LESS = 2;
8
-
9
- const EXPIRED_IN_SECONDS_PARAM = 'exp';
10
-
11
- /** @var string */
12
- private $token;
13
-
14
- /**
15
- * JWTToken constructor.
16
- * @param string $token
17
- */
18
- public function __construct($token)
19
- {
20
- $this->token = $token;
21
- }
22
-
23
- /**
24
- * @return string
25
- */
26
- public function __toString()
27
- {
28
- return $this->token;
29
- }
30
-
31
- /**
32
- * Get string to perform authentication
33
- *
34
- * @return string
35
- */
36
- public function getAuthString()
37
- {
38
- return 'Bearer ' . $this->__toString();
39
- }
40
-
41
- /**
42
- * Returns public data from token
43
- *
44
- * @return array
45
- */
46
- public function getDecodedPublicTokenInfo()
47
- {
48
- $tokenParts = explode('.', $this->__toString());
49
- if (!empty($tokenParts[1])) {
50
- $infoPart = base64_decode($tokenParts[1]);
51
- return json_decode($infoPart, true);
52
- }
53
- return [];
54
- }
55
-
56
- /**
57
- * Is token expired or very soon to be expired?
58
- *
59
- * @return bool
60
- */
61
- public function isExpired()
62
- {
63
- $tokenInfo = $this->getDecodedPublicTokenInfo();
64
- if (!empty($tokenInfo[self::EXPIRED_IN_SECONDS_PARAM])) {
65
- return $tokenInfo[self::EXPIRED_IN_SECONDS_PARAM] - time() < self::CONSIDER_EXPIRED_WHEN_LESS;
66
- }
67
- return true;
68
- }
69
-
70
- /**
71
- * Validates token signature
72
- *
73
- * @return bool
74
- */
75
- public function isSignatureValid()
76
- {
77
- // @TODO
78
- return true;
79
- }
80
-
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Authentication/NullToken.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Authentication;
4
-
5
- /**
6
- * Null object pattern
7
- *
8
- * @package WPDesk\SaasPlatformClient\Authentication
9
- */
10
- class NullToken implements Token
11
- {
12
- public function __construct()
13
- {
14
- }
15
-
16
- /**
17
- * @return string
18
- */
19
- public function __toString()
20
- {
21
- return '';
22
- }
23
-
24
- /**
25
- * Get string to perform authentication
26
- *
27
- * @return string
28
- */
29
- public function getAuthString()
30
- {
31
- return '';
32
- }
33
-
34
- /**
35
- * Is token expired or very soon to be expired?
36
- *
37
- * @return bool
38
- */
39
- public function isExpired()
40
- {
41
- return true;
42
- }
43
-
44
- /**
45
- * Validates token signature
46
- *
47
- * @return bool
48
- */
49
- public function isSignatureValid()
50
- {
51
- return false;
52
- }
53
-
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Authentication/Token.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Authentication;
4
-
5
- interface Token
6
- {
7
- /**
8
- * Get string to perform authentication
9
- *
10
- * @return string
11
- */
12
- public function getAuthString();
13
-
14
- /**
15
- * Is token expired or very soon to be expired?
16
- *
17
- * @return bool
18
- */
19
- public function isExpired();
20
-
21
- /**
22
- * Validates token signature
23
- *
24
- * @return bool
25
- */
26
- public function isSignatureValid();
27
-
28
- /**
29
- * @return string
30
- */
31
- public function __toString();
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheDispatcher.php DELETED
@@ -1,116 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- use Psr\SimpleCache\CacheInterface;
6
-
7
- class CacheDispatcher
8
- {
9
-
10
- /**
11
- * Cache info resolvers.
12
- *
13
- * @var CacheInfoResolver[]
14
- */
15
- private $resolvers;
16
-
17
- /**
18
- * Cache.
19
- *
20
- * @var CacheInterface
21
- */
22
- private $cache;
23
-
24
- /**
25
- * CacheDispatcher constructor.
26
- *
27
- * @param CacheInterface $cache
28
- * @param CacheInfoResolver[] $resolvers
29
- */
30
- public function __construct($cache, $resolvers)
31
- {
32
- $this->cache = $cache;
33
- $this->resolvers = $resolvers;
34
- }
35
-
36
- /**
37
- * Dispatch.
38
- *
39
- * @param object $object
40
- * @param CacheItemCreator $cacheItemCreator
41
- * @param CacheItemVerifier $cacheItemVerifier
42
- *
43
- * @return mixed
44
- * @throws \Psr\SimpleCache\InvalidArgumentException
45
- */
46
- public function dispatch($object, $cacheItemCreator, $cacheItemVerifier)
47
- {
48
- foreach ($this->resolvers as $resolver) {
49
- if ($resolver->isSupported($object)) {
50
- return $this->getOrCreateItem($resolver, $object, $cacheItemCreator, $cacheItemVerifier);
51
- }
52
- }
53
- return $cacheItemCreator->createCacheItem($object);
54
- }
55
-
56
- /**
57
- * Get item from cache.
58
- *
59
- * @param string $cacheKey Cache key.
60
- * @param CacheItemVerifier $cacheItemVerifier
61
- *
62
- * @return mixed|null
63
- * @throws \Psr\SimpleCache\InvalidArgumentException
64
- */
65
- private function getItemFromCache($cacheKey, $cacheItemVerifier)
66
- {
67
- try {
68
- $responseSerialized = $this->cache->get($cacheKey);
69
- } catch (\Exception $e) {
70
- $responseSerialized = null;
71
- }
72
- if ($responseSerialized !== null) {
73
- $response = $cacheItemVerifier->getVerifiedItemOrNull(unserialize($responseSerialized));
74
- if (null !== $response) {
75
- return $response;
76
- }
77
- }
78
- return null;
79
- }
80
-
81
- /**
82
- * Get or create item.
83
- *
84
- * @param CacheInfoResolver $resolver
85
- * @param object $object
86
- * @param CacheItemCreator $cacheItemCreator
87
- * @param CacheItemVerifier $cacheItemVerifier
88
- *
89
- * @return mixed
90
- * @throws \Psr\SimpleCache\InvalidArgumentException
91
- */
92
- private function getOrCreateItem($resolver, $object, $cacheItemCreator, $cacheItemVerifier)
93
- {
94
- $howToCache = $resolver->prepareHowToCache($object);
95
-
96
- if ($resolver->shouldCache($object)) {
97
- $item = $this->getItemFromCache($howToCache->getCacheKey(), $cacheItemVerifier);
98
- if (null != $item) {
99
- return $item;
100
- }
101
- }
102
-
103
- $item = $cacheItemCreator->createCacheItem($object);
104
-
105
- if ($resolver->shouldCache($object)) {
106
- $this->cache->set($howToCache->getCacheKey(), serialize($item), $howToCache->getCacheTtl());
107
- }
108
- if ($resolver->shouldClearCache($object, $item)) {
109
- $this->cache->clear();
110
- } else {
111
- $this->cache->deleteMultiple($resolver->shouldClearKeys($object, $item));
112
- }
113
- return $item;
114
- }
115
-
116
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheInfoResolver.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- interface CacheInfoResolver
6
- {
7
-
8
- /**
9
- * Is supported.
10
- *
11
- * @param object $object
12
- *
13
- * @return bool
14
- */
15
- public function isSupported($object);
16
-
17
- /**
18
- * Should be cached.
19
- *
20
- * @param object $object
21
- *
22
- * @return bool
23
- */
24
- public function shouldCache($object);
25
-
26
- /**
27
- * Prepare how to cache.
28
- *
29
- * @param object $object
30
- *
31
- * @return HowToCache
32
- */
33
- public function prepareHowToCache($object);
34
-
35
- /**
36
- * Should clear cache.
37
- *
38
- * @param object $object
39
- * @param mixed $item
40
- *
41
- * @return bool
42
- */
43
- public function shouldClearCache($object, $item);
44
-
45
- /**
46
- * Should clear keys.
47
- *
48
- * @param object $object
49
- * @param mixed $item
50
- *
51
- * @return string[]
52
- */
53
- public function shouldClearKeys($object, $item);
54
-
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheItemCreator.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- /**
6
- * Cache item creator.
7
- *
8
- * Interface CacheItemCreator
9
- * @package WPDesk\SaasPlatformClient\Cache
10
- */
11
- interface CacheItemCreator
12
- {
13
-
14
- /**
15
- * Create item to cache.
16
- *
17
- * @param object $object
18
- * @return mixed
19
- */
20
- public function createCacheItem($object);
21
-
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/CacheItemVerifier.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- /**
6
- * Cache item verifier.
7
- *
8
- * Interface CacheItemVerifier
9
- * @package WPDesk\SaasPlatformClient\Cache
10
- */
11
- interface CacheItemVerifier
12
- {
13
-
14
- /**
15
- * Get verified item or null.
16
- * Verifies item and returns it or null when item is not valid.
17
- *
18
- * @param $object
19
- * @return null|object
20
- */
21
- public function getVerifiedItemOrNull($object);
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/HowToCache.php DELETED
@@ -1,72 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- /**
6
- * How to cache item.
7
- *
8
- * Class HowToCache
9
- * @package WPDesk\SaasPlatformClient\Cache
10
- */
11
- class HowToCache
12
- {
13
-
14
- /**
15
- * Cache key.
16
- *
17
- * @var string
18
- */
19
- public $cacheKey;
20
-
21
- /**
22
- * Cache TTL.
23
- *
24
- * @var int
25
- */
26
- public $cacheTtl;
27
-
28
- /**
29
- * HowToCache constructor.
30
- *
31
- * @param string $cacheKey Cache key.
32
- * @param int $cacheTtl Cache TTL.
33
- */
34
- public function __construct($cacheKey, $cacheTtl = 3600)
35
- {
36
- $this->cacheKey = $cacheKey;
37
- $this->cacheTtl = $cacheTtl;
38
- }
39
-
40
- /**
41
- * @return string
42
- */
43
- public function getCacheKey()
44
- {
45
- return $this->cacheKey;
46
- }
47
-
48
- /**
49
- * @param string $cacheKey
50
- */
51
- public function setCacheKey($cacheKey)
52
- {
53
- $this->cacheKey = $cacheKey;
54
- }
55
-
56
- /**
57
- * @return int
58
- */
59
- public function getCacheTtl()
60
- {
61
- return $this->cacheTtl;
62
- }
63
-
64
- /**
65
- * @param int $cacheTtl
66
- */
67
- public function setCacheTtl($cacheTtl)
68
- {
69
- $this->cacheTtl = $cacheTtl;
70
- }
71
-
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Cache/WordpressCache.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Cache;
4
-
5
- use Psr\SimpleCache\CacheInterface;
6
-
7
- /**
8
- * Class WordpressCache
9
- *
10
- * @package WPDesk\SaasPlatformClient\Cache
11
- */
12
- class WordpressCache implements CacheInterface
13
- {
14
-
15
- const TRANSIENT_NAME_PREFIX = 'wspc_';
16
-
17
- /**
18
- * Fetches a value from the cache.
19
- *
20
- * @param string $key The unique key of this item in the cache.
21
- * @param mixed $default Default value to return if the key does not exist.
22
- *
23
- * @return mixed The value of the item from the cache, or $default in case of cache miss.
24
- */
25
- public function get($key, $default = null)
26
- {
27
- $value = get_transient($this->prapareTransientNameForKey($key));
28
- if (false === $value) {
29
- return $default;
30
- }
31
- return $value;
32
- }
33
-
34
- /**
35
- * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
36
- *
37
- * @param string $key The key of the item to store.
38
- * @param mixed $value The value of the item to store, must be serializable.
39
- * @param null|int $ttl Optional. Time until expiration in seconds. Default 0 (no expiration).
40
- *
41
- * @return bool True on success and false on failure.
42
- */
43
- public function set($key, $value, $ttl = 0)
44
- {
45
- return set_transient($this->prapareTransientNameForKey($key), $value, $ttl);
46
- }
47
-
48
- /**
49
- * Delete an item from the cache by its unique key.
50
- *
51
- * @param string $key The unique cache key of the item to delete.
52
- *
53
- * @return bool True if the item was successfully removed. False if there was an error.
54
- */
55
- public function delete($key)
56
- {
57
- return delete_transient($this->prapareTransientNameForKey($key));
58
- }
59
-
60
- /**
61
- * Wipes clean the entire cache's keys.
62
- *
63
- * @return bool True on success and false on failure.
64
- */
65
- public function clear()
66
- {
67
- global $wpdb;
68
- $transient_prefix = self::TRANSIENT_NAME_PREFIX;
69
- $transients = $wpdb->get_results(
70
- "SELECT option_name AS name FROM $wpdb->options WHERE option_name LIKE '_transient_{$transient_prefix}%'"
71
- );
72
- foreach ($transients as $transient) {
73
- $key = substr($transient->name, strlen("_transient_{$transient_prefix}"));
74
- delete_transient($this->prapareTransientNameForKey($key));
75
- }
76
- return true;
77
- }
78
-
79
- /**
80
- * Obtains multiple cache items by their unique keys.
81
- *
82
- * @param iterable $keys A list of keys that can obtained in a single operation.
83
- * @param mixed $default Default value to return for keys that do not exist.
84
- *
85
- * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as
86
- * value.
87
- */
88
- public function getMultiple($keys, $default = null)
89
- {
90
- $multiple_values = array();
91
- foreach ($keys as $key) {
92
- $multiple_values[$key] = $this->get($key, $default);
93
- }
94
- return $multiple_values;
95
- }
96
-
97
- /**
98
- * Persists a set of key => value pairs in the cache, with an optional TTL.
99
- *
100
- * @param iterable $values A list of key => value pairs for a multiple-set operation.
101
- * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and
102
- * the driver supports TTL then the library may set a default value
103
- * for it or let the driver take care of that.
104
- *
105
- * @return bool True on success and false on failure.
106
- */
107
- public function setMultiple($values, $ttl = 0)
108
- {
109
- foreach ($values as $key => $value) {
110
- $set = $this->set($key, $value, $ttl);
111
- if (false === $set) {
112
- return false;
113
- }
114
- }
115
- return true;
116
- }
117
-
118
- /**
119
- * Deletes multiple cache items in a single operation.
120
- *
121
- * @param iterable $keys A list of string-based keys to be deleted.
122
- *
123
- * @return bool True if the items were successfully removed. False if there was an error.
124
- */
125
- public function deleteMultiple($keys)
126
- {
127
- $delete_multiple = true;
128
- foreach ($keys as $key) {
129
- $delete_multiple = $delete_multiple && $this->delete($key);
130
- }
131
- return $delete_multiple;
132
- }
133
-
134
-
135
- /**
136
- * Determines whether an item is present in the cache.
137
- *
138
- * NOTE: It is recommended that has() is only to be used for cache warming type purposes
139
- * and not to be used within your live applications operations for get/set, as this method
140
- * is subject to a race condition where your has() will return true and immediately after,
141
- * another script can remove it making the state of your app out of date.
142
- *
143
- * @param string $key The cache item key.
144
- *
145
- * @return bool
146
- *
147
- */
148
- public function has($key)
149
- {
150
- return !empty($this->get($key));
151
- }
152
-
153
- /**
154
- * Prepare transient name for given key.
155
- *
156
- * @param string $key Key.
157
- *
158
- * @return string
159
- */
160
- private function prapareTransientNameForKey($key)
161
- {
162
- return self::TRANSIENT_NAME_PREFIX . $key;
163
- }
164
-
165
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlClient.php DELETED
@@ -1,206 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient\Curl;
4
-
5
- use WPDesk\SaasPlatformClient\HttpClient\HttpClient;
6
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientResponse;
7
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientRequestException;
8
-
9
- class CurlClient implements HttpClient
10
- {
11
- /** @var resource */
12
- private $curlResource;
13
-
14
- /** @var string|null|boolean */
15
- private $rawResponse;
16
-
17
- /** @var int */
18
- private $httpResponseCode;
19
-
20
- /**
21
- * @param string $url
22
- * @param string $body
23
- * @param array $headers
24
- * @param int $timeOut
25
- * @return HttpClientResponse
26
- * @throws HttpClientRequestException
27
- */
28
- public function get($url, $body, array $headers, $timeOut)
29
- {
30
- return $this->send($url, 'GET', $body, $headers, $timeOut);
31
- }
32
-
33
- /**
34
- * @param string $url
35
- * @param string $method
36
- * @param string $body
37
- * @param array $headers
38
- * @param int $timeOut
39
- * @return HttpClientResponse
40
- * @throws HttpClientRequestException
41
- */
42
- public function send($url, $method, $body, array $headers, $timeOut)
43
- {
44
- $this->initResource();
45
- try {
46
- $this->prepareConnection($url, $method, $body, $headers, $timeOut);
47
- $this->sendRequest();
48
- $this->throwExceptionIfError();
49
- $this->closeConnection();
50
-
51
- return $this->prepareResponse();
52
-
53
- } catch (\Exception $e) {
54
- $this->closeConnection();
55
- if ($e instanceof HttpClientRequestException) {
56
- throw $e;
57
- }
58
- throw CurlExceptionFactory::createDefaultException($e->getMessage(), $e->getCode(), $e);
59
- }
60
- }
61
-
62
- private function initResource()
63
- {
64
- $this->curlResource = curl_init();
65
- }
66
-
67
- /**
68
- * Opens a new curl connection.
69
- *
70
- * @param string $url The endpoint to send the request to.
71
- * @param string $method The request method.
72
- * @param string $body The body of the request.
73
- * @param array $headers The request headers.
74
- * @param int $timeOut The timeout in seconds for the request.
75
- */
76
- private function prepareConnection($url, $method, $body, array $headers, $timeOut)
77
- {
78
- $options = [
79
- CURLOPT_CUSTOMREQUEST => $method,
80
- CURLOPT_HTTPHEADER => $this->compileRequestHeaders($headers),
81
- CURLOPT_URL => $url,
82
- CURLOPT_CONNECTTIMEOUT => 10,
83
- CURLOPT_TIMEOUT => $timeOut,
84
- CURLOPT_RETURNTRANSFER => true, // Return response as string
85
- CURLOPT_HEADER => true, // Enable header processing
86
- CURLOPT_SSL_VERIFYHOST => 2,
87
- CURLOPT_SSL_VERIFYPEER => true,
88
- //CURLOPT_CAINFO => __DIR__ . '/certs/DigiCertHighAssuranceEVRootCA.pem',
89
- ];
90
- if ($method !== "GET") {
91
- $options[CURLOPT_POSTFIELDS] = $body;
92
- }
93
-
94
- curl_setopt_array($this->curlResource, $options);
95
- }
96
-
97
- /**
98
- * Compiles the request headers into a curl-friendly format.
99
- *
100
- * @param array $headers The request headers.
101
- *
102
- * @return array
103
- */
104
- private function compileRequestHeaders(array $headers)
105
- {
106
- $return = [];
107
- foreach ($headers as $key => $value) {
108
- $return[] = $key . ': ' . $value;
109
- }
110
- return $return;
111
- }
112
-
113
- /**
114
- * Send the request and get the raw response from curl
115
- */
116
- private function sendRequest()
117
- {
118
- $this->rawResponse = curl_exec($this->curlResource);
119
- $this->httpResponseCode = $this->getHttpResponseCode();
120
- }
121
-
122
- /** @return int */
123
- private function getHttpResponseCode()
124
- {
125
- return intval(curl_getinfo($this->curlResource, CURLINFO_HTTP_CODE));
126
- }
127
-
128
- private function throwExceptionIfError()
129
- {
130
- $errorNumber = curl_errno($this->curlResource);
131
- if ($errorNumber === 0) {
132
- return;
133
- }
134
-
135
- $errorMessage = curl_error($this->curlResource);
136
- throw CurlExceptionFactory::createCurlException($errorMessage, $errorNumber);
137
- }
138
-
139
- /**
140
- * Closes an existing curl connection
141
- */
142
- private function closeConnection()
143
- {
144
- curl_close($this->curlResource);
145
- $this->curlResource = null;
146
- }
147
-
148
- private function prepareResponse()
149
- {
150
- list($rawHeaders, $rawBody) = $this->extractResponseHeadersAndBody();
151
- return new HttpClientResponse($rawHeaders, $rawBody, $this->httpResponseCode);
152
- }
153
-
154
- /**
155
- * Extracts the headers and the body into a two-part array
156
- *
157
- * @return array
158
- */
159
- private function extractResponseHeadersAndBody()
160
- {
161
- $parts = explode("\r\n\r\n", $this->rawResponse);
162
- $rawBody = array_pop($parts);
163
- $rawHeaders = implode("\r\n\r\n", $parts);
164
- return [trim($rawHeaders), trim($rawBody)];
165
- }
166
-
167
- /**
168
- * @param string $url
169
- * @param string $body
170
- * @param array $headers
171
- * @param int $timeOut
172
- * @return HttpClientResponse
173
- * @throws HttpClientRequestException
174
- */
175
- public function post($url, $body, array $headers, $timeOut)
176
- {
177
- return $this->send($url, 'POST', $body, $headers, $timeOut);
178
- }
179
-
180
- /**
181
- * @param string $url
182
- * @param string $body
183
- * @param array $headers
184
- * @param int $timeOut
185
- * @return HttpClientResponse
186
- * @throws HttpClientRequestException
187
- */
188
- public function delete($url, $body, array $headers, $timeOut)
189
- {
190
- return $this->send($url, 'DELETE', $body, $headers, $timeOut);
191
- }
192
-
193
- /**
194
- * @param string $url
195
- * @param string $body
196
- * @param array $headers
197
- * @param int $timeOut
198
- * @return HttpClientResponse
199
- * @throws HttpClientRequestException
200
- */
201
- public function put($url, $body, array $headers, $timeOut)
202
- {
203
- return $this->send($url, 'PUT', $body, $headers, $timeOut);
204
- }
205
-
206
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/CurlExceptionFactory.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient\Curl;
4
-
5
- use WPDesk\SaasPlatformClient\HttpClient\Curl\Exception\CurlException;
6
- use WPDesk\SaasPlatformClient\HttpClient\Curl\Exception\CurlTimedOutException;
7
-
8
- class CurlExceptionFactory
9
- {
10
- /**
11
- * Convert curl code to appropriate exception class.
12
- *
13
- * @param int $curlCode Code from https://curl.haxx.se/libcurl/c/libcurl-errors.html
14
- * @param string $curlMessage
15
- * @return CurlException
16
- */
17
- public static function createCurlException($curlCode, $curlMessage) {
18
- switch ($curlCode) {
19
- case CURLE_OPERATION_TIMEDOUT:
20
- return new CurlTimedOutException($curlMessage, $curlCode);
21
- default:
22
- return self::createDefaultException($curlMessage, $curlCode);
23
- }
24
- }
25
-
26
- /**
27
- * Creates default Curl exception
28
- *
29
- * @param $code
30
- * @param $message
31
- * @param \Exception|null $prev
32
- * @return CurlException
33
- */
34
- public static function createDefaultException($code, $message, \Exception $prev = null) {
35
- return new CurlException('Default exception: ' . $message, $code, $prev);
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlException.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient\Curl\Exception;
4
-
5
- use WPDesk\SaasPlatformClient\HttpClient\HttpClientRequestException;
6
-
7
- /**
8
- * Base class for all curl exceptions.
9
- *
10
- * @package WPDesk\SaasPlatformClient\HttpClient\Curl\Exception
11
- */
12
- class CurlException extends \RuntimeException implements HttpClientRequestException
13
- {
14
-
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/Curl/Exception/CurlTimedOutException.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient\Curl\Exception;
4
-
5
- class CurlTimedOutException extends CurlException
6
- {
7
-
8
- }
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClient.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient;
4
-
5
-
6
- interface HttpClient
7
- {
8
- /**
9
- * @param string $url
10
- * @param string $body
11
- * @param array $headers
12
- * @param int $timeOut
13
- * @throw HttpClientRequestException
14
- * @return HttpClientResponse
15
- */
16
- public function put($url, $body, array $headers, $timeOut);
17
-
18
- /**
19
- * @param string $url
20
- * @param string $body
21
- * @param array $headers
22
- * @param int $timeOut
23
- * @throw HttpClientRequestException
24
- * @return HttpClientResponse
25
- */
26
- public function get($url, $body, array $headers, $timeOut);
27
-
28
- /**
29
- * @param string $url
30
- * @param string $body
31
- * @param array $headers
32
- * @param int $timeOut
33
- * @throw HttpClientRequestException
34
- * @return HttpClientResponse
35
- */
36
- public function post($url, $body, array $headers, $timeOut);
37
-
38
- /**
39
- * @param string $url
40
- * @param string $body
41
- * @param array $headers
42
- * @param int $timeOut
43
- * @throw HttpClientRequestException
44
- * @return HttpClientResponse
45
- */
46
- public function delete($url, $body, array $headers, $timeOut);
47
-
48
- /**
49
- * @param string $url
50
- * @param string $method
51
- * @param string $body
52
- * @param array $headers
53
- * @param int $timeOut
54
- * @throw HttpClientRequestException
55
- * @return HttpClientResponse
56
- */
57
- public function send($url, $method, $body, array $headers, $timeOut);
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientFactory.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient;
4
-
5
-
6
- use WPDesk\SaasPlatformClient\PlatformOption\HttpClientOptions;
7
-
8
- class HttpClientFactory
9
- {
10
- /**
11
- * @param HttpClientOptions $options
12
- * @return HttpClient
13
- */
14
- public function createClient(HttpClientOptions $options)
15
- {
16
- $className = $options->getHttpClientClass();
17
- return new $className;
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientRequestException.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- namespace WPDesk\SaasPlatformClient\HttpClient;
3
-
4
- /**
5
- * Interface for all exceptions that can be thrown by HttpClient
6
- *
7
- * @package WPDesk\SaasPlatformClient\HttpClient
8
- */
9
- interface HttpClientRequestException
10
- {
11
-
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/HttpClient/HttpClientResponse.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\HttpClient;
4
-
5
-
6
- class HttpClientResponse
7
- {
8
- /** @var string */
9
- private $headers;
10
-
11
- /** @var string */
12
- private $body;
13
-
14
- /** @var int */
15
- private $code;
16
-
17
- /**
18
- * HttpClientResponse constructor.
19
- * @param string $headers
20
- * @param string $body
21
- * @param int $code
22
- */
23
- public function __construct($headers, $body, $code)
24
- {
25
- if (empty($body)) {
26
- $body = '{}';
27
- }
28
- $this->headers = $headers;
29
- $this->body = $body;
30
- $this->code = $code;
31
- }
32
-
33
- /**
34
- * @return array
35
- */
36
- public function getHeaders()
37
- {
38
- $headers = array();
39
- $headers_rows = explode("\r\n", $this->headers);
40
- foreach ($headers_rows as $headers_row) {
41
- $header = explode(": ", $headers_row);
42
- $headers[$header[0]] = isset($header[1])?$header[1]:$header[0];
43
- }
44
- return $headers;
45
- }
46
-
47
- /**
48
- * @return string
49
- */
50
- public function getBody()
51
- {
52
- return $this->body;
53
- }
54
-
55
- /**
56
- * @return int
57
- */
58
- public function getResponseCode()
59
- {
60
- return $this->code;
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/AbstractModel.php DELETED
@@ -1,230 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- use \ArrayAccess;
6
- use ReflectionProperty;
7
-
8
- /**
9
- * Base class for models.
10
- *
11
- * It's much simplified but works. So here is the basic idea:
12
- * - we have a json data presented/decoded as array
13
- * - we want to denormalize the data and hydrate out object with them.
14
- *
15
- * We use fromArray method and:
16
- * - we tries to check if protected(!)/public property with array key name exists, we check also camel case version of the var
17
- * - if property exists we try to use Setter first so if you want to intercept serialization of model you can add protected setter
18
- * - if setter not exists and the current value is an AbstractModel then we try to use fromArray on it
19
- * - if all fails we just use simple assign to the property val
20
- *
21
- * @package WPDesk\SaasPlatformClient\Model
22
- */
23
- class AbstractModel implements ArrayAccess
24
- {
25
- /**
26
- * Constructor
27
- * @param mixed[] $data Associated array of property value initalizing the model
28
- */
29
- public function __construct(array $data = null)
30
- {
31
- if ($data !== null) {
32
- $this->fromArray($data);
33
- }
34
- }
35
-
36
- /**
37
- * Hydrate object from array.
38
- * Try to use snake case then camel case.
39
- *
40
- * @param array $data
41
- */
42
- public function fromArray(array $data)
43
- {
44
- $propertyNames = $this->extractPropertiesNames();
45
-
46
- foreach ($data as $key => $value) {
47
- if (in_array($key, $propertyNames, true)) {
48
- $this[$key] = $value;
49
- } else {
50
- $camelKey = $this->snakeToCamel($key);
51
- if (in_array($camelKey, $propertyNames, true)) {
52
- $this[$camelKey] = $value;
53
- }
54
- }
55
- }
56
- if (isset($data['_embedded']) && is_array($data['_embedded'])) {
57
- $this->fromArray($data['_embedded']);
58
- }
59
- }
60
-
61
- /**
62
- * @return string[]
63
- */
64
- protected function extractPropertiesNames()
65
- {
66
- try {
67
- $reflection = new \ReflectionClass($this);
68
- $properties = $reflection->getProperties();
69
-
70
- return array_map(function (ReflectionProperty $property) {
71
- return $property->getName();
72
- }, $properties);
73
- } catch (\ReflectionException $e) {
74
- return [];
75
- }
76
- }
77
-
78
- /**
79
- * Returns true if offset exists. False otherwise.
80
- * @param string $offset Offset
81
- * @return boolean
82
- */
83
- public function offsetExists($offset)
84
- {
85
- return isset($this->extractPropertiesNames()[$offset]);
86
- }
87
-
88
- /**
89
- * Gets offset.
90
- * @param string $offset Offset
91
- * @return mixed
92
- */
93
- public function offsetGet($offset)
94
- {
95
- if (isset($this->$offset)) {
96
- $getterName = $this->propertyNameToMethod($offset, 'get');
97
- if (method_exists($this, $getterName)) {
98
- return $this->$getterName();
99
- }
100
- return $this->$offset;
101
- }
102
-
103
- return null;
104
-
105
- }
106
-
107
- /**
108
- * @param string $name
109
- * @param string $prefix
110
- * @return string
111
- */
112
- private function propertyNameToMethod($name, $prefix)
113
- {
114
- return $prefix . ucfirst($this->snakeToCamel($name));
115
- }
116
-
117
- /**
118
- * Convert snake case to camel case
119
- *
120
- * @param $str
121
- * @return string
122
- */
123
- private function snakeToCamel($str)
124
- {
125
- // Remove underscores, capitalize words, squash, lowercase first.
126
- return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $str))));
127
- }
128
-
129
- /**
130
- * Unsets offset.
131
- * @param string $offset Offset
132
- * @return void
133
- */
134
- public function offsetUnset($offset)
135
- {
136
- $this->offsetSet($offset, null);
137
- }
138
-
139
- /**
140
- * Sets value based on offset. It's tries to use setter method first.
141
- * If setter is not available and current value is an object then tries to hydrate it by using fromArray
142
- * In the end it's tries to use assigment.
143
- *
144
- * Note that if $value is null and $offset is an object then object will be overridden by null
145
- *
146
- * @param string $offset Offset
147
- * @param mixed $value Value to be set
148
- * @return void
149
- */
150
- public function offsetSet($offset, $value)
151
- {
152
- if (null !== $offset) {
153
- $setterName = $this->propertyNameToMethod($offset, 'set');
154
- try {
155
- if (method_exists($this, $setterName)) {
156
- $this->$setterName($value);
157
- } else {
158
- if ($value !== null && isset($this->$offset) && is_object($this->$offset) && $this->$offset instanceof AbstractModel) {
159
- $this->$offset->fromArray($value);
160
- } else {
161
- $this->$offset = $value;
162
- }
163
- }
164
- } catch (\Exception $e) {
165
- // well that is for a greater good. We know that setter failed horribly so lets try further
166
- }
167
- }
168
- }
169
-
170
- /**
171
- * Hydrate object from stdClass
172
- *
173
- * @param \stdClass $object
174
- */
175
- public function fromObject(\stdClass $object)
176
- {
177
- foreach (get_object_vars($object) as $key => $value) {
178
- $this[$key] = $value;
179
- }
180
- }
181
-
182
- /**
183
- * Gets the string presentation of the object
184
- *
185
- * @return string
186
- */
187
- public function __toString()
188
- {
189
- $encoded = json_encode($this->toArray());
190
- return $encoded? (string) $encoded: '';
191
- }
192
-
193
-
194
- /**
195
- * Convert object to array.
196
- *
197
- * @param mixed $iterable
198
- *
199
- * @return array
200
- */
201
- private function toArrayFromIterable($iterable)
202
- {
203
- $array = [];
204
- foreach ($iterable as $key => $value) {
205
- if ($value instanceof AbstractModel) {
206
- $array[$key] = $value->toArray();
207
- } elseif ($value instanceof \DateTime) {
208
- $array[$key] = $value->format('c');
209
- } elseif (is_array($value)) {
210
- $array[$key] = $this->toArrayFromIterable($value);
211
- } else {
212
- $array[$key] = $value;
213
- }
214
- }
215
- return $array;
216
- }
217
-
218
-
219
- /**
220
- * Convert object to array
221
- *
222
- * @return array
223
- */
224
- public function toArray()
225
- {
226
- return $this->toArrayFromIterable($this);
227
- }
228
- }
229
-
230
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/KeyInfo.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class KeyInfo extends AbstractModel
6
- {
7
- /** @var \DateTime */
8
- protected $last_used;
9
-
10
- /** @var int */
11
- protected $owner_id;
12
-
13
- /** @var array */
14
- protected $domains;
15
-
16
- /**
17
- * @return \DateTime
18
- */
19
- public function getLastUsed()
20
- {
21
- return $this->last_used;
22
- }
23
-
24
- /**
25
- * @return int
26
- */
27
- public function getOwnerId()
28
- {
29
- return $this->owner_id;
30
- }
31
-
32
- /**
33
- * @return array
34
- */
35
- public function getDomains()
36
- {
37
- return $this->domains;
38
- }
39
- }
40
-
41
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Label/Label.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Label;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class Label extends AbstractModel
8
- {
9
- /** @var string */
10
- protected $labelId;
11
-
12
- /** @var string */
13
- protected $labelContent;
14
-
15
- /** @var string */
16
- protected $labelContentMime = 'image/gif';
17
-
18
- /** @var string */
19
- protected $labelContentExt = 'pdf';
20
-
21
- /**
22
- * @return string
23
- */
24
- public function getLabelContent()
25
- {
26
- return $this->labelContent;
27
- }
28
-
29
- /**
30
- * @return string
31
- */
32
- public function getLabelContentMime()
33
- {
34
- return $this->labelContentMime;
35
- }
36
-
37
- /**
38
- * @return string
39
- */
40
- public function getLabelContentExt()
41
- {
42
- return $this->labelContentExt;
43
- }
44
-
45
- }
46
-
47
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/LoginData.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class LoginData extends AbstractModel
6
- {
7
- /** @var string */
8
- protected $connect_key;
9
-
10
- /** @var string */
11
- protected $domain;
12
-
13
- /** @var string */
14
- protected $locale;
15
-
16
- /**
17
- * @return string
18
- */
19
- public function getConnectKey()
20
- {
21
- return $this->connect_key;
22
- }
23
-
24
- /**
25
- * @return string
26
- */
27
- public function getDomain()
28
- {
29
- return $this->domain;
30
- }
31
-
32
- /**
33
- * @return string
34
- */
35
- public function getLocale()
36
- {
37
- return $this->locale;
38
- }
39
- }
40
-
41
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientCollectionPoint.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\Address;
7
-
8
- class ClientCollectionPoint extends AbstractModel
9
- {
10
-
11
- /**
12
- * @var string
13
- */
14
- public $id;
15
-
16
- /**
17
- * @var string
18
- */
19
- public $name;
20
-
21
- /**
22
- * @var string
23
- */
24
- public $description;
25
-
26
- /**
27
- * @var Address
28
- */
29
- public $address;
30
-
31
- /**
32
- * @var ClientMapLocation
33
- */
34
- public $mapLocation;
35
-
36
- /**
37
- * ClientCollectionPoint constructor.
38
- *
39
- * @param array|null $data
40
- */
41
- public function __construct(array $data = null)
42
- {
43
- $this->address = new Address();
44
- $this->mapLocation = new ClientMapLocation();
45
-
46
- parent::__construct($data);
47
- }
48
-
49
- /**
50
- * @return string
51
- */
52
- public function getId()
53
- {
54
- return $this->id;
55
- }
56
-
57
- /**
58
- * @return string
59
- */
60
- public function getName()
61
- {
62
- return $this->name;
63
- }
64
-
65
- /**
66
- * @return string
67
- */
68
- public function getDescription()
69
- {
70
- return $this->description;
71
- }
72
-
73
- /**
74
- * @return Address
75
- */
76
- public function getAddress()
77
- {
78
- return $this->address;
79
- }
80
-
81
- /**
82
- * @return ClientMapLocation
83
- */
84
- public function getMapLocation()
85
- {
86
- return $this->mapLocation;
87
- }
88
-
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/ClientMapLocation.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- class ClientMapLocation
6
- {
7
-
8
- /**
9
- * Latitude
10
- *
11
- * @var string
12
- */
13
- public $lat;
14
-
15
- /**
16
- * Longitude
17
- *
18
- * @var string
19
- */
20
- public $lng;
21
-
22
- /**
23
- * @return string
24
- */
25
- public function getLat()
26
- {
27
- return $this->lat;
28
- }
29
-
30
- /**
31
- * @return string
32
- */
33
- public function getLng()
34
- {
35
- return $this->lng;
36
- }
37
-
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchRequest.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\Address;
7
-
8
- class SearchRequest extends AbstractModel
9
- {
10
-
11
- /**
12
- * @var Address
13
- */
14
- public $address;
15
-
16
- /**
17
- * @var string
18
- */
19
- public $serviceType;
20
-
21
- /**
22
- * How close to address should search for AP in KM
23
- *
24
- * @var int
25
- */
26
- public $radius;
27
-
28
- /**
29
- * @param Address $address
30
- */
31
- public function setAddress($address)
32
- {
33
- $this->address = $address;
34
- }
35
-
36
- /**
37
- * @param string $serviceType
38
- */
39
- public function setServiceType($serviceType)
40
- {
41
- $this->serviceType = $serviceType;
42
- }
43
-
44
- /**
45
- * @param int $radius
46
- */
47
- public function setRadius($radius)
48
- {
49
- $this->radius = $radius;
50
- }
51
-
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SearchResponse.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class SearchResponse extends AbstractModel
8
- {
9
-
10
- /**
11
- * @var ClientCollectionPoint[]
12
- */
13
- public $points = [];
14
-
15
- /** @var array */
16
- public $messageStack = [];
17
-
18
- /**
19
- * From array.
20
- *
21
- * @param array $data Data.
22
- */
23
- public function fromArray(array $data)
24
- {
25
- if ($data['points'] && count($data['points']) > 0) {
26
- foreach ($data['points'] as $point) {
27
- $this->points[] = new ClientCollectionPoint($point);
28
- }
29
- }
30
- if (isset($data['messageStack'])) {
31
- $this->messageStack = $data['messageStack'];
32
- }
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleRequest.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class SingleRequest extends AbstractModel
8
- {
9
-
10
- /**
11
- * @var string
12
- */
13
- public $id;
14
-
15
- /**
16
- * @param string $id
17
- */
18
- public function setId($id)
19
- {
20
- $this->id = $id;
21
- }
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ParcelCollectionPoints/SingleResponse.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class SingleResponse extends AbstractModel
8
- {
9
-
10
- /**
11
- * @var ClientCollectionPoint
12
- */
13
- public $point;
14
-
15
- /** @var array */
16
- public $messageStack = [];
17
-
18
-
19
- /**
20
- * From array.
21
- *
22
- * @param array $data Data.
23
- */
24
- public function fromArray(array $data)
25
- {
26
- if (isset($data['point'])) {
27
- $this->point = new ClientCollectionPoint($data['point']);
28
- }
29
- if (isset($data['messageStack'])) {
30
- $this->messageStack = $data['messageStack'];
31
- }
32
- }
33
-
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/RateRequest.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Rate;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest;
6
-
7
- class RateRequest extends ShipmentRequest
8
- {
9
-
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/RateResponse.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Rate;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class RateResponse extends AbstractModel
8
- {
9
- /**
10
- * @var SingleRate[]
11
- */
12
- public $rates = [];
13
-
14
- public $messageStack = [];
15
-
16
- /**
17
- * From array.
18
- *
19
- * @param array $data Data.
20
- */
21
- public function fromArray(array $data)
22
- {
23
- if ($data['rates'] && count($data['rates']) > 0) {
24
- foreach ($data['rates'] as $rate) {
25
- $this->rates[] = new SingleRate($rate);
26
- }
27
- }
28
- if (isset($data['messageStack'])) {
29
- $this->messageStack = $data['messageStack'];
30
- }
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Rate/SingleRate.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Rate;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\ClientMoney;
7
-
8
- class SingleRate extends AbstractModel
9
- {
10
- /** string */
11
- public $serviceType;
12
-
13
- /** string */
14
- public $serviceName;
15
-
16
- /**
17
- * @var ClientMoney|null
18
- */
19
- public $transportCharge;
20
-
21
- /**
22
- * @var ClientMoney|null
23
- */
24
- public $serviceCharge;
25
-
26
- /**
27
- * @var ClientMoney|null
28
- */
29
- public $totalCharge;
30
-
31
- /**
32
- * @var int
33
- */
34
- public $daysToDelivery;
35
-
36
- public function __construct(array $data = null)
37
- {
38
- $this->transportCharge = new ClientMoney();
39
- $this->serviceCharge = new ClientMoney();
40
- $this->totalCharge = new ClientMoney();
41
-
42
- parent::__construct($data);
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Register.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class Register extends AbstractModel
6
- {
7
- /** @var string */
8
- protected $email;
9
-
10
- /** @var string */
11
- protected $domain;
12
-
13
- /** @var string */
14
- protected $locale;
15
-
16
- /** @var string */
17
- protected $admin_url;
18
-
19
- /**
20
- * @param string $email
21
- */
22
- public function setEmail($email)
23
- {
24
- $this->email = $email;
25
- }
26
-
27
- /**
28
- * @param string $domain
29
- */
30
- public function setDomain($domain)
31
- {
32
- $this->domain = $domain;
33
- }
34
-
35
- /**
36
- * @param string $locale
37
- */
38
- public function setLocale($locale)
39
- {
40
- $this->locale = $locale;
41
- }
42
-
43
- /**
44
- * @param string $admin_url
45
- */
46
- public function setAdminUrl($admin_url)
47
- {
48
- $this->admin_url = $admin_url;
49
- }
50
- }
51
-
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Reset.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class Reset extends AbstractModel
6
- {
7
- /** @var string */
8
- protected $connect_key;
9
-
10
- /**
11
- * @param string $connect_key
12
- */
13
- public function setConnectKey($connect_key)
14
- {
15
- $this->connect_key = $connect_key;
16
- }
17
- }
18
-
19
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Actor.php DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
7
-
8
- class Actor extends AbstractModel
9
- {
10
- /**
11
- * @Constraints\Valid
12
- *
13
- * @var Address
14
- */
15
- protected $address;
16
-
17
- /**
18
- * @Constraints\NotBlank
19
- *
20
- * @var string
21
- */
22
- protected $name;
23
-
24
- /**
25
- * @var string
26
- */
27
- protected $companyName;
28
-
29
- /**
30
- * @var string
31
- */
32
- protected $phoneNumber;
33
-
34
- /**
35
- * @var string
36
- */
37
- protected $email;
38
-
39
- /**
40
- * @param Address $address
41
- */
42
- public function setAddress($address)
43
- {
44
- $this->address = $address;
45
- }
46
-
47
- /**
48
- * @param string $name
49
- */
50
- public function setName($name)
51
- {
52
- $this->name = $name;
53
- }
54
-
55
- /**
56
- * @param string $companyName
57
- */
58
- public function setCompanyName($companyName)
59
- {
60
- $this->companyName = $companyName;
61
- }
62
-
63
- /**
64
- * @param string $phoneNumber
65
- */
66
- public function setPhoneNumber($phoneNumber)
67
- {
68
- $this->phoneNumber = $phoneNumber;
69
- }
70
-
71
- /**
72
- * @param string $email
73
- */
74
- public function setEmail($email)
75
- {
76
- $this->email = $email;
77
- }
78
-
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Address.php DELETED
@@ -1,142 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
-
7
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
8
-
9
- class Address extends AbstractModel
10
- {
11
- /**
12
- * @Constraints\NotBlank
13
- *
14
- * @var string
15
- */
16
- public $addressLine1;
17
-
18
- /** @var string */
19
- public $addressLine2;
20
-
21
- /**
22
- * @Constraints\NotBlank
23
- *
24
- * @var string
25
- */
26
- public $postalCode;
27
-
28
- /**
29
- * @Constraints\NotBlank
30
- *
31
- * @var string
32
- */
33
- public $city;
34
-
35
- /**
36
- * @var string
37
- */
38
- public $stateCode;
39
-
40
- /**
41
- * @Constraints\NotBlank
42
- *
43
- * @var string
44
- */
45
- public $countryCode;
46
-
47
- /**
48
- * @return string
49
- */
50
- public function getAddressLine1()
51
- {
52
- return $this->addressLine1;
53
- }
54
-
55
- /**
56
- * @return string
57
- */
58
- public function getAddressLine2()
59
- {
60
- return $this->addressLine2;
61
- }
62
-
63
- /**
64
- * @return string
65
- */
66
- public function getPostalCode()
67
- {
68
- return $this->postalCode;
69
- }
70
-
71
- /**
72
- * @return string
73
- */
74
- public function getCity()
75
- {
76
- return $this->city;
77
- }
78
-
79
- /**
80
- * @return string
81
- */
82
- public function getStateCode()
83
- {
84
- return $this->stateCode;
85
- }
86
-
87
- /**
88
- * @return string
89
- */
90
- public function getCountryCode()
91
- {
92
- return $this->countryCode;
93
- }
94
-
95
- /**
96
- * @param string $addressLine1
97
- */
98
- public function setAddressLine1($addressLine1)
99
- {
100
- $this->addressLine1 = $addressLine1;
101
- }
102
-
103
- /**
104
- * @param string $addressLine2
105
- */
106
- public function setAddressLine2($addressLine2)
107
- {
108
- $this->addressLine2 = $addressLine2;
109
- }
110
-
111
- /**
112
- * @param string $postalCode
113
- */
114
- public function setPostalCode($postalCode)
115
- {
116
- $this->postalCode = $postalCode;
117
- }
118
-
119
- /**
120
- * @param string $city
121
- */
122
- public function setCity($city)
123
- {
124
- $this->city = $city;
125
- }
126
-
127
- /**
128
- * @param string $stateCode
129
- */
130
- public function setStateCode($stateCode)
131
- {
132
- $this->stateCode = $stateCode;
133
- }
134
-
135
- /**
136
- * @param string $countryCode
137
- */
138
- public function setCountryCode($countryCode)
139
- {
140
- $this->countryCode = $countryCode;
141
- }
142
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientCommodity.php DELETED
@@ -1,163 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
7
-
8
- class ClientCommodity extends AbstractModel
9
- {
10
-
11
- /**
12
- * Name of the commodity
13
- *
14
- * @Constraints\NotBlank
15
- *
16
- * @var string
17
- */
18
- protected $name;
19
-
20
- /**
21
- * Unit price
22
- *
23
- * @Constraints\NotBlank
24
- *
25
- * @var ClientMoney
26
- */
27
- protected $unitPrice;
28
-
29
- /**
30
- * Unit weight
31
- *
32
- * @Constraints\NotBlank
33
- *
34
- * @var ClientWeight
35
- */
36
- protected $unitWeight;
37
-
38
- /**
39
- * Quantity
40
- *
41
- * @Constraints\NotBlank
42
- *
43
- * @var int
44
- */
45
- protected $quantity;
46
-
47
- /**
48
- * Description ie 200 cm x 400 cm nylon carpet samples for demonstration
49
- * or Two steel springs for woodworking machine
50
- *
51
- * @Constraints\NotBlank
52
- *
53
- * @var string
54
- */
55
- protected $description;
56
-
57
- /**
58
- * @var string
59
- */
60
- protected $countryOfManufacture;
61
-
62
- /**
63
- * Harmonized Tariff System (HTS) codes to meet the U.S. and foreign governments' customs requirements
64
- *
65
- * @var string
66
- */
67
- protected $htsCode;
68
-
69
- /**
70
- * ClientCommodity constructor.
71
- *
72
- * @param string $name
73
- * @param ClientMoney $unitPrice
74
- * @param ClientWeight $unitWeight
75
- * @param int $quantity
76
- * @param string $description
77
- * @param string $countryOfManufacture
78
- * @param string $htsCode
79
- */
80
- public function __construct(
81
- $name,
82
- ClientMoney $unitPrice,
83
- ClientWeight $unitWeight,
84
- $quantity,
85
- $description,
86
- $countryOfManufacture,
87
- $htsCode
88
- ) {
89
- parent::__construct(null);
90
-
91
- $this->name = $name;
92
-
93
- $this->unitPrice = $unitPrice;
94
-
95
- $this->unitWeight = $unitWeight;
96
-
97
- $this->quantity = $quantity;
98
-
99
- $this->description = $description;
100
-
101
- $this->countryOfManufacture = $countryOfManufacture;
102
-
103
- $this->htsCode = $htsCode;
104
- }
105
-
106
- /**
107
- * @param string $name
108
- */
109
- public function setName($name)
110
- {
111
- $this->name = $name;
112
- }
113
-
114
- /**
115
- * @param ClientMoney $unitPrice
116
- */
117
- public function setUnitPrice($unitPrice)
118
- {
119
- $this->unitPrice = $unitPrice;
120
- }
121
-
122
- /**
123
- * @param ClientWeight $unitWeight
124
- */
125
- public function setUnitWeight($unitWeight)
126
- {
127
- $this->unitWeight = $unitWeight;
128
- }
129
-
130
- /**
131
- * @param int $quantity
132
- */
133
- public function setQuantity($quantity)
134
- {
135
- $this->quantity = $quantity;
136
- }
137
-
138
-
139
- /**
140
- * @param string $description
141
- */
142
- public function setDescription($description)
143
- {
144
- $this->description = $description;
145
- }
146
-
147
- /**
148
- * @param string $countryOfManufacture
149
- */
150
- public function setCountryOfManufacture($countryOfManufacture)
151
- {
152
- $this->countryOfManufacture = $countryOfManufacture;
153
- }
154
-
155
- /**
156
- * @param string $htsCode
157
- */
158
- public function setHtsCode($htsCode)
159
- {
160
- $this->htsCode = $htsCode;
161
- }
162
-
163
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientMoney.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- /**
8
- * Class ClientMoney
9
- * Compatible with Fowler Money.
10
- * @see http://moneyphp.org/en/stable
11
- * @package WPDesk\SaasPlatformClient\Model\Shipment
12
- */
13
- final class ClientMoney extends AbstractModel
14
- {
15
- /**
16
- * Value in string field but usually is INT
17
- *
18
- * @var string
19
- */
20
- public $amount;
21
-
22
- /** @var string In ISO 4217 */
23
- public $currency;
24
-
25
- /**
26
- * @return string
27
- */
28
- public function getAmount()
29
- {
30
- return $this->amount;
31
- }
32
-
33
- /**
34
- * @return string
35
- */
36
- public function getCurrency()
37
- {
38
- return $this->currency;
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ClientWeight.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- /**
8
- * Class ClientMoney
9
- * Compatible with Fowler Money.
10
- * @see http://moneyphp.org/en/stable
11
- * @package WPDesk\SaasPlatformClient\Model\Shipment
12
- */
13
- final class ClientWeight extends AbstractModel
14
- {
15
- /**
16
- **
17
- * Weight KGS by default
18
- *
19
- * @Constraints\NotBlank
20
- * @Constraints\GreaterThanOrEqual(0)
21
- *
22
- * @var int
23
- */
24
- protected $amount;
25
-
26
- /**
27
- * @Constraints\NotBlank
28
- * @Constraints\Choice({"G"})
29
- *
30
- * @var string
31
- */
32
- protected $unit;
33
-
34
- /**
35
- * @param int $amount
36
- */
37
- public function setAmount($amount)
38
- {
39
- $this->amount = $amount;
40
- }
41
-
42
- /**
43
- * @param string $unit
44
- */
45
- public function setUnit($unit)
46
- {
47
- $this->unit = $unit;
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
7
- use WPDesk\SaasPlatformClient\Model\Shipment\Package\Dimensions;
8
-
9
- class Package extends AbstractModel
10
- {
11
- /**
12
- * Package type values may vary over different shipping service providers
13
- *
14
- * @Constraints\NotBlank
15
- *
16
- * @var string
17
- */
18
- protected $type;
19
-
20
- /**
21
- * Weight in grams
22
- *
23
- * @Constraints\NotBlank
24
- * @Constraints\GreaterThanOrEqual(0)
25
- *
26
- * @var int
27
- */
28
- protected $weight;
29
-
30
- /**
31
- * @Constraints\NotBlank
32
- * @Constraints\Choice({"KGS", "LBS", "G})
33
- *
34
- * @var string
35
- */
36
- protected $weightUnit = 'G';
37
-
38
- /**
39
- * @Constraints\Valid
40
- * @var Dimensions
41
- */
42
- public $dimensions;
43
-
44
- /**
45
- * @var string
46
- */
47
- public $dimensionsUnit = 'MM';
48
-
49
- /**
50
- * @Constraints\NotBlank
51
- *
52
- * @var string
53
- */
54
- protected $description;
55
-
56
- /**
57
- * @param string $type
58
- */
59
- public function setType($type)
60
- {
61
- $this->type = $type;
62
- }
63
-
64
- /**
65
- * @param int $weight
66
- */
67
- public function setWeight($weight)
68
- {
69
- $this->weight = $weight;
70
- }
71
-
72
- /**
73
- * @param string $weightUnit
74
- */
75
- public function setWeightUnit($weightUnit)
76
- {
77
- $this->weightUnit = $weightUnit;
78
- }
79
-
80
- /**
81
- * @param string $description
82
- */
83
- public function setDescription($description)
84
- {
85
- $this->description = $description;
86
- }
87
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/Package/Dimensions.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment\Package;
5
-
6
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
7
-
8
- class Dimensions extends AbstractModel
9
- {
10
- /** @var int */
11
- protected $height;
12
-
13
- /** @var int */
14
- protected $width;
15
-
16
- /** @var int */
17
- protected $length;
18
-
19
- /**
20
- * @param int $height
21
- */
22
- public function setHeight($height)
23
- {
24
- $this->height = $height;
25
- }
26
-
27
- /**
28
- * @param int $width
29
- */
30
- public function setWidth($width)
31
- {
32
- $this->width = $width;
33
- }
34
-
35
- /**
36
- * @param int $length
37
- */
38
- public function setLength($length)
39
- {
40
- $this->length = $length;
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentAdminContext.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\ShippingService;
7
- use WPDesk\SaasPlatformClient\Model\Shop;
8
-
9
- /**
10
- * Shipment as in fs.com shop context
11
- *
12
- * @package App\Dto
13
- */
14
- final class ShipmentAdminContext extends AbstractModel
15
- {
16
- /** @var int */
17
- protected $id;
18
-
19
- /** @var string */
20
- protected $status;
21
-
22
- /** @var \DateTime */
23
- protected $createdAt;
24
-
25
- /** @var array */
26
- protected $shop;
27
-
28
- /** @var array */
29
- protected $shippingService;
30
-
31
- /** @var string */
32
- protected $trackingNumbersAsString;
33
-
34
- public function __construct($data = null)
35
- {
36
- $this->shop = new Shop();
37
- $this->shippingService = new ShippingService();
38
-
39
- parent::__construct($data);
40
- }
41
-
42
- /**
43
- * @return int
44
- */
45
- public function getId()
46
- {
47
- return $this->id;
48
- }
49
-
50
- /**
51
- * @return string
52
- */
53
- public function getStatus()
54
- {
55
- return $this->status;
56
- }
57
-
58
- /**
59
- * @return \DateTime
60
- */
61
- public function getCreatedAt()
62
- {
63
- return $this->createdAt;
64
- }
65
-
66
- /**
67
- * @return Shop
68
- */
69
- public function getShop()
70
- {
71
- return $this->shop;
72
- }
73
-
74
- /**
75
- * @return ShippingService
76
- */
77
- public function getShippingService()
78
- {
79
- return $this->shippingService;
80
- }
81
-
82
- /**
83
- * @return string
84
- */
85
- public function getTrackingNumbersAsString()
86
- {
87
- return $this->trackingNumbersAsString;
88
- }
89
-
90
- /**
91
- * @param string $createdAt
92
- */
93
- protected function setCreatedAt($createdAt)
94
- {
95
- $this->createdAt = new \DateTime($createdAt);
96
- }
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentRequest.php DELETED
@@ -1,195 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\Actor;
7
- use WPDesk\SaasPlatformClient\Model\Shipment\Package;
8
-
9
- /**
10
- *
11
- * @package App\Dto
12
- */
13
- class ShipmentRequest extends AbstractModel
14
- {
15
- /**
16
- * @Constraints\NotBlank
17
- * @Constraints\Valid
18
- *
19
- * @var Actor
20
- */
21
- protected $shipTo;
22
-
23
- /**
24
- * @Constraints\NotBlank
25
- * @Constraints\Valid
26
- *
27
- * @var Package[]
28
- */
29
- protected $packages;
30
-
31
- /**
32
- * Full information about the goods sent
33
- *
34
- * @Constraints\Valid
35
- *
36
- * @var ClientCommodity[]
37
- */
38
- public $commodities;
39
-
40
- /**
41
- * @Constraints\NotBlank
42
- *
43
- * @var string
44
- */
45
- protected $serviceType;
46
-
47
- /**
48
- * @var array
49
- */
50
- public $additionalCustomFields;
51
-
52
- /**
53
- * @var string
54
- */
55
- public $referenceNumber;
56
-
57
- /**
58
- * @var ShopData
59
- */
60
- protected $shopData;
61
-
62
- /**
63
- * @var ShopFlow
64
- */
65
- protected $shopFlow;
66
-
67
- /**
68
- * Id of selected collection point
69
- *
70
- * @var string
71
- */
72
- protected $collectionPointId;
73
-
74
- /**
75
- * @param \WPDesk\SaasPlatformClient\Model\Shipment\Actor $shipTo
76
- */
77
- public function setShipTo($shipTo)
78
- {
79
- $this->shipTo = $shipTo;
80
- }
81
-
82
- /**
83
- * @param Package[] $packages
84
- */
85
- public function setPackages($packages)
86
- {
87
- $this->packages = $packages;
88
- }
89
-
90
- /**
91
- * @param ClientCommodity[] $commodities
92
- */
93
- public function setCommodities($commodities)
94
- {
95
- $this->commodities = $commodities;
96
- }
97
-
98
- /**
99
- * @param string $serviceType
100
- */
101
- public function setServiceType($serviceType)
102
- {
103
- $this->serviceType = $serviceType;
104
- }
105
-
106
- /**
107
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Actor
108
- */
109
- public function getShipTo()
110
- {
111
- return $this->shipTo;
112
- }
113
-
114
- /**
115
- * @return Package[]
116
- */
117
- public function getPackages()
118
- {
119
- return $this->packages;
120
- }
121
-
122
- /**
123
- * @return string
124
- */
125
- public function getServiceType()
126
- {
127
- return $this->serviceType;
128
- }
129
-
130
- /**
131
- * @return array
132
- */
133
- public function getAdditionalCustomFields()
134
- {
135
- return $this->additionalCustomFields;
136
- }
137
-
138
- /**
139
- * @param array $additionalCustomFields
140
- */
141
- public function setAdditionalCustomFields($additionalCustomFields)
142
- {
143
- $this->additionalCustomFields = $additionalCustomFields;
144
- }
145
-
146
- /**
147
- * @return string
148
- */
149
- public function getReferenceNumber()
150
- {
151
- return $this->referenceNumber;
152
- }
153
-
154
- /**
155
- * @param string $referenceNumber
156
- */
157
- public function setReferenceNumber($referenceNumber)
158
- {
159
- $this->referenceNumber = $referenceNumber;
160
- }
161
-
162
- /**
163
- * @param ShopData $shopData
164
- */
165
- public function setShopData($shopData)
166
- {
167
- $this->shopData = $shopData;
168
- }
169
-
170
- /**
171
- * @param ShopFlow $shopFlow
172
- */
173
- public function setShopFlow($shopFlow)
174
- {
175
- $this->shopFlow = $shopFlow;
176
- }
177
-
178
- /**
179
- * @return string
180
- */
181
- public function getCollectionPointId()
182
- {
183
- return $this->collectionPointId;
184
- }
185
-
186
- /**
187
- * @param string $collectionPointId
188
- */
189
- public function setCollectionPointId($collectionPointId)
190
- {
191
- $this->collectionPointId = $collectionPointId;
192
- }
193
-
194
-
195
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShipmentResponse.php DELETED
@@ -1,120 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- /**
8
- *
9
- * @package App\Dto
10
- */
11
- final class ShipmentResponse extends AbstractModel
12
- {
13
- /** @var int */
14
- protected $shipmentId;
15
-
16
- /** @var string */
17
- protected $status;
18
-
19
- /** @var string|null */
20
- protected $message;
21
-
22
- /** @var string */
23
- protected $trackingId;
24
-
25
- /** @var string */
26
- protected $trackingUrl;
27
-
28
- /** @var string */
29
- protected $shipmentCountSent;
30
-
31
- /** @var string */
32
- protected $shipmentCountLeft;
33
-
34
- /** @var ClientMoney|null */
35
- protected $shipmentCost;
36
-
37
- /**
38
- * Constructor
39
- * @param mixed[] $data Associated array of property value initializing the model
40
- */
41
- public function __construct(array $data = null)
42
- {
43
- $this->shipmentCost = new ClientMoney();
44
- parent::__construct($data);
45
- }
46
-
47
- /**
48
- * @return int
49
- */
50
- public function getShipmentId()
51
- {
52
- return $this->shipmentId;
53
- }
54
-
55
- /**
56
- * @return string
57
- */
58
- public function getStatus()
59
- {
60
- return $this->status;
61
- }
62
-
63
- /**
64
- * @return null|string
65
- */
66
- public function getMessage()
67
- {
68
- return $this->message;
69
- }
70
-
71
- /**
72
- * @return string
73
- */
74
- public function getTrackingId()
75
- {
76
- return $this->trackingId;
77
- }
78
-
79
- /**
80
- * @return string
81
- */
82
- public function getTrackingUrl()
83
- {
84
- return $this->trackingUrl;
85
- }
86
-
87
- /**
88
- * @return string
89
- */
90
- public function getShipmentCountSent()
91
- {
92
- return $this->shipmentCountSent;
93
- }
94
-
95
- /**
96
- * @return string
97
- */
98
- public function getShipmentCountLeft()
99
- {
100
- return $this->shipmentCountLeft;
101
- }
102
-
103
- /**
104
- * @return bool
105
- */
106
- public function hasShipmentCost()
107
- {
108
- return $this->shipmentCost !== null;
109
- }
110
-
111
- /**
112
- * @return ClientMoney|null - Null when shipment cost is unknown => hasShipmentCost is false
113
- */
114
- public function getShipmentCost()
115
- {
116
- return $this->shipmentCost;
117
- }
118
-
119
-
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopData.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
-
7
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
8
-
9
- class ShopData extends AbstractModel
10
- {
11
-
12
- /**
13
- * Order id.
14
- *
15
- * @var int
16
- */
17
- protected $orderId;
18
-
19
- /**
20
- * Shipment id.
21
- *
22
- * @var int
23
- */
24
- protected $shipmentId;
25
-
26
-
27
- /**
28
- * @param int $orderId
29
- */
30
- public function setOrderId($orderId)
31
- {
32
- $this->orderId = $orderId;
33
- }
34
-
35
- /**
36
- * @param int $shipmentId
37
- */
38
- public function setShipmentId($shipmentId)
39
- {
40
- $this->shipmentId = $shipmentId;
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shipment/ShopFlow.php DELETED
@@ -1,113 +0,0 @@
1
- <?php
2
-
3
-
4
- namespace WPDesk\SaasPlatformClient\Model\Shipment;
5
-
6
-
7
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
8
-
9
- class ShopFlow extends AbstractModel
10
- {
11
-
12
- /**
13
- * Created via.
14
- *
15
- * @var string
16
- */
17
- protected $createdVia;
18
-
19
- /**
20
- * Sent via.
21
- *
22
- * @var string
23
- */
24
- protected $sentVia;
25
-
26
- /**
27
- * Fallback.
28
- *
29
- * @var bool
30
- */
31
- protected $fallback = false;
32
-
33
- /**
34
- * Fallback message.
35
- *
36
- * @var string
37
- */
38
- protected $fallbackMessage;
39
-
40
- /**
41
- * Rate type.
42
- *
43
- * @var string
44
- */
45
- protected $rateType;
46
-
47
- /**
48
- * @var string
49
- */
50
- protected $checkoutServiceType;
51
-
52
- /**
53
- * @var string
54
- */
55
- protected $checkoutServiceName;
56
-
57
- /**
58
- * @param string $createdVia
59
- */
60
- public function setCreatedVia($createdVia)
61
- {
62
- $this->createdVia = $createdVia;
63
- }
64
-
65
- /**
66
- * @param string $sentVia
67
- */
68
- public function setSentVia($sentVia)
69
- {
70
- $this->sentVia = $sentVia;
71
- }
72
-
73
- /**
74
- * @param bool $fallback
75
- */
76
- public function setFallback($fallback)
77
- {
78
- $this->fallback = $fallback;
79
- }
80
-
81
- /**
82
- * @param string $fallbackMessage
83
- */
84
- public function setFallbackMessage($fallbackMessage)
85
- {
86
- $this->fallbackMessage = $fallbackMessage;
87
- }
88
-
89
- /**
90
- * @param string $rateType
91
- */
92
- public function setRateType($rateType)
93
- {
94
- $this->rateType = $rateType;
95
- }
96
-
97
- /**
98
- * @param string $checkoutServiceType
99
- */
100
- public function setCheckoutServiceType($checkoutServiceType)
101
- {
102
- $this->checkoutServiceType = $checkoutServiceType;
103
- }
104
-
105
- /**
106
- * @param string $checkoutServiceName
107
- */
108
- public function setCheckoutServiceName($checkoutServiceName)
109
- {
110
- $this->checkoutServiceName = $checkoutServiceName;
111
- }
112
-
113
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/SendDocumentsResponse.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class SendDocumentsResponse extends AbstractModel
8
- {
9
-
10
- /**
11
- * @var array
12
- */
13
- protected $documentStatuses;
14
-
15
- /**
16
- * @return array
17
- */
18
- public function getDocumentStatuses()
19
- {
20
- return $this->documentStatuses;
21
- }
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocument.php DELETED
@@ -1,193 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentAdminContext;
7
-
8
- class ShipmentDocument extends AbstractModel
9
- {
10
-
11
- /**
12
- * @var string
13
- */
14
- protected $message;
15
-
16
- /**
17
- * @var int Unique numeric ID.
18
- */
19
- protected $id;
20
-
21
- /**
22
- * @var string document type.
23
- */
24
- protected $documentType;
25
-
26
- /**
27
- * @var string
28
- */
29
- protected $fileName;
30
-
31
- /**
32
- * Content encoded in base64
33
- * @var string
34
- */
35
- protected $fileContent;
36
-
37
- /**
38
- * @var string
39
- */
40
- protected $status;
41
-
42
- /**
43
- * @var \DateTime
44
- */
45
- protected $createdAt;
46
-
47
- /**
48
- * @var \DateTime
49
- */
50
- protected $updatedAt;
51
-
52
- /**
53
- * @var ShipmentAdminContext
54
- */
55
- protected $shipment;
56
-
57
- /**
58
- * @return int
59
- */
60
- public function getId()
61
- {
62
- return $this->id;
63
- }
64
-
65
- /**
66
- * @param int $id
67
- */
68
- public function setId($id)
69
- {
70
- $this->id = $id;
71
- }
72
-
73
- /**
74
- * @return string
75
- */
76
- public function getDocumentType()
77
- {
78
- return $this->documentType;
79
- }
80
-
81
- /**
82
- * @param string $documentType
83
- */
84
- public function setDocumentType($documentType)
85
- {
86
- $this->documentType = $documentType;
87
- }
88
-
89
- /**
90
- * @return string
91
- */
92
- public function getFileName()
93
- {
94
- return $this->fileName;
95
- }
96
-
97
- /**
98
- * @param string $fileName
99
- */
100
- public function setFileName($fileName)
101
- {
102
- $this->fileName = $fileName;
103
- }
104
-
105
- /**
106
- * @return string
107
- */
108
- public function getFileContent()
109
- {
110
- return $this->fileContent;
111
- }
112
-
113
- /**
114
- * @param string $fileContent
115
- */
116
- public function setFileContent($fileContent)
117
- {
118
- $this->fileContent = $fileContent;
119
- }
120
-
121
- /**
122
- * @return string
123
- */
124
- public function getStatus()
125
- {
126
- return $this->status;
127
- }
128
-
129
- /**
130
- * @param string $status
131
- */
132
- public function setStatus($status)
133
- {
134
- $this->status = $status;
135
- }
136
-
137
- /**
138
- * @return \DateTime
139
- */
140
- public function getCreatedAt()
141
- {
142
- return $this->createdAt;
143
- }
144
-
145
- /**
146
- * @param \DateTime $createdAt
147
- */
148
- public function setCreatedAt($createdAt)
149
- {
150
- $this->createdAt = $createdAt;
151
- }
152
-
153
- /**
154
- * @return \DateTime
155
- */
156
- public function getUpdatedAt()
157
- {
158
- return $this->updatedAt;
159
- }
160
-
161
- /**
162
- * @param \DateTime $updatedAt
163
- */
164
- public function setUpdatedAt($updatedAt)
165
- {
166
- $this->updatedAt = $updatedAt;
167
- }
168
-
169
- /**
170
- * @return ShipmentAdminContext
171
- */
172
- public function getShipment()
173
- {
174
- return $this->shipment;
175
- }
176
-
177
- /**
178
- * @param ShipmentAdminContext $shipment
179
- */
180
- public function setShipment($shipment)
181
- {
182
- $this->shipment = $shipment;
183
- }
184
-
185
- /**
186
- * @return string
187
- */
188
- public function getMessage()
189
- {
190
- return $this->message;
191
- }
192
-
193
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShipmentDocument/ShipmentDocumentRequest.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Model\AbstractModel;
6
-
7
- class ShipmentDocumentRequest extends AbstractModel
8
- {
9
-
10
- /**
11
- * @var string document type.
12
- */
13
- protected $documentType;
14
-
15
- /**
16
- * @var string
17
- */
18
- protected $fileName;
19
-
20
- /**
21
- * Content encoded in base64
22
- * @var string
23
- */
24
- protected $fileContent;
25
-
26
- /**
27
- * @return string
28
- */
29
- public function getDocumentType()
30
- {
31
- return $this->documentType;
32
- }
33
-
34
- /**
35
- * @param string $documentType
36
- */
37
- public function setDocumentType($documentType)
38
- {
39
- $this->documentType = $documentType;
40
- }
41
-
42
- /**
43
- * @return string
44
- */
45
- public function getFileName()
46
- {
47
- return $this->fileName;
48
- }
49
-
50
- /**
51
- * @param string $fileName
52
- */
53
- public function setFileName($fileName)
54
- {
55
- $this->fileName = $fileName;
56
- }
57
-
58
- /**
59
- * @return string
60
- */
61
- public function getFileContent()
62
- {
63
- return $this->fileContent;
64
- }
65
-
66
- /**
67
- * @param string $fileContent
68
- */
69
- public function setFileContent($fileContent)
70
- {
71
- $this->fileContent = $fileContent;
72
- }
73
-
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingPlan.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class ShippingPlan extends AbstractModel
6
- {
7
- /**
8
- * @var int Unique numeric ID.
9
- */
10
- protected $id;
11
-
12
- /**
13
- * @var integer Limit of maximum packages that can be sent.
14
- */
15
- protected $packageLimit;
16
-
17
- /**
18
- * @var \DateTimeInterface of when the plan has started.
19
- */
20
- protected $periodStart;
21
-
22
- /**
23
- * @var \DateTimeInterface Date and Time of when the plan ends.
24
- */
25
- protected $periodEnd;
26
-
27
- /**
28
- * @return int
29
- */
30
- public function getId()
31
- {
32
- return $this->id;
33
- }
34
-
35
- /**
36
- * @param int $id
37
- */
38
- public function setId($id)
39
- {
40
- $this->id = $id;
41
- }
42
-
43
- /**
44
- * @return int
45
- */
46
- public function getPackageLimit()
47
- {
48
- return $this->packageLimit;
49
- }
50
-
51
- /**
52
- * @param int $packageLimit
53
- */
54
- public function setPackageLimit($packageLimit)
55
- {
56
- $this->packageLimit = $packageLimit;
57
- }
58
-
59
- /**
60
- * @return \DateTimeInterface
61
- */
62
- public function getPeriodStart()
63
- {
64
- return $this->periodStart;
65
- }
66
-
67
- /**
68
- * @param \DateTimeInterface $periodStart
69
- */
70
- public function setPeriodStart($periodStart)
71
- {
72
- $this->periodStart = $periodStart;
73
- }
74
-
75
- /**
76
- * @return \DateTimeInterface
77
- */
78
- public function getPeriodEnd()
79
- {
80
- return $this->periodEnd;
81
- }
82
-
83
- /**
84
- * @param \DateTimeInterface $periodEnd
85
- */
86
- public function setPeriodEnd($periodEnd)
87
- {
88
- $this->periodEnd = $periodEnd;
89
- }
90
- }
91
-
92
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingService.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class ShippingService extends AbstractModel
6
- {
7
- /** @var int */
8
- protected $id;
9
-
10
- /** @var string */
11
- protected $name;
12
-
13
- /** @var string */
14
- protected $description;
15
-
16
- /** @var string */
17
- protected $logo_url;
18
-
19
- /** @var array */
20
- protected $connection_settings_definition_json;
21
-
22
- /** @var array */
23
- protected $connection_settings_values_json_schema;
24
-
25
- /** @var array */
26
- protected $request_fields_definition_json;
27
-
28
- /** @var array */
29
- protected $capabilities_json;
30
-
31
- /** @var bool */
32
- protected $enabled;
33
-
34
- /** @var bool */
35
- protected $promoted;
36
-
37
- /**
38
- * @return int
39
- */
40
- public function getId()
41
- {
42
- return $this->id;
43
- }
44
-
45
- /**
46
- * @return string
47
- */
48
- public function getName()
49
- {
50
- return $this->name;
51
- }
52
-
53
- /**
54
- * @return string
55
- */
56
- public function getDescription()
57
- {
58
- return $this->description;
59
- }
60
-
61
- /**
62
- * @return string
63
- */
64
- public function getLogoUrl()
65
- {
66
- return $this->logo_url;
67
- }
68
-
69
- /**
70
- * @return array
71
- */
72
- public function getConnectionSettingsDefinitionJson()
73
- {
74
- return $this->connection_settings_definition_json;
75
- }
76
-
77
- /**
78
- * @return array
79
- */
80
- public function getConnectionSettingsValuesJsonSchema()
81
- {
82
- return $this->connection_settings_values_json_schema;
83
- }
84
-
85
- /**
86
- * @return array
87
- */
88
- public function getRequestFieldsDefinitionJson()
89
- {
90
- return $this->request_fields_definition_json;
91
- }
92
-
93
- /**
94
- * @return array
95
- */
96
- public function getCapabilitiesJson()
97
- {
98
- return $this->capabilities_json;
99
- }
100
-
101
- /**
102
- * @return bool
103
- */
104
- public function getEnabled()
105
- {
106
- return $this->enabled;
107
- }
108
-
109
- /**
110
- * @return bool
111
- */
112
- public function getPromoted()
113
- {
114
- return $this->promoted;
115
- }
116
-
117
- }
118
-
119
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSetting.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class ShippingServiceSetting extends AbstractModel
6
- {
7
- const TYPE_CONNECTION_SETTINGS = 'connection';
8
-
9
- /** @var array */
10
- protected $json_value;
11
-
12
- /** @var int|string */
13
- protected $shipping_service;
14
-
15
- /** @var int|string */
16
- protected $shop;
17
-
18
- /** @var string */
19
- protected $type;
20
-
21
- public function __construct(array $data = null)
22
- {
23
- parent::__construct($data);
24
- $this->type = self::TYPE_CONNECTION_SETTINGS;
25
- }
26
-
27
- /**
28
- * @return array
29
- */
30
- public function getJsonValue()
31
- {
32
- return $this->json_value;
33
- }
34
-
35
- /**
36
- * @param array|\stdClass $json_value
37
- */
38
- public function setJsonValue($json_value)
39
- {
40
- if ($json_value instanceof \stdClass) {
41
- $this->json_value = get_object_vars($json_value);
42
- } else {
43
- $this->json_value = $json_value;
44
- }
45
- $this->json_value = $this->clear_non_assoc_settings($this->json_value);
46
- }
47
-
48
- /**
49
- * Clear values that are not part of associative array
50
- *
51
- * @param array $json_value
52
- *
53
- * @return array
54
- */
55
- private function clear_non_assoc_settings(array $json_value) {
56
- return array_filter($json_value, function($key) {
57
- return !is_int($key);
58
- }, ARRAY_FILTER_USE_KEY);
59
- }
60
-
61
- /**
62
- * @return int|string
63
- */
64
- public function getShippingService()
65
- {
66
- return $this->shipping_service;
67
- }
68
-
69
- /**
70
- * @param int|string $shipping_service
71
- */
72
- public function setShippingService($shipping_service)
73
- {
74
- $this->shipping_service = $shipping_service;
75
- }
76
-
77
- /**
78
- * @return int|string
79
- */
80
- public function getShop()
81
- {
82
- return $this->shop;
83
- }
84
-
85
- /**
86
- * @param int|string $shop
87
- */
88
- public function setShop($shop)
89
- {
90
- $this->shop = $shop;
91
- }
92
-
93
- /**
94
- * @return string
95
- */
96
- public function getType()
97
- {
98
- return $this->type;
99
- }
100
-
101
- /**
102
- * @param string $type
103
- */
104
- public function setType($type)
105
- {
106
- $this->type = $type;
107
- }
108
-
109
- }
110
-
111
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/ShippingServiceSettingTest.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class ShippingServiceSettingTest extends AbstractModel
6
- {
7
- }
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Shop.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class Shop extends AbstractModel
6
- {
7
-
8
- /** @var int */
9
- protected $id;
10
-
11
- /** @var string */
12
- protected $domain;
13
-
14
- /**
15
- * @return int
16
- */
17
- public function getId()
18
- {
19
- return $this->id;
20
- }
21
-
22
- /**
23
- * @return string
24
- */
25
- public function getDomain()
26
- {
27
- return $this->domain;
28
- }
29
- }
30
-
31
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Status.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class Status extends AbstractModel
6
- {
7
-
8
- /** @var string */
9
- protected $serverStatus;
10
-
11
- /** @var string */
12
- protected $platformVersion;
13
-
14
- /** @var int */
15
- protected $currentTimestamp;
16
-
17
- /** @var string */
18
- protected $migrationVersion;
19
-
20
- /** @var string[] */
21
- protected $tokenInfo;
22
-
23
- /**
24
- * @return string
25
- */
26
- public function getServerStatus()
27
- {
28
- return $this->serverStatus;
29
- }
30
-
31
- /**
32
- * @return string
33
- */
34
- public function getPlatformVersion()
35
- {
36
- return $this->platformVersion;
37
- }
38
-
39
- /**
40
- * @return int
41
- */
42
- public function getCurrentTimestamp()
43
- {
44
- return $this->currentTimestamp;
45
- }
46
-
47
- /**
48
- * @return string
49
- */
50
- public function getMigrationVersion()
51
- {
52
- return $this->migrationVersion;
53
- }
54
-
55
- /**
56
- * @return string[]
57
- */
58
- public function getTokenInfo()
59
- {
60
- return $this->tokenInfo;
61
- }
62
-
63
- }
64
-
65
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/Token.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class Token extends AbstractModel
6
- {
7
- /** @var string */
8
- protected $token;
9
-
10
- /**
11
- * @return string
12
- */
13
- public function getToken()
14
- {
15
- return $this->token;
16
- }
17
- }
18
-
19
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Model/User.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Model;
4
-
5
- class User extends AbstractModel
6
- {
7
-
8
- /** @var int */
9
- protected $id;
10
-
11
- /** @var string */
12
- protected $email;
13
-
14
- /** @var ShippingPlan */
15
- protected $shipping_plan;
16
-
17
- /** @var string[] */
18
- protected $roles;
19
-
20
- /** @var string */
21
- protected $password;
22
-
23
- public function __construct($data = null)
24
- {
25
- $this->shipping_plan = new ShippingPlan();
26
- parent::__construct($data);
27
- }
28
-
29
- /**
30
- * @return int
31
- */
32
- public function getId()
33
- {
34
- return $this->id;
35
- }
36
-
37
- /**
38
- * @return string
39
- */
40
- public function getEmail()
41
- {
42
- return $this->email;
43
- }
44
-
45
- /**
46
- * @return ShippingPlan
47
- */
48
- public function getShippingPlan()
49
- {
50
- return $this->shipping_plan;
51
- }
52
-
53
- /**
54
- * @return string[]
55
- */
56
- public function getRoles()
57
- {
58
- return $this->roles;
59
- }
60
-
61
- /**
62
- * @return string
63
- */
64
- public function getPassword()
65
- {
66
- return $this->password;
67
- }
68
- }
69
-
70
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Persistence/PersistentContainerFactory.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Persistence;
4
-
5
- use WPDesk\Persistence\PersistentContainer;
6
- use WPDesk\SaasPlatformClient\PlatformOption\PersistenceOptions;
7
-
8
- class PersistentContainerFactory
9
- {
10
- /**
11
- * @param PersistenceOptions $options
12
- * @return PersistentContainer
13
- */
14
- public function createContainer(PersistenceOptions $options)
15
- {
16
- $className = $options->getPersistenceClass();
17
- return new $className;
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Platform.php DELETED
@@ -1,577 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient;
4
-
5
- use Psr\Log\LoggerAwareInterface;
6
- use Psr\Log\LoggerInterface;
7
- use WPDesk\Persistence\ElementNotExistsException;
8
- use WPDesk\Persistence\PersistentContainer;
9
- use WPDesk\SaasPlatformClient\Authentication\JWTSaasToken;
10
- use WPDesk\SaasPlatformClient\Authentication\NullToken;
11
- use WPDesk\SaasPlatformClient\Authentication\Token;
12
- use WPDesk\SaasPlatformClient\ApiClient\Client;
13
- use WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SearchRequest;
14
- use WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SingleRequest;
15
- use WPDesk\SaasPlatformClient\Model\Rate\RateRequest;
16
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest;
17
- use WPDesk\SaasPlatformClient\Model\ShipmentDocument\ShipmentDocumentRequest;
18
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
19
- use WPDesk\SaasPlatformClient\Request\Authentication\RegisterRequest;
20
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
21
- use WPDesk\SaasPlatformClient\Request\ShipmentCancel\PostCancelRequest;
22
- use WPDesk\SaasPlatformClient\Request\Fields\GetFieldsRequest;
23
- use WPDesk\SaasPlatformClient\Request\Label\PostLabelRequest;
24
- use WPDesk\SaasPlatformClient\Request\ParcelCollectionPoints\GetSingleRequest;
25
- use WPDesk\SaasPlatformClient\Request\ParcelCollectionPoints\PostSearchRequest;
26
- use WPDesk\SaasPlatformClient\Request\Rate\PostRateRequest;
27
- use WPDesk\SaasPlatformClient\Request\ShipmentDocument\DeleteShipmentDocumentRequest;
28
- use WPDesk\SaasPlatformClient\Request\ShipmentDocument\PostShipmentDocumentRequest;
29
- use WPDesk\SaasPlatformClient\Request\ShipmentDocumentsSend\PostSendRequest;
30
- use WPDesk\SaasPlatformClient\Request\ShippingServices\GetListRequest;
31
- use WPDesk\SaasPlatformClient\Request\ShippingServices\GetServiceRequest;
32
- use WPDesk\SaasPlatformClient\Request\Shipment\PostShipmentRequest;
33
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\GetSettingsRequest;
34
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\PostSettingsRequest;
35
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\PutSettingsRequest;
36
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\Test\GetSettingsTestRequest;
37
- use WPDesk\SaasPlatformClient\Request\Status\GetStatusRequest;
38
- use WPDesk\SaasPlatformClient\Request\Users\GetUserRequest;
39
- use WPDesk\SaasPlatformClient\Response\AuthApiResponse;
40
- use WPDesk\SaasPlatformClient\Response\Authentication\RegisterResponse;
41
- use WPDesk\SaasPlatformClient\Request\Authentication\TokenRequest;
42
- use WPDesk\SaasPlatformClient\Response\Fields\GetFieldsResponse;
43
- use WPDesk\SaasPlatformClient\Response\Label\PostLabelResponse;
44
- use WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints\GetSingleResponse;
45
- use WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints\PostSearchResponse;
46
- use WPDesk\SaasPlatformClient\Response\ProtectedResponse;
47
- use WPDesk\SaasPlatformClient\Response\Response;
48
- use WPDesk\SaasPlatformClient\Response\ShipmentCancel\PostCancelResponse;
49
- use WPDesk\SaasPlatformClient\Response\Rate\PostRateResponse;
50
- use WPDesk\SaasPlatformClient\Response\ShipmentDocument\DeleteShipmentDocumentResponse;
51
- use WPDesk\SaasPlatformClient\Response\ShipmentDocument\PostShipmentDocumentResponse;
52
- use WPDesk\SaasPlatformClient\Response\ShipmentDocumentsSend\PostSendResponse;
53
- use WPDesk\SaasPlatformClient\Response\ShippingServices;
54
- use WPDesk\SaasPlatformClient\Response\Authentication\TokenResponse;
55
- use WPDesk\SaasPlatformClient\Response\ShippingServicesSettings\GetSettingsResponse;
56
- use WPDesk\SaasPlatformClient\Response\Shipment\PostShipmentResponse;
57
- use WPDesk\SaasPlatformClient\Response\ShippingServicesSettings\Test\GetSettingsTestResponse;
58
- use WPDesk\SaasPlatformClient\Response\Status\GetStatusResponse;
59
- use WPDesk\SaasPlatformClient\Response\Users\GetUserResponse;
60
-
61
- class Platform implements LoggerAwareInterface
62
- {
63
- const CONTAINER_KEY_TOKEN = 'token';
64
- const CONTAINER_KEY_CONNECT_KEY = 'connectKey';
65
- const CONTAINER_KEY_DOMAIN = 'domain';
66
- const CONTAINER_KEY_LOCALE = 'locale';
67
-
68
- const LIBARY_LOGIN_CONTEXT = 'wp-saas-platform-client';
69
-
70
- /** @var Client */
71
- private $client;
72
-
73
- /** @var PersistentContainer */
74
- private $persistentContainer;
75
-
76
- /** @var LoggerInterface */
77
- private $logger;
78
-
79
- /**
80
- * Platform constructor.
81
- * @param Client $client
82
- * @param PersistentContainer $container
83
- * @param LoggerInterface $logger
84
- */
85
- public function __construct(Client $client, PersistentContainer $container, LoggerInterface $logger)
86
- {
87
- $this->persistentContainer = $container;
88
- $this->client = $client;
89
- $this->logger = $logger;
90
- $this->logger->debug('Platform instance created', $this->getLoggerContext());
91
- }
92
-
93
- /**
94
- * Get Api client
95
- *
96
- * @return Client
97
- */
98
- public function getClient()
99
- {
100
- return $this->client;
101
- }
102
-
103
- /**
104
- * Set Api client
105
- *
106
- * @param Client $client
107
- */
108
- public function setClient(Client $client)
109
- {
110
- $this->client = $client;
111
- }
112
-
113
- /**
114
- * Is token persistent
115
- *
116
- * @return bool
117
- */
118
- public function isTokenSet()
119
- {
120
- $tokenString = $this->persistentContainer->get(self::CONTAINER_KEY_TOKEN);
121
- return !empty($tokenString);
122
- }
123
-
124
- /**
125
- * @return PersistentContainer
126
- */
127
- public function getPersistentContainer()
128
- {
129
- return $this->persistentContainer;
130
- }
131
-
132
- /**
133
- * Register user
134
- *
135
- * @param string $email
136
- * @param string $domain
137
- * @param string $locale
138
- * @param string $admin_url
139
- *
140
- * @return RegisterResponse
141
- */
142
- public function requestRegister($email, $domain, $locale, $admin_url = null)
143
- {
144
- $registerRequest = new RegisterRequest($email, $domain, $locale, $admin_url);
145
- $response = $this->client->sendRequest($registerRequest);
146
- return new RegisterResponse(new ProtectedResponse($response));
147
- }
148
-
149
- /**
150
- * Get shipping providers
151
- *
152
- * @return ShippingServices\GetShippingServicesListResponse
153
- */
154
- public function requestListShippingServices()
155
- {
156
- $listProvidersRequest = new GetListRequest($this->getToken());
157
- $response = $this->sendRequestWithInvalidTokenHandling($listProvidersRequest);
158
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
159
- return new ShippingServices\GetShippingServicesListResponse(new ProtectedResponse($response));
160
- }
161
-
162
-
163
- /**
164
- * Get specific shipping provider
165
- *
166
- * @param int $serviceId
167
- * @return ShippingServices\GetShippingServiceResponse
168
- */
169
- public function requestGetShippingService($serviceId)
170
- {
171
- $getServiceRequest = new GetServiceRequest($this->getToken(), $serviceId);
172
- $response = $this->sendRequestWithInvalidTokenHandling($getServiceRequest);
173
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
174
- return new ShippingServices\GetShippingServiceResponse(new ProtectedResponse($response));
175
- }
176
-
177
-
178
- /**
179
- * Creates shipment in service.
180
- *
181
- * @param ShipmentRequest $shipment
182
- * @param int $serviceId
183
- * @return PostShipmentResponse
184
- */
185
- public function requestPostShipment(ShipmentRequest $shipment, $serviceId)
186
- {
187
- $saasToken = new JWTSaasToken($this->getToken());
188
-
189
- $postShipmentRequest = new PostShipmentRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $shipment);
190
- $response = $this->sendRequestWithInvalidTokenHandling($postShipmentRequest);
191
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
192
- return new PostShipmentResponse(new ProtectedResponse($response));
193
- }
194
-
195
- /**
196
- * Rate shipment
197
- *
198
- * @param RateRequest $shipmentToRate
199
- * @param int $serviceId
200
- * @return PostRateResponse
201
- */
202
- public function requestPostRate(RateRequest $shipmentToRate, $serviceId)
203
- {
204
- $saasToken = new JWTSaasToken($this->getToken());
205
-
206
- $postRateRequest = new PostRateRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $shipmentToRate);
207
- $response = $this->sendRequestWithInvalidTokenHandling($postRateRequest);
208
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
209
- return new PostRateResponse(new ProtectedResponse($response));
210
- }
211
-
212
- /**
213
- * Creates document for shipment.
214
- *
215
- * @param ShipmentDocumentRequest $shipmentDocumentRequest
216
- * @param int $serviceId
217
- * @param int $shipmentId
218
- * @return PostShipmentDocumentResponse
219
- */
220
- public function requestPostShipmentDocument(
221
- ShipmentDocumentRequest $shipmentDocumentRequest,
222
- $serviceId,
223
- $shipmentId
224
- ) {
225
- $saasToken = new JWTSaasToken($this->getToken());
226
-
227
- $postShipmentDocumentRequest = new PostShipmentDocumentRequest(
228
- $this->getToken(),
229
- $shipmentId,
230
- $serviceId,
231
- $saasToken->getShopId(),
232
- $shipmentDocumentRequest
233
- );
234
- $response = $this->sendRequestWithInvalidTokenHandling($postShipmentDocumentRequest);
235
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
236
- return new PostShipmentDocumentResponse(new ProtectedResponse($response));
237
- }
238
-
239
- /**
240
- * Deletes document from shipment.
241
- *
242
- * @param int $documentId
243
- * @return DeleteShipmentDocumentResponse
244
- */
245
- public function requestDeleteShipmentDocument(
246
- $documentId
247
- ) {
248
- $deleteShipmentDocumentRequest = new DeleteShipmentDocumentRequest(
249
- $this->getToken(),
250
- $documentId
251
- );
252
- $response = $this->sendRequestWithInvalidTokenHandling($deleteShipmentDocumentRequest);
253
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
254
- return new DeleteShipmentDocumentResponse(new ProtectedResponse($response));
255
- }
256
-
257
- /**
258
- * Search Parcel Collection Points
259
- *
260
- * @param SearchRequest $searchParcelCollectionPointsRequest
261
- * @param int $serviceId
262
- * @return PostSearchResponse
263
- */
264
- public function requestPostSearchParcelCollectionPoints(
265
- SearchRequest $searchParcelCollectionPointsRequest,
266
- $serviceId
267
- ) {
268
- $saasToken = new JWTSaasToken($this->getToken());
269
-
270
- $postRateRequest = new PostSearchRequest(
271
- $this->getToken(),
272
- $serviceId,
273
- $saasToken->getShopId(),
274
- $searchParcelCollectionPointsRequest
275
- );
276
- $response = $this->sendRequestWithInvalidTokenHandling($postRateRequest);
277
-
278
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
279
- return new PostSearchResponse(new ProtectedResponse($response));
280
- }
281
-
282
- /**
283
- * Get single collection point
284
- *
285
- * @param SingleRequest $singleRequest
286
- * @param int $shippingServiceId
287
- * @return GetSingleResponse
288
- */
289
- public function requestGetSingleCollectionPoint(
290
- SingleRequest $singleRequest,
291
- $shippingServiceId
292
- ) {
293
- $saasToken = new JWTSaasToken($this->getToken());
294
-
295
- $getSingleRequest = new GetSingleRequest(
296
- $saasToken,
297
- $shippingServiceId,
298
- $saasToken->getShopId(),
299
- $singleRequest->id
300
- );
301
- $response = $this->sendRequestWithInvalidTokenHandling($getSingleRequest);
302
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
303
- return new GetSingleResponse(new ProtectedResponse($response));
304
- }
305
-
306
- /**
307
- * Get label. Request is POST because it can - and probably would change the shipment state in remote service
308
- *
309
- * @param int $shipmentId
310
- * @param int $serviceId
311
- * @return PostLabelResponse
312
- */
313
- public function requestPostLabel($shipmentId, $serviceId)
314
- {
315
- $saasToken = new JWTSaasToken($this->getToken());
316
-
317
- $postLabelRequest = new PostLabelRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $shipmentId);
318
- $response = $this->sendRequestWithInvalidTokenHandling($postLabelRequest);
319
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
320
- return new PostLabelResponse(new ProtectedResponse($response));
321
- }
322
-
323
- /**
324
- * Cancel shipment. Request is POST it change the shipment state in remote service
325
- *
326
- * @param int $shipmentId
327
- * @param int $serviceId
328
- * @return PostCancelResponse
329
- */
330
- public function requestPostCancel($shipmentId, $serviceId)
331
- {
332
- $saasToken = new JWTSaasToken($this->getToken());
333
-
334
- $postCancelRequest = new PostCancelRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $shipmentId);
335
- $response = $this->sendRequestWithInvalidTokenHandling($postCancelRequest);
336
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
337
- return new PostCancelResponse(new ProtectedResponse($response));
338
- }
339
-
340
- /**
341
- * Send documents
342
- *
343
- * @param int $shipmentId
344
- * @param int $serviceId
345
- * @return PostSendResponse
346
- */
347
- public function requestPostSendDocuments($shipmentId, $serviceId)
348
- {
349
- $saasToken = new JWTSaasToken($this->getToken());
350
-
351
- $postCancelRequest = new PostSendRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $shipmentId);
352
- $response = $this->sendRequestWithInvalidTokenHandling($postCancelRequest);
353
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
354
- return new PostSendResponse(new ProtectedResponse($response));
355
- }
356
-
357
- /**
358
- * Fetch dynamic fields
359
- *
360
- * @param int $serviceId
361
- * @param string[] $zoneTargets
362
- * @return GetFieldsResponse
363
- */
364
- public function requestGetFields($serviceId, array $zoneTargets)
365
- {
366
- $saasToken = new JWTSaasToken($this->getToken());
367
-
368
- $postCancelRequest = new GetFieldsRequest($this->getToken(), $serviceId, $saasToken->getShopId(), $zoneTargets);
369
- $response = $this->sendRequestWithInvalidTokenHandling($postCancelRequest);
370
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
371
- return new GetFieldsResponse(new ProtectedResponse($response));
372
- }
373
-
374
- /**
375
- * Get settings
376
- *
377
- * @param int $shippingServiceId
378
- * @param string $type
379
- * @return GetSettingsResponse
380
- */
381
- public function requestGetSettings($shippingServiceId, $type = ShippingServiceSetting::TYPE_CONNECTION_SETTINGS)
382
- {
383
- $saasToken = new JWTSaasToken($this->getToken());
384
-
385
- $getSettingsRequest = new GetSettingsRequest($saasToken, $shippingServiceId, $saasToken->getShopId(), $type);
386
- $response = $this->sendRequestWithInvalidTokenHandling($getSettingsRequest);
387
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
388
- return new GetSettingsResponse(new ProtectedResponse($response));
389
- }
390
-
391
- /**
392
- * Get status
393
- *
394
- * @return GetStatusResponse
395
- */
396
- public function requestGetStatus()
397
- {
398
- $saasToken = new JWTSaasToken($this->getToken());
399
- $getSettingsRequest = new GetStatusRequest($saasToken);
400
- $response = $this->sendRequestWithInvalidTokenHandling($getSettingsRequest);
401
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
402
- return new GetStatusResponse(new ProtectedResponse($response));
403
- }
404
-
405
- /**
406
- * Save settings
407
- *
408
- * @param ShippingServiceSetting $setting
409
- * @return ProtectedResponse
410
- */
411
- public function requestSaveSettings(ShippingServiceSetting $setting)
412
- {
413
- $saasToken = new JWTSaasToken($this->getToken());
414
- $setting->setShop($saasToken->getShopId());
415
-
416
- $settingResponse = $this->requestGetSettings($setting->getShippingService(), $setting->getType());
417
- if ($settingResponse->isNotExists()) {
418
- $saveRequest = new PostSettingsRequest($saasToken, $setting);
419
- } else {
420
- $saveRequest = new PutSettingsRequest($saasToken, $setting);
421
- }
422
-
423
- return new ProtectedResponse($this->sendRequestWithInvalidTokenHandling($saveRequest));
424
- }
425
-
426
- /**
427
- * Test service connection status to verify service settings.
428
- *
429
- * @param int $shippingServiceId
430
- * @return GetSettingsTestResponse
431
- */
432
- public function requestGetSettingsTest($shippingServiceId)
433
- {
434
- $saasToken = new JWTSaasToken($this->getToken());
435
-
436
- $getSettingsTestRequest = new GetSettingsTestRequest($saasToken, $shippingServiceId, $saasToken->getShopId());
437
- $response = $this->sendRequestWithInvalidTokenHandling($getSettingsTestRequest);
438
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
439
- return new GetSettingsTestResponse(new ProtectedResponse($response));
440
- }
441
-
442
- /**
443
- * Returns Token for Requests
444
- *
445
- * @return Token
446
- */
447
- protected function getToken()
448
- {
449
- try {
450
- $token = unserialize($this->persistentContainer->get(self::CONTAINER_KEY_TOKEN));
451
- if ($token instanceof Token) {
452
- $this->logger->notice('Took token from persistence container', $this->getLoggerContext());
453
- return $token;
454
- }
455
- $this->logger->info('Invalid token deserialization', $this->getLoggerContext());
456
- return new NullToken();
457
- } catch (ElementNotExistsException $e) {
458
- $this->logger->info('Token element does not exists in persisten container', $this->getLoggerContext());
459
- return new NullToken();
460
- }
461
- }
462
-
463
- /**
464
- * Send request and if token is invalid try to claim a new token
465
- *
466
- * @param AuthRequest $request
467
- * @return Response
468
- */
469
- protected function sendRequestWithInvalidTokenHandling(AuthRequest $request)
470
- {
471
- $isTokenValid = !$request->isTokenExpired() && !$request->isTokenInvalid();
472
-
473
- if ($isTokenValid) {
474
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
475
- $response = new AuthApiResponse($this->client->sendRequest($request));
476
- }
477
-
478
- /** @noinspection PhpUndefinedVariableInspection Because if token was valid then some response must exists */
479
- if (!$isTokenValid || $response->isBadCredentials()) {
480
- $this->logger->info("Automatic token reclaim VALIDITY: {$isTokenValid}", $this->getLoggerContext());
481
- $tokenResponse = $this->requestToken(
482
- $this->persistentContainer->get(self::CONTAINER_KEY_CONNECT_KEY),
483
- $this->persistentContainer->get(self::CONTAINER_KEY_DOMAIN),
484
- $this->persistentContainer->get(self::CONTAINER_KEY_LOCALE)
485
- );
486
-
487
- if ($tokenResponse->isLoginSuccess()) {
488
- $request->setToken($tokenResponse->getToken());
489
- $response = $this->client->sendRequest($request);
490
- } else {
491
- $this->logger->notice('Tried to relogin but failed', $this->getLoggerContext());
492
- $response = $tokenResponse;
493
- }
494
-
495
- }
496
- return $response;
497
- }
498
-
499
- /**
500
- * Login user to get a token
501
- *
502
- * @param string $connectKey
503
- * @param string $domain
504
- * @param string $locale
505
- * @return TokenResponse
506
- */
507
- public function requestToken($connectKey, $domain, $locale)
508
- {
509
- $registerRequest = new TokenRequest($connectKey, $domain, $locale);
510
- $response = $this->client->sendRequest($registerRequest);
511
- $tokenResponse = new TokenResponse(new ProtectedResponse($response));
512
- if ($tokenResponse->isLoginSuccess()) {
513
- $this->setToken($tokenResponse->getToken());
514
- $this->persistentContainer->set(self::CONTAINER_KEY_CONNECT_KEY, $connectKey);
515
- $this->persistentContainer->set(self::CONTAINER_KEY_DOMAIN, $domain);
516
- $this->persistentContainer->set(self::CONTAINER_KEY_LOCALE, $locale);
517
- }
518
-
519
- return $tokenResponse;
520
- }
521
-
522
- /**
523
- * Remember token
524
- *
525
- * @param Token $token
526
- */
527
- public function setToken(Token $token)
528
- {
529
- $this->persistentContainer->set(self::CONTAINER_KEY_TOKEN, serialize($token));
530
- $this->logger->notice('Token save in persistence container', $this->getLoggerContext());
531
- }
532
-
533
- /**
534
- * Get user
535
- *
536
- * @param $saas_user_id
537
- *
538
- * @return GetUserResponse
539
- */
540
- public function requestGetUser($saas_user_id)
541
- {
542
- $getUserRequest = new GetUserRequest($saas_user_id, $this->getToken());
543
- $response = $this->sendRequestWithInvalidTokenHandling($getUserRequest);
544
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
545
- return new GetUserResponse(new ProtectedResponse($response));
546
- }
547
-
548
- /**
549
- * Sets logger
550
- *
551
- * @param LoggerInterface $logger
552
- */
553
- public function setLogger(LoggerInterface $logger)
554
- {
555
- $this->logger = $logger;
556
- }
557
-
558
- /**
559
- * Returns logger context for
560
- *
561
- * @param string $additional_context Optional additional context
562
- * @return array
563
- */
564
- protected function getLoggerContext($additional_context = '')
565
- {
566
- $context = [
567
- self::LIBARY_LOGIN_CONTEXT,
568
- self::class
569
- ];
570
- if ($additional_context !== '') {
571
- $context[] = $additional_context;
572
- }
573
- return $context;
574
- }
575
-
576
-
577
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformAdminContext.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShippingPlan;
6
- use WPDesk\SaasPlatformClient\Request\Authentication\ConnectKeyInfoRequest;
7
- use WPDesk\SaasPlatformClient\Request\Authentication\ConnectKeyResetRequest;
8
- use WPDesk\SaasPlatformClient\Request\Shipment\GetUserListShipmentRequest;
9
- use WPDesk\SaasPlatformClient\Request\ShippingPlan\PutShippingPlanRequest;
10
- use WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\PutSettingsRequest;
11
- use WPDesk\SaasPlatformClient\Response\Authentication\ConnectKeyInfoResponse;
12
- use WPDesk\SaasPlatformClient\Response\Authentication\ConnectKeyResetResponse;
13
- use WPDesk\SaasPlatformClient\Response\ProtectedResponse;
14
- use WPDesk\SaasPlatformClient\Response\Shipment\GetListShipmentAdminContextResponse;
15
-
16
- class PlatformAdminContext extends Platform
17
- {
18
- /**
19
- * Reset user connect key
20
- *
21
- * @param int $saas_user_id
22
- *
23
- * @return ConnectKeyResetResponse
24
- */
25
- public function requestConnectKeyReset($saas_user_id)
26
- {
27
- $connectKeyResetRequest = new ConnectKeyResetRequest($saas_user_id, $this->getToken());
28
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
29
- return new ConnectKeyResetResponse(new ProtectedResponse($this->sendRequestWithInvalidTokenHandling($connectKeyResetRequest)));
30
- }
31
-
32
- /**
33
- * Reset user connect key
34
- *
35
- * @param $connectKey
36
- * @return ConnectKeyInfoResponse
37
- */
38
- public function requestConnectKeyInfoRequest($connectKey)
39
- {
40
- $connectKeyInfoRequest = new ConnectKeyInfoRequest($connectKey, $this->getToken());
41
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
42
- return new ConnectKeyInfoResponse(new ProtectedResponse($this->sendRequestWithInvalidTokenHandling($connectKeyInfoRequest)));
43
- }
44
-
45
- /**
46
- * @param string $saas_user_id
47
- * @return GetListShipmentAdminContextResponse
48
- */
49
- public function requestGetListShipments($saas_user_id) {
50
- $listProvidersRequest = new GetUserListShipmentRequest($saas_user_id, $this->getToken());
51
- $response = $this->sendRequestWithInvalidTokenHandling($listProvidersRequest);
52
- /** @noinspection PhpMethodParametersCountMismatchInspection PHPStorm bug with wrapped traits */
53
- return new GetListShipmentAdminContextResponse(new ProtectedResponse($response));
54
- }
55
-
56
- /**
57
- * Save settings
58
- *
59
- * @param ShippingPlan $setting
60
- * @return ProtectedResponse
61
- */
62
- public function requestSavePlan(ShippingPlan $plan, $saas_user_id)
63
- {
64
- $previousPlan = $this->requestGetUser($saas_user_id)->getUser()->getShippingPlan();
65
- $plan->setId($previousPlan->getId());
66
- $putShippingPlanRequest = new PutShippingPlanRequest($this->getToken(), $plan);
67
-
68
- return new ProtectedResponse($this->sendRequestWithInvalidTokenHandling($putShippingPlanRequest));
69
- }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformFactory.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient;
4
-
5
- use WPDesk\SaasPlatformClient\ApiClient\ClientFactory;
6
- use WPDesk\SaasPlatformClient\Persistence\PersistentContainerFactory;
7
-
8
- class PlatformFactory
9
- {
10
- /**
11
- * Creates Flexible Connect Platform instance
12
- *
13
- * @param PlatformFactoryOptions $options
14
- * @return Platform
15
- */
16
- public static function createPlatformApi(PlatformFactoryOptions $options)
17
- {
18
- $clientFactory = new ClientFactory();
19
- $persistenceFactory = new PersistentContainerFactory();
20
- return new Platform(
21
- $clientFactory->createClient($options),
22
- $persistenceFactory->createContainer($options),
23
- $options->getLogger());
24
- }
25
-
26
- /**
27
- * Creates Flexible Connect Platform instance in administration context
28
- *
29
- * @param string $adminConnectKey Connect key for admin account
30
- * @param string $locale Locale in format xx_XX
31
- * @param PlatformFactoryOptions $options
32
- *
33
- * @return PlatformAdminContext
34
- */
35
- public static function createPlatformApiForAdmin($adminConnectKey, $locale, PlatformFactoryOptions $options)
36
- {
37
- $clientFactory = new ClientFactory();
38
- $persistenceFactory = new PersistentContainerFactory();
39
- $persistanceContainer = $persistenceFactory->createContainer($options);
40
-
41
- $persistanceContainer->set(Platform::CONTAINER_KEY_CONNECT_KEY, $adminConnectKey);
42
- $persistanceContainer->set(Platform::CONTAINER_KEY_DOMAIN, 'wpdesk.org');
43
- $persistanceContainer->set(Platform::CONTAINER_KEY_LOCALE, $locale);
44
-
45
- return new PlatformAdminContext(
46
- $clientFactory->createClient($options),
47
- $persistanceContainer,
48
- $options->getLogger()
49
- );
50
- }
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryOptions.php DELETED
@@ -1,223 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient;
4
-
5
- use Psr\Log\LoggerInterface;
6
- use Psr\Log\NullLogger;
7
- use WPDesk\Persistence\MemoryContainer;
8
- use WPDesk\SaasPlatformClient\HttpClient\Curl\CurlClient;
9
- use WPDesk\SaasPlatformClient\PlatformOption\PlatformUrlOptions;
10
- use WPDesk\SaasPlatformClient\PlatformOption\HttpClientOptions;
11
- use WPDesk\SaasPlatformClient\PlatformOption\PersistenceOptions;
12
- use WPDesk\SaasPlatformClient\PlatformOption\SerializerOptions;
13
- use WPDesk\SaasPlatformClient\Serializer\JsonSerializer;
14
-
15
- class PlatformFactoryOptions implements PersistenceOptions, HttpClientOptions, SerializerOptions, PlatformUrlOptions
16
- {
17
-
18
- const DEFAULT_CACHE_TTL = 600;
19
-
20
- /**
21
- * @var string
22
- */
23
- private $httpClientClass = CurlClient::class;
24
-
25
- /**
26
- * @var string
27
- */
28
- protected $persistenceClass = MemoryContainer::class;
29
-
30
- /**
31
- * @var LoggerInterface
32
- */
33
- private $logger;
34
-
35
- /**
36
- * @var string
37
- */
38
- private $serializerClass = JsonSerializer::class;
39
-
40
- /**
41
- * @var string
42
- */
43
- private $apiUrl = 'https://app.flexibleshipping.com/api/v1';
44
-
45
- /** @var bool */
46
- protected $cachedClient = false;
47
-
48
- /** @var int */
49
- protected $cacheTtl = self::DEFAULT_CACHE_TTL;
50
-
51
- /**
52
- * @var string
53
- */
54
- private $apiMimeType = 'application/json';
55
-
56
- /**
57
- * Default request headers - added to each request.
58
- *
59
- * @var array
60
- */
61
- private $defaultRequestHeaders = array();
62
-
63
- /**
64
- * PlatformFactoryOptions constructor.
65
- */
66
- public function __construct()
67
- {
68
- if (getenv('SAAS_FLEXIBLESHIPPING_URL')) {
69
- $this->apiUrl = getenv('SAAS_FLEXIBLESHIPPING_URL');
70
- }
71
- if (defined('SAAS_FLEXIBLESHIPPING_URL')) {
72
- $this->apiUrl = SAAS_FLEXIBLESHIPPING_URL;
73
- }
74
- $this->logger = new NullLogger();
75
- }
76
-
77
- /**
78
- * @return string
79
- */
80
- public function getHttpClientClass()
81
- {
82
- return $this->httpClientClass;
83
- }
84
-
85
- /**
86
- * @param string $httpClientClass
87
- */
88
- public function setHttpClientClass($httpClientClass)
89
- {
90
- $this->httpClientClass = $httpClientClass;
91
- }
92
-
93
- /**
94
- * @return string
95
- */
96
- public function getPersistenceClass()
97
- {
98
- return $this->persistenceClass;
99
- }
100
-
101
- /**
102
- * @param string $persistenceClass
103
- */
104
- public function setPersistenceClass($persistenceClass)
105
- {
106
- $this->persistenceClass = $persistenceClass;
107
- }
108
-
109
- /**
110
- * @return string
111
- */
112
- public function getSerializerClass()
113
- {
114
- return $this->serializerClass;
115
- }
116
-
117
- /**
118
- * @param string $serializerClass
119
- */
120
- public function setSerializerClass($serializerClass)
121
- {
122
- $this->serializerClass = $serializerClass;
123
- }
124
-
125
- /**
126
- * @return string
127
- */
128
- public function getApiUrl()
129
- {
130
- return $this->apiUrl;
131
- }
132
-
133
- /**
134
- * @param string $apiUrl
135
- */
136
- public function setApiUrl($apiUrl)
137
- {
138
- $this->apiUrl = $apiUrl;
139
- }
140
-
141
- /**
142
- * @return string
143
- */
144
- public function getApiMimeType()
145
- {
146
- return $this->apiMimeType;
147
- }
148
-
149
- /**
150
- * @param string $apiMimeType
151
- */
152
- public function setApiMimeType($apiMimeType)
153
- {
154
- $this->apiMimeType = $apiMimeType;
155
- }
156
-
157
- /**
158
- * @return LoggerInterface
159
- */
160
- public function getLogger()
161
- {
162
- return $this->logger;
163
- }
164
-
165
- /**
166
- * @param LoggerInterface $logger
167
- */
168
- public function setLogger($logger)
169
- {
170
- $this->logger = $logger;
171
- }
172
-
173
- /**
174
- * @return bool
175
- */
176
- public function isCachedClient()
177
- {
178
- return $this->cachedClient;
179
- }
180
-
181
- /**
182
- * @param bool $cachedClient
183
- */
184
- public function setCachedClient($cachedClient)
185
- {
186
- $this->cachedClient = $cachedClient;
187
- }
188
-
189
- /**
190
- * @param int $cacheTtl
191
- */
192
- public function setCacheTtl($cacheTtl)
193
- {
194
- $this->cacheTtl = $cacheTtl;
195
- }
196
-
197
- /**
198
- * @return int
199
- */
200
- public function getCacheTtl()
201
- {
202
- return $this->cacheTtl;
203
- }
204
-
205
- /**
206
- * @return array
207
- */
208
- public function getDefaultRequestHeaders()
209
- {
210
- return $this->defaultRequestHeaders;
211
- }
212
-
213
- /**
214
- * @param array $defaultRequestHeaders
215
- */
216
- public function setDefaultRequestHeaders($defaultRequestHeaders)
217
- {
218
- $this->defaultRequestHeaders = $defaultRequestHeaders;
219
- }
220
-
221
-
222
-
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformFactoryWordpressOptions.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient;
4
-
5
- use WPDesk\Persistence\Wordpress\WordpressOptionsContainer;
6
-
7
- class PlatformFactoryWordpressOptions extends PlatformFactoryOptions
8
- {
9
- /** @var bool */
10
- protected $cachedClient = false;
11
-
12
- /**
13
- * @var string
14
- */
15
- protected $persistenceClass = WordpressOptionsContainer::class;
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/HttpClientOptions.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\PlatformOption;
4
-
5
- interface HttpClientOptions
6
- {
7
- /**
8
- * @return string
9
- */
10
- public function getHttpClientClass();
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/PersistenceOptions.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\PlatformOption;
4
-
5
- interface PersistenceOptions
6
- {
7
- /**
8
- * @return string
9
- */
10
- public function getPersistenceClass();
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/PlatformUrlOptions.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\PlatformOption;
4
-
5
- interface PlatformUrlOptions
6
- {
7
- /**
8
- * @return string
9
- */
10
- public function getApiUrl();
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/PlatformOption/SerializerOptions.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\PlatformOption;
4
-
5
- interface SerializerOptions
6
- {
7
- /**
8
- * @return string
9
- */
10
- public function getSerializerClass();
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/AuthRequest.php DELETED
@@ -1,53 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
-
7
- class AuthRequest extends BasicRequest
8
- {
9
- /** @var Token */
10
- private $token;
11
-
12
- public function __construct(Token $token)
13
- {
14
- $this->setToken($token);
15
- }
16
-
17
- /**
18
- * @param Token $token
19
- */
20
- public function setToken(Token $token)
21
- {
22
- $this->token = $token;
23
- }
24
-
25
- /**
26
- * @return bool
27
- */
28
- public function isTokenExpired()
29
- {
30
- return $this->token->isExpired();
31
- }
32
-
33
- /**
34
- * @return bool
35
- */
36
- public function isTokenInvalid()
37
- {
38
- return !$this->token->isSignatureValid();
39
- }
40
-
41
- /**
42
- * Returns array of http headers
43
- *
44
- * @return array
45
- */
46
- public function getHeaders()
47
- {
48
- $headers = array(
49
- 'Authorization' => $this->token->getAuthString()
50
- );
51
- return array_merge($headers, parent::getHeaders());
52
- }
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyInfoRequest.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class ConnectKeyInfoRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'GET';
12
-
13
- /** @var string */
14
- protected $endPoint = '/connectkeyinfo/{connectKey}';
15
-
16
-
17
- /**
18
- * ConnectKeyInfoRequest constructor.
19
- * @param $connectKey
20
- * @param Token $token
21
- */
22
- public function __construct($connectKey, Token $token)
23
- {
24
- parent::__construct($token);
25
-
26
- $this->endPoint = str_replace('{connectKey}', $connectKey, $this->endPoint);
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/ConnectKeyResetRequest.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class ConnectKeyResetRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'POST';
12
-
13
- /** @var string */
14
- protected $endPoint = '/users/{id}/connectKeyReset';
15
-
16
-
17
- public function __construct($user_id, Token $token)
18
- {
19
- parent::__construct($token);
20
-
21
- $this->endPoint = str_replace('{id}', $user_id, $this->endPoint);
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/RegisterRequest.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Request\BasicRequest;
6
-
7
- final class RegisterRequest extends BasicRequest
8
- {
9
- /** @var string */
10
- protected $method = 'POST';
11
-
12
- /** @var string */
13
- protected $endPoint = '/register';
14
-
15
- /**
16
- * RegisterRequest constructor.
17
- * @param string $email
18
- * @param string $domain
19
- * @param string $locale
20
- * @param ?string $admin_url
21
- */
22
- public function __construct($email, $domain, $locale, $admin_url = null)
23
- {
24
- $this->data = compact('email', 'domain', 'locale');
25
- if ($admin_url !== null) {
26
- $this->data['adminUrl'] = $admin_url;
27
- }
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Authentication/TokenRequest.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Authentication;
4
-
5
-
6
- use WPDesk\SaasPlatformClient\Request\BasicRequest;
7
-
8
- final class TokenRequest extends BasicRequest
9
- {
10
- /** @var string */
11
- protected $method = 'POST';
12
-
13
- /** @var string */
14
- protected $endPoint = '/token';
15
-
16
- /**
17
- * TokenRequest constructor.
18
- * @param string $connectKey
19
- * @param string $domain
20
- * @param string $locale
21
- */
22
- public function __construct($connectKey, $domain, $locale)
23
- {
24
- $this->data = compact(['connectKey', 'domain', 'locale']);
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/BasicRequest.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request;
4
-
5
-
6
- class BasicRequest implements Request
7
- {
8
- /** @var string */
9
- protected $method;
10
-
11
- /** @var array */
12
- protected $data;
13
-
14
- /** @var string */
15
- protected $endPoint;
16
-
17
- /**
18
- * @return string
19
- */
20
- public function getMethod()
21
- {
22
- return $this->method;
23
- }
24
-
25
- /**
26
- * Return endpoint in format /[^/]+/
27
- *
28
- * @return string
29
- */
30
- public function getEndpoint()
31
- {
32
- return '/' . trim($this->endPoint, '/');
33
- }
34
-
35
- /**
36
- * Returns array of http headers
37
- *
38
- * @return array
39
- */
40
- public function getHeaders()
41
- {
42
- return array();
43
- }
44
-
45
- /**
46
- * Return unserialized request body as array
47
- *
48
- * @return array
49
- */
50
- public function getBody()
51
- {
52
- return $this->data;
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Fields/GetFieldsRequest.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Fields;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class GetFieldsRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'GET';
12
-
13
- /** @var string */
14
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/dynamic_fields/{zone_targets}';
15
-
16
- const ZONE_TARGETS_DELIMITER = ',';
17
-
18
- /**
19
- * @param array $zoneTargets
20
- * @return string
21
- */
22
- private function serializeZoneTargets(array $zoneTargets)
23
- {
24
- return implode(self::ZONE_TARGETS_DELIMITER, $zoneTargets);
25
- }
26
-
27
- /**
28
- * PostShipmentRequest constructor.
29
- * @param Token $token
30
- * @param int $shippingServiceId
31
- * @param int $shopId
32
- * @param string[] $zoneTargets
33
- */
34
- public function __construct(
35
- Token $token,
36
- $shippingServiceId,
37
- $shopId,
38
- array $zoneTargets
39
- ) {
40
- parent::__construct($token);
41
-
42
- $this->endPoint = str_replace(['{shop}', '{service}', '{zone_targets}'],
43
- [$shopId, $shippingServiceId, $this->serializeZoneTargets($zoneTargets)], $this->endPoint);
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Label/PostLabelRequest.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Label;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class PostLabelRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'POST';
12
-
13
- /** @var string */
14
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/shipments/{shipment}/labels';
15
-
16
- /**
17
- * PostShipmentRequest constructor.
18
- * @param Token $token
19
- * @param int $shippingServiceId
20
- * @param int $shopId
21
- * @param int $shipmentId
22
- */
23
- public function __construct(
24
- Token $token,
25
- $shippingServiceId,
26
- $shopId,
27
- $shipmentId
28
- ) {
29
- parent::__construct($token);
30
-
31
- $this->endPoint = str_replace(['{shop}', '{service}', '{shipment}'], [$shopId, $shippingServiceId, $shipmentId],
32
- $this->endPoint);
33
-
34
- $this->data = [];
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/GetSingleRequest.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class GetSingleRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'GET';
12
-
13
- /** @var string */
14
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/ap/{id}';
15
-
16
- const ZONE_TARGETS_DELIMITER = ',';
17
-
18
-
19
- public function __construct(
20
- Token $token,
21
- $shippingServiceId,
22
- $shopId,
23
- $collectionPointId
24
- ) {
25
- parent::__construct($token);
26
-
27
- $this->endPoint = str_replace(
28
- ['{shop}', '{service}', '{id}'],
29
- [$shopId, $shippingServiceId, $collectionPointId],
30
- $this->endPoint
31
- );
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ParcelCollectionPoints/PostSearchRequest.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SearchRequest;
6
- use WPDesk\SaasPlatformClient\Authentication\Token;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class PostSearchRequest extends AuthRequest
10
- {
11
-
12
- /** @var string */
13
- protected $method = 'POST';
14
-
15
- /** @var string */
16
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/ap';
17
-
18
- /**
19
- * PostRateRequest constructor.
20
- * @param Token $token
21
- * @param int $shippingServiceId
22
- * @param int $shopId
23
- * @param SearchRequest $request
24
- */
25
- public function __construct(
26
- Token $token,
27
- $shippingServiceId,
28
- $shopId,
29
- SearchRequest $request
30
- ) {
31
- parent::__construct($token);
32
-
33
- $this->endPoint = str_replace(['{shop}', '{service}'], [$shopId, $shippingServiceId], $this->endPoint);
34
-
35
- $this->data = $request->toArray();
36
- }
37
-
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Rate/PostRateRequest.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Rate;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\Rate\RateRequest;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class PostRateRequest extends AuthRequest
10
- {
11
- /** @var string */
12
- protected $method = 'POST';
13
-
14
- /** @var string */
15
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/rates';
16
-
17
- /**
18
- * PostRateRequest constructor.
19
- * @param Token $token
20
- * @param int $shippingServiceId
21
- * @param int $shopId
22
- * @param RateRequest $request
23
- */
24
- public function __construct(
25
- Token $token,
26
- $shippingServiceId,
27
- $shopId,
28
- RateRequest $request
29
- ) {
30
- parent::__construct($token);
31
-
32
- $this->endPoint = str_replace(['{shop}', '{service}'], [$shopId, $shippingServiceId], $this->endPoint);
33
-
34
- $this->data = $request->toArray();
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Request.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request;
4
-
5
-
6
- interface Request
7
- {
8
- /**
9
- * @return string
10
- */
11
- public function getMethod();
12
-
13
- /**
14
- * @return array
15
- */
16
- public function getHeaders();
17
-
18
- /**
19
- * @return array
20
- */
21
- public function getBody();
22
-
23
- /**
24
- * @return string
25
- */
26
- public function getEndpoint();
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Shipment/GetUserListShipmentRequest.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class GetUserListShipmentRequest extends AuthRequest
10
- {
11
- /** @var string */
12
- protected $method = 'GET';
13
-
14
- /** @var string */
15
- protected $endPoint = '/users/{id}/shipments';
16
-
17
- /**
18
- * GetListShipmentRequest constructor.
19
- * @param Token $token
20
- */
21
- public function __construct($user_id, Token $token)
22
- {
23
- parent::__construct($token);
24
-
25
- $this->endPoint = str_replace('{id}', $user_id, $this->endPoint);
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Shipment/PostShipmentRequest.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class PostShipmentRequest extends AuthRequest
10
- {
11
- /** @var string */
12
- protected $method = 'POST';
13
-
14
- /** @var string */
15
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/shipments';
16
-
17
- /**
18
- * PostShipmentRequest constructor.
19
- * @param Token $token
20
- * @param int $shippingServiceId
21
- * @param int $shopId
22
- * @param ShipmentRequest $request
23
- */
24
- public function __construct(
25
- Token $token,
26
- $shippingServiceId,
27
- $shopId,
28
- ShipmentRequest $request
29
- ) {
30
- parent::__construct($token);
31
-
32
- $this->endPoint = str_replace(['{shop}', '{service}'], [$shopId, $shippingServiceId], $this->endPoint);
33
-
34
- $this->data = $request->toArray();
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentCancel/PostCancelRequest.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShipmentCancel;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class PostCancelRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'POST';
12
-
13
- /** @var string */
14
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/shipments/{shipment}/cancel';
15
-
16
- /**
17
- * PostShipmentRequest constructor.
18
- * @param Token $token
19
- * @param int $shippingServiceId
20
- * @param int $shopId
21
- * @param int $shipmentId
22
- */
23
- public function __construct(
24
- Token $token,
25
- $shippingServiceId,
26
- $shopId,
27
- $shipmentId
28
- ) {
29
- parent::__construct($token);
30
-
31
- $this->endPoint = str_replace(
32
- ['{shop}', '{service}', '{shipment}'],
33
- [$shopId, $shippingServiceId, $shipmentId],
34
- $this->endPoint
35
- );
36
-
37
- $this->data = [];
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/DeleteShipmentDocumentRequest.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class DeleteShipmentDocumentRequest extends AuthRequest
9
- {
10
-
11
- /** @var string */
12
- protected $method = 'DELETE';
13
-
14
- /** @var string */
15
- protected $endPoint = '/documents/{document}';
16
-
17
- /**
18
- * PostShipmentRequest constructor.
19
- * @param Token $token
20
- * @param int $documentId
21
- */
22
- public function __construct(
23
- Token $token,
24
- $documentId
25
- ) {
26
- parent::__construct($token);
27
-
28
- $this->endPoint = str_replace(
29
- '{document}',
30
- $documentId,
31
- $this->endPoint
32
- );
33
- }
34
-
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocument/PostShipmentDocumentRequest.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShipmentDocument\ShipmentDocumentRequest;
6
- use WPDesk\SaasPlatformClient\Authentication\Token;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class PostShipmentDocumentRequest extends AuthRequest
10
- {
11
-
12
- /** @var string */
13
- protected $method = 'POST';
14
-
15
- /** @var string */
16
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/shipments/{shipment}/documents';
17
-
18
- /**
19
- * PostShipmentRequest constructor.
20
- * @param Token $token
21
- * @param int $shipmentId
22
- * @param int $shippingServiceId
23
- * @param int $shopId
24
- * @param ShipmentDocumentRequest $request
25
- */
26
- public function __construct(
27
- Token $token,
28
- $shipmentId,
29
- $shippingServiceId,
30
- $shopId,
31
- ShipmentDocumentRequest $request
32
- ) {
33
- parent::__construct($token);
34
-
35
- $this->endPoint = str_replace(
36
- ['{shop}', '{service}', '{shipment}'],
37
- [$shopId, $shippingServiceId, $shipmentId],
38
- $this->endPoint
39
- );
40
-
41
- $this->data = $request->toArray();
42
- }
43
-
44
-
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShipmentDocumentsSend/PostSendRequest.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShipmentDocumentsSend;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class PostSendRequest extends AuthRequest
9
- {
10
-
11
- /** @var string */
12
- protected $method = 'POST';
13
-
14
- /** @var string */
15
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/shipments/{shipment}/documents/send';
16
-
17
- /**
18
- * PostShipmentRequest constructor.
19
- * @param Token $token
20
- * @param int $shippingServiceId
21
- * @param int $shopId
22
- * @param int $shipmentId
23
- */
24
- public function __construct(
25
- Token $token,
26
- $shippingServiceId,
27
- $shopId,
28
- $shipmentId
29
- ) {
30
- parent::__construct($token);
31
-
32
- $this->endPoint = str_replace(
33
- ['{shop}', '{service}', '{shipment}'],
34
- [$shopId, $shippingServiceId, $shipmentId],
35
- $this->endPoint
36
- );
37
-
38
- $this->data = [];
39
- }
40
-
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingPlan/PutShippingPlanRequest.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingPlan;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\ShippingPlan;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
-
10
- final class PutShippingPlanRequest extends AuthRequest
11
- {
12
- /** @var string */
13
- protected $method = 'PUT';
14
-
15
- /** @var ShippingPlan */
16
- private $plan;
17
-
18
- /** @var string */
19
- protected $endPoint = '/shipping_plans/{id}';
20
-
21
- public function __construct(Token $token, ShippingPlan $plan)
22
- {
23
- parent::__construct($token);
24
- $this->plan = $plan;
25
-
26
- $this->data = $plan->toArray();
27
-
28
- $this->endPoint = str_replace('{id}', $plan->getId(), $this->endPoint);
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetListRequest.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServices;
4
-
5
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
6
-
7
- final class GetListRequest extends AuthRequest
8
- {
9
- /** @var string */
10
- protected $method = 'GET';
11
-
12
- /** @var string */
13
- protected $endPoint = '/shipping_services';
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServices/GetServiceRequest.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServices;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class GetServiceRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'GET';
12
-
13
- /** @var string */
14
- protected $endPoint = '/shipping_services/{id}';
15
-
16
- /**
17
- * PutSettingsRequest constructor.
18
- * @param Token $token
19
- * @param int $shippingServiceId
20
- */
21
- public function __construct(
22
- Token $token,
23
- $shippingServiceId
24
- ) {
25
- parent::__construct($token);
26
-
27
- $this->endPoint = str_replace('{id}', $shippingServiceId, $this->endPoint);
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/GetSettingsRequest.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServicesSettings;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
- use WPDesk\SaasPlatformClient\Request\Traits\SettingsItemRequestHelper;
9
-
10
- final class GetSettingsRequest extends AuthRequest
11
- {
12
- use SettingsItemRequestHelper;
13
-
14
- /** @var string */
15
- protected $method = 'GET';
16
-
17
- /** @var string */
18
- protected $endPoint = '/shipping_services/settings/{id}';
19
-
20
- /**
21
- * PutSettingsRequest constructor.
22
- * @param Token $token
23
- * @param int $shippingServiceId
24
- * @param int $shopId
25
- * @param string $settingType
26
- */
27
- public function __construct(
28
- Token $token,
29
- $shippingServiceId,
30
- $shopId,
31
- $settingType = ShippingServiceSetting::TYPE_CONNECTION_SETTINGS
32
- ) {
33
- parent::__construct($token);
34
-
35
- $params = $this->buildSettingsId($shippingServiceId, $shopId, $settingType);
36
- $this->endPoint = str_replace('{id}', $params, $this->endPoint);
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PostSettingsRequest.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServicesSettings;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
- use WPDesk\SaasPlatformClient\Request\Traits\SettingsItemRequestHelper;
9
-
10
- final class PostSettingsRequest extends AuthRequest
11
- {
12
- use SettingsItemRequestHelper;
13
-
14
- /** @var string */
15
- protected $method = 'POST';
16
-
17
- /** @var ShippingServiceSetting */
18
- private $setting;
19
-
20
- /** @var string */
21
- protected $endPoint = '/shipping_services/settings';
22
-
23
- public function __construct(Token $token, ShippingServiceSetting $setting)
24
- {
25
- parent::__construct($token);
26
- $this->setting = $setting;
27
-
28
- $this->data = $setting->toArray();
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/PutSettingsRequest.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServicesSettings;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
- use WPDesk\SaasPlatformClient\Request\Traits\SettingsItemRequestHelper;
9
-
10
- final class PutSettingsRequest extends AuthRequest
11
- {
12
- use SettingsItemRequestHelper;
13
-
14
- /** @var string */
15
- protected $method = 'PUT';
16
-
17
- /** @var string */
18
- protected $endPoint = '/shipping_services/settings/{id}';
19
-
20
- /**
21
- * PutSettingsRequest constructor.
22
- * @param Token $token
23
- * @param int $shippingServiceId
24
- * @param int $shopId
25
- * @param string $settingType
26
- */
27
- public function __construct(Token $token, ShippingServiceSetting $setting)
28
- {
29
- parent::__construct($token);
30
-
31
- $params = $this->buildSettingsId($setting->getShippingService(), $setting->getShop(), $setting->getType());
32
- $this->endPoint = str_replace('{id}', $params, $this->endPoint);
33
-
34
- $this->data = $setting->toArray();
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/ShippingServicesSettings/Test/GetSettingsTestRequest.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\ShippingServicesSettings\Test;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
7
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
8
-
9
- final class GetSettingsTestRequest extends AuthRequest
10
- {
11
- /** @var string */
12
- protected $method = 'GET';
13
-
14
- /** @var string */
15
- protected $endPoint = '/shops/{shop}/shipping_services/{service}/settings/{type}/test';
16
-
17
- /**
18
- * PutSettingsRequest constructor.
19
- * @param Token $token
20
- * @param int $shippingServiceId
21
- * @param int $shopId
22
- */
23
- public function __construct(
24
- Token $token,
25
- $shippingServiceId,
26
- $shopId
27
- ) {
28
- parent::__construct($token);
29
-
30
- $this->endPoint = str_replace(
31
- ['{shop}', '{service}', '{type}'],
32
- [$shopId, $shippingServiceId, ShippingServiceSetting::TYPE_CONNECTION_SETTINGS],
33
- $this->endPoint
34
- );
35
- }
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Status/GetStatusRequest.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Status;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
- use WPDesk\SaasPlatformClient\Request\BasicRequest;
8
-
9
- final class GetStatusRequest extends BasicRequest
10
- {
11
-
12
- /** @var string */
13
- protected $method = 'GET';
14
-
15
- /** @var string */
16
- protected $endPoint = '/status';
17
-
18
- /** @var Token */
19
- private $token;
20
-
21
- /**
22
- * GetStatusRequest constructor.
23
- *
24
- * @param null|Token $token
25
- */
26
- public function __construct(
27
- Token $token = null
28
- ) {
29
- $this->token = $token;
30
- }
31
-
32
- /**
33
- * Returns array of http headers
34
- *
35
- * @return array
36
- */
37
- public function getHeaders()
38
- {
39
- if (null !== $this->token) {
40
- $headers = array(
41
- 'Authorization' => $this->token->getAuthString()
42
- );
43
- return array_merge($headers, parent::getHeaders());
44
- } else {
45
- return parent::getHeaders();
46
- }
47
- }
48
-
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Traits/SettingsItemRequestHelper.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Traits;
4
-
5
- trait SettingsItemRequestHelper
6
- {
7
-
8
- /**
9
- * Build multiple compound key id in api-platform
10
- *
11
- * @param int $shippingServiceId
12
- * @param int $shopId
13
- * @param string|null $settingType
14
- * @return string
15
- */
16
- private function buildSettingsId($shippingServiceId, $shopId, $settingType = null)
17
- {
18
- $query_data = [
19
- 'shippingService' => $shippingServiceId,
20
- 'shop' => $shopId,
21
- 'type' => $settingType
22
- ];
23
- if (null !== $settingType) {
24
- $query_data['type'] = $settingType;
25
- }
26
- return http_build_query($query_data, null, ';');
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Request/Users/GetUserRequest.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Request\Users;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\Token;
6
- use WPDesk\SaasPlatformClient\Request\AuthRequest;
7
-
8
- final class GetUserRequest extends AuthRequest
9
- {
10
- /** @var string */
11
- protected $method = 'GET';
12
-
13
- /** @var string */
14
- protected $endPoint = '/users/{id}';
15
-
16
- /**
17
- * getUserRequest constructor.
18
- *
19
- * @param $user_id
20
- * @param Token $token
21
- */
22
- public function __construct($user_id, Token $token)
23
- {
24
- parent::__construct($token);
25
-
26
- $this->endPoint = str_replace('{id}', $user_id, $this->endPoint);
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ApiResponse.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response;
4
-
5
-
6
- interface ApiResponse extends Response
7
- {
8
- /**
9
- * Get links structure to the other request
10
- *
11
- * @return array
12
- */
13
- public function getLinks();
14
-
15
- /**
16
- * Is it a BAD REQUEST response
17
- *
18
- * @return bool
19
- */
20
- public function isBadRequest();
21
-
22
- /**
23
- * Is it a FATAL ERROR response
24
- *
25
- * @return bool
26
- */
27
- public function isServerFatalError();
28
-
29
- /**
30
- * Is requested resource exists
31
- *
32
- * @return bool
33
- */
34
- public function isNotExists();
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/AuthApiResponse.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response;
4
-
5
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
6
-
7
- class AuthApiResponse implements ApiResponse
8
- {
9
- const RESPONSE_CODE_BAD_CREDENTIALS = 401;
10
-
11
- const RESPONSE_CODE_NOT_EXISTS = 404;
12
-
13
- use AuthApiResponseDecorator;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyInfoResponse.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\ApiResponseDecorator;
7
-
8
- final class ConnectKeyInfoResponse implements ApiResponse
9
- {
10
- use ApiResponseDecorator;
11
-
12
- /**
13
- * @return int
14
- */
15
- public function getUserId()
16
- {
17
- return (int)$this->getResponseBody()['owner_id'];
18
- }
19
-
20
- /**
21
- * @return \DateTimeImmutable
22
- * @throws \Exception
23
- */
24
- public function getLastUsed()
25
- {
26
- $lastUsed = $this->getResponseBody()['lastUsed'];
27
- return new \DateTimeImmutable($lastUsed['date']);
28
- }
29
-
30
- /**
31
- * @return array[string]
32
- */
33
- public function getDomains()
34
- {
35
- return $this->getResponseBody()['domains'];
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/ConnectKeyResetResponse.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
7
-
8
- final class ConnectKeyResetResponse implements ApiResponse
9
- {
10
- use AuthApiResponseDecorator;
11
-
12
- /**
13
- * Returns newly generated connect key
14
- *
15
- * @return string
16
- */
17
- public function getNewConnectKey()
18
- {
19
- $body = $this->getResponseBody();
20
- return (string)$body['connectKey'];
21
- }
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/RegisterResponse.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\RawResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\ApiResponseDecorator;
8
-
9
- final class RegisterResponse implements ApiResponse
10
- {
11
- const API_KEY_FIELD = 'password';
12
-
13
- const RESPONSE_CODE_USER_ALREADY_EXISTS = 460;
14
-
15
- const RESPONSE_CODE_DOMAIN_ALREADY_EXISTS = 461;
16
-
17
- use ApiResponseDecorator;
18
-
19
- /**
20
- * Returns true if user is registered
21
- *
22
- * @return bool
23
- */
24
- public function isUserRegistered()
25
- {
26
- return in_array($this->getResponseCode(),
27
- [RawResponse::RESPONSE_CODE_CREATED, RawResponse::RESPONSE_CODE_SUCCESS]);
28
- }
29
-
30
- /**
31
- * Returns true if user is was already registered
32
- *
33
- * @return bool
34
- */
35
- public function isUserAlreadyExists()
36
- {
37
- return $this->getResponseCode() === self::RESPONSE_CODE_USER_ALREADY_EXISTS;
38
- }
39
-
40
- /**
41
- * Returns true if user cannot be registered because domain is occupied
42
- *
43
- * @return bool
44
- */
45
- public function isDomainOccupied()
46
- {
47
- return $this->getResponseCode() === self::RESPONSE_CODE_DOMAIN_ALREADY_EXISTS;
48
- }
49
-
50
- /**
51
- * Returns apiKey from register response
52
- *
53
- * @return string
54
- */
55
- public function getApiKey()
56
- {
57
- return $this->getResponseBody()[self::API_KEY_FIELD];
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Authentication/TokenResponse.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Authentication;
4
-
5
- use WPDesk\SaasPlatformClient\Authentication\JWTToken;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\AuthApiResponse;
8
- use WPDesk\SaasPlatformClient\Response\Traits\ApiResponseDecorator;
9
-
10
- final class TokenResponse implements ApiResponse
11
- {
12
- use ApiResponseDecorator;
13
-
14
- const RESPONSE_CODE_LOGIN_SUCCESS = 200;
15
-
16
- /**
17
- * Returns token if exists
18
- *
19
- * @return JWTToken
20
- */
21
- public function getToken()
22
- {
23
- $body = $this->getResponseBody();
24
- return new JWTToken($body['token']);
25
- }
26
-
27
- /**
28
- * @return bool
29
- */
30
- public function isBadCredentials()
31
- {
32
- return $this->getResponseCode() === AuthApiResponse::RESPONSE_CODE_BAD_CREDENTIALS;
33
- }
34
-
35
- /**
36
- * Returns true if login is a success and token is available
37
- *
38
- * @return bool
39
- */
40
- public function isLoginSuccess()
41
- {
42
- return $this->getResponseCode() === self::RESPONSE_CODE_LOGIN_SUCCESS;
43
- }
44
-
45
- /**
46
- * Returns true if user cannot be registered because domain is occupied
47
- *
48
- * @return bool
49
- */
50
- public function isDomainOccupied()
51
- {
52
- return $this->getResponseCode() === RegisterResponse::RESPONSE_CODE_DOMAIN_ALREADY_EXISTS;
53
- }
54
-
55
-
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyMessageFromResponse.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Exception;
4
-
5
- class EmptyMessageFromResponse extends \RuntimeException
6
- {
7
- /**
8
- * Exception factory
9
- *
10
- * @param string $request
11
- * @param int $errorCode
12
- * @return TriedExtractDataFromErrorResponse
13
- */
14
- public static function createWithClassInfo($request, $errorCode)
15
- {
16
- return new EmptyStatusFromResponse("Tried to extract message from {$request} when an error occured. Response code: {$errorCode}",
17
- $errorCode);
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/EmptyStatusFromResponse.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Exception;
4
-
5
- class EmptyStatusFromResponse extends \RuntimeException
6
- {
7
- /**
8
- * Exception factory
9
- *
10
- * @param string $request
11
- * @param int $errorCode
12
- * @return TriedExtractDataFromErrorResponse
13
- */
14
- public static function createWithClassInfo($request, $errorCode)
15
- {
16
- return new EmptyStatusFromResponse("Tried to extract status from {$request} when an error occured. Response code: {$errorCode}",
17
- $errorCode);
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Exception/TriedExtractDataFromErrorResponse.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Exception;
4
-
5
- class TriedExtractDataFromErrorResponse extends \RuntimeException
6
- {
7
- /**
8
- * Exception factory
9
- *
10
- * @param string $request
11
- * @param int $errorCode
12
- * @return TriedExtractDataFromErrorResponse
13
- */
14
- public static function createWithClassInfo($request, $errorCode)
15
- {
16
- return new TriedExtractDataFromErrorResponse("Tried to extract data from {$request} when an error occured. Response code: {$errorCode}",
17
- $errorCode);
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Fields/GetFieldsResponse.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Fields;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
7
-
8
- class GetFieldsResponse implements ApiResponse
9
- {
10
- use AuthApiResponseDecorator;
11
-
12
- /**
13
- * @return array
14
- */
15
- public function getFields()
16
- {
17
- return $this->getResponseBody()['fieldsJson'];
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Label/PostLabelResponse.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Label;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Label\Label;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostLabelResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return Label
15
- */
16
- public function getLabel()
17
- {
18
- return new Label($this->getResponseBody());
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Maintenance/MaintenanceResponseContext.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Maintenance;
4
-
5
- use WPDesk\SaasPlatformClient\Response\Response;
6
-
7
- class MaintenanceResponseContext
8
- {
9
-
10
- /**
11
- * Response.
12
- *
13
- * @var Response
14
- */
15
- private $response;
16
-
17
- public function __construct(Response $response)
18
- {
19
- $this->response = $response;
20
- }
21
-
22
- /**
23
- * Get maintenance message.
24
- *
25
- * @return string|null
26
- */
27
- public function getMaintenanceMessage()
28
- {
29
- $responseBody = $this->response->getResponseBody();
30
- if (isset($responseBody['message'])) {
31
- return $responseBody['message'];
32
- }
33
- return null;
34
- }
35
-
36
- /**
37
- * Get maintenance till.
38
- *
39
- * @return int|null
40
- */
41
- public function getMaintenanceTill()
42
- {
43
- $responseBody = $this->response->getResponseBody();
44
- if (isset($responseBody['maintenance_till'])) {
45
- return intval($responseBody['maintenance_till']);
46
- }
47
- return null;
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/GetSingleResponse.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SingleResponse;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- final class GetSingleResponse implements ApiResponse
10
- {
11
-
12
- use AuthApiResponseDecorator;
13
-
14
- /**
15
- * @return SingleResponse
16
- */
17
- public function getSingleResponse()
18
- {
19
- return new SingleResponse($this->getResponseBody());
20
- }
21
-
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ParcelCollectionPoints/PostSearchResponse.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SearchResponse;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostSearchResponse implements ApiResponse
10
- {
11
-
12
- use AuthApiResponseDecorator;
13
-
14
- const RESPONSE_CODE_COLLECTION_POINT_FAILED = 476;
15
-
16
- /**
17
- * @return SearchResponse
18
- */
19
- public function getPoints()
20
- {
21
- return new SearchResponse($this->getResponseBody());
22
- }
23
-
24
- /**
25
- * Platform can't respond in meaningful way about rates
26
- *
27
- * @return bool
28
- */
29
- public function isCollectionPointError()
30
- {
31
- return $this->rawResponse->getResponseCode() === self::RESPONSE_CODE_COLLECTION_POINT_FAILED;
32
- }
33
-
34
-
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ProtectedResponse.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response;
4
-
5
- use WPDesk\SaasPlatformClient\Response\Exception\TriedExtractDataFromErrorResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\ApiResponseDecorator;
7
-
8
- /**
9
- * Response is protected in a way so when you try to get body of the response when an error occured you will get an exception
10
- *
11
- * Class ProtectedResponse
12
- * @package WPDesk\SaasPlatformClient\Response
13
- */
14
- class ProtectedResponse implements Response
15
- {
16
- use ApiResponseDecorator;
17
-
18
- public function getResponseBody()
19
- {
20
- if ($this->isError()) {
21
- throw TriedExtractDataFromErrorResponse::createWithClassInfo(get_class($this->rawResponse), $this->getResponseCode());
22
- }
23
- return $this->rawResponse->getResponseBody();
24
- }
25
-
26
-
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Rate/PostRateResponse.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Rate;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Rate\RateResponse;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostRateResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- const RESPONSE_CODE_RATE_FAILED = 274;
14
-
15
- /**
16
- * @return RateResponse
17
- */
18
- public function getRate()
19
- {
20
- return new RateResponse($this->getResponseBody());
21
- }
22
-
23
- /**
24
- * Platform can't respond in meaningful way about rates
25
- *
26
- * @return bool
27
- */
28
- public function isRateFailedError()
29
- {
30
- return $this->rawResponse->getResponseCode() === self::RESPONSE_CODE_RATE_FAILED;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/RawResponse.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response;
4
-
5
- class RawResponse implements Response
6
- {
7
- const RESPONSE_CODE_SUCCESS = 200;
8
- const RESPONSE_CODE_CREATED = 201;
9
- const RESPONSE_CODE_ERROR_BAD_REQUEST = 400;
10
- const RESPONSE_CODE_DOMAIN_NOT_ALLOWED = 462;
11
- const RESPONSE_CODE_ERROR_FATAL = 500;
12
- const RESPONSE_CODE_MAINTENANCE = 503;
13
- const HEADER_X_PLATFORM_VERSION_HASH = 'X-Platform-Version-Hash';
14
-
15
- /** @var array */
16
- private $data;
17
-
18
- /** @var int */
19
- private $code;
20
-
21
- /** @var array */
22
- private $headers;
23
-
24
- /**
25
- * RawResponse constructor.
26
- * @param array $body
27
- * @param int $code
28
- * @param array $headers
29
- */
30
- public function __construct(array $body, $code, array $headers)
31
- {
32
- $this->data = $body;
33
- $this->code = (int)$code;
34
- $this->headers = $headers;
35
- }
36
-
37
- /**
38
- * Returns response http code
39
- *
40
- * @return int
41
- */
42
- public function getResponseCode()
43
- {
44
- return $this->code;
45
- }
46
-
47
- /**
48
- * Returns response body as array
49
- *
50
- * @return array
51
- */
52
- public function getResponseBody()
53
- {
54
- return $this->data;
55
- }
56
-
57
- /**
58
- * Returns response body as array
59
- *
60
- * @return array
61
- */
62
- public function getResponseErrorBody()
63
- {
64
- return $this->data;
65
- }
66
-
67
- /**
68
- * Returns response error message if present or empty string.
69
- *
70
- * @return string|null
71
- */
72
- public function getResponseMessage()
73
- {
74
- if (is_array($this->data) && !empty($this->data['message'])) {
75
- return $this->data['message'];
76
- }
77
- return '';
78
- }
79
-
80
- /**
81
- * Returns response body as array
82
- *
83
- * @return array
84
- */
85
- public function getResponseHeaders()
86
- {
87
- return $this->headers;
88
- }
89
-
90
- /**
91
- * Is any error occured
92
- *
93
- * @return bool
94
- */
95
- public function isError()
96
- {
97
- $code = $this->getResponseCode();
98
- return ( $code < 200 || $code >= 300 ) && !$this->isMaintenance();
99
- }
100
-
101
- /**
102
- * Is maintenance.
103
- *
104
- * @return bool
105
- */
106
- public function isMaintenance()
107
- {
108
- $code = $this->getResponseCode();
109
- return self::RESPONSE_CODE_MAINTENANCE === $code;
110
- }
111
-
112
- /**
113
- * Get platform version hash string.
114
- *
115
- * @return bool|string
116
- */
117
- public function getPlatformVersionHash()
118
- {
119
- if (isset($this->headers[self::HEADER_X_PLATFORM_VERSION_HASH])) {
120
- return $this->headers[self::HEADER_X_PLATFORM_VERSION_HASH];
121
- }
122
- return false;
123
- }
124
-
125
-
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Response.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response;
4
-
5
- interface Response
6
- {
7
- /**
8
- * @return int
9
- */
10
- public function getResponseCode();
11
-
12
- /** @return array */
13
- public function getResponseBody();
14
-
15
- /** @return array */
16
- public function getResponseHeaders();
17
-
18
- /** @return array */
19
- public function getResponseErrorBody();
20
-
21
- /**
22
- * Returns response error message if present or null.
23
- *
24
- * @return string|null
25
- */
26
- public function getResponseMessage();
27
-
28
- /**
29
- * Is any error occured
30
- *
31
- * @return bool
32
- */
33
- public function isError();
34
-
35
- /**
36
- * Is maintenance
37
- *
38
- * @return bool
39
- */
40
- public function isMaintenance();
41
-
42
- /**
43
- * Get platform version hash string.
44
- *
45
- * @return bool|string
46
- */
47
- public function getPlatformVersionHash();
48
-
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Shipment/GetListShipmentAdminContextResponse.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentAdminContext;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
- use WPDesk\SaasPlatformClient\Response\Traits\PagedListImplementation;
9
-
10
- class GetListShipmentAdminContextResponse implements ApiResponse
11
- {
12
- use AuthApiResponseDecorator;
13
- use PagedListImplementation;
14
-
15
- /*
16
- * @return ShippingService[]
17
- */
18
- public function getPage()
19
- {
20
- $page = $this->getRawPage();
21
- $itemList = [];
22
- if (count($page) > 0) {
23
- foreach ($page as $item) {
24
- $itemList[] = new ShipmentAdminContext($item);
25
- }
26
- }
27
- return $itemList;
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Shipment/PostShipmentResponse.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Shipment;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Shipment\ShipmentResponse;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostShipmentResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- const RESPONSE_CODE_SHIPMENT_PLAN_EXCEEDED = 472;
14
-
15
- /**
16
- * @return bool
17
- */
18
- public function isShipmentPlanExceeded()
19
- {
20
- return $this->getResponseCode() === self::RESPONSE_CODE_SHIPMENT_PLAN_EXCEEDED;
21
- }
22
-
23
- /**
24
- * @return ShipmentResponse
25
- */
26
- public function getShipment()
27
- {
28
- return new ShipmentResponse($this->getResponseBody());
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentCancel/PostCancelResponse.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShipmentCancel;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
7
-
8
- class PostCancelResponse implements ApiResponse
9
- {
10
- use AuthApiResponseDecorator;
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/DeleteShipmentDocumentResponse.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
7
-
8
- class DeleteShipmentDocumentResponse implements ApiResponse
9
- {
10
- use AuthApiResponseDecorator;
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocument/PostShipmentDocumentResponse.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShipmentDocument;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShipmentDocument\ShipmentDocument;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostShipmentDocumentResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return ShipmentDocument
15
- */
16
- public function getShipmentDocument()
17
- {
18
- return new ShipmentDocument($this->getResponseBody());
19
- }
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShipmentDocumentsSend/PostSendResponse.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShipmentDocumentsSend;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShipmentDocument\SendDocumentsResponse;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class PostSendResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return SendDocumentsResponse
15
- */
16
- public function getDocumentStatusesResponse()
17
- {
18
- return new SendDocumentsResponse($this->getResponseBody());
19
- }
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServiceResponse.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShippingServices;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShippingService;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- final class GetShippingServiceResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return ShippingService
15
- */
16
- public function getShippingService()
17
- {
18
- return new ShippingService($this->getResponseBody());
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServices/GetShippingServicesListResponse.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShippingServices;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShippingService;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
- use WPDesk\SaasPlatformClient\Response\Traits\PagedListImplementation;
9
-
10
- final class GetShippingServicesListResponse implements ApiResponse
11
- {
12
- use AuthApiResponseDecorator;
13
- use PagedListImplementation;
14
-
15
- /*
16
- * @return ShippingService[]
17
- */
18
- public function getPage()
19
- {
20
- $page = $this->getRawPage();
21
- $itemList = [];
22
- if (count($page) > 0) {
23
- foreach ($page as $item) {
24
- $itemList[] = new ShippingService($item);
25
- }
26
- }
27
- return $itemList;
28
- }
29
-
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/GetSettingsResponse.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShippingServicesSettings;
4
-
5
- use WPDesk\SaasPlatformClient\Model\ShippingServiceSetting;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class GetSettingsResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @param array $data
15
- * @return array
16
- */
17
- private function convertHalReferencesToJson(array $data)
18
- {
19
- foreach ($data['_links'] as $key => $item) {
20
- $data[$key] = $item['href'];
21
- }
22
- return $data;
23
- }
24
-
25
- /**
26
- * @return ShippingServiceSetting
27
- */
28
- public function getSetting()
29
- {
30
- return new ShippingServiceSetting($this->convertHalReferencesToJson($this->getResponseBody()));
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/ShippingServicesSettings/Test/GetSettingsTestResponse.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\ShippingServicesSettings\Test;
4
-
5
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\Exception\EmptyStatusFromResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class GetSettingsTestResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- const MESSAGE = 'message';
14
- const STATUS = 'status';
15
-
16
- public function getMessage()
17
- {
18
- $responseBody = $this->getResponseBody();
19
- if (isset($responseBody[self::MESSAGE])) {
20
- return $responseBody[self::MESSAGE];
21
- } else {
22
- throw EmptyMessageFromResponse::createWithClassInfo(get_class($this->rawResponse), $this->getResponseCode());
23
- }
24
- }
25
-
26
- public function getStatus()
27
- {
28
- $responseBody = $this->getResponseBody();
29
- if (isset($responseBody[self::STATUS])) {
30
- return $responseBody[self::STATUS];
31
- } else {
32
- throw EmptyStatusFromResponse::createWithClassInfo(get_class($this->rawResponse), $this->getResponseCode());
33
- }
34
- }
35
-
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Status/GetStatusResponse.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Status;
4
-
5
- use WPDesk\SaasPlatformClient\Model\Status;
6
- use WPDesk\SaasPlatformClient\Response\ApiResponse;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- class GetStatusResponse implements ApiResponse
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return Status
15
- */
16
- public function getStatus()
17
- {
18
- return new Status($this->getResponseBody());
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/ApiResponseDecorator.php DELETED
@@ -1,155 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Traits;
4
-
5
- use WPDesk\SaasPlatformClient\Response\AuthApiResponse;
6
- use WPDesk\SaasPlatformClient\Response\RawResponse;
7
- use WPDesk\SaasPlatformClient\Response\Response;
8
-
9
- trait ApiResponseDecorator
10
- {
11
-
12
- /** @var RawResponse */
13
- private $rawResponse;
14
-
15
- /**
16
- * RawResponseDecorator constructor.
17
- * @param Response $rawResponse
18
- */
19
- public function __construct(Response $rawResponse)
20
- {
21
- $this->rawResponse = $rawResponse;
22
- }
23
-
24
- /**
25
- * Returns response http code
26
- *
27
- * @return int
28
- */
29
- public function getResponseCode()
30
- {
31
- return $this->rawResponse->getResponseCode();
32
- }
33
-
34
- /**
35
- * Returns response body as array
36
- *
37
- * @return array
38
- */
39
- public function getResponseBody()
40
- {
41
- return $this->rawResponse->getResponseBody();
42
- }
43
-
44
- /**
45
- * Returns response body as array
46
- *
47
- * @return array
48
- */
49
- public function getResponseErrorBody()
50
- {
51
- return $this->rawResponse->getResponseErrorBody();
52
- }
53
-
54
- /**
55
- * Returns response error message if present or empty string.
56
- *
57
- * @return string
58
- */
59
- public function getResponseMessage()
60
- {
61
- return $this->rawResponse->getResponseMessage();
62
- }
63
-
64
- /**
65
- * Returns response body as array
66
- *
67
- * @return array
68
- */
69
- public function getResponseHeaders()
70
- {
71
- return $this->rawResponse->getResponseHeaders();
72
- }
73
-
74
- /**
75
- * Get links structure to the other request
76
- *
77
- * @return array
78
- */
79
- public function getLinks()
80
- {
81
- $body = $this->getResponseBody();
82
- return $body['_links'];
83
- }
84
-
85
- /**
86
- * Is it a BAD REQUEST response
87
- *
88
- * @return bool
89
- */
90
- public function isBadRequest()
91
- {
92
- return $this->getResponseCode() === RawResponse::RESPONSE_CODE_ERROR_BAD_REQUEST;
93
- }
94
-
95
- /**
96
- * Is it a DOMAIN NOT ALLOWED response
97
- *
98
- * @return bool
99
- */
100
- public function isDomainNotAllowed()
101
- {
102
- return $this->getResponseCode() === RawResponse::RESPONSE_CODE_DOMAIN_NOT_ALLOWED;
103
- }
104
-
105
- /**
106
- * Is it a FATAL ERROR response
107
- *
108
- * @return bool
109
- */
110
- public function isServerFatalError()
111
- {
112
- return $this->getResponseCode() === RawResponse::RESPONSE_CODE_ERROR_FATAL;
113
- }
114
-
115
- /**
116
- * Is any error occured
117
- *
118
- * @return bool
119
- */
120
- public function isError()
121
- {
122
- return $this->rawResponse->isError();
123
- }
124
-
125
- /**
126
- * Is requested resource exists
127
- *
128
- * @return bool
129
- */
130
- public function isNotExists()
131
- {
132
- return $this->getResponseCode() === AuthApiResponse::RESPONSE_CODE_NOT_EXISTS;
133
- }
134
-
135
- /**
136
- * Is maintenance.
137
- *
138
- * @return bool
139
- */
140
- public function isMaintenance()
141
- {
142
- return $this->rawResponse->isMaintenance();
143
- }
144
-
145
- /**
146
- * Get platform version hash string.
147
- *
148
- * @return bool|string
149
- */
150
- public function getPlatformVersionHash()
151
- {
152
- return $this->rawResponse->getPlatformVersionHash();
153
- }
154
-
155
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/AuthApiResponseDecorator.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Traits;
4
-
5
- use WPDesk\SaasPlatformClient\Response\AuthApiResponse;
6
-
7
- trait AuthApiResponseDecorator
8
- {
9
- use ApiResponseDecorator;
10
-
11
- /**
12
- * @return bool
13
- */
14
- public function isBadCredentials()
15
- {
16
- return $this->getResponseCode() === AuthApiResponse::RESPONSE_CODE_BAD_CREDENTIALS;
17
- }
18
-
19
- /**
20
- * Is bad credential because token expires
21
- *
22
- * @return bool
23
- */
24
- public function isTokenExpired()
25
- {
26
- return $this->isBadCredentials();
27
- }
28
-
29
- /**
30
- * Is bad credential because token is invalid
31
- *
32
- * @return bool
33
- */
34
- public function isTokenInvalid()
35
- {
36
- return $this->isBadCredentials();
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Traits/PagedListImplementation.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Traits;
4
-
5
- trait PagedListImplementation
6
- {
7
- /*
8
- * @return array
9
- */
10
- public function getRawPage()
11
- {
12
- $body = $this->getResponseBody();
13
- if ($body['_embedded'] !== null && $body['_embedded']['item'] !== null) {
14
- return $body['_embedded']['item'];
15
- }
16
- return [];
17
- }
18
-
19
- /**
20
- * @return int
21
- */
22
- public function getPageCount()
23
- {
24
- return (int)floor($this->getItemCount() / $this->getItemsPerPage());
25
- }
26
-
27
- /**
28
- * @return int
29
- */
30
- public function getItemsPerPage()
31
- {
32
- $body = $this->getResponseBody();
33
- return (int)$body['itemsPerPage'];
34
- }
35
-
36
- /**
37
- * @return int
38
- */
39
- public function getItemCount()
40
- {
41
- $body = $this->getResponseBody();
42
- return (int)$body['totalItems'];
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Response/Users/GetUserResponse.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Response\Users;
4
-
5
- use WPDesk\SaasPlatformClient\Model\User;
6
- use WPDesk\SaasPlatformClient\Response\Response;
7
- use WPDesk\SaasPlatformClient\Response\Traits\AuthApiResponseDecorator;
8
-
9
- final class GetUserResponse implements Response
10
- {
11
- use AuthApiResponseDecorator;
12
-
13
- /**
14
- * @return User
15
- */
16
- public function getUser()
17
- {
18
- return new User($this->getResponseBody());
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Serializer/Exception/CannotUnserializeException.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Serializer\Exception;
4
-
5
- /**
6
- * Thrown when serializer cannot unserialize string data
7
- *
8
- * @package WPDesk\SaasPlatformClient\Serializer\Exception
9
- */
10
- class CannotUnserializeException extends \RuntimeException
11
- {
12
-
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Serializer/JsonSerializer.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Serializer;
4
-
5
- use WPDesk\SaasPlatformClient\Serializer\Exception\CannotUnserializeException;
6
-
7
- class JsonSerializer implements Serializer
8
- {
9
-
10
- /**
11
- * Convert data to string
12
- *
13
- * @param mixed $data
14
- * @return string
15
- */
16
- public function serialize($data)
17
- {
18
- return json_encode($data, JSON_FORCE_OBJECT);
19
- }
20
-
21
- /**
22
- * Convert string to php data
23
- *
24
- * @param string $data
25
- * @return mixed
26
- */
27
- public function unserialize($data)
28
- {
29
- $unserializedResult = json_decode($data, true);
30
- if ($unserializedResult === null) {
31
- throw new CannotUnserializeException("Cannot unserialize data: {$data}");
32
- }
33
-
34
- return $unserializedResult;
35
- }
36
-
37
- /**
38
- * @return string
39
- */
40
- public function getMime()
41
- {
42
- return 'application/json';
43
- }
44
-
45
-
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Serializer/Serializer.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Serializer;
4
-
5
-
6
- interface Serializer
7
- {
8
- /**
9
- * @param mixed $data
10
- * @return string
11
- */
12
- public function serialize($data);
13
-
14
- /**
15
- * @param string $data
16
- * @return mixed
17
- */
18
- public function unserialize($data);
19
-
20
- /**
21
- * @return string
22
- */
23
- public function getMime();
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-saas-platform-client/src/Serializer/SerializerFactory.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
-
3
- namespace WPDesk\SaasPlatformClient\Serializer;
4
-
5
- use WPDesk\SaasPlatformClient\PlatformOption\SerializerOptions;
6
-
7
- class SerializerFactory
8
- {
9
- /**
10
- * @param SerializerOptions $options
11
- * @return Serializer
12
- */
13
- public function createSerializer(SerializerOptions $options)
14
- {
15
- $className = $options->getSerializerClass();
16
- return new $className;
17
- }
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- /vendor/
2
- .idea
3
- build-coverage
4
- swagger
5
- composer.lock
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/CHANGELOG.md DELETED
@@ -1,11 +0,0 @@
1
- ## [1.1.1] - 2019-07-19
2
- ### Added
3
- - Remove from Flexible Shipping when not connected to platform
4
-
5
- ## [1.1.0] - 2019-06-17
6
- ### Added
7
- - Refactor so the platform factory can be injected
8
-
9
- ## [1.0.0] - 2019-06-17
10
- ### Added
11
- - Init
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/apigen.neon DELETED
@@ -1,27 +0,0 @@
1
- destination: docs
2
- templateConfig: /app/theme-woocommerce/config.neon
3
- extensions: [php]
4
- source:
5
- - classes
6
- exclude:
7
- - vendor
8
- - tests
9
- - languages
10
-
11
- charset: [UTF-8]
12
- main: Wordpress plugin
13
- title: Plugin template more info
14
- baseUrl: "/"
15
-
16
- templateTheme: default
17
- php: false
18
- sourceCode: false
19
- tree: true
20
- deprecated: false
21
- todo: false
22
- download: false
23
-
24
- accessLevels:
25
- - public
26
- - private
27
- - protected
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/composer.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "name": "wpdesk/wp-wpdesk-connect",
3
- "authors": [
4
- {
5
- "name": "Krzysiek",
6
- "email": "krzysiek@wpdesk.pl"
7
- }
8
- ],
9
- "require": {
10
- "php": ">=5.6",
11
- "psr/log": "^1.1",
12
- "wpdesk/wp-view": "^1.0",
13
- "wpdesk/wp-builder": "^1.1",
14
- "wpdesk/wp-wpdesk-fs-shipment": "^1.0"
15
- },
16
- "require-dev": {
17
- "phpunit/phpunit": "<7",
18
- "wp-coding-standards/wpcs": "^0.14.1",
19
- "squizlabs/php_codesniffer": "^3.4.2",
20
- "mockery/mockery": "^1.2",
21
- "10up/wp_mock": "^0.3"
22
- },
23
- "autoload": {
24
- "classmap": ["src"]
25
- },
26
- "autoload-dev": {
27
- },
28
- "scripts": {
29
- "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
30
- "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
31
- "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
32
- "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage"
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/phpunit-integration.xml DELETED
@@ -1,28 +0,0 @@
1
- <phpunit bootstrap="tests/integration/bootstrap.php"
2
- backupGlobals="false"
3
- >
4
- <testsuites>
5
- <testsuite>
6
- <directory prefix="Test" suffix=".php">./tests/integration</directory>
7
- </testsuite>
8
- </testsuites>
9
-
10
- <filter>
11
- <whitelist>
12
- <directory suffix=".php">src</directory>
13
- </whitelist>
14
- </filter>
15
-
16
- <logging>
17
- <log type="junit" target="build-coverage/report.junit.xml"/>
18
- <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
19
- <log type="coverage-text" target="build-coverage/coverage.txt"/>
20
- <log type="coverage-clover" target="build-coverage/clover.xml"/>
21
- </logging>
22
-
23
- <php>
24
- <env name="WP_DEVELOP_DIR" value="/tmp/wordpress-develop"/>
25
- <env name="WC_DEVELOP_DIR" value="/tmp/woocommerce"/>
26
- </php>
27
-
28
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/phpunit-unit.xml DELETED
@@ -1,21 +0,0 @@
1
- <phpunit bootstrap="tests/unit/bootstrap.php">
2
- <testsuites>
3
- <testsuite>
4
- <directory prefix="Test" suffix=".php">./tests/unit/</directory>
5
- </testsuite>
6
- </testsuites>
7
-
8
- <filter>
9
- <whitelist>
10
- <directory suffix=".php">src</directory>
11
- </whitelist>
12
- </filter>
13
-
14
- <logging>
15
- <log type="junit" target="build-coverage/report.junit.xml"/>
16
- <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
17
- <log type="coverage-text" target="build-coverage/coverage.txt"/>
18
- <log type="coverage-clover" target="build-coverage/clover.xml"/>
19
- </logging>
20
-
21
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/class-uk-states.php DELETED
@@ -1,154 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_UK_States
5
- */
6
- class WPDesk_Flexible_Shipping_UK_States implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- const COUNTRY_GB = 'GB';
11
-
12
- const PRIORITY_LATEST = 999999;
13
-
14
- /**
15
- * Hooks.
16
- */
17
- public function hooks() {
18
- add_filter( 'woocommerce_states', [ $this, 'add_uk_counties_to_wc_states' ] );
19
- add_filter( 'woocommerce_checkout_fields', [ $this, 'make_uk_state_required' ], self::PRIORITY_LATEST );
20
- }
21
-
22
- /**
23
- * Make UK state required.
24
- *
25
- * @param array $fields Checkout fields.
26
- *
27
- * @return array
28
- */
29
- public function make_uk_state_required( array $fields ) {
30
- $billing_country = WC()->customer->get_shipping_country();
31
- if ( self::COUNTRY_GB === $billing_country ) {
32
- $fields['billing']['billing_state']['required'] = true;
33
- }
34
- $shipping_country = WC()->customer->get_shipping_country();
35
- if ( self::COUNTRY_GB === $shipping_country ) {
36
- $fields['shipping']['shipping_state']['required'] = true;
37
- }
38
-
39
- return $fields;
40
- }
41
-
42
- /**
43
- * Add UK Counties to Woocommerce states.
44
- *
45
- * @param array $states Woocommerce states.
46
- *
47
- * @return array
48
- */
49
- public function add_uk_counties_to_wc_states( array $states ) {
50
- $states[ self::COUNTRY_GB ] = array(
51
- 'AV' => 'Avon',
52
- 'BE' => 'Bedfordshire',
53
- 'BK' => 'Berkshire',
54
- 'BU' => 'Buckinghamshire',
55
- 'CA' => 'Cambridgeshire',
56
- 'CH' => 'Cheshire',
57
- 'CL' => 'Cleveland',
58
- 'CO' => 'Cornwall',
59
- 'CD' => 'County Durham',
60
- 'CU' => 'Cumbria',
61
- 'DE' => 'Derbyshire',
62
- 'DV' => 'Devon',
63
- 'DO' => 'Dorset',
64
- 'ES' => 'East Sussex',
65
- 'EX' => 'Essex',
66
- 'GL' => 'Gloucestershire',
67
- 'HA' => 'Hampshire',
68
- 'HE' => 'Herefordshire',
69
- 'HT' => 'Hertfordshire',
70
- 'IW' => 'Isle of Wight',
71
- 'KE' => 'Kent',
72
- 'LA' => 'Lancashire',
73
- 'LE' => 'Leicestershire',
74
- 'LI' => 'Lincolnshire',
75
- 'LO' => 'London',
76
- 'ME' => 'Merseyside',
77
- 'MI' => 'Middlesex',
78
- 'NO' => 'Norfolk',
79
- 'NH' => 'North Humberside',
80
- 'NY' => 'North Yorkshire',
81
- 'NS' => 'Northamptonshire',
82
- 'NL' => 'Northumberland',
83
- 'NT' => 'Nottinghamshire',
84
- 'OX' => 'Oxfordshire',
85
- 'SH' => 'Shropshire',
86
- 'SO' => 'Somerset',
87
- 'SM' => 'South Humberside',
88
- 'SY' => 'South Yorkshire',
89
- 'SF' => 'Staffordshire',
90
- 'SU' => 'Suffolk',
91
- 'SR' => 'Surrey',
92
- 'TW' => 'Tyne and Wear',
93
- 'WA' => 'Warwickshire',
94
- 'WM' => 'West Midlands',
95
- 'WS' => 'West Sussex',
96
- 'WY' => 'West Yorkshire',
97
- 'WI' => 'Wiltshire',
98
- 'WO' => 'Worcestershire',
99
- 'ABD' => 'Scotland / Aberdeenshire',
100
- 'ANS' => 'Scotland / Angus',
101
- 'ARL' => 'Scotland / Argyle & Bute',
102
- 'AYR' => 'Scotland / Ayrshire',
103
- 'CLK' => 'Scotland / Clackmannanshire',
104
- 'DGY' => 'Scotland / Dumfries & Galloway',
105
- 'DNB' => 'Scotland / Dunbartonshire',
106
- 'DDE' => 'Scotland / Dundee',
107
- 'ELN' => 'Scotland / East Lothian',
108
- 'EDB' => 'Scotland / Edinburgh',
109
- 'FIF' => 'Scotland / Fife',
110
- 'GGW' => 'Scotland / Glasgow',
111
- 'HLD' => 'Scotland / Highland',
112
- 'LKS' => 'Scotland / Lanarkshire',
113
- 'MLN' => 'Scotland / Midlothian',
114
- 'MOR' => 'Scotland / Moray',
115
- 'OKI' => 'Scotland / Orkney',
116
- 'PER' => 'Scotland / Perth and Kinross',
117
- 'RFW' => 'Scotland / Renfrewshire',
118
- 'SB' => 'Scotland / Scottish Borders',
119
- 'SHI' => 'Scotland / Shetland Isles',
120
- 'STI' => 'Scotland / Stirling',
121
- 'WLN' => 'Scotland / West Lothian',
122
- 'WIS' => 'Scotland / Western Isles',
123
- 'AGY' => 'Wales / Anglesey',
124
- 'GNT' => 'Wales / Blaenau Gwent',
125
- 'CP' => 'Wales / Caerphilly',
126
- 'CF' => 'Wales / Cardiff',
127
- 'CAE' => 'Wales / Carmarthenshire',
128
- 'CR' => 'Wales / Ceredigion',
129
- 'CW' => 'Wales / Conwy',
130
- 'DEN' => 'Wales / Denbighshire',
131
- 'FLN' => 'Wales / Flintshire',
132
- 'GLA' => 'Wales / Glamorgan',
133
- 'GWN' => 'Wales / Gwynedd',
134
- 'MT' => 'Wales / Merthyr Tydfil',
135
- 'MON' => 'Wales / Monmouthshire',
136
- 'PT' => 'Wales / Neath Port Talbot',
137
- 'NP' => 'Wales / Newport',
138
- 'PEM' => 'Wales / Pembrokeshire',
139
- 'POW' => 'Wales / Powys',
140
- 'RT' => 'Wales / Rhondda Cynon Taff',
141
- 'SS' => 'Wales / Swansea',
142
- 'TF' => 'Wales / Torfaen',
143
- 'WX' => 'Wales / Wrexham',
144
- 'ANT' => 'Northern Ireland / County Antrim',
145
- 'ARM' => 'Northern Ireland / County Armagh',
146
- 'DOW' => 'Northern Ireland / County Down',
147
- 'FER' => 'Northern Ireland / County Fermanagh',
148
- 'LDY' => 'Northern Ireland / County Londonderry',
149
- 'TYR' => 'Northern Ireland / County Tyrone',
150
- );
151
- return $states;
152
- }
153
-
154
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-request-fields.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Saas_Shipment_Fields
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Request_Fields {
7
-
8
- /**
9
- * Shipment.
10
- *
11
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
12
- */
13
- private $shipment;
14
-
15
- /**
16
- * Shipment request.
17
- *
18
- * @var \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest Shipment request.
19
- */
20
- private $shipment_request;
21
-
22
- /**
23
- * WPDesk_Flexible_Shipping_Shipment_Request_Fields constructor.
24
- *
25
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
26
- * @param \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest $shipment_request Shipment request.
27
- *
28
- * @return WPDesk_Flexible_Shipping_Shipment_Request_Fields
29
- */
30
- public function __construct(
31
- WPDesk_Flexible_Shipping_Shipment_Saas $shipment,
32
- \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest $shipment_request
33
- ) {
34
- $this->shipment = $shipment;
35
- $this->shipment_request = $shipment_request;
36
- return $this;
37
- }
38
-
39
- /**
40
- * Get field value for platform.
41
- *
42
- * @param array $field Field.
43
- *
44
- * @return string|bool
45
- */
46
- private function get_field_value_for_platform( array $field ) {
47
- $field_value = $this->shipment->get_meta( $field['id'], '' );
48
- if ( 'checkbox' === $field['type'] ) {
49
- $field_value = 'yes' === $field_value;
50
- }
51
- return $field_value;
52
- }
53
-
54
- /**
55
- * Prepare shipment field from send-as.
56
- *
57
- * @param array $field Field.
58
- * @param string $send_as Send as field name.
59
- * @param mixed $append_to Append to object.
60
- */
61
- private function prepare_shipment_field_from_send_as( array $field, $send_as, $append_to ) {
62
- $send_as_to_array = explode( '.', $send_as );
63
- $field_name = $send_as_to_array[0];
64
- if ( 1 === count( $send_as_to_array ) ) {
65
- $append_to[ $field_name ] = $this->get_field_value_for_platform( $field );
66
- } else {
67
- unset( $send_as_to_array[0] );
68
- $append_to_field = $append_to[ $field_name ];
69
- if ( empty( $append_to_field ) ) {
70
- $append_to[ $field_name ] = new \WPDesk\SaasPlatformClient\Model\AbstractModel();
71
- }
72
- $this->prepare_shipment_field_from_send_as( $field, implode( '.', $send_as_to_array ), $append_to[ $field_name ] );
73
- }
74
- }
75
-
76
- /**
77
- * Is visible condition meet.
78
- *
79
- * @param array $field Field.
80
- * @return bool
81
- */
82
- private function is_visible_condition_meet( array $field ) {
83
- if ( isset( $field['visible-when'] ) ) {
84
- $visible_when = WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment::create_for_field( $field, $this->shipment );
85
- return $visible_when->is_visible();
86
- }
87
- return true;
88
- }
89
-
90
- /**
91
- * Prepare shipment field.
92
- *
93
- * @param array $field Field.
94
- */
95
- private function prepare_shipment_field( array $field ) {
96
- if ( isset( $field['send-with'] )
97
- && ( in_array( 'shipment', $field['send-with'], true )
98
- || in_array( 'label', $field['send-with'], true ) )
99
- && ! in_array( 'package', $field['send-with'], true )
100
- && $this->is_visible_condition_meet( $field )
101
- ) {
102
- if ( isset( $field['send-as'] ) ) {
103
- $this->prepare_shipment_field_from_send_as( $field, $field['send-as'], $this->shipment_request );
104
- } else {
105
- $this->shipment_request->{$field['id']} = $this->get_field_value_for_platform( $field );
106
- }
107
- }
108
- }
109
-
110
- /**
111
- * Prepare shipment fields from filedset.
112
- *
113
- * @param array $fieldset Fieldset.
114
- */
115
- private function prepare_shipment_fields_from_fieldset( array $fieldset ) {
116
- foreach ( $fieldset['fields'] as $field ) {
117
- $this->prepare_shipment_field( $field );
118
- }
119
- }
120
-
121
- /**
122
- * Prepare fields from platform,
123
- *
124
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest
125
- */
126
- public function prepare_shipment_fields() {
127
- $order = $this->shipment->get_order();
128
- $fields = $this->shipment->get_shipping_service()->get_fields_for_targets( [ $order->get_shipping_country() ] );
129
- foreach ( $fields as $fieldset ) {
130
- $this->prepare_shipment_fields_from_fieldset( $fieldset );
131
- }
132
- return $this->shipment_request;
133
- }
134
-
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-ajax.php DELETED
@@ -1,208 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Saas_Ajax
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Ajax {
7
-
8
- const META_SAAS_MESSAGE = '_saas_message';
9
-
10
- const UPGRADE_PLAN_URL = 'https://www.flexibleshipping.com/connect/purchase/';
11
-
12
- /**
13
- * Shipment.
14
- *
15
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
16
- */
17
- private $shipment;
18
-
19
- /**
20
- * Links.
21
- *
22
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
23
- */
24
- private $saas_platform_links;
25
-
26
- /**
27
- * WPDesk_Flexible_Shipping_Shipment_Saas_Ajax constructor.
28
- *
29
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
30
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Platform links.
31
- */
32
- public function __construct(
33
- WPDesk_Flexible_Shipping_Shipment_Saas $shipment,
34
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links
35
- ) {
36
- $this->shipment = $shipment;
37
- $this->saas_platform_links = $saas_platform_links;
38
- }
39
-
40
- /**
41
- * Save field data.
42
- *
43
- * @param array $field Field.
44
- * @param array $data Data.
45
- */
46
- private function save_field_data( array $field, array $data ) {
47
- $id = $this->shipment->get_id();
48
- $meta_value = '';
49
- $data_name = $field['id'] . '_' . $id;
50
- if ( isset( $data[ $data_name ] ) ) {
51
- $meta_value = $data[ $data_name ];
52
- }
53
- $this->shipment->set_meta( $field['id'], $meta_value );
54
- }
55
-
56
- /**
57
- * Save fieldset data.
58
- *
59
- * @param array $fieldset Fieldset.
60
- * @param array $data Data.
61
- */
62
- private function save_fieldset_data( array $fieldset, array $data ) {
63
- foreach ( $fieldset['fields'] as $field ) {
64
- $this->save_field_data( $field, $data );
65
- }
66
- }
67
-
68
- /**
69
- * Save data from metabox.
70
- *
71
- * @param array $data Data.
72
- */
73
- private function save_ajax_data( array $data ) {
74
- $fields = $this->shipment->get_fields_for_targets();
75
- foreach ( $fields as $fieldset ) {
76
- if ( isset( $fieldset['show-in'] ) && in_array( 'metabox', $fieldset['show-in'], true ) ) {
77
- $this->save_fieldset_data( $fieldset, $data );
78
- }
79
- }
80
- $id = $this->shipment->get_id();
81
- $data_name = 'attachments_' . $id;
82
- $meta_value = '';
83
- if ( isset( $data[ $data_name ] ) ) {
84
- $meta_value = $data[ $data_name ];
85
- unset( $meta_value['{count}'] );
86
- }
87
- $this->shipment->set_meta( 'attachments', $meta_value );
88
- }
89
-
90
- /**
91
- * Shipment exceeded message.
92
- *
93
- * @return string
94
- */
95
- private function shipments_exceeded_message() {
96
- return sprintf(
97
- // Translators: link.
98
- __( '%1$s Shipment plan exceeded. %2$sPlease upgrade your plan →%3$s', 'flexible-shipping' ),
99
- '</p><p class="fs-saas-no-labels-left">',
100
- '<a target="_blank" href="' . $this->saas_platform_links->add_utm(
101
- $this->saas_platform_links->get_upgrade_plan(),
102
- 'fs-notice-myaccount',
103
- 'flexible-shipping',
104
- 'link',
105
- 'user-site',
106
- ''
107
- ) . '" target="blank">',
108
- '</a>'
109
- );
110
- }
111
-
112
- /**
113
- * Save metabox data.
114
- *
115
- * @param array $data Data.
116
- * @param array $response Response.
117
- *
118
- * @return mixed
119
- * @throws RuntimeException Exception.
120
- */
121
- private function action_save( array $data, array $response ) {
122
- $metabox_can_be_saved = $this->shipment->matabox_can_be_saved();
123
- if ( ! $metabox_can_be_saved ) {
124
- throw new RuntimeException( __( 'Shipment cannot be saved for this status!', 'flexible-shipping' ) );
125
- }
126
- $this->save_ajax_data( $data );
127
- $this->shipment->set_meta( self::META_SAAS_MESSAGE, '' );
128
- $this->shipment->update_status( 'fs-new' );
129
- $this->shipment->save();
130
- $response['status'] = 'success';
131
- $response['message'] = __( 'Saved', 'flexible-shipping' );
132
-
133
- return $response;
134
- }
135
-
136
- /**
137
- * Action send.
138
- *
139
- * @param array $response Response.
140
- *
141
- * @return mixed
142
- */
143
- private function action_send( array $response ) {
144
- try {
145
- $shipment = $this->shipment;
146
- $shipment->set_sent_via_metabox();
147
- $shipment_response = $this->shipment->send_shipment();
148
- $shipment_left = intval( $shipment_response->getShipmentCountLeft() );
149
- $shipment_sent = intval( $shipment_response->getShipmentCountSent() );
150
- $response['message'] = sprintf(
151
- // Translators: shipments counts (sent/all).
152
- __( 'Shipment created.%1$sFS Connect plan usage: %2$s/%3$s shipments', 'flexible-shipping' ),
153
- '<br />',
154
- $shipment_sent,
155
- $shipment_left + $shipment_sent
156
- );
157
- if ( 0 === $shipment_left ) {
158
- $response['message'] .= $this->shipments_exceeded_message();
159
- }
160
- } catch ( WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception $e ) {
161
- $response['status'] = 'fail';
162
- $response['message'] = $this->shipments_exceeded_message();
163
- } catch ( Exception $e ) {
164
- $response['status'] = 'fail';
165
- $response['message'] = $e->getMessage();
166
- }
167
-
168
- return $response;
169
- }
170
-
171
- /**
172
- * Handle AJAX requests for shipment.
173
- *
174
- * @param string $action Action.
175
- * @param array $data Data.
176
- *
177
- * @return array
178
- *
179
- * @throws WPDesk_Flexible_Shipping_Send_Shipment_Exception Send Shipment Exception.
180
- * @throws RuntimeException Runtime Exception.
181
- */
182
- public function ajax_request( $action, $data ) {
183
- $response = array();
184
- if ( 'save' === $action || 'send' === $action ) {
185
- $response = $this->action_save( $data, $response );
186
- }
187
- if ( 'send' === $action ) {
188
- $response = $this->action_send( $response );
189
- }
190
- if ( 'cancel' === $action ) {
191
- try {
192
- $this->shipment->cancel_shipment();
193
- $response['message'] = __( 'Canceled', 'flexible-shipping' );
194
- } catch ( Exception $e ) {
195
- $response['status'] = 'fail';
196
- $message_formatter = new WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter(
197
- $e->getMessage(),
198
- $this->shipment->get_shipping_service_name()
199
- );
200
- $response['message'] = $message_formatter->format_to_html();
201
- }
202
- }
203
-
204
- $response['content'] = $this->shipment->get_order_metabox_content();
205
- return $response;
206
- }
207
-
208
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-ajax.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handle documents for shipments.
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax implements \WPDesk\PluginBuilder\Plugin\Hookable {
7
-
8
- const RESPONSE_STATUS = 'status';
9
- const RESPONSE_MESSAGE = 'message';
10
- const RESPONSE_STATUS_FAIL = 'fail';
11
- const RESPONSE_STATUS_SUCCESS = 'success';
12
-
13
- const FLEXIBLE_SHIPPING_SHIPMENT_NONCE = 'flexible_shipping_shipment_nonce';
14
-
15
- /**
16
- * Hooks.
17
- */
18
- public function hooks() {
19
- add_action( 'wp_ajax_flexible_shipping_add_attachment_to_shipment', array( $this, 'handle_ajax_add_attachment' ) );
20
- add_action( 'wp_ajax_flexible_shipping_delete_attachment_for_shipment', array( $this, 'handle_ajax_delete_attachment' ) );
21
- add_action( 'wp_ajax_flexible_shipping_send_attachments_for_shipment', array( $this, 'handle_ajax_send_attachments' ) );
22
- }
23
-
24
- /**
25
- * Get value from request parameter.
26
- *
27
- * @param string $parameter Parameter name.
28
- *
29
- * @return string|null
30
- */
31
- private function get_from_request( $parameter ) {
32
- if ( isset( $_REQUEST[ $parameter ] ) ) { // WPCS: CSRF ok, input var ok.
33
- return $_REQUEST[ $parameter ]; // WPCS: CSRF ok, input var ok.
34
- }
35
- return '';
36
- }
37
-
38
- /**
39
- * Get shipment.
40
- *
41
- * @param int $shipment_id Shipment ID.
42
- *
43
- * @return WPDesk_Flexible_Shipping_Shipment_Saas|null
44
- */
45
- private function get_shipment( $shipment_id ) {
46
- $shipment = fs_get_shipment( $shipment_id );
47
- if ( $shipment instanceof WPDesk_Flexible_Shipping_Shipment_Saas ) {
48
- return $shipment;
49
- }
50
- return null;
51
- }
52
-
53
- /**
54
- * Handle AJAX add attachment request.
55
- */
56
- public function handle_ajax_add_attachment() {
57
- $response = array(
58
- self::RESPONSE_STATUS => self::RESPONSE_STATUS_FAIL,
59
- self::RESPONSE_MESSAGE => __( 'Unknown error!', 'flexible-shipping' ),
60
- );
61
- if ( ! wp_verify_nonce( $this->get_from_request( 'nonce' ), self::FLEXIBLE_SHIPPING_SHIPMENT_NONCE ) ) {
62
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_FAIL;
63
- $response[ self::RESPONSE_MESSAGE ] = __( 'Nonce verification error! Invalid request.', 'flexible-shipping' );
64
- } else {
65
- $shipment_id = $this->get_from_request( 'shipment_id' );
66
- $attachment_id = $this->get_from_request( 'attachment_id' );
67
- $attachment_type = $this->get_from_request( 'attachment_type' );
68
-
69
- $shipment = $this->get_shipment( intval( $shipment_id ) );
70
-
71
- $attachment = wp_get_attachment_metadata( $attachment_id );
72
-
73
- if ( empty( $attachment_type ) ) {
74
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachment type not selected!', 'flexible-shipping' );
75
- } elseif ( false === $attachment ) {
76
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachment not found!', 'flexible-shipping' );
77
- } elseif ( empty( $shipment ) ) {
78
- $response[ self::RESPONSE_MESSAGE ] = __( 'Shipment not found!', 'flexible-shipping' );
79
- } else {
80
-
81
- $shipment_document_request = new \WPDesk\SaasPlatformClient\Model\ShipmentDocument\ShipmentDocumentRequest();
82
- $shipment_document_request->setDocumentType( $attachment_type );
83
- $shipment_document_request->setFileContent( base64_encode( file_get_contents( get_attached_file( $attachment_id ) ) ) );
84
- $ext = '.' . pathinfo( get_attached_file( $attachment_id ), PATHINFO_EXTENSION );
85
- $shipment_document_request->setFileName( get_the_title( $attachment_id ) . $ext );
86
-
87
- try {
88
- $shipment_document = $shipment->get_platform()->requestPostShipmentDocument(
89
- $shipment_document_request,
90
- $shipment->get_shipping_service()->get_id(),
91
- $shipment->get_saas_shipment_id()
92
- );
93
-
94
- if ( $shipment_document->isError() ) {
95
- throw new RuntimeException( $shipment_document->getShipmentDocument()->getMessage() );
96
- }
97
-
98
- $shipment_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments( $shipment );
99
- $shipment_attachments->add_attachment( $attachment_type, $attachment_id, $shipment_document->getShipmentDocument()->getId() );
100
-
101
- $shipment->save();
102
-
103
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_SUCCESS;
104
- $response['shipment_id'] = $shipment_id;
105
- $response['attachment_id'] = $attachment_id;
106
-
107
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachment added', 'flexible-shipping' );
108
- $metabox_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments( $shipment );
109
- $response['content'] = $metabox_attachments->get_order_metabox_content();
110
- } catch ( Exception $e ) {
111
- $response[ self::RESPONSE_MESSAGE ] = $e->getMessage();
112
- }
113
- }
114
- }
115
- wp_send_json( $response );
116
- }
117
-
118
- /**
119
- * Handle AJAX delete attachment request.
120
- */
121
- public function handle_ajax_delete_attachment() {
122
- $response = array(
123
- self::RESPONSE_STATUS => self::RESPONSE_STATUS_FAIL,
124
- self::RESPONSE_MESSAGE => __( 'Unknown error!', 'flexible-shipping' ),
125
- );
126
- if ( ! wp_verify_nonce( $this->get_from_request( 'nonce' ), self::FLEXIBLE_SHIPPING_SHIPMENT_NONCE ) ) {
127
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_FAIL;
128
- $response[ self::RESPONSE_MESSAGE ] = __( 'Nonce verification error! Invalid request.', 'flexible-shipping' );
129
- } else {
130
- $shipment_id = $this->get_from_request( 'shipment_id' );
131
- $saas_attachment_id = $this->get_from_request( 'saas_attachment_id' );
132
-
133
- $shipment = $this->get_shipment( intval( $shipment_id ) );
134
-
135
- if ( empty( $shipment ) ) {
136
- $response[ self::RESPONSE_MESSAGE ] = __( 'Shipment not found!', 'flexible-shipping' );
137
- } else {
138
-
139
- try {
140
- $delete_response = $shipment->get_platform()->requestDeleteShipmentDocument( $saas_attachment_id );
141
-
142
- if ( $delete_response->isError() ) {
143
- throw new RuntimeException( $delete_response->getResponseMessage() );
144
- }
145
-
146
- $shipment_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments( $shipment );
147
-
148
- $deleted = $shipment_attachments->delete_attachment_by_saas_attachment_id( $saas_attachment_id );
149
-
150
- if ( $deleted ) {
151
- $shipment->save();
152
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_SUCCESS;
153
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachment deleted', 'flexible-shipping' );
154
- } else {
155
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachment not found!', 'flexible-shipping' );
156
- }
157
-
158
- $metabox_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments( $shipment );
159
- $response['content'] = $metabox_attachments->get_order_metabox_content();
160
-
161
- } catch ( Exception $e ) {
162
- $response[ self::RESPONSE_MESSAGE ] = $e->getMessage();
163
- }
164
- }
165
- }
166
- wp_send_json( $response );
167
- }
168
-
169
- /**
170
- * Handle AJAX send attachments request.
171
- */
172
- public function handle_ajax_send_attachments() {
173
- $response = array(
174
- self::RESPONSE_STATUS => self::RESPONSE_STATUS_FAIL,
175
- self::RESPONSE_MESSAGE => __( 'Unknown error!', 'flexible-shipping' ),
176
- );
177
- if ( ! wp_verify_nonce( $this->get_from_request( 'nonce' ), self::FLEXIBLE_SHIPPING_SHIPMENT_NONCE ) ) {
178
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_FAIL;
179
- $response[ self::RESPONSE_MESSAGE ] = __( 'Nonce verification error! Invalid request.', 'flexible-shipping' );
180
- } else {
181
- $shipment_id = $this->get_from_request( 'shipment_id' );
182
-
183
- $shipment = $this->get_shipment( intval( $shipment_id ) );
184
-
185
- if ( empty( $shipment ) ) {
186
- $response[ self::RESPONSE_MESSAGE ] = __( 'Shipment not found!', 'flexible-shipping' );
187
- } else {
188
-
189
- try {
190
- $send_documents = $shipment->get_platform()->requestPostSendDocuments(
191
- $shipment->get_saas_shipment_id(),
192
- $shipment->get_shipping_service()->get_id()
193
- );
194
-
195
- if ( $send_documents->isError() ) {
196
- // Translators: response code.
197
- throw new RuntimeException( sprintf( __( 'Unable to send documents: %1$s' ), $send_documents->getResponseMessage() ) );
198
- }
199
-
200
-
201
- $shipment_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments( $shipment );
202
- $shipment_attachments->mark_attachments_as_sent( $send_documents->getDocumentStatusesResponse()->getDocumentStatuses() );
203
-
204
- $shipment->save();
205
-
206
- $response[ self::RESPONSE_STATUS ] = self::RESPONSE_STATUS_SUCCESS;
207
- $response[ self::RESPONSE_MESSAGE ] = __( 'Attachments send', 'flexible-shipping' );
208
-
209
- $metabox_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments( $shipment );
210
- $response['content'] = $metabox_attachments->get_order_metabox_content();
211
-
212
- } catch ( Exception $e ) {
213
- $response[ self::RESPONSE_MESSAGE ] = $e->getMessage();
214
- }
215
- }
216
- }
217
- wp_send_json( $response );
218
- }
219
-
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments-upload-dir.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handle SaaS attachments upload dir.
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Upload_Dir implements \WPDesk\PluginBuilder\Plugin\Hookable {
7
-
8
- const UPLOADS_PATH = '/woocommerce_uploads/shipment_attachments';
9
-
10
- /**
11
- * Hooks.
12
- */
13
- public function hooks() {
14
- add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
15
- }
16
-
17
- /**
18
- * Change upload dir for downloadable files.
19
- *
20
- * @param array $path_data Array of paths.
21
- *
22
- * @return array
23
- */
24
- public function upload_dir( $path_data ) {
25
- if ( isset( $_POST['type'] ) && WPDesk_Flexible_Shipping_Shipment_CPT::POST_TYPE_SHIPMENT === $_POST['type'] ) { // WPCS: CSRF ok, input var ok.
26
-
27
- if ( empty( $path_data['subdir'] ) ) {
28
- $path_data['path'] = $path_data['path'] . self::UPLOADS_PATH;
29
- $path_data['url'] = $path_data['url'] . self::UPLOADS_PATH;
30
- $path_data['subdir'] = self::UPLOADS_PATH;
31
- } else {
32
- $new_subdir = self::UPLOADS_PATH . $path_data['subdir'];
33
-
34
- $path_data['path'] = str_replace( $path_data['subdir'], $new_subdir, $path_data['path'] );
35
- $path_data['url'] = str_replace( $path_data['subdir'], $new_subdir, $path_data['url'] );
36
- $path_data['subdir'] = str_replace( $path_data['subdir'], $new_subdir, $path_data['subdir'] );
37
- }
38
- }
39
- return $path_data;
40
- }
41
-
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-attachments.php DELETED
@@ -1,125 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Flexible Shipping SaaS Shipment Attachments.
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Attachments {
7
-
8
- const META_ATTACHMENTS = 'attachments';
9
-
10
- const SAAS_ATTACHMENT_ID = 'saas_attachment_id';
11
- const ATTACHMENT_ID = 'attachment_id';
12
- const TYPE = 'type';
13
-
14
- /**
15
- * Shipment.
16
- *
17
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
18
- */
19
- private $shipment;
20
-
21
- /**
22
- * WPDesk_Flexible_Shipping_Shipment_Saas_Attachments constructor.
23
- *
24
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
25
- */
26
- public function __construct( $shipment ) {
27
- $this->shipment = $shipment;
28
- }
29
-
30
- /**
31
- * Get attachments.
32
- *
33
- * @return array
34
- */
35
- public function get_attachments() {
36
- $attachments = $this->shipment->get_meta( self::META_ATTACHMENTS, array() );
37
- if ( ! is_array( $attachments ) ) {
38
- $attachments = array( $attachments );
39
- }
40
- foreach ( $attachments as $attachment_key => $attachment ) {
41
- if ( ! is_array( $attachment ) ) {
42
- unset( $attachments[ $attachment_key ] );
43
- } else {
44
- $attachment_id = $attachment[ self::ATTACHMENT_ID ];
45
- $ext = '.' . pathinfo( get_attached_file( $attachment_id ), PATHINFO_EXTENSION );
46
-
47
- $attachments[ $attachment_key ]['filename'] = get_the_title( $attachment_id ) . $ext;
48
- }
49
- }
50
- return $attachments;
51
- }
52
-
53
- /**
54
- * Delete attachment by SaaS attachment ID.
55
- *
56
- * @param int $saas_attachment_id SaaS attachment id.
57
- * @return bool
58
- */
59
- public function delete_attachment_by_saas_attachment_id( $saas_attachment_id ) {
60
- $attachments = $this->get_attachments();
61
- $deleted = false;
62
- foreach ( $attachments as $attachment_key => $attachment ) {
63
- if ( intval( $attachment[ self::SAAS_ATTACHMENT_ID ] ) === intval( $saas_attachment_id ) ) {
64
- $deleted = true;
65
- unset( $attachments[ $attachment_key ] );
66
- $this->shipment->set_meta( self::META_ATTACHMENTS, $attachments );
67
- }
68
- }
69
-
70
- return $deleted;
71
- }
72
-
73
- /**
74
- * Add attachment.
75
- *
76
- * @param string $attachment_type Attachment type.
77
- * @param int $attachment_id Attachment id.
78
- * @param int $saas_attachment_id SaaS attachment id.
79
- */
80
- public function add_attachment( $attachment_type, $attachment_id, $saas_attachment_id ) {
81
- $attachments = $this->get_attachments();
82
- $attachments[] = array(
83
- self::TYPE => $attachment_type,
84
- self::ATTACHMENT_ID => $attachment_id,
85
- self::SAAS_ATTACHMENT_ID => $saas_attachment_id,
86
- );
87
- $this->shipment->set_meta( self::META_ATTACHMENTS, $attachments );
88
- }
89
-
90
- /**
91
- * Mark attachments as sent.
92
- *
93
- * @param array $attachment_statuses Attachment statuses.
94
- */
95
- public function mark_attachments_as_sent( $attachment_statuses ) {
96
- $attachments = $this->get_attachments();
97
- foreach ( $attachment_statuses as $attachment_status ) {
98
- $document_id = intval( $attachment_status['documentId'] );
99
- $document_sent = intval( $attachment_status['documentSent'] );
100
- foreach ( $attachments as $attachment_key => $attachment ) {
101
- if ( $document_id === $attachment[ self::SAAS_ATTACHMENT_ID ] ) {
102
- if ( $document_sent ) {
103
- $attachment['sent'] = 1;
104
- } else {
105
- unset( $attachment['sent'] );
106
- }
107
- $attachments[ $attachment_key ] = $attachment;
108
- }
109
- }
110
- }
111
-
112
- $this->shipment->set_meta( self::META_ATTACHMENTS, $attachments );
113
-
114
- }
115
-
116
- /**
117
- * Are attachments available.
118
- *
119
- * @return bool
120
- */
121
- public function are_attachments_avaliable() {
122
- return 'yes' === $this->shipment->get_meta( 'documents', 'no' );
123
- }
124
-
125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-message-formatter.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter {
7
-
8
- /**
9
- * Message.
10
- *
11
- * @var string
12
- */
13
- private $message;
14
-
15
- /**
16
- * Integration name.
17
- *
18
- * @var string
19
- */
20
- private $integration_name;
21
-
22
- /**
23
- * WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter constructor.
24
- *
25
- * @param string $message Message.
26
- * @param string $integration_name Integration name.
27
- */
28
- public function __construct( $message, $integration_name ) {
29
- $this->message = $message;
30
- $this->integration_name = $integration_name;
31
- }
32
-
33
- /**
34
- * Format error message to html.
35
- *
36
- * @return string
37
- */
38
- public function format_to_html() {
39
- return sprintf( '%1$s%2$s:%3$s %4$s',
40
- '<span>',
41
- // Translators: metabox title.
42
- sprintf( __( '%1$s notice', 'flexible-shipping' ), $this->integration_name ),
43
- '</span>',
44
- $this->message
45
- );
46
- }
47
-
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox-attachments.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Metabox attachments content.
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments {
7
-
8
- /**
9
- * Shipment.
10
- *
11
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
12
- */
13
- private $shipment;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_Shipment_Saas_Ajax constructor.
17
- *
18
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
19
- */
20
- public function __construct( WPDesk_Flexible_Shipping_Shipment_Saas $shipment ) {
21
- $this->shipment = $shipment;
22
- }
23
-
24
-
25
- /**
26
- * Display order metabox attachments.
27
- */
28
- public function display_order_metabox_attachments() {
29
- global $thepostid;
30
-
31
- $thepostid = $this->shipment->get_order()->get_id();
32
-
33
- $shipment_id = $this->shipment->get_id();
34
- $type_field_id = 'attachment_type';
35
- $attachment_field_id = 'attachment_attachment_id';
36
-
37
- $field_label = __( 'Attachments', 'flexible-shipping' );
38
-
39
- $shipment_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments( $this->shipment );
40
-
41
- $attachments = $shipment_attachments->get_attachments();
42
-
43
- $attachment_types = array(
44
- 'COMMERCIAL_INVOICE' => 'Invoice',
45
- 'CERTIFICATE_OF_ORIGIN' => 'Origin cert',
46
- 'NAFTA_CERTIFICATE_OF_ORIGIN' => 'NAFTA cert',
47
- 'PRO_FORMA_INVOICE' => 'Pro Forma Inv',
48
- 'OTHER' => 'Other',
49
- );
50
- if ( $this->shipment->get_status() === WPDesk_Flexible_Shipping_Shipment::STATUS_FS_CONFIRMED ) {
51
- include 'views/order-metabox-shipment-attachments.php';
52
- }
53
- }
54
-
55
- /**
56
- * Get order metabox content.
57
- *
58
- * @return string
59
- */
60
- public function get_order_metabox_content() {
61
- ob_start();
62
- $this->display_order_metabox_attachments();
63
- $content = ob_get_contents();
64
- ob_end_clean();
65
- return $content;
66
- }
67
-
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-metabox.php DELETED
@@ -1,168 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Saas_Metabox
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Metabox {
7
-
8
- /**
9
- * Shipment.
10
- *
11
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
12
- */
13
- private $shipment;
14
-
15
- /**
16
- * Platform factory.
17
- *
18
- * @var WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory
19
- */
20
- private $platform_factory;
21
-
22
- public function __construct(
23
- WPDesk_Flexible_Shipping_Shipment_Saas $shipment,
24
- WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory $platform_factory = null
25
- ) {
26
- $this->shipment = $shipment;
27
- $this->platform_factory = $platform_factory;
28
- }
29
-
30
- /**
31
- * Prepare collection points options.
32
- *
33
- * @return array
34
- */
35
- private function prepare_collection_points_options() {
36
- $shipping_service = $this->shipment->get_shipping_service();
37
- $shipping_service_collection_points = $shipping_service->get_collection_points();
38
-
39
- $order = $this->shipment->get_order();
40
- $address = new \WPDesk\SaasPlatformClient\Model\Shipment\Address();
41
- $address->setAddressLine1( $order->get_shipping_address_1() );
42
- $address->setAddressLine2( $order->get_shipping_address_2() );
43
- $address->setPostalCode( $order->get_shipping_postcode() );
44
- $address->setCity( $order->get_shipping_city() );
45
- $address->setStateCode( $order->get_shipping_state() );
46
- $address->setCountryCode( $order->get_shipping_country() );
47
-
48
- return $shipping_service_collection_points->prepare_collection_points_options_for_address( $address );
49
- }
50
-
51
-
52
- /**
53
- * Display fieldset in order metabox.
54
- *
55
- * @param array $fieldset Fieldset.
56
- * @param int $id Shipment ID.
57
- * @param bool $disabled Disabled.
58
- * @param array $values Values.
59
- */
60
- private function display_order_metabox_fieldset( array $fieldset, $id, $disabled, $values ) {
61
- $fields = $fieldset['fields'];
62
- $is_replicable = false;
63
- foreach ( $fields as $field_key => $field ) {
64
- if ( 'parcel_collection_points' === $field['type'] ) {
65
- $fields[ $field_key ]['access_points_options'] = $this->prepare_collection_points_options();
66
- }
67
- }
68
- if ( isset( $fieldset['replicable'] ) ) {
69
- $is_replicable = true;
70
- include 'views/order-metabox-fieldset-replicable.php';
71
- } else {
72
- include 'views/order-metabox-fieldset.php';
73
- }
74
- }
75
-
76
- /**
77
- * Display order metabox attachments.
78
- */
79
- private function display_order_metabox_attachments() {
80
- $shipment_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments( $this->shipment );
81
- if ( $shipment_attachments->are_attachments_avaliable() ) {
82
- $metabox_attachments = new WPDesk_Flexible_Shipping_Shipment_Saas_Metabox_Attachments( $this->shipment );
83
- $metabox_attachments->display_order_metabox_attachments();
84
- }
85
- }
86
-
87
- /**
88
- * Get order metabox content.
89
- *
90
- * @return string
91
- */
92
- public function get_order_metabox_content() {
93
-
94
- /** Global $post is required for woocommerce_wp_text_input used in metabox. */
95
- global $post;
96
- if ( empty( $post ) ) {
97
- $post = $this->shipment->get_post();
98
- }
99
-
100
- ob_start();
101
-
102
- $disabled = true;
103
- if ( $this->shipment->get_status() === 'fs-new' || $this->shipment->get_status() === 'fs-failed' ) {
104
- $disabled = false;
105
- }
106
- $order = $this->shipment->get_order();
107
- $id = $this->shipment->get_id();
108
- $integration = $this->shipment->get_integration();
109
- $values = $this->shipment->get_meta();
110
- $label_url = $this->shipment->get_label_url();
111
- $tracking_number = $this->shipment->get_tracking_number();
112
- $tracking_url = $this->shipment->get_tracking_url();
113
-
114
- $shipping_service = $this->shipment->get_shipping_service();
115
-
116
- try {
117
- $fields = $this->shipment->get_fields_for_targets();
118
- foreach ( $fields as $fieldset ) {
119
- if ( isset( $fieldset['show-in'] ) && in_array( 'metabox', $fieldset['show-in'], true ) ) {
120
- $this->display_order_metabox_fieldset( $fieldset, $id, $disabled, $values );
121
- }
122
- }
123
-
124
- $this->display_order_metabox_attachments();
125
-
126
- $supports_label = $shipping_service->supports( 'supportsShipmentLabel' );
127
- $supports_cancel = $shipping_service->supports( 'supportsShipmentCancel' );
128
-
129
- $status = $this->shipment->get_status();
130
- $status_text = get_post_status_object( $status )->label;
131
-
132
- $shipment_charges = '';
133
- $show_shipping_charges = false;
134
- if ( ! empty( $this->shipment->get_shipment_cost_as_money() ) ) {
135
- $shipment_charges = $this->shipment->get_shipment_cost_amount();
136
- $show_shipping_charges = true;
137
- }
138
-
139
- include 'views/order-metabox-actions.php';
140
-
141
- } catch ( Exception $e ) {
142
- if ( $e instanceof WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception ) {
143
- $error_message = $e->getMessage();
144
- } elseif ( $e instanceof WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found ) {
145
- $error_message = $shipping_service->prepare_settings_not_found_message();
146
- } else {
147
- $saas_connection = new WPDesk_Flexible_Shipping_SaaS_Connection(null, null, $this->platform_factory);
148
- if ( $e instanceof WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception ) {
149
- $maintenance_context = new \WPDesk\SaasPlatformClient\Response\Maintenance\MaintenanceResponseContext( $e->get_response() );
150
- $error_message = $saas_connection->prepare_maintenance_notice(
151
- $maintenance_context->getMaintenanceMessage(),
152
- $maintenance_context->getMaintenanceTill()
153
- );
154
- } else {
155
- $error_message = $saas_connection->prepare_fatal_error_notice();
156
- }
157
- }
158
- include 'views/order-metabox-connection-error.php';
159
- }
160
-
161
- $content = ob_get_contents();
162
- ob_end_clean();
163
-
164
- return $content;
165
-
166
- }
167
-
168
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas-send.php DELETED
@@ -1,227 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Saas_Send
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Saas_Send {
7
-
8
- const WEIGHT_UNIT = 'G';
9
- const WOOCOMMERCE_GRAMS = 'g';
10
-
11
- /**
12
- * Shipment.
13
- *
14
- * @var WPDesk_Flexible_Shipping_Shipment_Saas
15
- */
16
- private $shipment;
17
-
18
- /**
19
- * WPDesk_Flexible_Shipping_Shipment_Saas_Send constructor.
20
- *
21
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
22
- */
23
- public function __construct( WPDesk_Flexible_Shipping_Shipment_Saas $shipment ) {
24
- $this->shipment = $shipment;
25
- }
26
-
27
- /**
28
- * Prepare ship to address.
29
- *
30
- * @param WC_Order $order Order.
31
- *
32
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Address
33
- */
34
- private function prepare_ship_to_address( $order ) {
35
- $ship_to_address = new \WPDesk\SaasPlatformClient\Model\Shipment\Address();
36
- $ship_to_address->setAddressLine1( $order->get_shipping_address_1() );
37
- $ship_to_address->setAddressLine2( $order->get_shipping_address_2() );
38
- $ship_to_address->setPostalCode( str_replace( '-', '', $order->get_shipping_postcode() ) );
39
- $ship_to_address->setCity( $order->get_shipping_city() );
40
- $ship_to_address->setCountryCode( $order->get_shipping_country() );
41
- $ship_to_address->setStateCode( $order->get_shipping_state() );
42
-
43
- return $ship_to_address;
44
- }
45
-
46
- /**
47
- * Prepare ship to actor.
48
- *
49
- * @param WC_Order $order Order.
50
- *
51
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Actor
52
- */
53
- private function prepare_ship_to( $order ) {
54
- $ship_to = new \WPDesk\SaasPlatformClient\Model\Shipment\Actor();
55
- $ship_to->setAddress( $this->prepare_ship_to_address( $order ) );
56
- $ship_to->setName( trim( $order->get_shipping_first_name() . ' ' . $order->get_shipping_last_name() ) );
57
- $ship_to->setCompanyName( $order->get_shipping_company() );
58
- $ship_to->setPhoneNumber( $order->get_billing_phone() );
59
- $ship_to->setEmail( $order->get_billing_email() );
60
-
61
- return $ship_to;
62
- }
63
-
64
- /**
65
- * Prepare packages.
66
- *
67
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Package[]
68
- */
69
- private function prepare_packages() {
70
- $package = new \WPDesk\SaasPlatformClient\Model\Shipment\Package();
71
- $package->seTtype( $this->shipment->get_meta( 'package_type' ) );
72
- $package->setWeight( intval( wc_get_weight( floatval( $this->shipment->get_meta( 'package_weight' ) ), self::WOOCOMMERCE_GRAMS ) ) );
73
- $package->setDescription( $this->shipment->get_meta( 'description' ) );
74
-
75
- $package->dimensions = new \WPDesk\SaasPlatformClient\Model\Shipment\Package\Dimensions();
76
- $package->dimensions->setHeight( intval( wc_get_dimension( floatval( $this->shipment->get_meta( 'height' ) ), 'mm' ) ) );
77
- $package->dimensions->setWidth( intval( wc_get_dimension( floatval( $this->shipment->get_meta( 'width' ) ), 'mm' ) ) );
78
- $package->dimensions->setLength( intval( wc_get_dimension( floatval( $this->shipment->get_meta( 'length' ) ), 'mm' ) ) );
79
-
80
- $packages = array( $package );
81
-
82
- return $packages;
83
- }
84
-
85
- /**
86
- * Prepare commodities.
87
- *
88
- * @param WC_Order $order Order.
89
- *
90
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\ClientCommodity[]
91
- */
92
- private function prepare_commodities( $order ) {
93
- $commodities = array();
94
- /** @var WC_Order_Item_Product $order_item */
95
- foreach ( $order->get_items() as $order_item ) {
96
- $unit_price = new \WPDesk\SaasPlatformClient\Model\Shipment\ClientMoney();
97
- $unit_price->currency = $order->get_currency();
98
- $total_order_item = floatval( $order_item->get_total() ) + floatval( $order_item->get_total_tax() );
99
- $unit_price->amount = strval( round( $total_order_item / floatval( $order_item->get_quantity() ), wc_get_rounding_precision() ) );
100
-
101
- $unit_weight = new \WPDesk\SaasPlatformClient\Model\Shipment\ClientWeight();
102
- $unit_weight->setUnit( self::WEIGHT_UNIT );
103
- $unit_weight->setAmount( intval( wc_get_weight( $order_item->get_product()->get_weight(), self::WOOCOMMERCE_GRAMS ) ) );
104
-
105
- $description = $order_item->get_product()->get_attribute( 'shipping-desc' );
106
- $origin_country = $order_item->get_product()->get_attribute( 'origin-country' );
107
- $hts_code = $order_item->get_product()->get_attribute( 'hts-code' );
108
-
109
- if ( ! empty( $description ) && ! empty( $origin_country ) && ! empty( $hts_code ) ) {
110
- $commodities[] = new \WPDesk\SaasPlatformClient\Model\Shipment\ClientCommodity(
111
- $order_item->get_name(),
112
- $unit_price,
113
- $unit_weight,
114
- $order_item->get_quantity(),
115
- $description,
116
- $origin_country,
117
- $hts_code
118
- );
119
- }
120
- }
121
- return $commodities;
122
- }
123
-
124
- /**
125
- * Prepare shop data.
126
- *
127
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\ShopData
128
- */
129
- private function prepare_shop_data() {
130
- $shop_data = new \WPDesk\SaasPlatformClient\Model\Shipment\ShopData();
131
- $shop_data->setOrderId( $this->shipment->get_order_id() );
132
- $shop_data->setShipmentId( $this->shipment->get_id() );
133
- return $shop_data;
134
- }
135
-
136
- /**
137
- * Prepare shop flow.
138
- *
139
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\ShopFlow
140
- */
141
- private function prepare_shop_flow() {
142
- $shipment = $this->shipment;
143
- $shop_flow = new \WPDesk\SaasPlatformClient\Model\Shipment\ShopFlow();
144
- $shop_flow->setCreatedVia( $shipment->get_created_via() );
145
- $shop_flow->setSentVia( $shipment->get_sent_via() );
146
- $shop_flow->setFallback( $shipment->was_fallback() );
147
- $shop_flow->setFallbackMessage( $shipment->get_fallback_message() );
148
- $shop_flow->setRateType( $shipment->get_rate_type() );
149
- $shop_flow->setCheckoutServiceType( $shipment->get_checkout_service_type() );
150
- $shop_flow->setCheckoutServiceName( $shipment->get_checkout_service_name() );
151
- return $shop_flow;
152
- }
153
-
154
- /**
155
- * Prepare shipment request.
156
- *
157
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest
158
- */
159
- private function prepare_shipment_request() {
160
-
161
- $shipment_request = new \WPDesk\SaasPlatformClient\Model\Shipment\ShipmentRequest();
162
- $shipment_request->setShipTo( $this->prepare_ship_to( $this->shipment->get_order() ) );
163
- $shipment_request->setPackages( $this->prepare_packages() );
164
-
165
- $shipment_request->setCommodities( $this->prepare_commodities( $this->shipment->get_order() ) );
166
-
167
- $shipment_request->setServiceType( $this->shipment->get_meta( 'service_type' ) );
168
-
169
- $shipment_request->setShopData( $this->prepare_shop_data() );
170
- $shipment_request->setShopFlow( $this->prepare_shop_flow() );
171
-
172
- $shipment_request_fields = new WPDesk_Flexible_Shipping_Shipment_Request_Fields( $this->shipment, $shipment_request );
173
- $shipment_request_fields->prepare_shipment_fields();
174
-
175
- return $shipment_request;
176
- }
177
-
178
- /**
179
- * Send shipment to platform.
180
- *
181
- * @return WPDesk\SaasPlatformClient\Model\Shipment\ShipmentResponse
182
- * @throws WPDesk_Flexible_Shipping_Send_Shipment_Exception Send Shipment Exception.
183
- */
184
- public function send() {
185
- $shipment = $this->shipment;
186
- $platform = $shipment->get_platform();
187
- $shipment_request = $this->prepare_shipment_request();
188
- $response = $platform->requestPostShipment( $shipment_request, $shipment->get_shipping_method()->get_shipping_service_id() );
189
- if ( $response->isError() ) {
190
- $error_body = $response->getResponseErrorBody();
191
- $message = __( 'UPS! Something is wrong!', 'flexible-shipping' );
192
-
193
- if ( isset( $error_body['detail'] ) ) {
194
- $message = $error_body['detail'];
195
- }
196
- if ( isset( $error_body['message'] ) ) {
197
- $message = $error_body['message'];
198
- }
199
- $shipment->set_meta( $shipment::META_SAAS_MESSAGE, $message );
200
- $shipment->update_status( 'fs-failed' );
201
- $shipment->save();
202
- if ( $response->isShipmentPlanExceeded() ) {
203
- throw new WPDesk_Flexible_Shipping_Shipment_Plan_Exceeded_Exception( $shipment->get_error_message(), $response->getResponseCode() );
204
- } else {
205
- throw new WPDesk_Flexible_Shipping_Send_Shipment_Exception( $shipment->get_error_message(), $response->getResponseCode() );
206
- }
207
- }
208
-
209
- $shipment_response = $response->getShipment();
210
- $shipment->set_saas_shipment_id( $shipment_response->getShipmentId() );
211
- $shipment->set_tracking_number( $shipment_response->getTrackingId() );
212
- $shipment->set_tracking_url( $shipment_response->getTrackingUrl() );
213
- if ($shipment_response->hasShipmentCost()) {
214
- $shipment->set_shipment_cost( $shipment_response->getShipmentCost() );
215
- }
216
- $shipment->delete_meta( $shipment::META_SAAS_MESSAGE );
217
- $shipment->update_status( 'fs-' . $shipment_response->getStatus() );
218
- $shipment->save();
219
-
220
- $shipment->add_order_note_shipment_created();
221
-
222
- do_action( 'flexible_shipping_shipment_confirmed', $shipment );
223
-
224
- return $shipment_response;
225
- }
226
-
227
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/class-shipment-saas.php DELETED
@@ -1,768 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Flexible Shipping SaaS Shipment.
5
- *
6
- * Class WPDesk_Flexible_Shipping_Shipment_Saas
7
- */
8
- class WPDesk_Flexible_Shipping_Shipment_Saas
9
- extends WPDesk_Flexible_Shipping_Shipment
10
- implements WPDesk_Flexible_Shipping_Shipment_Interface {
11
-
12
- const META_SAAS_SHIPMENT_ID = '_saas_shipment_id';
13
-
14
- const META_SAAS_MESSAGE = '_saas_message';
15
-
16
- const META_SAAS_TRACKING_ID = '_saas_tracking_id';
17
-
18
- const META_SAAS_TRACKING_URL = '_saas_tracking_url';
19
-
20
- const META_SAAS_SHIPMENT_COST = '_saas_shipment_cost';
21
-
22
- const FIELD_CALCULATION_METHOD = 'calculation-method';
23
-
24
- const FLOAT_EPSILON = 0.000001;
25
-
26
- const RATE_TYPE = 'rate_type';
27
-
28
- const FALLBACK_MESSAGE = 'fallback_message';
29
-
30
- const FALLBACK = 'fallback';
31
-
32
- const CHECKOUT_SERVICE_TYPE = 'checkout_service_type';
33
- const CHECKOUT_SERVICE_NAME = 'checkout_service_name';
34
-
35
- /**
36
- * Renderer.
37
- *
38
- * @var WPDesk\View\Renderer\Renderer;
39
- */
40
- private static $renderer;
41
-
42
- /**
43
- * Platform links.
44
- *
45
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
46
- */
47
- private static $saas_platform_links;
48
-
49
- /**
50
- * Platform factory.
51
- *
52
- * @var WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory
53
- */
54
- private static $platform_factory;
55
-
56
- /**
57
- * Shipping method.
58
- *
59
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
60
- */
61
- private $shipping_method;
62
-
63
- /**
64
- * Shipping service.
65
- *
66
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
67
- */
68
- private $shipping_service;
69
-
70
- /**
71
- * Logger.
72
- *
73
- * @var \Psr\Log\LoggerInterface
74
- */
75
- private $logger;
76
-
77
- /**
78
- * WPDesk_Flexible_Shipping_Shipment_Saas constructor.
79
- *
80
- * @param int $shipment_id Shipment ID.
81
- * @param WC_Order|null $order Order.
82
- */
83
- public function __construct( $shipment_id, $order = null ) {
84
- parent::__construct( $shipment_id, $order );
85
- $shipping_methods = WC()->shipping()->get_shipping_methods();
86
- $integration = $this->get_integration();
87
- /**
88
- * IDE Type hint.
89
- *
90
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings $shipping_method
91
- */
92
- $shipping_method = $shipping_methods[ $integration ];
93
- $this->shipping_method = $shipping_method;
94
- $this->shipping_service = $shipping_method->get_shipping_service();
95
- }
96
-
97
- /**
98
- * Set renderer.
99
- *
100
- * @param WPDesk\View\Renderer\Renderer $renderer Renderer.
101
- */
102
- public static function set_renderer( WPDesk\View\Renderer\Renderer $renderer ) {
103
- self::$renderer = $renderer;
104
- }
105
-
106
- /**
107
- * Set platform links.
108
- *
109
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Platform links.
110
- */
111
- public static function set_platform_links( WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links ) {
112
- self::$saas_platform_links = $saas_platform_links;
113
- }
114
-
115
- public static function set_platform_factory( WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory $platform_factory ) {
116
- self::$platform_factory = $platform_factory;
117
- }
118
-
119
- /**
120
- * Save field data from shipping method.
121
- *
122
- * @param array $field Field.
123
- * @param array $fs_method Flexible Shipping Method settings.
124
- * @param WC_Order_Item_Shipping $shipping_method Woocommerce shipping method.
125
- * @param array $post_data Post data.
126
- * @param float $package_weight Package weight.
127
- */
128
- private function save_field_data_from_shipping_method( array $field, array $fs_method, $shipping_method, $post_data, $package_weight = 0.0 ) {
129
- $field_id = $field['id'];
130
- $fs_saas_data = $shipping_method->get_meta( '_fs_saas_data' );
131
- if ( ! is_array( $fs_saas_data ) ) {
132
- $fs_saas_data = array();
133
- }
134
- $meta_field_id = '_fs_' . $field_id;
135
- $calculated = false;
136
- if ( isset( $field[ self::FIELD_CALCULATION_METHOD ] ) ) {
137
- if ( 'sum_items_weight' === $field[ self::FIELD_CALCULATION_METHOD ] && abs( 0 - floatval( $package_weight ) ) > self::FLOAT_EPSILON ) {
138
- $this->set_meta( $field_id, $package_weight );
139
- $calculated = true;
140
- }
141
- }
142
- if ( ! $calculated ) {
143
- if ( isset( $fs_method[ $this->get_integration() . '_' . $field_id ] ) ) {
144
- $this->set_meta( $field_id, $fs_method[ $this->get_integration() . '_' . $field_id ] );
145
- }
146
- if ( isset( $fs_saas_data[ $meta_field_id ] ) ) {
147
- $this->set_meta( $field_id, $fs_saas_data[ $meta_field_id ] );
148
- }
149
- if ( isset( $post_data[ $field_id . '_' . $this->shipping_service->get_integration_id() ] ) ) {
150
- $this->set_meta( $field_id, $post_data[ $field_id . '_' . $this->shipping_service->get_integration_id() ] );
151
- }
152
- }
153
- }
154
-
155
- /**
156
- * Save fieldset data from shipping method.
157
- *
158
- * @param array $fieldset Fieldset.
159
- * @param array $fs_method Flexible Shipping method.
160
- * @param WC_Order_Item_Shipping $shipping_method Woocommerce shipping method.
161
- * @param array $post_data Post data.
162
- * @param float $package_weight Package weight.
163
- */
164
- private function save_fieldset_data_from_shipping_method(
165
- array $fieldset,
166
- array $fs_method,
167
- $shipping_method,
168
- array $post_data,
169
- $package_weight
170
- ) {
171
- foreach ( $fieldset['fields'] as $field ) {
172
- $this->save_field_data_from_shipping_method( $field, $fs_method, $shipping_method, $post_data, $package_weight );
173
- }
174
- }
175
-
176
- /**
177
- * Set shop and floe data.
178
- *
179
- * @param WC_Order_Item_Shipping $shipping_method Shipping method.
180
- */
181
- private function set_shop_and_flow_data( $shipping_method ) {
182
- $rate_type = $shipping_method->get_meta( '_fs_rate_type' );
183
- if ( '' === $shipping_method->get_meta( '_fs_rate_type' ) ) {
184
- $rate_type = 'custom';
185
- }
186
- if ( 'live' === $rate_type ) {
187
- $service_type = $shipping_method->get_meta( '_fs_service_type' );
188
- if ( '' !== $service_type ) {
189
- $this->set_meta( self::CHECKOUT_SERVICE_TYPE, $service_type );
190
- }
191
- $service_name = $shipping_method->get_meta( '_fs_service_name' );
192
- if ( '' !== $service_name ) {
193
- $this->set_meta( self::CHECKOUT_SERVICE_NAME, $service_name );
194
- }
195
- }
196
- $this->set_meta( self::RATE_TYPE, $rate_type );
197
-
198
- $fallback_message = $shipping_method->get_meta( '_fs_fallback' );
199
- if ( '' !== $fallback_message ) {
200
- $this->set_meta( self::FALLBACK, '1' );
201
- $this->set_meta( self::FALLBACK_MESSAGE, $fallback_message );
202
- } else {
203
- $this->set_meta( self::FALLBACK, '0' );
204
- $this->set_meta( self::FALLBACK_MESSAGE, '' );
205
- }
206
- }
207
-
208
- /**
209
- * Create shipment on checkout.
210
- *
211
- * @param array $fs_method Flexible Shipping method.
212
- * @param array $package Package.
213
- */
214
- public function checkout( array $fs_method, $package ) {
215
-
216
- $post_data = $_REQUEST;
217
-
218
- $shipping_method = $this->get_meta_shipping_method();
219
-
220
- if ( null !== $shipping_method ) {
221
- $this->set_shop_and_flow_data( $shipping_method );
222
- }
223
-
224
- $package_weight = fs_calculate_package_weight( $package );
225
- if ( abs( 0 - floatval( $package_weight ) ) > self::FLOAT_EPSILON ) {
226
- $this->set_meta( '_package_weight', $package_weight );
227
- }
228
-
229
- $order = $this->get_order();
230
-
231
- try {
232
- $fields = $this->shipping_service->get_fields_for_targets( [ $order->get_shipping_country() ] );
233
- foreach ( $fields as $fieldset ) {
234
- if (
235
- isset( $fieldset['show-in'] ) && in_array( 'metabox', $fieldset['show-in'], true )
236
- || isset( $fieldset['show-in'] ) && in_array( 'checkout', $fieldset['show-in'], true )
237
- ) {
238
- $this->save_fieldset_data_from_shipping_method(
239
- $fieldset,
240
- $fs_method,
241
- $shipping_method,
242
- $post_data,
243
- $package_weight
244
- );
245
- }
246
- }
247
- } catch ( Exception $e ) {
248
- $this->update_status( 'fs-failed' );
249
- $this->set_meta(
250
- self::META_SAAS_MESSAGE,
251
- sprintf(
252
- // Translators: error from checkout.
253
- __( 'There was problems on checkout: %1$s', 'flexible-shipping' ),
254
- $e->getMessage()
255
- )
256
- );
257
- }
258
-
259
- }
260
-
261
- /**
262
- * Get order metabox content.
263
- *
264
- * @return string
265
- */
266
- public function get_order_metabox_content() {
267
- $metabox = new WPDesk_Flexible_Shipping_Shipment_Saas_Metabox( $this, self::$platform_factory );
268
- return $metabox->get_order_metabox_content();
269
- }
270
-
271
- /**
272
- * Display order metabox.
273
- */
274
- public function order_metabox() {
275
- echo $this->get_order_metabox_content();
276
- }
277
-
278
- /**
279
- * Get order metabox title.
280
- *
281
- * @return string
282
- */
283
- public function get_order_metabox_title() {
284
- return $this->get_shipping_service_name();
285
- }
286
-
287
- /**
288
- * Get shipping service name.
289
- *
290
- * @return string
291
- */
292
- public function get_shipping_service_name() {
293
- return $this->shipping_service->get_name();
294
- }
295
-
296
- /**
297
- * Get fields for targets.
298
- *
299
- * @return array
300
- */
301
- public function get_fields_for_targets() {
302
- $order = $this->get_order();
303
- $shipping_country = $order->get_shipping_country();
304
- if ( empty( $shipping_country ) ) {
305
- $default_shipping_country = explode( ':', get_option( 'woocommerce_default_country' ) );
306
- $shipping_country = $default_shipping_country[0];
307
- }
308
- return $this->shipping_service->get_fields_for_targets( [ $shipping_country ] );
309
- }
310
-
311
- /**
312
- * Get platform.
313
- *
314
- * @return \WPDesk\SaasPlatformClient\Platform
315
- */
316
- public function get_platform() {
317
- if ( ! self::$platform_factory instanceof WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory ) {
318
- $this->logger = WPDesk_Flexible_Shipping_Logger_Factory::create_logger();
319
-
320
- $platform_factory = new WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory( $this->logger );
321
- }
322
-
323
- $platform = $platform_factory->get_platform();
324
-
325
- return $platform;
326
- }
327
-
328
- /**
329
- * Send order notes to client?
330
- *
331
- * @return bool
332
- */
333
- public function order_note_send_to_client() {
334
- if ( 'yes' === $this->shipping_service->get_option_from_shipping_method( 'email_add_tracking_number' ) ) {
335
- return true;
336
- }
337
- return false;
338
- }
339
-
340
- /**
341
- * Add order note - shipment created.
342
- */
343
- public function add_order_note_shipment_created() {
344
- $order = $this->get_order();
345
- $order->add_order_note(
346
- sprintf(
347
- // Translators: service name and shipment number.
348
- __( '%1$s Shipment %2$s was created.', 'flexible-shipping' ),
349
- $this->shipping_service->get_name(),
350
- $this->get_tracking_number()
351
- ),
352
- $this->order_note_send_to_client()
353
- );
354
- }
355
-
356
- /**
357
- * Add order note - shipment created.
358
- *
359
- * @param string $tracking_number Tracking number.
360
- */
361
- private function add_order_note_shipment_canceled( $tracking_number ) {
362
- $order = $this->get_order();
363
- $order->add_order_note(
364
- sprintf(
365
- // Translators: service name.
366
- __( '%1$s Shipment %2$s was canceled.', 'flexible-shipping' ),
367
- $this->shipping_service->get_name(),
368
- $tracking_number
369
- ),
370
- $this->order_note_send_to_client()
371
- );
372
- }
373
-
374
- /**
375
- * Cancel shipment on platform.
376
- *
377
- * @throws WPDesk_Flexible_Shipping_Cancel_Shipment_Exception Cancel Shipment Exception.
378
- */
379
- public function cancel_shipment() {
380
- $tracking_number = $this->get_tracking_number();
381
- $platform = $this->get_platform();
382
- $response = $platform->requestPostCancel( $this->get_saas_shipment_id(), $this->shipping_service->get_id() );
383
- if ( $response->isError() ) {
384
- $error_body = $response->getResponseErrorBody();
385
- $message = __( 'UPS! Something is wrong!', 'flexible-shipping' );
386
-
387
- if ( isset( $error_body['detail'] ) ) {
388
- $message = $error_body['detail'];
389
- }
390
- if ( isset( $error_body['message'] ) ) {
391
- $message = $error_body['message'];
392
- }
393
- throw new WPDesk_Flexible_Shipping_Cancel_Shipment_Exception( $message );
394
- }
395
-
396
- $this->set_saas_shipment_id( '' );
397
- $this->delete_meta( self::META_SAAS_MESSAGE );
398
- $this->delete_meta( self::META_SAAS_TRACKING_URL );
399
- $this->delete_meta( self::META_SAAS_TRACKING_ID );
400
- $this->delete_meta( self::META_SAAS_SHIPMENT_COST );
401
- $this->update_status( 'fs-new' );
402
- $this->save();
403
-
404
- $this->add_order_note_shipment_canceled( $tracking_number );
405
-
406
- do_action( 'flexible_shipping_shipment_canceled', $this );
407
- }
408
-
409
- /**
410
- * Send shipment to platform.
411
- *
412
- * @return WPDesk\SaasPlatformClient\Model\Shipment\ShipmentResponse
413
- * @throws WPDesk_Flexible_Shipping_Send_Shipment_Exception Send Shipment Exception.
414
- */
415
- public function send_shipment() {
416
- $send_shipment = new WPDesk_Flexible_Shipping_Shipment_Saas_Send( $this );
417
- return $send_shipment->send();
418
- }
419
-
420
- /**
421
- * Metabox can be saved?
422
- *
423
- * @return bool
424
- */
425
- public function matabox_can_be_saved() {
426
- if ( $this->get_status() === 'fs-new' && $this->get_status() === 'fs-failed' ) {
427
- return false;
428
- }
429
- return true;
430
- }
431
-
432
- /**
433
- * Handle AJAX requests for shipment.
434
- *
435
- * @param string $action Action.
436
- * @param array $data Data.
437
- *
438
- * @return array
439
- *
440
- * @throws WPDesk_Flexible_Shipping_Send_Shipment_Exception Send Shipment Exception.
441
- * @throws RuntimeException Runtime Exception.
442
- */
443
- public function ajax_request( $action, $data ) {
444
- $saas_ajax = new WPDesk_Flexible_Shipping_Shipment_Saas_Ajax( $this, self::$saas_platform_links );
445
- return $saas_ajax->ajax_request( $action, $data );
446
- }
447
-
448
- /**
449
- * Get label URL.
450
- *
451
- * @return null|string
452
- * Returns URL for label
453
- */
454
- public function get_label_url() {
455
- if ( in_array( $this->get_status(), array( 'fs-new', 'fs-failed' ), true ) ) {
456
- return null;
457
- }
458
- $label_url = '?flexible_shipping_get_label=' . $this->get_id() . '&nonce=' . wp_create_nonce( 'flexible_shipping_get_label' );
459
- return site_url( $label_url );
460
- }
461
-
462
- /**
463
- * Get error message.
464
- *
465
- * @return null|string
466
- */
467
- public function get_error_message() {
468
- $saas_message = $this->get_meta( self::META_SAAS_MESSAGE );
469
- if ( ! empty( $saas_message ) ) {
470
- $message_formatter = new WPDesk_Flexible_Shipping_Shipment_Saas_Message_Formatter(
471
- $saas_message,
472
- $this->get_shipping_service_name()
473
- );
474
- return $message_formatter->format_to_html();
475
- }
476
- return '';
477
- }
478
-
479
- /**
480
- * Get tracking number.
481
- *
482
- * @return string
483
- */
484
- public function get_tracking_number() {
485
- return $this->get_meta( self::META_SAAS_TRACKING_ID );
486
- }
487
-
488
- /**
489
- * Set tracking number.
490
- *
491
- * @param string $saas_tracking_id Tracking ID from platform.
492
- */
493
- public function set_tracking_number( $saas_tracking_id ) {
494
- $this->set_meta( self::META_SAAS_TRACKING_ID, $saas_tracking_id );
495
- }
496
-
497
- /**
498
- * Get tracking URL.
499
- *
500
- * @return string
501
- */
502
- public function get_tracking_url() {
503
- return $this->get_meta( self::META_SAAS_TRACKING_URL );
504
- }
505
-
506
- /**
507
- * Set tracking URL.
508
- *
509
- * @param string $saas_tracking_url Tracking URL from platform.
510
- */
511
- public function set_tracking_url( $saas_tracking_url ) {
512
- $this->set_meta( self::META_SAAS_TRACKING_URL, $saas_tracking_url );
513
- }
514
-
515
- /**
516
- * Set shipment cost.
517
- *
518
- * @param \WPDesk\SaasPlatformClient\Model\Shipment\ClientMoney $shipment_cost Shipment cost.
519
- */
520
- public function set_shipment_cost( $shipment_cost ) {
521
- $shipment_cost_array = array(
522
- 'amount' => $shipment_cost->getAmount(),
523
- 'currency' => $shipment_cost->getCurrency(),
524
- );
525
- $this->set_meta( self::META_SAAS_SHIPMENT_COST, $shipment_cost_array );
526
- }
527
-
528
- /**
529
- * Get shipment cost as Money.
530
- *
531
- * @return \Money\Money|null
532
- */
533
- public function get_shipment_cost_as_money() {
534
- $shipment_cost = $this->get_meta( self::META_SAAS_SHIPMENT_COST );
535
- if ( ! empty( $shipment_cost ) && is_array( $shipment_cost ) ) {
536
- return new Money\Money( $shipment_cost['amount'], new \Money\Currency( $shipment_cost['currency'] ) );
537
- }
538
- return null;
539
- }
540
-
541
- /**
542
- * Get shipment cost amount.
543
- */
544
- public function get_shipment_cost_amount() {
545
- $shipment_cost_as_money = $this->get_shipment_cost_as_money();
546
- $money_formatter = new WPDesk_Flexible_Shipping_Money_Formatter( $shipment_cost_as_money );
547
- return $money_formatter->format();
548
- }
549
-
550
- /**
551
- * Get shipment cost currency.
552
- */
553
- public function get_shipment_cost_currency() {
554
- $shipment_cost_as_money = $this->get_shipment_cost_as_money();
555
- if ( ! empty( $shipment_cost_as_money ) ) {
556
- return $shipment_cost_as_money->getCurrency()->getCode();
557
- }
558
- return null;
559
- }
560
-
561
- /**
562
- * Is label avaliable?
563
- *
564
- * @return bool
565
- */
566
- public function label_avaliable() {
567
- if ( in_array( $this->get_status(), array( 'fs-confirmed', 'fs-manifest' ), true ) ) {
568
- return true;
569
- }
570
- return false;
571
- }
572
-
573
- /**
574
- * Prepare label file name.
575
- *
576
- * @param string $extension File extension.
577
- *
578
- * @return string
579
- */
580
- private function prepare_label_file_name( $extension ) {
581
- return sprintf(
582
- 'label_%1$s_%2$s.%3$s',
583
- $this->get_shipping_service_name(),
584
- $this->get_tracking_number(),
585
- $extension
586
- );
587
- }
588
-
589
- /**
590
- * Get label from platform.
591
- *
592
- * @return array
593
- *
594
- * @throws WPDesk_Flexible_Shipping_Get_Label_Exception Label exception.
595
- */
596
- private function get_label_from_platform() {
597
- $platform = $this->get_platform();
598
- $label_response = $platform->requestPostLabel( intval( $this->get_meta( '_saas_shipment_id' ) ), $this->shipping_service->get_id() );
599
- if ( $label_response->isError() ) {
600
- throw new WPDesk_Flexible_Shipping_Get_Label_Exception( $label_response->getResponseCode() . ' - ' . $label_response->getResponseErrorBody()['message'] );
601
- } else {
602
- $label = $label_response->getLabel();
603
- $label_data = array(
604
- 'label_format' => $label->getLabelContentExt(),
605
- 'content' => base64_decode( $label->getLabelContent() ),
606
- 'file_name' => $this->prepare_label_file_name( $label->getLabelContentExt() ),
607
- );
608
- return $label_data;
609
- }
610
- }
611
-
612
- /**
613
- * Get label.
614
- *
615
- * @return array
616
- * @throws WPDesk_Flexible_Shipping_Label_Not_Available_Exception Exception.
617
- */
618
- public function get_label() {
619
- if ( ! $this->label_avaliable() ) {
620
- throw new WPDesk_Flexible_Shipping_Label_Not_Available_Exception( __( 'Label is not avaliable for this shipment.', 'flexible-shipping' ) );
621
- }
622
- return $this->get_label_from_platform();
623
- }
624
-
625
- /**
626
- * Prepare args tracking data.
627
- *
628
- * @return array
629
- */
630
- private function prepare_args_tracking_data() {
631
- return array(
632
- 'shipments' => array(
633
- array(
634
- 'tracking_url' => $this->get_tracking_url(),
635
- 'tracking_number' => $this->get_tracking_number(),
636
- ),
637
- ),
638
- );
639
- }
640
-
641
- /**
642
- * Display checkout fields.
643
- *
644
- * @param string $folder Template folder.
645
- */
646
- private function maybe_display_checkout_fields( $folder ) {
647
- $checkout_fields = new WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Shipment(
648
- $this->shipping_service,
649
- $this->shipping_service->get_collection_points(),
650
- self::$renderer,
651
- $folder
652
- );
653
- $checkout_fields->maybe_display_fields_for_shipment( $this );
654
- }
655
-
656
- /**
657
- * Echo after order table.
658
- */
659
- public function get_after_order_table() {
660
- if ( $this->label_avaliable() ) {
661
- echo self::$renderer->render( 'myaccount/after_order_table', $this->prepare_args_tracking_data() ); // phpcs:ignore
662
- }
663
- $this->maybe_display_checkout_fields( 'myaccount' );
664
- }
665
-
666
- /**
667
- * Echo email after order table.
668
- */
669
- public function get_email_after_order_table() {
670
- if ( 'yes' === $this->shipping_service->get_option_from_shipping_method( 'email_add_tracking_number' )
671
- && $this->label_avaliable()
672
- ) {
673
- echo self::$renderer->render( 'email/after_order_table', $this->prepare_args_tracking_data() ); // phpcs:ignore
674
- }
675
- $this->maybe_display_checkout_fields( 'email' );
676
- }
677
-
678
- /**
679
- * Get SaaS shipment ID (from platform).
680
- *
681
- * @return array|null|string
682
- */
683
- public function get_saas_shipment_id() {
684
- return $this->get_meta( self::META_SAAS_SHIPMENT_ID );
685
- }
686
-
687
- /**
688
- * Set SaaS shipment ID.
689
- *
690
- * @param string $shipment_id Shipment ID.
691
- */
692
- public function set_saas_shipment_id( $shipment_id ) {
693
- $this->set_meta( self::META_SAAS_SHIPMENT_ID, $shipment_id );
694
- }
695
-
696
- /**
697
- * Get shipping service.
698
- *
699
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service
700
- */
701
- public function get_shipping_service() {
702
- return $this->shipping_service;
703
- }
704
-
705
- /**
706
- * Creates shipment.
707
- *
708
- * @throws Exception Exception.
709
- */
710
- public function api_create() {
711
- $this->send_shipment();
712
- }
713
-
714
- /**
715
- * Get shipping method.
716
- *
717
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
718
- */
719
- public function get_shipping_method() {
720
- return $this->shipping_method;
721
- }
722
-
723
- /**
724
- * Was fallback?
725
- *
726
- * @return bool
727
- */
728
- public function was_fallback() {
729
- return '1' === $this->get_meta( self::FALLBACK, '0' );
730
- }
731
-
732
- /**
733
- * Get fallback message.
734
- *
735
- * @return string
736
- */
737
- public function get_fallback_message() {
738
- return $this->get_meta( self::FALLBACK_MESSAGE, '' );
739
- }
740
-
741
- /**
742
- * Get rate type.
743
- *
744
- * @return string
745
- */
746
- public function get_rate_type() {
747
- return $this->get_meta( self::RATE_TYPE, self::NOT_SET );
748
- }
749
-
750
- /**
751
- * Get checkout service type.
752
- *
753
- * @return string
754
- */
755
- public function get_checkout_service_type() {
756
- return $this->get_meta( self::CHECKOUT_SERVICE_TYPE, self::NOT_SET );
757
- }
758
-
759
- /**
760
- * Get checkout service name.
761
- *
762
- * @return string
763
- */
764
- public function get_checkout_service_name() {
765
- return $this->get_meta( self::CHECKOUT_SERVICE_NAME, self::NOT_SET );
766
- }
767
-
768
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-actions.php DELETED
@@ -1,32 +0,0 @@
1
- <?php if ( !$disabled ) : ?>
2
- <p>
3
- <button data-id="<?php echo $id; ?>" class="button button-primary fs-saas-button fs-saas-button-create button-shipping"><?php _e( 'Create', 'flexible-shipping' ); ?></button>
4
- <button data-id="<?php echo $id; ?>" class="button fs-saas-button fs-saas-button-save button-shipping"><?php _e( 'Save', 'flexible-shipping' ); ?></button>
5
- <span class="spinner fs-saas-spinner shipping-spinner"></span>
6
- </p>
7
- <?php else : ?>
8
- <p>
9
- <p>
10
- <?php if ( $supports_label ) : ?>
11
- <a data-qa-id="get-label" target="_blank" href='<?php echo $label_url; ?>' data-id="<?php echo $id; ?>" class="button button-primary fs-saas-button fs-saas-button-get-label"><?php _e( 'Get Label', 'flexible-shipping' ); ?></a>
12
- <?php endif; ?>
13
- <?php if ( $supports_cancel ) : ?>
14
- <span class="spinner fs-saas-spinner shipping-spinner"></span>
15
- <a data-qa-id="cancel-created" data-id="<?php echo $id; ?>" class="fs-saas-button fs-saas-button-cancel-created button-shipping"><?php _e( 'Cancel', 'flexible-shipping' ); ?></a>
16
- <?php endif; ?>
17
- </p>
18
- </p>
19
- <?php endif; ?>
20
- <?php if ( ! empty( $tracking_url ) ) : ?>
21
- <p class="fs-saas-shipment">
22
- <span><?php _e( 'Track:', 'flexible-shipping' ); ?></span> <a title="<?php _e( 'Click to track shipment', 'flexible-shipping' ); ?>" target="_blank" href="<?php echo $tracking_url; ?>"><?php echo $tracking_number; ?></a>
23
- </p>
24
- <?php endif; ?>
25
- <?php if ( $show_shipping_charges ) : ?>
26
- <p class="fs-saas-charges">
27
- <?php echo sprintf( __( '%1$sShipping charges:%2$s %3$s', 'flexible-shipping' ), '<span>', '</span>', $shipment_charges ); ?>
28
- </p>
29
- <?php endif; ?>
30
- <p class="fs-saas-status fs-saas-status-<?php echo $status; ?>">
31
- <?php echo sprintf( __( '%1$sShipment status:%2$s %3$s', 'flexible-shipping' ), '<span>', '</span>', $status_text ); ?>
32
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-connection-error.php DELETED
@@ -1,3 +0,0 @@
1
- <p class="connection-error">
2
- <?php echo $error_message; ?>
3
- </p>
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-fieldset-replicable.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- include 'order-metabox-fieldset.php';
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-fieldset.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- /**
3
- * Display fieldset in metabox.
4
- *
5
- * @var array $fields
6
- * @var array $values
7
- * @var bool $disabled
8
- */
9
- ?>
10
- <?php foreach ( $fields as $field ) : ?>
11
- <?php
12
- if ( ! empty( $field['id'] ) ) {
13
- $key = $field['id'];
14
- $args = array(
15
- 'label' => do_shortcode( $field['name'] ),
16
- 'id' => $key . '_' . $id,
17
- 'type' => $field['type'],
18
- );
19
- if ( 'select' === $field['type'] ) {
20
- $args['options'] = array();
21
- foreach ( $field['select-additional']['options'] as $option ) {
22
- $args['options'][ $option['value'] ] = $option['text'];
23
- }
24
- }
25
- if ( 'parcel_collection_points' === $field['type'] ) {
26
- $args['options'] = $field['access_points_options'];
27
- $args['class'] = 'fs_select2';
28
- }
29
- if ( isset( $values[ $key ] ) ) {
30
- $args['value'] = $values[ $key ][0];
31
- }
32
- if ( $disabled ) {
33
- $args['custom_attributes'] = array( 'disabled' => 'disabled' );
34
- }
35
- if ( isset( $field['desc'] ) ) {
36
- $args['description'] = do_shortcode( $field['desc'] );
37
- }
38
- if ( isset( $field['tooltip'] ) && is_array( $field['tooltip'] ) ) {
39
- $args['description'] = do_shortcode( $field['tooltip']['description'] );
40
- $args['desc_tip'] = true;
41
- }
42
- }
43
- ?>
44
- <div class="<?php echo esc_attr( $key ); ?>">
45
- <?php if ( 'checkbox' === $field['type'] ) : ?>
46
- <?php $args['label'] .= ' '; ?>
47
- <?php woocommerce_wp_checkbox( $args ); ?>
48
- <?php elseif ( 'header' === $field['type'] ) : ?>
49
- <h4><?php echo $field['name']; /* phpcs:ignore */ ?></h4>
50
- <?php elseif ( 'select' === $field['type'] || 'parcel_collection_points' === $field['type'] ) : ?>
51
- <?php woocommerce_wp_select( $args ); ?>
52
- <?php else : ?>
53
- <?php woocommerce_wp_text_input( $args ); ?>
54
- <?php endif; ?>
55
- <?php if ( isset( $field['visible-when'] ) ) : ?>
56
- <script type="text/javascript">
57
- new ApConditionalLogic( '<?php echo esc_attr( $field['id'] ); ?>', <?php echo esc_attr( $id ); ?>, <?php echo wp_json_encode( $field['visible-when'] ); ?> );
58
- </script>
59
- <?php endif; ?>
60
- </div>
61
- <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-shipment-attachments.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- /**
3
- * @package Flexible Shipping
4
- * @var string $type_field_id Type field ID.
5
- * @var string $attachment_field_id Attachment field ID.
6
- * @var string $field_label Field label.
7
- * @var array $attachments Documents.
8
- * @var array $attachment_types Allowed document types.
9
- * @var string $shipment_id Shipment ID.
10
- */
11
-
12
- $type_value = '';
13
- $attachment_id_value = '';
14
- ?>
15
- <?php $show_send_button = false; ?>
16
- <div class="flexible-shipping-shipment-attachments">
17
- <hr />
18
- <h4><?php echo $field_label; ?></h4>
19
- <div class="flexible-shipping-shipment-attachments-content">
20
- <table>
21
- <thead>
22
- <tr>
23
- <td><?php _e( 'Type', 'flexible-shipping' ); ?></td>
24
- <td><?php _e( 'Filename', 'flexible-shipping' ); ?></td>
25
- <td><?php _e( 'Sent', 'flexible-shipping' ); ?></td>
26
- <td></td>
27
- </tr>
28
- </thead>
29
- <tbody>
30
- <?php foreach ( $attachments as $attachment ) : ?>
31
- <?php $show_send_button = true; ?>
32
- <?php $type_value = $attachment['type']; ?>
33
- <?php $attachment_id_value = $attachment['attachment_id']; ?>
34
- <?php $saas_attachment_id_value = $attachment['saas_attachment_id']; ?>
35
- <?php $attachment_url = ''; ?>
36
- <?php $filename_value = $attachment['filename']; ?>
37
- <?php $sent_value = empty( $attachment['sent'] ) ? __( 'No', 'flexible-shipping' ) : __( 'Yes', 'flexible-shipping' ); ?>
38
- <?php include 'order-metabox-single-attachment.php'; ?>
39
- <?php endforeach; ?>
40
- </tbody>
41
- </table>
42
- <?php if ( $show_send_button ) : ?>
43
- <button
44
- data-shipment_id="<?php echo esc_attr( $shipment_id ); ?>"
45
- class="fs-saas-button-send-attachments button"
46
- ><?php _e( 'Send', 'flexible-shipping' ); ?>
47
- </button>
48
- <?php endif; ?>
49
- </div><br />
50
- <?php
51
- $args = array(
52
- 'label' => '',
53
- 'id' => $type_field_id,
54
- 'type' => 'select',
55
- 'class' => 'flexible-shipping-shipment-attachments-type',
56
- 'options' => $attachment_types,
57
- 'value' => $type_value,
58
- );
59
- woocommerce_wp_select( $args );
60
-
61
- $args = array(
62
- 'id' => $attachment_field_id,
63
- 'class' => 'flexible-shipping-shipment-attachments-attachment-id',
64
- 'type' => 'hidden',
65
- 'value' => $attachment_id_value,
66
- );
67
- woocommerce_wp_hidden_input( $args );
68
- ?>
69
- <button
70
- data-shipment_id="<?php echo esc_attr( $shipment_id ); ?>"
71
- class="fs-saas-button-add-attachment button"
72
- ><?php _e( 'Add', 'flexible-shipping' ); ?>
73
- </button>
74
- <div class="flexible_shipping_shipment_attachment_message" style="display:none;"></div>
75
- <hr />
76
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas-fs-integration/saas/views/order-metabox-single-attachment.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * @package Flexible Shipping
4
- * @var array $attachment_types Allowed document types.
5
- * @var string $type_value Type value.
6
- *
7
- * @var string $attachment_url Attachment URL.
8
- *
9
- * @var string $filename_value Attachment filename.
10
- *
11
- * @var string $shipment_id Shipment ID.
12
- *
13
- * @var string $saas_attachment_id_value SaaS attachment ID.
14
- */
15
- ?>
16
- <div class="flexible-shipping-shipment-attachments-single-content">
17
- <tr>
18
- <td><?php echo $attachment_types[ $type_value ]; ?>:</td>
19
- <td>
20
- <!--
21
- <a href="<?php echo $attachment_url; ?>" target="_blank"><?php echo $filename_value; ?></a>
22
- -->
23
- <?php echo $filename_value; ?>
24
- </td>
25
- <td>
26
- <?php echo $sent_value; ?>
27
- </td>
28
- <td>
29
- <a
30
- class="fs-saas-button-delete-attachment"
31
- href="#"
32
- data-saas_attachment_id="<?php echo esc_attr( $saas_attachment_id_value ); ?>"
33
- data-shipment_id="<?php echo esc_attr( $shipment_id ); ?>"
34
- >
35
- <?php _e( 'Delete', 'flexible-shipping' ); ?>
36
- </a>
37
- </td>
38
- </tr>
39
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-field-collection-points.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Displays collection points in checkout.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Collection_Points_Checkout_Field
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Checkout_Field_Collection_Points {
9
-
10
- const FLEXIBLE_SHIPPING_COLLECTION_POINT = 'flexible_shipping_collection_point';
11
-
12
- /**
13
- * Shipping service.
14
- *
15
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
16
- */
17
- private $shipping_service;
18
-
19
- /**
20
- * Service collection points.
21
- *
22
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
23
- */
24
- private $service_collection_points;
25
-
26
- /**
27
- * Renderer.
28
- *
29
- * @var WPDesk\View\Renderer\Renderer;
30
- */
31
- private $renderer;
32
-
33
- /**
34
- * Request data.
35
- *
36
- * @var WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data
37
- */
38
- private $request_data;
39
-
40
- /**
41
- * Field.
42
- *
43
- * @var array
44
- */
45
- private $field;
46
-
47
- /**
48
- * WPDesk_Flexible_Shipping_SaaS_Collection_Points_Checkout_Field constructor.
49
- *
50
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
51
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points Service collection points.
52
- * @param \WPDesk\View\Renderer\Renderer $renderer Renderer.
53
- * @param null|WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data Request data.
54
- * @param array $field Field.
55
- */
56
- public function __construct(
57
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service,
58
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points,
59
- WPDesk\View\Renderer\Renderer $renderer,
60
- $request_data,
61
- $field
62
- ) {
63
- $this->shipping_service = $shipping_service;
64
- $this->service_collection_points = $service_collection_points;
65
- $this->renderer = $renderer;
66
- $this->request_data = $request_data;
67
- $this->field = $field;
68
- }
69
-
70
-
71
- /**
72
- * Get request data.
73
- *
74
- * @return array
75
- */
76
- private function get_post_data_from_request() {
77
- if ( ! empty( $_REQUEST['post_data'] ) ) {
78
- parse_str( $_REQUEST['post_data'], $post_data );
79
- } else {
80
- $post_data = array();
81
- }
82
- return $post_data;
83
- }
84
-
85
- /**
86
- * Prepare collection points options.
87
- *
88
- * @return array
89
- */
90
- private function prepare_collection_points_options() {
91
- $address = new \WPDesk\SaasPlatformClient\Model\Shipment\Address();
92
- $address->setAddressLine1( $this->request_data->get_shipping_address_1() );
93
- $address->setAddressLine2( $this->request_data->get_shipping_address_2() );
94
- $address->setPostalCode( $this->request_data->get_shipping_postcode() );
95
- $address->setCity( $this->request_data->get_shipping_city() );
96
- $address->setStateCode( $this->request_data->get_shipping_state() );
97
- $address->setCountryCode( $this->request_data->get_shipping_country() );
98
-
99
- return $this->service_collection_points->prepare_collection_points_options_for_address( $address );
100
- }
101
-
102
- /**
103
- * Display collection point on checkout.
104
- */
105
- public function display_collection_point_field_on_checkout() {
106
- $collection_points_options = $this->prepare_collection_points_options();
107
- $selected_collection_point = '';
108
- $post_data = $this->get_post_data_from_request();
109
- $field_name = $this->field['id'] . '_' . $this->shipping_service->get_integration_id();
110
- $field_label = $this->field['name'];
111
- $field_description = empty( $this->field['description'] ) ? '' : $this->field['description'];
112
- if ( isset( $post_data[ $field_name ] ) && array_key_exists( $post_data[ $field_name ], $collection_points_options ) ) {
113
- $selected_collection_point = $post_data[ $field_name ];
114
- }
115
- echo $this->renderer->render( // phpcs:ignore
116
- 'checkout/shipping-method-after',
117
- array(
118
- 'select_options' => $collection_points_options, // phpcs:ignore
119
- 'selected_collection_point' => $selected_collection_point, // phpcs:ignore
120
- 'collection_point_label' => $field_label, // phpcs:ignore
121
- 'collection_point_description' => $field_description, // phpcs:ignore
122
- 'collection_point_field_name' => $field_name, // phpcs:ignore
123
- 'collection_point_map_selector_label' => __( 'Select point from map', 'flexible-shipping' ), // phpcs:ignore
124
- 'collection_point_service_id' => strval( $this->shipping_service->get_id() ), // phpcs:ignore
125
- )
126
- );
127
- }
128
-
129
- /**
130
- * Display collection point for shipment.
131
- *
132
- * @param string $folder Template folder.
133
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
134
- */
135
- public function display_collection_point_field_for_shipment( $folder, $shipment ) {
136
- $field_label = $this->field['name'];
137
- try {
138
- $collection_point_response = $this->service_collection_points->get_collection_point( $shipment->get_meta( $this->field['id'] ) );
139
- $field_value = $this->service_collection_points->format_single_point_description_from_response( $collection_point_response );
140
- } catch ( Exception $e ) {
141
- $field_value = $e->getMessage();
142
- }
143
- echo $this->renderer->render( // phpcs:ignore
144
- $folder . '/after_order_table_checkout_field',
145
- array(
146
- 'field_label' => $field_label, // phpcs:ignore
147
- 'field_value' => $field_value, // phpcs:ignore
148
- )
149
- );
150
-
151
- }
152
-
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-checkout.php DELETED
@@ -1,166 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Displays additional shipping checkout fields on checkout.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout implements \WPDesk\PluginBuilder\Plugin\Hookable {
9
-
10
- /**
11
- * Shipping service.
12
- *
13
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
14
- */
15
- private $shipping_service;
16
-
17
- /**
18
- * Service collection points.
19
- *
20
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
21
- */
22
- private $service_collection_points;
23
-
24
- /**
25
- * Renderer.
26
- *
27
- * @var WPDesk\View\Renderer\Renderer;
28
- */
29
- private $renderer;
30
-
31
- /**
32
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout constructor.
33
- *
34
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
35
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points Service collection points.
36
- * @param \WPDesk\View\Renderer\Renderer $renderer Renderer.
37
- */
38
- public function __construct(
39
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service,
40
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points,
41
- WPDesk\View\Renderer\Renderer $renderer
42
- ) {
43
- $this->shipping_service = $shipping_service;
44
- $this->service_collection_points = $service_collection_points;
45
- $this->renderer = $renderer;
46
- }
47
-
48
- /**
49
- * Hooks.
50
- */
51
- public function hooks() {
52
- add_action( 'woocommerce_review_order_after_shipping', array( $this, 'maybe_display_fields_on_checkout_page' ) );
53
- }
54
-
55
- /**
56
- * Get Flexible shipping method from rate meta.
57
- *
58
- * @param array $shipping_rate_meta Shipping rate meta.
59
- * @return array
60
- */
61
- private function get_flexible_shipping_method_from_rate_meta( array $shipping_rate_meta ) {
62
- $fs_method = array();
63
- if ( isset( $shipping_rate_meta['_fs_method'] ) ) {
64
- $fs_method = $shipping_rate_meta['_fs_method'];
65
- }
66
- return $fs_method;
67
- }
68
-
69
- /**
70
- * Get method integration from flexible shipping method.
71
- *
72
- * @param array $fs_method Flexible shipping method.
73
- * @return string
74
- */
75
- private function get_method_integration_from_fs_method( array $fs_method ) {
76
- $method_integration = '';
77
- if ( isset( $fs_method['method_integration'] ) ) {
78
- $method_integration = $fs_method['method_integration'];
79
- }
80
- return $method_integration;
81
- }
82
-
83
- /**
84
- * Display access point.
85
- *
86
- * @param WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data Request data.
87
- * @param array $field Field.
88
- */
89
- private function display_access_point( WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data, $field ) {
90
- $access_point = new WPDesk_Flexible_Shipping_SaaS_Checkout_Field_Collection_Points(
91
- $this->shipping_service,
92
- $this->service_collection_points,
93
- $this->renderer,
94
- $request_data,
95
- $field
96
- );
97
- $access_point->display_collection_point_field_on_checkout();
98
- }
99
-
100
- /**
101
- * Maybe display parcel collection points field for shipping method.
102
- *
103
- * @param array $field Field.
104
- * @param WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data Request data.
105
- * @param WC_Shipping_Rate $cart_shipping_rate Shipping method.
106
- */
107
- public function maybe_display_parcel_collection_points_field_for_shipping_method(
108
- array $field,
109
- WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data,
110
- WC_Shipping_Rate $cart_shipping_rate
111
- ) {
112
- $shipping_rate_meta = $cart_shipping_rate->get_meta_data();
113
- $fs_method = $this->get_flexible_shipping_method_from_rate_meta( $shipping_rate_meta );
114
- if ( $this->shipping_service->get_integration_id() === $this->get_method_integration_from_fs_method( $fs_method ) ) {
115
- $visible_when = WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout::create_for_field( $field, $cart_shipping_rate );
116
- if ( $visible_when->is_visible() ) {
117
- $this->display_access_point( $request_data, $field );
118
- }
119
- }
120
- }
121
-
122
- /**
123
- * Maybe display parcel collection points field.
124
- *
125
- * @param array $field Field.
126
- * @param WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data Request data.
127
- */
128
- private function maybe_display_parcel_collection_points_field( array $field, WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data ) {
129
- $cart_shipping_methods = WC()->cart->calculate_shipping();
130
- foreach ( $cart_shipping_methods as $cart_shipping_rate ) {
131
- $this->maybe_display_parcel_collection_points_field_for_shipping_method( $field, $request_data, $cart_shipping_rate );
132
- }
133
- }
134
-
135
- /**
136
- * Maybe display fields from fieldset.
137
- *
138
- * @param array $fieldset Fieldset.
139
- * @param WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data Request data.
140
- */
141
- private function maybe_display_fields_from_fieldset( array $fieldset, WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data $request_data ) {
142
- if ( in_array( 'checkout', $fieldset['show-in'], true ) ) {
143
- foreach ( $fieldset['fields'] as $field ) {
144
- if ( 'parcel_collection_points' === $field['type'] ) {
145
- $this->maybe_display_parcel_collection_points_field( $field, $request_data );
146
- }
147
- }
148
- }
149
- }
150
-
151
- /**
152
- * Maybe display fields on checkout page.
153
- */
154
- public function maybe_display_fields_on_checkout_page() {
155
- $request_data = new WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data( $_REQUEST );
156
- try {
157
- $request_fields = $this->shipping_service->get_fields_for_targets( [ $request_data->get_shipping_country() ] );
158
- foreach ( $request_fields as $fieldset ) {
159
- $this->maybe_display_fields_from_fieldset( $fieldset, $request_data );
160
- }
161
- } catch ( WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found $e ) {
162
- null;
163
- }
164
- }
165
-
166
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-checkout-fields-shipment.php DELETED
@@ -1,123 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Displays additional shipping checkout fields for shipment.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Shipment
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Shipment {
9
-
10
- /**
11
- * Shipping service.
12
- *
13
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
14
- */
15
- private $shipping_service;
16
-
17
- /**
18
- * Service collection points.
19
- *
20
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
21
- */
22
- private $service_collection_points;
23
-
24
- /**
25
- * Renderer.
26
- *
27
- * @var WPDesk\View\Renderer\Renderer;
28
- */
29
- private $renderer;
30
-
31
- /**
32
- * Template folder.
33
- *
34
- * @var string;
35
- */
36
- private $folder;
37
-
38
- /**
39
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout constructor.
40
- *
41
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
42
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points Service collection points.
43
- * @param \WPDesk\View\Renderer\Renderer $renderer Renderer.
44
- * @param string $folder Template folder.
45
- */
46
- public function __construct(
47
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service,
48
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points,
49
- WPDesk\View\Renderer\Renderer $renderer,
50
- $folder
51
- ) {
52
- $this->shipping_service = $shipping_service;
53
- $this->service_collection_points = $service_collection_points;
54
- $this->renderer = $renderer;
55
- $this->folder = $folder;
56
- }
57
-
58
- /**
59
- * Display access point.
60
- *
61
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
62
- * @param array $field Field.
63
- */
64
- private function display_access_point( WPDesk_Flexible_Shipping_Shipment_Saas $shipment, $field ) {
65
- $access_point = new WPDesk_Flexible_Shipping_SaaS_Checkout_Field_Collection_Points(
66
- $this->shipping_service,
67
- $this->service_collection_points,
68
- $this->renderer,
69
- null,
70
- $field
71
- );
72
- $access_point->display_collection_point_field_for_shipment( $this->folder, $shipment );
73
- }
74
-
75
- /**
76
- * Maybe display parcel collection points field.
77
- *
78
- * @param array $field Field.
79
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
80
- */
81
- private function maybe_display_parcel_collection_points_field( array $field, WPDesk_Flexible_Shipping_Shipment_Saas $shipment ) {
82
- $visible_when = WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment::create_for_field( $field, $shipment );
83
- if ( $visible_when->is_visible() ) {
84
- $this->display_access_point( $shipment, $field );
85
- }
86
- }
87
-
88
- /**
89
- * Maybe display fields from fieldset for shipment.
90
- *
91
- * @param array $fieldset Fieldset.
92
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
93
- */
94
- private function maybe_display_fields_from_fieldset_for_shipment(
95
- array $fieldset,
96
- WPDesk_Flexible_Shipping_Shipment_Saas $shipment
97
- ) {
98
- if ( in_array( 'checkout', $fieldset['show-in'], true ) ) {
99
- foreach ( $fieldset['fields'] as $field ) {
100
- if ( 'parcel_collection_points' === $field['type'] ) {
101
- $this->maybe_display_parcel_collection_points_field( $field, $shipment );
102
- }
103
- }
104
- }
105
- }
106
-
107
- /**
108
- * Maybe display fields for shipment.
109
- *
110
- * @param WPDesk_Flexible_Shipping_Shipment_Saas $shipment Shipment.
111
- */
112
- public function maybe_display_fields_for_shipment( WPDesk_Flexible_Shipping_Shipment_Saas $shipment ) {
113
- try {
114
- $request_fields = $this->shipping_service->get_fields_for_targets( [ $shipment->get_order()->get_shipping_country() ] );
115
- foreach ( $request_fields as $fieldset ) {
116
- $this->maybe_display_fields_from_fieldset_for_shipment( $fieldset, $shipment );
117
- }
118
- } catch ( WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found $e ) {
119
- null;
120
- }
121
- }
122
-
123
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-checkout.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles conditional logic in checkout.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout extends WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When {
9
-
10
- /**
11
- * Cart shipping rate.
12
- *
13
- * @var array
14
- */
15
- private $cart_shipping_rate;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Field_Visible_When constructor.
19
- *
20
- * @param array $visible_when_conditions Conditions.
21
- * @param WC_Shipping_Rate $cart_shipping_rate Cart shipping rate.
22
- */
23
- public function __construct( array $visible_when_conditions, $cart_shipping_rate ) {
24
- parent::__construct( $visible_when_conditions );
25
- $this->cart_shipping_rate = $cart_shipping_rate;
26
- }
27
-
28
- /**
29
- * Create for field.
30
- *
31
- * @param array $field Field.
32
- * @param WC_Shipping_Rate $cart_shipping_rate Cart shipping rate.
33
- *
34
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Checkout
35
- */
36
- public static function create_for_field( array $field, WC_Shipping_Rate $cart_shipping_rate ) {
37
- $visible_when_conditions = array();
38
- if ( isset( $field['visible-when'] ) ) {
39
- $visible_when_conditions = $field['visible-when'];
40
- }
41
- return new self( $visible_when_conditions, $cart_shipping_rate );
42
- }
43
-
44
- /**
45
- * Get service type from shipping rate.
46
- *
47
- * @return string
48
- */
49
- private function get_service_type_from_cart_shipping_rate() {
50
- $meta_data = $this->cart_shipping_rate->get_meta_data();
51
- $fs_saas_data = array();
52
- if ( isset( $meta_data['_fs_saas_data'] ) ) {
53
- $fs_saas_data = $meta_data['_fs_saas_data'];
54
- }
55
- $service_type = '';
56
- if ( isset( $fs_saas_data['_fs_service_type'] ) ) {
57
- $service_type = $fs_saas_data['_fs_service_type'];
58
- }
59
- return $service_type;
60
- }
61
-
62
- /**
63
- * Get service type.
64
- *
65
- * @return string
66
- */
67
- protected function get_service_type() {
68
- return $this->get_service_type_from_cart_shipping_rate();
69
- }
70
-
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when-shipment.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles conditional logic for shipment.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Shipment_Field_Visible_When
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment extends WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When {
9
-
10
- /**
11
- * Shipment.
12
- *
13
- * @var WPDesk_Flexible_Shipping_Shipment
14
- */
15
- private $shipment;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Shipment_Field_Visible_When constructor.
19
- *
20
- * @param array $visible_when_conditions Conditions.
21
- * @param WPDesk_Flexible_Shipping_Shipment $shipment Shipment.
22
- */
23
- public function __construct( array $visible_when_conditions, WPDesk_Flexible_Shipping_Shipment $shipment ) {
24
- parent::__construct( $visible_when_conditions );
25
- $this->shipment = $shipment;
26
- }
27
-
28
- /**
29
- * Create for field.
30
- *
31
- * @param array $field Field.
32
- * @param WPDesk_Flexible_Shipping_Shipment $shipment Shipment.
33
- *
34
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When_Shipment
35
- */
36
- public static function create_for_field( array $field, WPDesk_Flexible_Shipping_Shipment $shipment ) {
37
- $visible_when_conditions = array();
38
- if ( isset( $field['visible-when'] ) ) {
39
- $visible_when_conditions = $field['visible-when'];
40
- }
41
- return new self( $visible_when_conditions, $shipment );
42
- }
43
-
44
- /**
45
- * Get service type from shipping rate.
46
- *
47
- * @return string
48
- */
49
- private function get_service_type_from_shipment() {
50
- $service_type = $this->shipment->get_meta( 'service_type', '' );
51
- return $service_type;
52
- }
53
-
54
- /**
55
- * Get service type.
56
- *
57
- * @return string
58
- */
59
- protected function get_service_type() {
60
- return $this->get_service_type_from_shipment();
61
- }
62
-
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout-fields/class-saas-field-visible-when.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles conditional logic.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When
7
- */
8
- abstract class WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When {
9
-
10
- /**
11
- * Conditions.
12
- *
13
- * @var array
14
- */
15
- private $visible_when_conditions;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Field_Visible_When constructor.
19
- *
20
- * @param array $visible_when_conditions Conditions.
21
- */
22
- public function __construct( array $visible_when_conditions ) {
23
- $this->visible_when_conditions = $visible_when_conditions;
24
- }
25
-
26
- /**
27
- * Get service type.
28
- *
29
- * @return string
30
- */
31
- abstract protected function get_service_type();
32
-
33
- /**
34
- * Is condition meet?
35
- *
36
- * @param array $condition Condition.
37
- *
38
- * @return bool
39
- */
40
- private function is_condition_meet( array $condition ) {
41
- $is_condition_meet = false;
42
-
43
- $field = $condition['field'];
44
- $cond = $condition['cond'];
45
- $values = $condition['values'];
46
-
47
- $field_value = '';
48
- if ( 'service_type' === $field ) {
49
- $field_value = $this->get_service_type();
50
- }
51
- if ( 'in' === $cond ) {
52
- $is_condition_meet = in_array( $field_value, $values, true );
53
- }
54
- return $is_condition_meet;
55
- }
56
-
57
- /**
58
- * Is visible?
59
- *
60
- * @return bool
61
- */
62
- public function is_visible() {
63
- $is_visible = true;
64
- foreach ( $this->visible_when_conditions as $condition ) {
65
- $is_visible = $is_visible && $this->is_condition_meet( $condition );
66
- }
67
- return $is_visible;
68
- }
69
-
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/checkout/class-checkout-ajax-request-data.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles woocommerce AJAX request data.
5
- *
6
- * Class WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data
7
- */
8
- class WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data {
9
-
10
- /**
11
- * POST data.
12
- *
13
- * @var array
14
- */
15
- protected $post_data = array();
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data constructor.
19
- *
20
- * @param array $request Request array.
21
- */
22
- public function __construct( array $request ) {
23
- if ( ! empty( $request['post_data'] ) ) {
24
- parse_str( $request['post_data'], $this->post_data );
25
- }
26
- }
27
-
28
- /**
29
- * Get data by name;
30
- *
31
- * @param string $name Name.
32
- *
33
- * @return string|null
34
- */
35
- public function get_data_by_name( $name ) {
36
- return isset( $this->post_data[ $name ] ) ? $this->post_data[ $name ] : null;
37
- }
38
-
39
- /**
40
- * Ship to difrrent address?
41
- *
42
- * @return bool
43
- */
44
- private function ship_to_different_address() {
45
- $ship_to_different_address = $this->get_data_by_name( 'ship_to_different_address' );
46
- return isset( $ship_to_different_address ) && '1' === $ship_to_different_address;
47
- }
48
-
49
- /**
50
- * Get shipping field value.
51
- *
52
- * @param string $field_name Field name.
53
- *
54
- * @return string
55
- */
56
- private function get_shipping_field_value( $field_name ) {
57
- if ( $this->ship_to_different_address() ) {
58
- $field_value = $this->get_data_by_name( 'shipping_' . $field_name );
59
- } else {
60
- $field_value = $this->get_data_by_name( 'billing_' . $field_name );
61
- }
62
- return is_null( $field_value ) ? '' : $field_value;
63
- }
64
-
65
- /**
66
- * Get shipping address_1.
67
- *
68
- * @return string
69
- */
70
- public function get_shipping_address_1() {
71
- return $this->get_shipping_field_value( 'address_1' );
72
- }
73
-
74
- /**
75
- * Get shipping address_2.
76
- *
77
- * @return string
78
- */
79
- public function get_shipping_address_2() {
80
- return $this->get_shipping_field_value( 'address_2' );
81
- }
82
-
83
- /**
84
- * Get shipping postcode.
85
- *
86
- * @return string
87
- */
88
- public function get_shipping_postcode() {
89
- return $this->get_shipping_field_value( 'postcode' );
90
- }
91
-
92
- /**
93
- * Get shipping city.
94
- *
95
- * @return string
96
- */
97
- public function get_shipping_city() {
98
- return $this->get_shipping_field_value( 'city' );
99
- }
100
-
101
- /**
102
- * Get shipping state.
103
- *
104
- * @return string
105
- */
106
- public function get_shipping_state() {
107
- return $this->get_shipping_field_value( 'state' );
108
- }
109
-
110
- /**
111
- * Get shipping country.
112
- *
113
- * @return string
114
- */
115
- public function get_shipping_country() {
116
- return $this->get_shipping_field_value( 'country' );
117
- }
118
-
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-money-formatter.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Money_Formatter
5
- */
6
- class WPDesk_Flexible_Shipping_Money_Formatter {
7
-
8
- /**
9
- * Money.
10
- *
11
- * @var \Money\Money
12
- */
13
- private $money;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_Money_Formatter constructor.
17
- *
18
- * @param \Money\Money $money Money.
19
- */
20
- public function __construct( Money\Money $money ) {
21
- $this->money = $money;
22
- }
23
-
24
- /**
25
- * Format as money string.
26
- *
27
- * @return null|string
28
- */
29
- public function format() {
30
- if ( ! empty( $this->money ) ) {
31
- if ( class_exists( 'NumberFormatter' ) ) {
32
- $currencies = new \Money\Currencies\ISOCurrencies();
33
- $number_formatter = new NumberFormatter( get_locale(), NumberFormatter::CURRENCY );
34
- $money_formatter = new \Money\Formatter\IntlMoneyFormatter( $number_formatter, $currencies );
35
- return $money_formatter->format( $this->money );
36
- } else {
37
- return wc_price( $this->money->getAmount() / 100, array( 'currency' => trim( $this->money->getCurrency() ) ) );
38
- }
39
- }
40
- return null;
41
-
42
- }
43
-
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-add-shipping-handler.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler {
7
-
8
- /**
9
- * Shipping service.
10
- *
11
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
12
- */
13
- private $shipping_service;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler constructor.
17
- *
18
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
19
- */
20
- public function __construct( WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service ) {
21
- $this->shipping_service = $shipping_service;
22
- }
23
-
24
- /**
25
- * Hooks.
26
- */
27
- public function hooks() {
28
- add_filter( 'flexible_shipping_add_shipping_options', array( $this, 'handle_add_shipping_options' ) );
29
- }
30
-
31
- /**
32
- * Handle add shipping service options.
33
- *
34
- * @param array $options Options.
35
- *
36
- * @return array
37
- */
38
- public function handle_add_shipping_options( array $options ) {
39
- $options[ $this->shipping_service->get_integration_id() ] = $this->shipping_service->get_name();
40
- return $options;
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-auth-params.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings_Connection
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Auth_Params {
7
-
8
-
9
- /**
10
- * Returns WooCommerce shop domain
11
- *
12
- * @return string
13
- */
14
- public function get_user_domain() {
15
- if (!defined("SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN")) {
16
- $parsed_url = wp_parse_url( site_url() );
17
- $domain = $parsed_url['host'];
18
- } else {
19
- $domain = SAAS_FLEXIBLESHIPPING_URL_SHOP_DOMAIN;
20
- }
21
-
22
- return apply_filters('flexible_shipping_saas_domain', $domain);
23
- }
24
-
25
- /**
26
- * Returns default user locale
27
- *
28
- * @return string
29
- */
30
- public function get_user_locale() {
31
- return get_locale();
32
- }
33
- }
34
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-bad-credentials-exception.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception extends RuntimeException {
7
-
8
-
9
- /**
10
- * WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception constructor.
11
- *
12
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Platform links.
13
- */
14
- public function __construct( WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links ) {
15
- $notice_content = sprintf(
16
- /* Translators: url */
17
- __( 'The Connect Key that you entered is invalid. Please enter a valid key. %1$sGet your Connect Key →%2$s', 'flexible-shipping' ),
18
- '<a href="' . $saas_platform_links->get_base_url() . '">',
19
- '</a>'
20
- );
21
- parent::__construct( $notice_content );
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-cache-settings.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles cache settings
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Cache_Settings
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Cache_Settings {
9
-
10
- const SETTINGS_OPTION_NAME = 'disable_cache';
11
-
12
- const OPTION_NAME = 'fs_disable_cache';
13
-
14
- const OPTION_VALUE_DISABLED = '0';
15
- const OPTION_VALUE_ENABLED = '1';
16
-
17
- /**
18
- * Enabled.
19
- *
20
- * @var bool
21
- */
22
- private $enabled = false;
23
-
24
- /**
25
- * WPDesk_Flexible_Shipping_SaaS_Logger_Settings constructor.
26
- */
27
- public function __construct() {
28
- $option_value = get_option( self::OPTION_NAME, self::OPTION_VALUE_ENABLED );
29
- $this->enabled = self::OPTION_VALUE_ENABLED === $option_value;
30
- }
31
-
32
- /**
33
- * Is enabled.
34
- *
35
- * @return bool
36
- */
37
- public function is_enabled() {
38
- return $this->enabled;
39
- }
40
-
41
- /**
42
- * Update option from saas settings.
43
- *
44
- * @param WPDesk_Flexible_Shipping_SaaS_Settings $saas_settings Saas settings.
45
- */
46
- public function update_option_from_saas_settings( WPDesk_Flexible_Shipping_SaaS_Settings $saas_settings ) {
47
- $saas_settings_value = $saas_settings->get_option( self::SETTINGS_OPTION_NAME );
48
- if ( ! empty( $saas_settings_value ) && 'yes' === $saas_settings_value ) {
49
- $option_value = self::OPTION_VALUE_ENABLED;
50
- } else {
51
- $option_value = self::OPTION_VALUE_DISABLED;
52
- }
53
- update_option( self::OPTION_NAME, $option_value );
54
- $this->enabled = self::OPTION_VALUE_ENABLED === $option_value;
55
- }
56
-
57
- /**
58
- * Add fields to settings.
59
- *
60
- * @param array $settings Settings.
61
- *
62
- * @return array
63
- */
64
- public function add_fields_to_settings( array $settings ) {
65
- $settings[ self::SETTINGS_OPTION_NAME ] = array(
66
- 'type' => 'checkbox',
67
- 'label' => __( 'Enable', 'flexible-shipping' ),
68
- 'title' => __( 'Cache', 'flexible-shipping' ),
69
- 'description' => __( 'Enables Flexible Shipping Connect cache. Disable only for debugging.', 'flexible-shipping' ),
70
- 'default' => 'yes',
71
- );
72
- return $settings;
73
- }
74
-
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-ajax.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings_Connection
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- const AJAX_ACTION = 'wpdesk_fs_connection_status';
11
- const NONCE_NAME = 'status_field_nonce';
12
-
13
- const STATUS_ERROR = 'ERROR';
14
- const STATUS_OK = 'OK';
15
-
16
- const RESPONSE_MESSAGE = 'message';
17
- const RESPONSE_STATUS = 'status';
18
-
19
-
20
- /**
21
- * SaaS connection.
22
- *
23
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
24
- */
25
- private $saas_connection;
26
-
27
- /**
28
- * WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax constructor.
29
- *
30
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
31
- */
32
- public function __construct(
33
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection
34
- ) {
35
- $this->saas_connection = $saas_connection;
36
- }
37
-
38
- /**
39
- * Hooks.
40
- */
41
- public function hooks() {
42
- add_action( 'wp_ajax_' . self::AJAX_ACTION, array( $this, 'handle_ajax_request' ) );
43
- }
44
-
45
- /**
46
- * Prepare response.
47
- *
48
- * @param \WPDesk\SaasPlatformClient\Response\ShippingServicesSettings\Test\GetSettingsTestResponse $test_response Test connection response.
49
- *
50
- * @return array
51
- */
52
- public function prepare_response( $test_response ) {
53
- $response = array(
54
- self::RESPONSE_STATUS => self::STATUS_ERROR,
55
- self::RESPONSE_MESSAGE => __( 'Something go wrong!', 'flexible-shipping' ),
56
- );
57
- try {
58
- if ( $test_response->isError() ) {
59
- $response[ self::RESPONSE_MESSAGE ] = sprintf(
60
- // Translators: response code.
61
- __( 'Invalid response from Flexible Shipping Connect platform. Response code: %1$s.', 'flexible-shipping' ),
62
- $test_response->getResponseCode()
63
- );
64
- } else {
65
- $response[ self::RESPONSE_STATUS ] = $test_response->getStatus();
66
- if ( self::STATUS_ERROR === $response[ self::RESPONSE_STATUS ] ) {
67
- $response[ self::RESPONSE_MESSAGE ] = $test_response->getMessage();
68
- } else {
69
- $response[ self::RESPONSE_MESSAGE ] = __( 'OK', 'flexible-shipping' );
70
- }
71
- }
72
- } catch ( Exception $e ) {
73
- $response[ self::RESPONSE_STATUS ] = self::STATUS_ERROR;
74
- $response[ self::RESPONSE_MESSAGE ] = $e->getMessage();
75
- }
76
- return $response;
77
- }
78
-
79
- /**
80
- * Handle AJAX request.
81
- */
82
- public function handle_ajax_request() {
83
- check_ajax_referer( self::NONCE_NAME, 'nonce' );
84
-
85
- $service_id = $_REQUEST['service_id'];
86
-
87
- $test_response = $this->saas_connection->get_platform()->requestGetSettingsTest( $service_id );
88
-
89
- wp_send_json( $this->prepare_response( $test_response ) );
90
- exit;
91
- }
92
-
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection-status-field.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings_Connection
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Connection_Status_Field {
7
-
8
- /**
9
- * Shipping method.
10
- *
11
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
12
- */
13
- private $shipping_method;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_Connection_Status_Field constructor.
17
- *
18
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings $shipping_method Shipping method.
19
- */
20
- public function __construct( $shipping_method ) {
21
- $this->shipping_method = $shipping_method;
22
- }
23
-
24
- /**
25
- * Get field key.
26
- *
27
- * @param string $key Key.
28
- *
29
- * @return string
30
- */
31
- protected function get_field_key( $key ) {
32
- return $this->shipping_method->get_field_key( $key );
33
- }
34
-
35
- /**
36
- * Generate HTML.
37
- *
38
- * @param string $key Key.
39
- * @param array $data Data.
40
- *
41
- * @return false|string
42
- */
43
- public function generate_html( $key, $data ) {
44
- $field_key = $this->get_field_key( $key );
45
- $defaults = array(
46
- 'title' => '',
47
- 'disabled' => false,
48
- 'class' => '',
49
- 'css' => '',
50
- 'placeholder' => '',
51
- 'type' => 'text',
52
- 'desc_tip' => false,
53
- 'description' => '',
54
- 'custom_attributes' => array(),
55
- );
56
-
57
- $data = wp_parse_args( $data, $defaults );
58
-
59
- $field_id = esc_attr( $field_key );
60
- $tooltip_html = $this->shipping_method->get_tooltip_html( $data );
61
- $title = $data['title'];
62
- $description_html = $this->shipping_method->get_description_html( $data );
63
- $status_html = __( 'Checking...', 'flexible-shipping' );
64
- $service_id = $this->shipping_method->get_shipping_service_id();
65
- $ajax_action = false;
66
- $ajax_nonce = '';
67
- $ajax_error_message = __( 'Something go wrong! (AJAX)', 'flexible-shipping' );
68
-
69
- if ( ! $this->shipping_method->get_has_saas_settings() ) {
70
- $status_html = __( 'Add credentials', 'flexible-shipping' );
71
- } else {
72
- $ajax_action = WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax::AJAX_ACTION;
73
- $ajax_nonce = wp_create_nonce( WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax::NONCE_NAME );
74
- }
75
-
76
- ob_start();
77
- include 'views/html-field-connection-status.php';
78
- return ob_get_clean();
79
- }
80
-
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-connection.php DELETED
@@ -1,616 +0,0 @@
1
- <?php
2
-
3
- use Psr\Log\LoggerInterface;
4
-
5
- if ( ! defined( 'ABSPATH' ) ) {
6
- exit;
7
- } // Exit if accessed directly
8
-
9
- if ( ! class_exists( 'WPDesk_Flexible_Shipping_SaaS_Settings_Connection' ) ) {
10
-
11
- /**
12
- * Class WPDesk_Flexible_Shipping_SaaS_Settings_Connection
13
- */
14
- class WPDesk_Flexible_Shipping_SaaS_Connection
15
- implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
16
-
17
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
18
-
19
- const PRIORITY_BEFORE_DEFAULT = 9;
20
- const PRIORITY_AFTER_DEFAULT = 11;
21
-
22
- const PAGE_WOOCOMMERCE_SETTINGS = 'wc-settings';
23
- const TAB_SHIPPING = 'shipping';
24
- const SECTION_FLEXIBLE_SHIPPING_CONNECT = 'flexible_shipping_connect';
25
-
26
- const OPTION_SAAS_API_KEY = 'fs_saas_api_key';
27
- const OPTION_FLEXIBLE_SHIPPING_SAAS_CONNECTED = 'fs_saas_connected';
28
-
29
- const CONNECTED = '1';
30
- const DISCONNECTED = '0';
31
-
32
- const NONCE_CONNECTION_ACTION = 'fs_connection_nonce';
33
- const NONCE_CONNECTION_NAME = '_nonce_fs_connection';
34
-
35
- const SUBMIT_CONNECTION_PARAMETER = 'flexible-shipping-submit-connection';
36
-
37
- const PARAMETER_CONNECT_URL = 'flexible_shipping_connect_url';
38
- const PARAMETER_CONNECT_FROM_MAIL = 'connect_from_mail';
39
-
40
- const SETTINGS_ERROR_SETTING = 'flexible-shipping-connect';
41
-
42
- const BUTTON_ID_DISCONNECT = 'flexible-shipping-disconnect';
43
- const BUTTON_ID_CONNECT = 'flexible-shipping-connect';
44
-
45
- const LOGGER_SOURCE = 'saas-connection';
46
-
47
- /**
48
- * Is processing email link?
49
- *
50
- * @var bool
51
- */
52
- private $is_processing_email_link = false;
53
-
54
- /**
55
- * Saas shipping providers.
56
- *
57
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Services
58
- */
59
- private $saas_shipping_services;
60
-
61
- /**
62
- * Links.
63
- *
64
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
65
- */
66
- private $saas_platform_links;
67
-
68
- /**
69
- * Platform factory.
70
- *
71
- * @var WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory
72
- */
73
- private $platform_factory;
74
-
75
- /**
76
- * Logger.
77
- *
78
- * @var LoggerInterface
79
- */
80
- private $logger;
81
-
82
- public function __construct(
83
- LoggerInterface $logger = null,
84
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
85
- WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory $platform_factory = null
86
- ) {
87
-
88
- if ( null === $saas_platform_links ) {
89
- $saas_platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
90
- }
91
- $this->saas_platform_links = $saas_platform_links;
92
- $this->platform_factory = $platform_factory;
93
-
94
- if ( null !== $logger ) {
95
- $this->logger = $logger;
96
- } else {
97
- $this->logger = new \Psr\Log\NullLogger();
98
- }
99
- $this->saas_shipping_services = new WPDesk_Flexible_Shipping_SaaS_Shipping_Services(
100
- $this,
101
- $this->logger,
102
- $saas_platform_links
103
- );
104
-
105
- }
106
-
107
- /**
108
- * Hooks.
109
- */
110
- public function hooks() {
111
- add_filter( 'removable_query_args', [ $this, 'add_email_parameters_to_removable_query_args' ] );
112
-
113
- add_action( 'update_option_' . self::OPTION_SAAS_API_KEY, [ $this, 'connect_on_api_key_change' ], 10, 3 );
114
-
115
- add_action( 'admin_init', [ $this, 'connect_admin_notices' ], self::PRIORITY_BEFORE_DEFAULT );
116
- add_action( 'admin_init', [ $this, 'handle_connection_form' ], self::PRIORITY_BEFORE_DEFAULT );
117
- add_action( 'admin_init', [ $this, 'handle_saas_connect_url' ] );
118
- add_action( 'admin_init', [ $this, 'check_connection_and_show_notice_on_error' ] );
119
- }
120
-
121
- /**
122
- * Clear SaaS client cache.
123
- */
124
- public function clear_saas_client_cache() {
125
- $client_cache = new \WPDesk\SaasPlatformClient\Cache\WordpressCache();
126
- $client_cache->clear();
127
- }
128
-
129
- /**
130
- * Is on settings page?
131
- *
132
- * @return bool
133
- */
134
- public function is_on_setings_page() {
135
- return (
136
- isset( $_GET['page'] )
137
- && self::PAGE_WOOCOMMERCE_SETTINGS === $_GET['page']
138
- && isset( $_GET['tab'] )
139
- && self::TAB_SHIPPING === $_GET['tab']
140
- );
141
- }
142
-
143
- /**
144
- * Check connection and show notice on error.
145
- */
146
- public function check_connection_and_show_notice_on_error() {
147
- if ( $this->is_on_setings_page() && $this->is_connected() ) {
148
- try {
149
- $platform = $this->get_platform();
150
- $response = $platform->requestListShippingServices();
151
- if ( $response->isBadCredentials() ) {
152
- $this->add_notice_bad_credentials();
153
- } elseif ( $response->isMaintenance() ) {
154
- $maintenance_context = new \WPDesk\SaasPlatformClient\Response\Maintenance\MaintenanceResponseContext( $response );
155
- $this->add_notice_maintenance(
156
- $maintenance_context->getMaintenanceMessage(),
157
- $maintenance_context->getMaintenanceTill()
158
- );
159
- } elseif ( $response->isServerFatalError() ) {
160
- $this->add_notice_fatal_error();
161
- }
162
- } catch ( Exception $e ) {
163
- $this->add_notice_fatal_error();
164
- }
165
- }
166
- }
167
-
168
- /**
169
- * Add notice for fatal error.
170
- *
171
- * @param string $platform_message Message from platform.
172
- * @param int $till Time till maintenance is active.
173
- */
174
- public function add_notice_maintenance( $platform_message, $till ) {
175
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
176
- $notice_content = $this->prepare_maintenance_notice( $platform_message, $till );
177
- new \WPDesk\Notice\Notice( $notice_content, $notice_type );
178
- }
179
-
180
- /**
181
- * Add notice for fatal error.
182
- */
183
- public function add_notice_fatal_error() {
184
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
185
- $notice_content = $this->prepare_fatal_error_notice();
186
- new \WPDesk\Notice\Notice( $notice_content, $notice_type );
187
- }
188
-
189
- /**
190
- * Add notice for bad credentials.
191
- */
192
- public function add_notice_bad_credentials() {
193
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
194
- $notice_content = $this->prepare_bad_credentials_notice();
195
- new \WPDesk\Notice\Notice( $notice_content, $notice_type );
196
- }
197
-
198
- /**
199
- * Removable query args.
200
- *
201
- * @param array $removable_query_args Query args.
202
- *
203
- * @return array
204
- */
205
- public function add_email_parameters_to_removable_query_args( $removable_query_args ) {
206
- $removable_query_args[] = self::PARAMETER_CONNECT_FROM_MAIL;
207
- $removable_query_args[] = 'connect_key';
208
-
209
- return $removable_query_args;
210
- }
211
-
212
-
213
- /**
214
- * Show settings messages.
215
- */
216
- public function connect_admin_notices() {
217
- $settings_errors = get_settings_errors( self::SETTINGS_ERROR_SETTING );
218
- foreach ( $settings_errors as $error ) {
219
- new \WPDesk\Notice\Notice( $error['message'], $error['type'] );
220
- }
221
- }
222
-
223
- /**
224
- * Get platform.
225
- *
226
- * @return \WPDesk\SaasPlatformClient\Platform
227
- */
228
- public function get_platform() {
229
- if ( ! $this->platform_factory instanceof WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory ) {
230
- $this->platform_factory = new WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory( $this->logger );
231
- }
232
-
233
- return $this->platform_factory->get_platform();
234
- }
235
-
236
- /**
237
- * Login user.
238
- *
239
- * @param string $connect_key Key.
240
- * @param WPDesk_Flexible_Shipping_SaaS_Auth_Params $params Parameters.
241
- *
242
- * @return \WPDesk\SaasPlatformClient\Response\Authentication\TokenResponse
243
- */
244
- private function login_user( $connect_key, WPDesk_Flexible_Shipping_SaaS_Auth_Params $params ) {
245
- return $this->get_platform()->requestToken(
246
- $connect_key,
247
- $params->get_user_domain(),
248
- $params->get_user_locale()
249
- );
250
- }
251
-
252
- /**
253
- * Add settings error: user authenticated successfully notice.
254
- */
255
- private function add_settings_error_login_success() {
256
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_SUCCESS;
257
- $notice_content = __( 'Your store has been connected to Flexible Shipping Connect. Choose from the available shipping integrations below.',
258
- 'flexible-shipping' );
259
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
260
- }
261
-
262
- /**
263
- * Add settings error: disconnected notice.
264
- */
265
- private function add_settings_error_disconnected() {
266
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_SUCCESS;
267
- $notice_content = __( 'You are now disconnected from Flexible Shipping Connect. All shipping services have been disabled. To use Flexible Shipping Connect again, please enter a valid Connect Key.',
268
- 'flexible-shipping' );
269
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
270
- }
271
-
272
- /**
273
- * Add notice already connected. Used for email link.
274
- */
275
- private function add_notice_already_connected() {
276
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_INFO;
277
- $notice_content = __( 'Your store is already connected to Flexible Shipping Connect!', 'flexible-shipping' );
278
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
279
- }
280
-
281
- /**
282
- * Add settings error: domain occupied.
283
- */
284
- private function add_settings_error_domain_occupied() {
285
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
286
- $notice_content = sprintf(
287
- /* Translators: url */
288
- __( 'Your store (%1$s) is already registered on another account. You can register your domain only on one account. If you have questions, %2$scontact us%3$s.',
289
- 'flexible-shipping'
290
- ),
291
- site_url(),
292
- '<a target="_blank" href="' . $this->saas_platform_links->add_utm(
293
- $this->saas_platform_links->get_support(),
294
- 'fs-register-contactus',
295
- 'flexible-shipping',
296
- 'link',
297
- 'user-site',
298
- 'contact-us'
299
- ) . '">',
300
- '</a>'
301
- );
302
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
303
- }
304
-
305
- /**
306
- * Add settings error: bad credentials.
307
- */
308
- private function add_settings_error_bad_credentials() {
309
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
310
- $notice_content = $this->prepare_bad_credentials_notice();
311
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
312
- }
313
-
314
- /**
315
- * Add settings error: fatal error.
316
- */
317
- private function add_settings_error_fatal_error() {
318
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
319
- $notice_content = $this->prepare_fatal_error_notice();
320
- add_settings_error( self::SETTINGS_ERROR_SETTING, 'success', $notice_content, $notice_type );
321
- }
322
-
323
- /**
324
- * Prepare fatal error notice text.
325
- *
326
- * @param string $platform_message Message from platform.
327
- * @param int $till Time till maintenance is active.
328
- * @return string
329
- */
330
- public function prepare_maintenance_notice( $platform_message, $till ) {
331
- if ( isset( $platform_message ) ) {
332
- $platform_message = sprintf(
333
- '%1$s%2$s',
334
- '<br/><br/>',
335
- sprintf(
336
- // Translators: platform message.
337
- __( 'Message from platform: %1$s%2$s%3$s', 'flexible-shipping' ),
338
- '<strong>',
339
- $platform_message,
340
- '</strong>'
341
- )
342
- );
343
- } else {
344
- $platform_message = '';
345
- }
346
- $notice_content = sprintf(
347
- /* Translators: url */
348
- __(
349
- 'FS Connect is undergoing maintenance. To get more information about the platform status check %1$sstatus.flexibleshipping.com &rarr;%2$s%3$s',
350
- 'flexible-shipping'
351
- ),
352
- '<a href="' . $this->saas_platform_links->add_utm(
353
- $this->saas_platform_links->get_status(),
354
- 'fs-notice-status',
355
- 'flexible-shipping',
356
- 'link',
357
- 'user-site',
358
- ''
359
- ) . '">',
360
- '</a>',
361
- $platform_message
362
- );
363
- return $notice_content;
364
- }
365
-
366
- /**
367
- * Prepare fatal error notice text.
368
- *
369
- * @return string
370
- */
371
- public function prepare_fatal_error_notice() {
372
- $notice_content = __(
373
- 'There are some connection problems. Please try again in a few minutes. Thanks!',
374
- 'flexible-shipping'
375
- );
376
- $notice_content .= '<br />';
377
- $notice_content .= sprintf(
378
- /* Translators: url */
379
- __( 'To get more information about the platform status check %1$sstatus.flexibleshipping.com &rarr;%2$s',
380
- 'flexible-shipping'
381
- ),
382
- '<a href="' . $this->saas_platform_links->add_utm(
383
- $this->saas_platform_links->get_status(),
384
- 'fs-notice-status',
385
- 'flexible-shipping',
386
- 'link',
387
- 'user-site',
388
- ''
389
- ) . '">',
390
- '</a>'
391
- );
392
-
393
- return $notice_content;
394
- }
395
-
396
- /**
397
- * Prepare fatal error notice text.
398
- *
399
- * @return string
400
- */
401
- public function prepare_bad_credentials_notice() {
402
- $notice_content = sprintf(
403
- /* Translators: url */
404
- __( 'The Connect Key that you entered is invalid. Please enter a valid key. %1$sRegister%3$s for a new key or log in to %2$syour account%3$s to get your key.', 'flexible-shipping' ),
405
- '<a href="' . add_query_arg( 'page', WPDesk_Flexible_Shipping_SaaS_User_Registration::REGISTER_PAGE_SLUG, admin_url( 'admin.php' ) ) . '">',
406
- '<a href="' . $this->saas_platform_links->add_utm(
407
- $this->saas_platform_links->get_my_account(),
408
- 'fs-configuration-contactus',
409
- 'flexible-shipping',
410
- 'link',
411
- 'user-site',
412
- 'contact-us'
413
- ) . '">',
414
- '</a>'
415
- );
416
-
417
- return $notice_content;
418
- }
419
-
420
- /**
421
- * Is on submit page?
422
- *
423
- * @return bool
424
- */
425
- public function is_on_submit_page() {
426
- return ( isset( $_REQUEST[ self::SUBMIT_CONNECTION_PARAMETER ] ) && '1' === $_REQUEST[ self::SUBMIT_CONNECTION_PARAMETER ] );
427
- }
428
-
429
- /**
430
- * Handle connection form.
431
- */
432
- public function handle_connection_form() {
433
- if ( $this->is_on_submit_page() ) {
434
- if ( isset( $_REQUEST[ self::NONCE_CONNECTION_NAME ] )
435
- && wp_verify_nonce( $_REQUEST[ self::NONCE_CONNECTION_NAME ], self::NONCE_CONNECTION_ACTION )
436
- && isset( $_REQUEST['api_key'] )
437
- ) {
438
- $api_key = sanitize_text_field( $_REQUEST['api_key'] );
439
- if ( $this->is_connected() ) {
440
- $api_key = '';
441
- } else {
442
- remove_action( 'update_option_' . self::OPTION_SAAS_API_KEY, [
443
- $this,
444
- 'connect_on_api_key_change',
445
- ], 10, 3 );
446
- update_option( self::OPTION_SAAS_API_KEY, '' );
447
- add_action( 'update_option_' . self::OPTION_SAAS_API_KEY, [
448
- $this,
449
- 'connect_on_api_key_change',
450
- ], 10, 3 );
451
- }
452
- update_option( self::OPTION_SAAS_API_KEY, $api_key );
453
- }
454
- set_transient( 'settings_errors', get_settings_errors(), 30 );
455
- $url = admin_url( 'admin.php' );
456
- $url = add_query_arg( 'page', 'wc-settings', $url );
457
- $url = add_query_arg( 'tab', 'shipping', $url );
458
- $url = add_query_arg( 'section', WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID, $url );
459
- $url = add_query_arg( 'settings-updated', 'true', $url );
460
- wp_safe_redirect( $url );
461
- exit;
462
- }
463
- }
464
-
465
- /**
466
- * Update option - do connection when api key changed.
467
- *
468
- * @param string $old_value Old option value.
469
- * @param string $value Current option value.
470
- * @param string $option Option name.
471
- */
472
- public function connect_on_api_key_change( $old_value, $value, $option ) {
473
- $old_key_value = $old_value;
474
- $new_key_value = $value;
475
- $connected = $this->is_connected();
476
- if ( ( ! $connected || ( $old_key_value !== $new_key_value ) ) && '' !== $new_key_value ) {
477
- update_option( self::OPTION_FLEXIBLE_SHIPPING_SAAS_CONNECTED, self::DISCONNECTED );
478
- try {
479
- $response = $this->login_user(
480
- $new_key_value,
481
- new WPDesk_Flexible_Shipping_SaaS_Auth_Params()
482
- );
483
- if ( $response->isLoginSuccess() ) {
484
- update_option( self::OPTION_FLEXIBLE_SHIPPING_SAAS_CONNECTED, self::CONNECTED );
485
- $this->add_settings_error_login_success();
486
- } else {
487
- if ( $response->isBadCredentials() ) {
488
- $this->add_settings_error_bad_credentials();
489
- } elseif ( $response->isDomainOccupied() ) {
490
- $this->add_settings_error_domain_occupied();
491
- } elseif ( $response->isBadRequest() ) {
492
- $this->add_settings_error_fatal_error();
493
- } elseif ( $response->isServerFatalError() ) {
494
- $this->add_settings_error_fatal_error();
495
- } else {
496
- $this->add_settings_error_fatal_error();
497
- }
498
- }
499
- } catch ( Exception $e ) {
500
- $this->add_settings_error_fatal_error();
501
- }
502
- } elseif ( '' === $new_key_value ) {
503
- update_option( self::OPTION_FLEXIBLE_SHIPPING_SAAS_CONNECTED, self::DISCONNECTED );
504
- if ( $connected ) {
505
- $this->add_settings_error_disconnected();
506
- }
507
- }
508
- set_transient( 'settings_errors', get_settings_errors(), 30 );
509
- }
510
-
511
- /**
512
- * Get connected.
513
- *
514
- * @return string
515
- */
516
- private function get_connected() {
517
- return get_option( self::OPTION_FLEXIBLE_SHIPPING_SAAS_CONNECTED, '0' );
518
- }
519
-
520
- /**
521
- * Is connected.
522
- *
523
- * @return bool
524
- */
525
- public function is_connected() {
526
- return ( $this->get_connected() === self::CONNECTED );
527
- }
528
-
529
- /**
530
- * Handle SaaS connect URL.
531
- */
532
- public function handle_saas_connect_url() {
533
- if ( ! empty( $_GET[ self::PARAMETER_CONNECT_URL ] ) ) {
534
- if ( current_user_can( 'manage_woocommerce' ) ) {
535
- $this->is_processing_email_link = true;
536
- if ( $this->is_connected() ) {
537
- $this->add_notice_already_connected();
538
- } else {
539
- $api_key = sanitize_text_field( $_GET['connect_key'] );
540
- /**
541
- * Clear option value to trigger connection action in connect_on_api_key_change.
542
- */
543
- update_option( self::OPTION_SAAS_API_KEY, '' );
544
- update_option( self::OPTION_SAAS_API_KEY, $api_key );
545
- }
546
- }
547
- set_transient( 'settings_errors', get_settings_errors(), 30 );
548
- $url = admin_url( 'admin.php' );
549
- $url = add_query_arg( 'page', 'wc-settings', $url );
550
- $url = add_query_arg( 'tab', 'shipping', $url );
551
- $url = add_query_arg( 'section', WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID, $url );
552
- $url = add_query_arg( 'settings-updated', 'true', $url );
553
- wp_safe_redirect( $url );
554
- exit;
555
- }
556
- }
557
-
558
-
559
- /**
560
- * Get shipping providers from platform.
561
- *
562
- * @return array|\WPDesk\SaasPlatformClient\Response\ShippingServices\GetShippingServicesListResponse
563
- */
564
- public function get_shipping_services_from_platform() {
565
- $shipping_services = array();
566
- if ( $this->is_connected() ) {
567
- try {
568
- $platform = $this->get_platform();
569
- $shipping_services = $platform->requestListShippingServices();
570
-
571
- return $shipping_services->getPage();
572
- } catch ( Exception $e ) {
573
- }
574
- }
575
-
576
- return $shipping_services;
577
- }
578
-
579
- public function display_connection_form() {
580
- $form_action = admin_url( 'admin.php' );
581
- $form_action = add_query_arg( self::SUBMIT_CONNECTION_PARAMETER, '1', $form_action );
582
- if ( $this->is_connected() ) {
583
- $button_id = self::BUTTON_ID_DISCONNECT;
584
- $readonly = 'readonly="readonly"';
585
- $submit_button_value = __( 'Disconnect', 'flexible-shipping' );
586
- } else {
587
- $button_id = self::BUTTON_ID_CONNECT;
588
- $readonly = '';
589
- $submit_button_value = __( 'Connect', 'flexible-shipping' );
590
- }
591
- $api_key = get_option( self::OPTION_SAAS_API_KEY, '' );
592
- $saas_connected = $this->is_connected();
593
- include 'views/html-saas-connection-form.php';
594
- }
595
-
596
- /**
597
- * Get SaaS shipping providers.
598
- *
599
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Services
600
- */
601
- public function get_saas_shipping_services() {
602
- return $this->saas_shipping_services;
603
- }
604
-
605
- /**
606
- * Set SaaS shipping providers.
607
- *
608
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Services $saas_shipping_services SaaS shipping providers.
609
- */
610
- public function set_saas_shipping_services( $saas_shipping_services ) {
611
- $this->saas_shipping_services = $saas_shipping_services;
612
- }
613
-
614
- }
615
-
616
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-country-state-field.php DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Country_State_Field
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Country_State_Field {
7
-
8
- const DELIMITER = ':';
9
-
10
- const COUNTRY_STATE_CODE_FIELD = 'country_state_code';
11
- const COUNTRY_CODE_FIELD = 'country_code';
12
- const STATE_CODE_FIELD = 'state_code';
13
-
14
- /**
15
- * Country code.
16
- *
17
- * @var string|null
18
- */
19
- private $country_code;
20
-
21
- /**
22
- * State code.
23
- *
24
- * @var string|null
25
- */
26
- private $state_code;
27
-
28
- /**
29
- * WPDesk_Flexible_Shipping_SaaS_Country_State_Field constructor.
30
- *
31
- * @param string|null $country_code Country code.
32
- * @param string|null $state_code State code.
33
- */
34
- public function __construct( $country_code, $state_code ) {
35
- $this->country_code = $country_code;
36
- $this->state_code = $state_code;
37
- }
38
-
39
- /**
40
- * Create from single field.
41
- *
42
- * @param string $country_state_code Country state code.
43
- *
44
- * @return WPDesk_Flexible_Shipping_SaaS_Country_State_Field
45
- */
46
- public static function create_from_single_field( $country_state_code ) {
47
- $country_state_code_array = explode( self::DELIMITER, $country_state_code );
48
- return new WPDesk_Flexible_Shipping_SaaS_Country_State_Field(
49
- $country_state_code_array[0],
50
- isset( $country_state_code_array[1] ) ? $country_state_code_array[1] : null
51
- );
52
- }
53
-
54
- /**
55
- * Create from serialized settings.
56
- *
57
- * @param array $settings Serialized settings.
58
- *
59
- * @return WPDesk_Flexible_Shipping_SaaS_Country_State_Field
60
- */
61
- public static function create_from_serialized_settings( array $settings ) {
62
- if ( ! empty( $settings[ self::COUNTRY_STATE_CODE_FIELD ] ) ) {
63
- return self::create_from_single_field( $settings[ self::COUNTRY_STATE_CODE_FIELD ] );
64
- } else {
65
- return new WPDesk_Flexible_Shipping_SaaS_Country_State_Field( null, null );
66
- }
67
- }
68
-
69
- /**
70
- * Create from serialized settings.
71
- *
72
- * @param array $settings Serialized settings.
73
- *
74
- * @return WPDesk_Flexible_Shipping_SaaS_Country_State_Field
75
- */
76
- public static function create_from_settings( array $settings ) {
77
- if ( ! empty( $settings[ self::COUNTRY_CODE_FIELD ] ) ) {
78
- return new WPDesk_Flexible_Shipping_SaaS_Country_State_Field(
79
- $settings[ self::COUNTRY_CODE_FIELD ],
80
- isset( $settings[ self::STATE_CODE_FIELD ] ) ? $settings[ self::STATE_CODE_FIELD ] : null
81
- );
82
- } else {
83
- return new WPDesk_Flexible_Shipping_SaaS_Country_State_Field( null, null );
84
- }
85
- }
86
-
87
- /**
88
- * Get country state code as single field.
89
- *
90
- * @return string
91
- */
92
- public function get_as_single_field() {
93
- $single_field = '';
94
- if ( ! empty( $this->country_code ) ) {
95
- $single_field = $this->country_code;
96
- if ( ! empty( $this->state_code ) ) {
97
- $single_field .= self::DELIMITER . $this->state_code;
98
- }
99
- }
100
- return $single_field;
101
- }
102
-
103
- /**
104
- * Get country state as array.
105
- *
106
- * @return array
107
- */
108
- public function get_as_array() {
109
- $array = [];
110
- if ( ! empty( $this->country_code ) ) {
111
- $array[ self::COUNTRY_CODE_FIELD ] = $this->country_code;
112
- if ( ! empty( $this->state_code ) ) {
113
- $array[ self::STATE_CODE_FIELD ] = $this->state_code;
114
- }
115
- }
116
- return $array;
117
- }
118
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-custom-services-setting.php DELETED
@@ -1,170 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Custom Services - settings field.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings {
9
-
10
- const CUSTOM_SERVICE_NAME = 'name';
11
- const CUSTOM_SERVICE_ENABLED = 'enabled';
12
-
13
- /**
14
- * Field.
15
- *
16
- * @var array
17
- */
18
- private $field;
19
-
20
- /**
21
- * Shipping method field.
22
- *
23
- * @var array
24
- */
25
- private $shipping_method_field;
26
-
27
- /**
28
- * WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings constructor.
29
- *
30
- * @param array $field Field.
31
- * @param array|null $shipping_method_field Shipping method field.
32
- */
33
- public function __construct( array $field, $shipping_method_field ) {
34
- $this->field = $field;
35
- $this->shipping_method_field = null === $shipping_method_field ? array() : $shipping_method_field;
36
- if ( ! is_array( $this->shipping_method_field ) ) {
37
- $this->shipping_method_field = array();
38
- }
39
- }
40
-
41
- /**
42
- * Shipping method first time setup?
43
- *
44
- * @return bool
45
- */
46
- private function first_time_setup() {
47
- if ( 0 === count( $this->shipping_method_field ) ) {
48
- return true;
49
- }
50
- return false;
51
- }
52
-
53
- /**
54
- * Create services field.
55
- *
56
- * @return array
57
- */
58
- private function create_services_field() {
59
- $services = array();
60
- if ( isset( $this->field['services'] ) && is_array( $this->field['services'] ) ) {
61
- foreach ( $this->field['services'] as $service_id => $service ) {
62
- if ( isset( $this->shipping_method_field[ $service_id ] ) ) {
63
- $shipping_method_field_service = $this->shipping_method_field[ $service_id ];
64
-
65
- $services[ $service_id ][ self::CUSTOM_SERVICE_NAME ] = $shipping_method_field_service[ self::CUSTOM_SERVICE_NAME ];
66
- if ( isset( $shipping_method_field_service[ self::CUSTOM_SERVICE_ENABLED ] ) ) {
67
- $services[ $service_id ][ self::CUSTOM_SERVICE_ENABLED ] = $shipping_method_field_service[ self::CUSTOM_SERVICE_ENABLED ];
68
- } else {
69
- $services[ $service_id ][ self::CUSTOM_SERVICE_ENABLED ] = '0';
70
- }
71
- } else {
72
- $services[ $service_id ] = array( self::CUSTOM_SERVICE_NAME => $service[ self::CUSTOM_SERVICE_NAME ] );
73
- }
74
- }
75
- }
76
- return $services;
77
- }
78
-
79
- /**
80
- * Remove unused services from shipping method field.
81
- *
82
- * @param array $services Services.
83
- */
84
- private function remove_unused_services( $services ) {
85
- foreach ( $this->shipping_method_field as $service_id => $service ) {
86
- if ( empty( $services[ $service_id ] ) ) {
87
- unset( $this->shipping_method_field[ $service_id ] );
88
- }
89
- }
90
- }
91
-
92
- /**
93
- * Set default values when service fields are empty.
94
- *
95
- * @param array $services Services.
96
- * @param string $default_enabled Default value for enabled field.
97
- *
98
- * @return array
99
- */
100
- private function set_empty_service_fields( $services, $default_enabled ) {
101
- foreach ( $services as $service_id => $service ) {
102
- if ( ! isset( $services[ $service_id ][ self::CUSTOM_SERVICE_ENABLED ] ) ) {
103
- $services[ $service_id ][ self::CUSTOM_SERVICE_ENABLED ] = $default_enabled;
104
- }
105
- if ( empty( $services[ $service_id ][ self::CUSTOM_SERVICE_NAME ] ) ) {
106
- $services[ $service_id ][ self::CUSTOM_SERVICE_NAME ] = $this->field['services'][ $service_id ][ self::CUSTOM_SERVICE_NAME ];
107
- }
108
- }
109
- return $services;
110
- }
111
-
112
- /**
113
- * Sort services as in settings.
114
- *
115
- * @param array $services Services.
116
- *
117
- * @return array
118
- */
119
- private function sort_services( array $services ) {
120
- if ( 0 !== count( $this->shipping_method_field ) ) {
121
- $services = array_replace( array_flip( array_keys( $this->shipping_method_field ) ), $services );
122
- }
123
- return $services;
124
- }
125
-
126
- /**
127
- * Setup shipping integrations custom services values.
128
- *
129
- * @return array
130
- */
131
- public function setup_custom_services() {
132
- if ( $this->first_time_setup() ) {
133
- $default_enabled = '1';
134
- } else {
135
- $default_enabled = '0';
136
- }
137
- $services = $this->create_services_field();
138
-
139
- $this->remove_unused_services( $services );
140
-
141
- $services = $this->sort_services( $services );
142
-
143
- $services = $this->set_empty_service_fields( $services, $default_enabled );
144
-
145
- return $services;
146
- }
147
-
148
-
149
- /**
150
- * Process custom services field.
151
- *
152
- * @param array $posted_value Posted value.
153
- *
154
- * @return array
155
- */
156
- public function process_custom_services_field( array $posted_value ) {
157
- $custom_services_settings_value = array();
158
- foreach ( $posted_value as $service_id => $service ) {
159
- $custom_services_settings_value[ sanitize_text_field( $service_id ) ] = array(
160
- self::CUSTOM_SERVICE_NAME => sanitize_text_field( $posted_value[ $service_id ][ self::CUSTOM_SERVICE_NAME ] ),
161
- self::CUSTOM_SERVICE_ENABLED => 0,
162
- );
163
- if ( ! empty( $posted_value[ $service_id ][ self::CUSTOM_SERVICE_ENABLED ] ) ) {
164
- $custom_services_settings_value[ sanitize_text_field( $service_id ) ][ self::CUSTOM_SERVICE_ENABLED ] = 1;
165
- }
166
- }
167
- return $custom_services_settings_value;
168
- }
169
-
170
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-default-value-compute-handler.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles rate request.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Default_Value_Compute_Handler {
9
-
10
- /**
11
- * Compute method.
12
- *
13
- * @var string
14
- */
15
- private $compute_method;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_Default_Value_Compute_Handler constructor.
19
- *
20
- * @param string $compute_method Compute method.
21
- */
22
- public function __construct( $compute_method ) {
23
- $this->compute_method = $compute_method;
24
- }
25
-
26
- /**
27
- * Compute.
28
- */
29
- public function compute() {
30
- $computed_value = null;
31
- if ( 'units' === $this->compute_method ) {
32
- return $this->compute_units();
33
- }
34
- return $computed_value;
35
- }
36
-
37
- /**
38
- * Compute units.
39
- *
40
- * @return string
41
- */
42
- private function compute_units() {
43
- $units = 'imperial';
44
- $woocommerce_weight_unit = get_option( 'woocommerce_weight_unit', 'lbs' );
45
- if ( in_array( $woocommerce_weight_unit, array( 'g', 'kg' ), true ) ) {
46
- $units = 'metric';
47
- }
48
- return $units;
49
- }
50
-
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-free-shipping-metadata-handler.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Free_Shipping_Metadata_Handler
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Free_Shipping_Metadata_Handler implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- const META_FS_FREE_SHIPPING = '_fs_free_shipping';
11
-
12
- /**
13
- * Hooks.
14
- */
15
- public function hooks() {
16
- add_filter( 'woocommerce_order_shipping_method', [ $this, 'add_free_shipping_to_shipping_method_name' ], 10, 2 );
17
- add_filter( 'woocommerce_hidden_order_itemmeta', [ $this, 'hide_free_shipping_meta' ] );
18
- add_action( 'woocommerce_before_order_itemmeta', [ $this, 'display_free_shipping_in_order_shipping' ], 10, 3 );
19
- }
20
-
21
- /**
22
- * Add free shipping to shipping method name.
23
- *
24
- * @param string $names Names.
25
- * @param WC_Order $order Order.
26
- *
27
- * @return string
28
- */
29
- public function add_free_shipping_to_shipping_method_name( $names, $order ) {
30
- $names = array();
31
- foreach ( $order->get_shipping_methods() as $shipping_method ) {
32
- $name = $shipping_method->get_name();
33
- $fallback = $shipping_method->get_meta( self::META_FS_FREE_SHIPPING );
34
- if ( '' !== $fallback ) {
35
- // Translators: shipping method name.
36
- $name = sprintf( __( '%1$s (free shipping)', 'flexible-shipping' ), $name );
37
- }
38
- $names[] = $name;
39
- }
40
- return implode( ', ', $names );
41
- }
42
-
43
- /**
44
- * Hide free shipping meta.
45
- *
46
- * @param array $items Items to hide.
47
- *
48
- * @return array
49
- */
50
- public function hide_free_shipping_meta( array $items ) {
51
- $items[] = self::META_FS_FREE_SHIPPING;
52
- return $items;
53
- }
54
-
55
- /**
56
- * Display free shipping in order shipping.
57
- *
58
- * @param string $item_id Item Id.
59
- * @param WC_Order_Item $item Item.
60
- * @param WC_Product|null $product Produuct.
61
- */
62
- public function display_free_shipping_in_order_shipping( $item_id, $item, $product ) {
63
- if ( $item->is_type( 'shipping' ) ) {
64
- $free_shipping = $item->get_meta( self::META_FS_FREE_SHIPPING );
65
- if ( '' !== $free_shipping ) {
66
- include 'views/html-order-free-shipping.php';
67
- }
68
- }
69
- }
70
-
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-fallback-metadata-handler.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Live_Rates_Fallback_Handler
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Live_Rates_Fallback_Metadata_Handler implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- const MATA_FS_FALLBACK = '_fs_fallback';
11
- const META_FS_RATE_TYPE = '_fs_rate_type';
12
-
13
- /**
14
- * Hooks.
15
- */
16
- public function hooks() {
17
- add_filter( 'woocommerce_order_shipping_method', [ $this, 'add_fallback_to_shipping_method_name' ], 10, 2 );
18
- add_filter( 'woocommerce_hidden_order_itemmeta', [ $this, 'hide_fallback_meta' ] );
19
- add_action( 'woocommerce_before_order_itemmeta', [ $this, 'display_fallback_message_in_order_shipping' ], 10, 3 );
20
- }
21
-
22
- /**
23
- * Add fallback to shipping method name.
24
- *
25
- * @param string $names Names.
26
- * @param WC_Abstract_Order $order Order.
27
- *
28
- * @return string
29
- */
30
- public function add_fallback_to_shipping_method_name( $names, $order ) {
31
- $names = array();
32
- foreach ( $order->get_shipping_methods() as $shipping_method ) {
33
- $name = $shipping_method->get_name();
34
- $fallback = $shipping_method->get_meta( self::MATA_FS_FALLBACK );
35
- if ( '' !== $fallback ) {
36
- // Translators: shipping method name.
37
- $name = sprintf( __( '%1$s (fallback)', 'flexible-shipping' ), $name );
38
- }
39
- $names[] = $name;
40
- }
41
- return implode( ', ', $names );
42
- }
43
-
44
- /**
45
- * Hide fallback meta.
46
- *
47
- * @param array $items Items to hide.
48
- *
49
- * @return array
50
- */
51
- public function hide_fallback_meta( array $items ) {
52
- $items[] = WPDesk_Flexible_Shipping::META_DEFAULT;
53
- $items[] = self::MATA_FS_FALLBACK;
54
- $items[] = self::META_FS_RATE_TYPE;
55
- return $items;
56
- }
57
-
58
- /**
59
- * Display fallback message in order shipping.
60
- *
61
- * @param string $item_id Item Id.
62
- * @param WC_Order_Item $item Item.
63
- * @param WC_Product|null $product Produuct.
64
- */
65
- public function display_fallback_message_in_order_shipping( $item_id, $item, $product ) {
66
- if ( $item->is_type( 'shipping' ) ) {
67
- $fallback = $item->get_meta( self::MATA_FS_FALLBACK );
68
- if ( '' !== $fallback ) {
69
- include 'views/html-order-fallback-message.php';
70
- }
71
- }
72
- }
73
-
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-live-rates-handler.php DELETED
@@ -1,622 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles rate request.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler {
9
-
10
- const PRIORITY_BEFORE_DEFAULT = 9;
11
-
12
- const RATE_TYPE_LIVE = 'live';
13
- const FS_RATE_TYPE = '_fs_rate_type';
14
-
15
- /**
16
- * Integration id.
17
- *
18
- * @var string
19
- */
20
- private $integration_id;
21
-
22
- /**
23
- * Shipping service.
24
- *
25
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService
26
- */
27
- private $shipping_service;
28
-
29
- /**
30
- * SaaS connection.
31
- *
32
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
33
- */
34
- private $saas_connection;
35
-
36
- /**
37
- * Logger.
38
- *
39
- * @var \Psr\Log\LoggerInterface
40
- */
41
- private $logger;
42
-
43
- /**
44
- * Fallback error message.
45
- *
46
- * @var string
47
- */
48
- private $fallback_error_message = '';
49
-
50
- /**
51
- * WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler constructor.
52
- *
53
- * @param string $integration_id Integration id.
54
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
55
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS Connection.
56
- * @param \Psr\Log\LoggerInterface $logger Logger.
57
- */
58
- public function __construct( $integration_id, $shipping_service, $saas_connection, \Psr\Log\LoggerInterface $logger = null ) {
59
- $this->integration_id = $integration_id;
60
- $this->shipping_service = $shipping_service;
61
- $this->saas_connection = $saas_connection;
62
- $this->logger = $logger;
63
- }
64
-
65
- /**
66
- * Hooks.
67
- */
68
- public function hooks() {
69
- add_filter( 'flexible_shipping_add_method', [ $this, 'handle_saas_live_rates' ], self::PRIORITY_BEFORE_DEFAULT, 4 );
70
- add_action( 'woocommerce_before_checkout_form', [ $this, 'recalculate_shipping_for_woocomerce_manager' ] );
71
- }
72
-
73
- /**
74
- * Prepare packages.
75
- *
76
- * @param array $woocommerce_package Package.
77
- * @param string $package_type Package type.
78
- * @param string $description Description.
79
- * @param float $weight Weight.
80
- * @param int $height Height.
81
- * @param int $width Width.
82
- * @param int $length Length.
83
- *
84
- * @return array
85
- */
86
- private function prepare_packages( array $woocommerce_package, $package_type, $description, $weight, $height, $width, $length ) {
87
- $package = new \WPDesk\SaasPlatformClient\Model\Shipment\Package();
88
- $package->seTtype( $package_type );
89
- $package_weight = fs_calculate_package_weight( $woocommerce_package );
90
- if ( floatval( 0 ) === $package_weight ) {
91
- $package_weight = $weight;
92
- }
93
- $package_weight = intval( wc_get_weight( floatval( $package_weight ), 'g' ) );
94
- $package->setWeight( $package_weight );
95
-
96
- $package->setDescription( $description );
97
- $package->dimensions = new \WPDesk\SaasPlatformClient\Model\Shipment\Package\Dimensions();
98
- $package->dimensions->setHeight( intval( wc_get_dimension( floatval( $height ), 'mm' ) ) );
99
- $package->dimensions->setWidth( intval( wc_get_dimension( floatval( $width ), 'mm' ) ) );
100
- $package->dimensions->setLength( intval( wc_get_dimension( floatval( $length ), 'mm' ) ) );
101
-
102
- $packages = array( $package );
103
-
104
- return $packages;
105
- }
106
-
107
- /**
108
- * Prepare ship to address.
109
- *
110
- * @param array $package Package.
111
- *
112
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Address
113
- */
114
- private function prepare_ship_to_address( array $package ) {
115
- $destination = $package['destination'];
116
- $ship_to_address = new \WPDesk\SaasPlatformClient\Model\Shipment\Address();
117
- $ship_to_address->setAddressLine1( $destination['address'] );
118
- $ship_to_address->setAddressLine2( $destination['address_2'] );
119
- $ship_to_address->setPostalCode( str_replace( '-', '', $destination['postcode'] ) );
120
- $ship_to_address->setCity( $destination['city'] );
121
- $ship_to_address->setCountryCode( $destination['country'] );
122
- $ship_to_address->setStateCode( $destination['state'] );
123
-
124
- return $ship_to_address;
125
- }
126
-
127
-
128
- /**
129
- * Prepare ship to.
130
- *
131
- * @param array $package Package.
132
- *
133
- * @return \WPDesk\SaasPlatformClient\Model\Shipment\Actor
134
- */
135
- private function prepare_ship_to( array $package ) {
136
- $ship_to = new \WPDesk\SaasPlatformClient\Model\Shipment\Actor();
137
- $ship_to->setAddress( $this->prepare_ship_to_address( $package ) );
138
- $ship_to->setName( 'first last' );
139
- $ship_to->setCompanyName( '' );
140
- $ship_to->setPhoneNumber( '' );
141
- $ship_to->setEmail( '' );
142
- return $ship_to;
143
- }
144
-
145
- /**
146
- * Get string element from array.
147
- *
148
- * @param array $array Array.
149
- * @param string $key Key.
150
- *
151
- * @return string
152
- */
153
- private function get_string_element_from_array( array $array, $key ) {
154
- if ( isset( $array[ $key ] ) ) {
155
- return $array[ $key ];
156
- }
157
- return '';
158
- }
159
-
160
- /**
161
- * Get int element from array.
162
- *
163
- * @param array $array Array.
164
- * @param string $key Key.
165
- *
166
- * @return int
167
- */
168
- private function get_int_element_from_array( array $array, $key ) {
169
- if ( isset( $array[ $key ] ) ) {
170
- return intval( $array[ $key ] );
171
- }
172
- return 0;
173
- }
174
-
175
- /**
176
- * Prepare shipment field from send-as.
177
- *
178
- * @param array $field Field.
179
- * @param string $send_as Send as field name.
180
- * @param mixed $append_to Append to object.
181
- * @param mixed $field_value Field value.
182
- */
183
- private function prepare_shipment_field_from_send_as( array $field, $send_as, $append_to, $field_value ) {
184
- $send_as_to_array = explode( '.', $send_as );
185
- $field_name = $send_as_to_array[0];
186
- if ( 1 === count( $send_as_to_array ) ) {
187
- $append_to[ $field_name ] = $field_value;
188
- } else {
189
- unset( $send_as_to_array[0] );
190
- $append_to_field = $append_to[ $field_name ];
191
- if ( empty( $append_to_field ) ) {
192
- $append_to[ $field_name ] = new \WPDesk\SaasPlatformClient\Model\AbstractModel();
193
- }
194
- $this->prepare_shipment_field_from_send_as( $field, implode( '.', $send_as_to_array ), $append_to[ $field_name ], $field_value );
195
- }
196
- }
197
-
198
- /**
199
- * Get shipping method setting for field.
200
- *
201
- * @param array $field Field.
202
- * @param array $shipping_method Shipping method settings.
203
- *
204
- * @return bool|string
205
- */
206
- private function get_shipping_method_setting_for_field( $field, $shipping_method ) {
207
- $field_value = '';
208
- if ( isset( $shipping_method[ $this->integration_id . '_' . $field['id'] ] ) ) {
209
- $field_value = $shipping_method[ $this->integration_id . '_' . $field['id'] ];
210
- }
211
- if ( 'checkbox' === $field['type'] ) {
212
- $field_value = 'yes' === $field_value;
213
- }
214
- return $field_value;
215
- }
216
-
217
- /**
218
- * Get checkout value for field.
219
- *
220
- * @param array $field Field.
221
- *
222
- * @return string
223
- */
224
- private function get_checkout_value_for_field( array $field ) {
225
- $field_name = $field['id'] . '_' . $this->shipping_service->get_integration_id();
226
- $request_data = new WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data( $_REQUEST );
227
- $field_value = $request_data->get_data_by_name( $field_name );
228
- if ( empty( $field_value ) ) {
229
- $field_value = null;
230
- }
231
- return $field_value;
232
- }
233
-
234
- /**
235
- * Prepare rate request additional fields.
236
- *
237
- * @param \WPDesk\SaasPlatformClient\Model\Rate\RateRequest $rate_request Rate request.
238
- * @param array $fields Fields.
239
- * @param array $shipping_method Shipping method settings.
240
- *
241
- * @return \WPDesk\SaasPlatformClient\Model\Rate\RateRequest
242
- */
243
- private function prepare_rate_request_additional_fields( $rate_request, $fields, $shipping_method ) {
244
- foreach ( $fields as $fieldset ) {
245
- foreach ( $fieldset['fields'] as $field ) {
246
- if ( isset( $field['send-with'] ) && in_array( 'rate', $field['send-with'], true ) ) {
247
- if ( in_array( 'checkout', $fieldset['show-in'], true ) ) {
248
- $field_value = $this->get_checkout_value_for_field( $field );
249
- } else {
250
- $field_value = $this->get_shipping_method_setting_for_field( $field, $shipping_method );
251
- }
252
- if ( isset( $field['send-as'] ) ) {
253
- $this->prepare_shipment_field_from_send_as( $field, $field['send-as'], $rate_request, $field_value );
254
- } else {
255
- $rate_request->{$field['id']} = $field_value;
256
- }
257
- }
258
- }
259
- }
260
- return $rate_request;
261
- }
262
-
263
- /**
264
- * Prepare rate request.
265
- *
266
- * @param array $package Package.
267
- * @param array $shipping_method Shipping method.
268
- *
269
- * @return \WPDesk\SaasPlatformClient\Model\Rate\RateRequest
270
- */
271
- private function prepare_rate_request( array $package, array $shipping_method ) {
272
- $rate_request = new \WPDesk\SaasPlatformClient\Model\Rate\RateRequest();
273
- $rate_request->setServiceType( '' );
274
- $rate_request->setReferenceNumber( '' );
275
- $rate_request->setShipTo( $this->prepare_ship_to( $package ) );
276
- $package_type = $this->get_string_element_from_array( $shipping_method, $this->integration_id . '_package_type' );
277
- $description = $this->get_string_element_from_array( $shipping_method, $this->integration_id . '_description' );
278
- $weight = floatval( $this->get_string_element_from_array( $shipping_method, $this->integration_id . '_package_weight' ) );
279
- $height = $this->get_int_element_from_array( $shipping_method, $this->integration_id . '_height' );
280
- $width = $this->get_int_element_from_array( $shipping_method, $this->integration_id . '_width' );
281
- $length = $this->get_int_element_from_array( $shipping_method, $this->integration_id . '_length' );
282
- $rate_request->setPackages( $this->prepare_packages( $package, $package_type, $description, $weight, $height, $width, $length ) );
283
-
284
-
285
- $destination_country = $package['destination']['country'];
286
- $fields = $this->shipping_service->get_fields_for_targets( array( $destination_country ) );
287
- $rate_request = $this->prepare_rate_request_additional_fields( $rate_request, $fields, $shipping_method );
288
-
289
- return $rate_request;
290
- }
291
-
292
- /**
293
- * Get shipping method settings fields.
294
- *
295
- * @param array $shipping_method Shipping method.
296
- *
297
- * @return array
298
- */
299
- private function get_shipping_method_settings( array $shipping_method ) {
300
- return apply_filters( 'flexible_shipping_method_settings', array(), $shipping_method );
301
- }
302
-
303
- /**
304
- * Get custom services enabled for shipping method.
305
- *
306
- * @param array $shipping_method Shipping method.
307
- *
308
- * @return bool
309
- */
310
- private function get_custom_services_enabled( array $shipping_method ) {
311
- $custom_services_enabled = false;
312
- if ( isset( $shipping_method[ $this->integration_id . '_custom_services' ] )
313
- && 'yes' === $shipping_method[ $this->integration_id . '_custom_services' ]
314
- ) {
315
- $custom_services_enabled = true;
316
- }
317
- return $custom_services_enabled;
318
- }
319
-
320
- /**
321
- * Get custom service types from shipping method settings.
322
- *
323
- * @param array $shipping_method_settings Shipping method settings.
324
- *
325
- * @return array
326
- */
327
- private function get_custom_service_types_from_settings( array $shipping_method_settings ) {
328
- if ( isset( $shipping_method_settings[ $this->integration_id . '_service_type_custom_services' ] )
329
- && isset( $shipping_method_settings[ $this->integration_id . '_service_type_custom_services' ]['services'] )
330
- ) {
331
- $custom_services_service_types = $shipping_method_settings[ $this->integration_id . '_service_type_custom_services' ]['services'];
332
- } else {
333
- $custom_services_service_types = array();
334
- }
335
- return $custom_services_service_types;
336
- }
337
-
338
- /**
339
- * Filter rates.
340
- *
341
- * @param WPDesk\SaasPlatformClient\Model\Rate\SingleRate[] $rates Rates.
342
- * @param array $shipping_method Shipping method.
343
- *
344
- * @return array
345
- */
346
- private function filter_and_rename_rates( $rates, array $shipping_method ) {
347
- $shipping_method_settings = $this->get_shipping_method_settings( $shipping_method );
348
-
349
- $custom_services_enabled = $this->get_custom_services_enabled( $shipping_method );
350
-
351
- $custom_services_service_types = $this->get_custom_service_types_from_settings( $shipping_method_settings );
352
-
353
- foreach ( $rates as $rate_id => $rate ) {
354
- if ( isset( $custom_services_service_types[ $rate->serviceType ] ) ) {
355
- if ( $custom_services_enabled && 0 === intval( $custom_services_service_types[ $rate->serviceType ]['enabled'] ) ) {
356
- unset( $rates[ $rate_id ] );
357
- } else {
358
- $rates[ $rate_id ]->serviceName = $custom_services_service_types[ $rate->serviceType ]['name'];
359
- }
360
- } else {
361
- unset( $rates[ $rate_id ] );
362
- }
363
- }
364
- return $rates;
365
- }
366
-
367
- /**
368
- * Get rate for given service type.
369
- *
370
- * @param WPDesk\SaasPlatformClient\Model\Rate\SingleRate[] $rates Rates.
371
- * @param string $service_type_id Service type id.
372
- *
373
- * @return \WPDesk\SaasPlatformClient\Model\Rate\SingleRate|null
374
- */
375
- private function get_rate_for_service_type( $rates, $service_type_id ) {
376
- foreach ( $rates as $rate ) {
377
- if ( strval( $rate->serviceType ) === strval( $service_type_id ) ) {
378
- return $rate;
379
- }
380
- }
381
- return null;
382
- }
383
-
384
- /**
385
- * Sort rates.
386
- *
387
- * @param WPDesk\SaasPlatformClient\Model\Rate\SingleRate[] $rates Rates.
388
- * @param array $shipping_method Shipping method.
389
- *
390
- * @return array
391
- */
392
- private function sort_rates( $rates, array $shipping_method ) {
393
- $custom_services_enabled = $this->get_custom_services_enabled( $shipping_method );
394
-
395
- if ( $custom_services_enabled ) {
396
- $sorted_rates = array();
397
- $shipping_method_settings = $this->get_shipping_method_settings( $shipping_method );
398
- $custom_services_service_types = $this->get_custom_service_types_from_settings( $shipping_method_settings );
399
- foreach ( $custom_services_service_types as $service_type_id => $service_type ) {
400
- $rate = $this->get_rate_for_service_type( $rates, $service_type_id );
401
- if ( null !== $rate ) {
402
- $sorted_rates[] = $rate;
403
- }
404
- }
405
- return $sorted_rates;
406
- }
407
-
408
- return $rates;
409
- }
410
-
411
- /**
412
- * Add rates to checkout.
413
- *
414
- * @param \WPDesk\SaasPlatformClient\Model\Rate\SingleRate[] $rates Rates.
415
- * @param array $shipping_method Shipping method.
416
- * @param WPDesk_Flexible_Shipping $flexible_shipping Flexible shipping.
417
- * @param array $live_rate_response Live rate response.
418
- */
419
- private function add_rates_to_checkout( $rates, $shipping_method, $flexible_shipping, $live_rate_response ) {
420
- foreach ( $rates as $rate ) {
421
- $flexible_shipping->add_rate( array(
422
- 'id' => $flexible_shipping->id . ':' . $flexible_shipping->instance_id . ':' . $rate->serviceType,
423
- 'label' => $rate->serviceName,
424
- 'cost' => $rate->totalCharge->getAmount() / 100,
425
- 'meta_data' => array(
426
- '_fs_method' => $shipping_method,
427
- self::FS_RATE_TYPE => self::RATE_TYPE_LIVE,
428
- '_fs_saas_data' => array(
429
- WPDesk_Flexible_Shipping::META_DEFAULT => $shipping_method['method_default'],
430
- '_fs_service_type' => $rate->serviceType,
431
- '_fs_service_name' => $rate->serviceName,
432
- '_fs_live_rate_response' => $live_rate_response,
433
- ),
434
- ),
435
- ) );
436
- }
437
- }
438
-
439
- /**
440
- * Is fallback enabled?
441
- *
442
- * @param array $shipping_method_settings Shipping method settings.
443
- *
444
- * @return bool
445
- */
446
- private function is_fallback_enabled( array $shipping_method_settings ) {
447
- return 'yes' === $shipping_method_settings[ $this->integration_id . '_fallback' ];
448
- }
449
-
450
- /**
451
- * Maybe add notice in checkout page for admin.
452
- *
453
- * @param string $notice_message Notice message.
454
- * @param array $shipping_method_settings Shipping method settings.
455
- */
456
- private function maybe_add_notice_for_admin( $notice_message, $shipping_method_settings ) {
457
- if ( is_checkout() && current_user_can( 'manage_woocommerce' ) ) {
458
- $message = sprintf(
459
- // Translators: notice message.
460
- __( 'Flexible Shipping Fallback (%1$s): %2$s', 'flexible-shipping' ),
461
- $shipping_method_settings['method_title'],
462
- $notice_message
463
- );
464
- if ( ! wc_has_notice( $message, 'error' ) ) {
465
- wc_add_notice( $message, 'error' );
466
- }
467
- }
468
- }
469
-
470
- /**
471
- * Maybe show message stock.
472
- *
473
- * @param array $message_stack Message stack.
474
- * @param array $shipping_method_settings Shipping method settings.
475
- */
476
- private function maybe_show_message_stock( array $message_stack, array $shipping_method_settings ) {
477
- if ( ! is_array( $message_stack ) ) {
478
- $message_stack = array( $message_stack );
479
- }
480
- $message = '';
481
- foreach ( $message_stack as $message_stack_text ) {
482
- $message .= $message_stack_text . ' ';
483
- }
484
- if ( ! empty( $message ) ) {
485
- $this->maybe_add_notice_for_admin( $message, $shipping_method_settings );
486
- }
487
- }
488
-
489
- /**
490
- * Process SaaS live rates.
491
- *
492
- * @param bool $add_method Already processed.
493
- * @param array $shipping_method_settings Shipping method.
494
- * @param array $package Package.
495
- * @param WPDesk_Flexible_Shipping $flexible_shipping Flexible shipping.
496
- *
497
- * @return bool
498
- */
499
- private function process_live_rates( $add_method, array $shipping_method_settings, array $package, $flexible_shipping ) {
500
- $is_fallback = false;
501
- if ( $this->integration_id === $shipping_method_settings['method_integration'] ) {
502
- if ( self::RATE_TYPE_LIVE === $shipping_method_settings[ $this->integration_id . '_rates_type' ] ) {
503
- try {
504
- $rate_request = $this->prepare_rate_request( $package, $shipping_method_settings );
505
- $rate_request_response = $this->saas_connection->get_platform()->requestPostRate( $rate_request, $this->shipping_service->get_id() );
506
- if ( $rate_request_response->isError() ) {
507
- $reponse_error_body = $rate_request_response->getResponseErrorBody();
508
- if ( isset( $reponse_error_body['message'] ) && ! empty( $reponse_error_body['message'] ) ) {
509
- $this->fallback_error_message = $reponse_error_body['message'];
510
- } else {
511
- $this->fallback_error_message = sprintf(
512
- // Translators: response code.
513
- __( 'Invalid live rates response! Error code: %1$s', 'flexible-shipping' ),
514
- $rate_request_response->getResponseCode()
515
- );
516
- }
517
- $this->logger->debug( $this->fallback_error_message );
518
- $add_method = $this->is_fallback_enabled( $shipping_method_settings );
519
- $is_fallback = true;
520
- } else {
521
- $rates = $this->filter_and_rename_rates( $rate_request_response->getRate()->rates, $shipping_method_settings );
522
- $rates = $this->sort_rates( $rates, $shipping_method_settings );
523
-
524
- $rate_request_response_body = $rate_request_response->getResponseBody();
525
- $this->add_rates_to_checkout( $rates, $shipping_method_settings, $flexible_shipping, $rate_request_response_body );
526
- $add_method = false;
527
- $this->maybe_show_message_stock( $rate_request_response->getRate()->messageStack, $shipping_method_settings );
528
- }
529
- } catch ( Exception $e ) {
530
- $this->fallback_error_message = sprintf(
531
- // Translators: error message and error code.
532
- __( 'Live rates response exception %1$s; %2$s occurred while sending request', 'flexible-shipping' ),
533
- $e->getMessage(),
534
- $e->getCode()
535
- );
536
- $this->logger->error( $this->fallback_error_message );
537
- $add_method = $this->is_fallback_enabled( $shipping_method_settings );
538
- $is_fallback = true;
539
- }
540
- if ( $is_fallback ) {
541
- if ( $add_method ) {
542
- add_filter( 'woocommerce_shipping_method_add_rate', [
543
- $this,
544
- 'add_fallback_metadata_to_rate',
545
- ], 10, 3 );
546
- }
547
- $this->maybe_add_notice_for_admin( $this->fallback_error_message, $shipping_method_settings );
548
- }
549
- }
550
- }
551
- return $add_method;
552
- }
553
-
554
- /**
555
- * Handle SaaS live rates.
556
- *
557
- * @param bool $add_method Already processed.
558
- * @param array $shipping_method_settings Shipping method.
559
- * @param array $package Package.
560
- * @param null|WPDesk_Flexible_Shipping $flexible_shipping Flexible shipping.
561
- *
562
- * @return bool
563
- */
564
- public function handle_saas_live_rates( $add_method, array $shipping_method_settings, array $package, $flexible_shipping = null ) {
565
- if ( null === $flexible_shipping ) {
566
- $flexible_shipping = new WPDesk_Flexible_Shipping();
567
- }
568
- if ( $flexible_shipping->is_free_shipping( $shipping_method_settings, $flexible_shipping->contents_cost() ) ) {
569
- $add_method = true;
570
- add_filter( 'woocommerce_shipping_method_add_rate', [
571
- $this,
572
- 'add_free_shipping_metadata_to_rate',
573
- ], 10, 3 );
574
- $this->maybe_add_notice_for_admin( $this->fallback_error_message, $shipping_method_settings );
575
- } else {
576
- $add_method = $this->process_live_rates( $add_method, $shipping_method_settings, $package, $flexible_shipping );
577
- }
578
- return $add_method;
579
- }
580
-
581
-
582
- /**
583
- * Add fallback metadata to shipping rate.
584
- *
585
- * @param WC_Shipping_Rate $rate Rate.
586
- * @param array $args Args.
587
- * @param WC_Shipping_Method $shipping_method Shipping method.
588
- * @return WC_Shipping_Rate
589
- */
590
- public function add_fallback_metadata_to_rate( $rate, array $args, $shipping_method ) {
591
- remove_filter( 'woocommerce_shipping_method_add_rate', [ $this, 'add_fallback_metadata_to_rate' ], 10, 3 );
592
- $rate->add_meta_data( '_fs_fallback', $this->fallback_error_message );
593
- $rate->add_meta_data( self::FS_RATE_TYPE, self::RATE_TYPE_LIVE );
594
- return $rate;
595
- }
596
-
597
- /**
598
- * Add free shipping metadata to shipping rate.
599
- *
600
- * @param WC_Shipping_Rate $rate Rate.
601
- * @param array $args Args.
602
- * @param WC_Shipping_Method $shipping_method Shipping method.
603
- * @return WC_Shipping_Rate
604
- */
605
- public function add_free_shipping_metadata_to_rate( $rate, array $args, $shipping_method ) {
606
- remove_filter( 'woocommerce_shipping_method_add_rate', [ $this, 'add_free_shipping_metadata_to_rate' ], 10, 3 );
607
- $rate->add_meta_data( '_fs_free_shipping', 'Free shipping' );
608
- $rate->add_meta_data( self::FS_RATE_TYPE, self::RATE_TYPE_LIVE );
609
- return $rate;
610
- }
611
-
612
- /**
613
- * Recalculate shipping for woocommerce manager.
614
- * Used for fallback always visible on checkout.
615
- */
616
- public function recalculate_shipping_for_woocomerce_manager() {
617
- if ( ! is_ajax() && is_checkout() && current_user_can( 'manage_woocommerce' ) ) {
618
- WC()->session->set( 'cart_totals', null );
619
- }
620
- }
621
-
622
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-maintenance-mode-exception.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception extends RuntimeException {
7
-
8
- /**
9
- * Response
10
- *
11
- * @var \WPDesk\SaasPlatformClient\Response\Response
12
- */
13
- private $response;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception constructor.
17
- *
18
- * @param \WPDesk\SaasPlatformClient\Response\Response $response Response.
19
- * @param string $message Message.
20
- * @param int $code Code.
21
- * @param Throwable|null $previous Previous.
22
- */
23
- public function __construct( WPDesk\SaasPlatformClient\Response\Response $response, $message = '', $code = 0, Throwable $previous = null ) {
24
- parent::__construct( $message, $code, $previous );
25
- $this->response = $response;
26
- }
27
-
28
- /**
29
- * Get response.
30
- *
31
- * @return \WPDesk\SaasPlatformClient\Response\Response
32
- */
33
- public function get_response() {
34
- return $this->response;
35
- }
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-message-stock-metadata-handler.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Message_Stock_Metadata_Handler
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Message_Stock_Metadata_Handler implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- /**
11
- * Hooks.
12
- */
13
- public function hooks() {
14
- add_action( 'woocommerce_before_order_itemmeta', [ $this, 'display_message_stock_in_order_shipping' ], 10, 3 );
15
- }
16
-
17
- /**
18
- * Display message stock in order shipping.
19
- *
20
- * @param string $item_id Item Id.
21
- * @param WC_Order_Item $item Item.
22
- * @param WC_Product|null $product Produuct.
23
- */
24
- public function display_message_stock_in_order_shipping( $item_id, $item, $product ) {
25
- if ( $item->is_type( 'shipping' ) ) {
26
- $fs_saas_data = $item->get_meta( '_fs_saas_data' );
27
- if ( is_array( $fs_saas_data )
28
- && isset( $fs_saas_data['_fs_live_rate_response'] )
29
- && isset( $fs_saas_data['_fs_live_rate_response']['messageStack'] )
30
- && is_array( $fs_saas_data['_fs_live_rate_response']['messageStack'] )
31
- ) {
32
- $message = '';
33
- foreach ( $fs_saas_data['_fs_live_rate_response']['messageStack'] as $message_stock_text ) {
34
- $message .= $message_stock_text . ' ';
35
- }
36
- include 'views/html-order-message-stock.php';
37
- }
38
- }
39
- }
40
-
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-new-courier-settings-section.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Adds planned integrations section in settings.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section {
9
-
10
- /**
11
- * Platform links.
12
- *
13
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
14
- */
15
- private $saas_platform_links;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section constructor.
19
- *
20
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Platform links.
21
- */
22
- public function __construct( WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links ) {
23
- $this->saas_platform_links = $saas_platform_links;
24
- }
25
-
26
-
27
- /**
28
- * Add fields to settings.
29
- *
30
- * @param array $settings Settings.
31
- *
32
- * @return array
33
- */
34
- public function add_fields_to_settings( array $settings ) {
35
- $url = $this->saas_platform_links->add_utm(
36
- $this->saas_platform_links->get_planned(),
37
- 'fs-configuration-flexibleshippingtablerate',
38
- 'flexible-shipping',
39
- 'link',
40
- 'user-site',
41
- 'planned-integrations'
42
- );
43
- $settings[] = array(
44
- 'type' => 'long_row',
45
- 'class' => 'fs-connect-new-courier',
46
- 'content' => sprintf( // Translators: URL.
47
- __( 'Do not you see your courier? %1$sCheck planned integrations →%2$s', 'flexible-shipping' ),
48
- '<a target="_blank" href="' . $url . '">',
49
- '</a>'
50
- ),
51
- );
52
- return $settings;
53
- }
54
-
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-factory.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory {
7
-
8
- const SAAS_PLATFORM_LOGGER_SOURCE = 'saas-platform';
9
-
10
- const ONE_HOUR = 3600;
11
-
12
- /**
13
- * Logger.
14
- *
15
- * @var \Psr\Log\LoggerInterface
16
- */
17
- private $logger;
18
-
19
- /**
20
- * WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory constructor.
21
- *
22
- * @param \Psr\Log\LoggerInterface $logger Logger.
23
- */
24
- public function __construct( \Psr\Log\LoggerInterface $logger ) {
25
- $this->logger = new WPDesk_Flexible_Shipping_WooCommerce_Context_Logger(
26
- $logger,
27
- self::SAAS_PLATFORM_LOGGER_SOURCE
28
- );
29
- }
30
-
31
- /**
32
- * Get platform.
33
- *
34
- * @return \WPDesk\SaasPlatformClient\Platform
35
- */
36
- public function get_platform() {
37
- $default_headers = array();
38
- if ( defined( 'FLEXIBLE_SHIPPING_VERSION' ) ) {
39
- $default_headers['X-Plugin-Version'] = FLEXIBLE_SHIPPING_VERSION;
40
- }
41
- $platform_options = new \WPDesk\SaasPlatformClient\PlatformFactoryWordpressOptions();
42
- $platform_options->setLogger( $this->logger );
43
- $platform_options->setDefaultRequestHeaders( $default_headers );
44
-
45
- $cache_settings = new WPDesk_Flexible_Shipping_SaaS_Cache_Settings();
46
- if ( $cache_settings->is_enabled() ) {
47
- $platform_options->setCachedClient( true );
48
- }
49
- $platform_options->setCacheTtl( self::ONE_HOUR );
50
- $platform = \WPDesk\SaasPlatformClient\PlatformFactory::createPlatformApi( $platform_options );
51
-
52
- return $platform;
53
- }
54
- }
55
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-platform-links.php DELETED
@@ -1,197 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Platform_Links
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Platform_Links {
7
-
8
- const MY_ACCOUNT = 'my-account/';
9
- const SUPPORT = 'support/';
10
- const TERMS = 'terms/';
11
- const PRIVACY = 'terms/privacy/';
12
- const UPGRADE_PLAN = 'my-account/';
13
- const CONNECT = 'connect/';
14
- const PLANNED = 'product-category/integrations/';
15
-
16
- const DOCS = 'https://docs.flexibleshipping.com/category/81-getting-started';
17
- const STATUS = 'https://status.flexibleshipping.com/';
18
-
19
- const UTM_SOURCE = 'fs-signup';
20
- const UTM_MEDIUM = 'banner';
21
- const UTM_CAMPAIGN = 'fs-signup';
22
- const UTM_TERM = '';
23
-
24
- const UTM_CONTENT_GENERAL = 'general';
25
- const UTM_CONTENT_PRIVACY_POLICY = 'privacy-policy';
26
- const UTM_CONTENT_TERMS = 'terms';
27
-
28
-
29
- /**
30
- * Base URL.
31
- *
32
- * @var string
33
- */
34
- private $base_url;
35
-
36
- /**
37
- * WPDesk_Flexible_Shipping_SaaS_Platform_Links constructor.
38
- *
39
- * @param string $base_url Base URL.
40
- */
41
- public function __construct( $base_url = 'https://flexibleshipping.com/' ) {
42
- $this->base_url = trailingslashit( $base_url );
43
- }
44
-
45
- /**
46
- * Get base URL.
47
- *
48
- * @return string
49
- */
50
- public function get_base_url() {
51
- return $this->base_url;
52
- }
53
-
54
- /**
55
- * Get my account URL.
56
- *
57
- * @return string
58
- */
59
- public function get_my_account() {
60
- return $this->base_url . self::MY_ACCOUNT;
61
- }
62
-
63
- /**
64
- * Get my account URL.
65
- *
66
- * @return string
67
- */
68
- public function get_support() {
69
- return $this->base_url . self::SUPPORT;
70
- }
71
-
72
- /**
73
- * Get terms URL.
74
- *
75
- * @return string
76
- */
77
- public function get_terms() {
78
- return $this->base_url . self::TERMS;
79
- }
80
-
81
- /**
82
- * Get privacy URL.
83
- *
84
- * @return string
85
- */
86
- public function get_privacy() {
87
- return $this->base_url . self::PRIVACY;
88
- }
89
-
90
- /**
91
- * Get upgrade plan URL.
92
- *
93
- * @return string
94
- */
95
- public function get_upgrade_plan() {
96
- return $this->base_url . self::UPGRADE_PLAN;
97
- }
98
-
99
- /**
100
- * Get docs URL.
101
- *
102
- * @return string
103
- */
104
- public function get_docs() {
105
- return self::DOCS;
106
- }
107
-
108
- /**
109
- * Get status URL.
110
- *
111
- * @return string
112
- */
113
- public function get_status() {
114
- return self::STATUS;
115
- }
116
-
117
- /**
118
- * Get connect URL.
119
- *
120
- * @return string
121
- */
122
- public function get_connect() {
123
- return $this->base_url . self::CONNECT;
124
- }
125
-
126
- /**
127
- * Get planned integrations URL.
128
- *
129
- * @return string
130
- */
131
- public function get_planned() {
132
- return $this->base_url . self::PLANNED;
133
- }
134
-
135
- /**
136
- * Add UTM to URL.
137
- *
138
- * @param string $url URL.
139
- * @param string $utm_content Parameter utm_content.
140
- * @param string $utm_campaign Parameter utm_campaign.
141
- * @param string $utm_medium Parameter utm_medium.
142
- * @param string $utm_source Parameter utm_source.
143
- * @param string $utm_term Parameter utm_term.
144
- *
145
- * @return string
146
- */
147
- public function add_utm( $url, $utm_content, $utm_campaign = '', $utm_medium = '', $utm_source = '', $utm_term = '' ) {
148
- $utm_campaign = empty( $utm_campaign ) ? self::UTM_CAMPAIGN : $utm_campaign;
149
- $utm_medium = empty( $utm_medium ) ? self::UTM_MEDIUM : $utm_medium;
150
- $utm_source = empty( $utm_source ) ? self::UTM_SOURCE : $utm_source;
151
- $utm_term = empty( $utm_term ) ? self::UTM_TERM : $utm_term;
152
- return sprintf(
153
- '%1$s?utm_source=%2$s&utm_medium=%3$s&utm_campaign=%4$s&utm_content=%5$s&utm_term=%6$s',
154
- $url,
155
- $utm_source,
156
- $utm_medium,
157
- $utm_campaign,
158
- $utm_content,
159
- $utm_term
160
- );
161
- }
162
-
163
- /**
164
- * Add utm-content general to URL.
165
- *
166
- * @param string $url URL.
167
- *
168
- * @return string
169
- */
170
- public function add_utm_general( $url ) {
171
- return $this->add_utm( $url, self::UTM_CONTENT_GENERAL );
172
- }
173
-
174
- /**
175
- * Add utm-content privacy policy to URL.
176
- *
177
- * @param string $url URL.
178
- *
179
- * @return string
180
- */
181
- public function add_utm_privacy_policy( $url ) {
182
- return $this->add_utm( $url, self::UTM_CONTENT_PRIVACY_POLICY );
183
- }
184
-
185
- /**
186
- * Add utm-content terms to URL.
187
- *
188
- * @param string $url URL.
189
- *
190
- * @return string
191
- */
192
- public function add_utm_terms( $url ) {
193
- return $this->add_utm( $url, self::UTM_CONTENT_TERMS );
194
- }
195
-
196
- }
197
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-registration-second-notice.php DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice
7
- implements \WPDesk\PluginBuilder\Plugin\Hookable {
8
-
9
- const SECOND_NOTICE_NAME = 'fs_connect_start2';
10
- const SECOND_NOTICE_OPTION_NAME = 'fs_connect_start2_time';
11
- const NOTICE_START_TIME_OFFSET = 604800; // One week.
12
- //const NOTICE_START_TIME_OFFSET = 60; // One minute.
13
-
14
- /**
15
- * First notice name.
16
- *
17
- * @var string
18
- */
19
- private $first_notice_name;
20
-
21
- /**
22
- * WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice constructor.
23
- *
24
- * @param string $first_notice_name First notice name.
25
- */
26
- public function __construct( $first_notice_name ) {
27
- $this->first_notice_name = $first_notice_name;
28
- }
29
-
30
- /**
31
- * Hooks.
32
- */
33
- public function hooks() {
34
- add_action( 'wpdesk_notice_dismissed_notice', array( $this, 'save_notice_start_date' ) );
35
- add_action( 'admin_init', array( $this, 'maybe_show_notice' ) );
36
- }
37
-
38
- /**
39
- * Save notice start date.
40
- * Fires on notice dismiss.
41
- *
42
- * @param string $notice_name Dismissed notice name.
43
- */
44
- public function save_notice_start_date( $notice_name ) {
45
- if ( $this->first_notice_name === $notice_name ) {
46
- $notice_start_time = current_time( 'timestamp' ) + self::NOTICE_START_TIME_OFFSET;
47
- update_option( self::SECOND_NOTICE_OPTION_NAME, $notice_start_time );
48
- }
49
- }
50
-
51
- /**
52
- * Get notice content.
53
- *
54
- * @return string
55
- */
56
- private function get_notice_content() {
57
- $link = add_query_arg( 'page', WPDesk_Flexible_Shipping_SaaS_User_Registration::REGISTER_PAGE_SLUG, admin_url( 'admin.php' ) );
58
- ob_start();
59
- include 'views/html-flexible-shipping-connect-second-notice.php';
60
- $notice_content = ob_get_contents();
61
- ob_end_clean();
62
-
63
- return $notice_content;
64
- }
65
-
66
-
67
- /**
68
- * Maybe show notice.
69
- */
70
- public function maybe_show_notice() {
71
- $notice_start_time = intval( get_option( self::SECOND_NOTICE_OPTION_NAME, '0' ) );
72
- if ( 0 !== $notice_start_time && $notice_start_time <= current_time( 'timestamp' ) ) {
73
- $notice_content = $this->get_notice_content();
74
- new \WPDesk\Notice\PermanentDismissibleNotice(
75
- $notice_content,
76
- self::SECOND_NOTICE_NAME,
77
- \WPDesk\Notice\Notice::NOTICE_TYPE_INFO,
78
- 10,
79
- array(
80
- 'class' => self::SECOND_NOTICE_NAME,
81
- 'id' => self::SECOND_NOTICE_NAME,
82
- )
83
- );
84
- }
85
- }
86
-
87
- }
88
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-service-settings-not-found-exception.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found extends RuntimeException {
7
- }
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings-service-checkbox.php DELETED
@@ -1,145 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox {
7
-
8
- /**
9
- * Integration ID.
10
- *
11
- * @var string
12
- */
13
- private $integration_id;
14
-
15
- /**
16
- * Shipping service.
17
- *
18
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
19
- */
20
- private $shipping_service;
21
-
22
- /**
23
- * Required plugin version.
24
- *
25
- * @var null|string
26
- */
27
- private $required_plugin_version;
28
-
29
- /**
30
- * Current plugin version.
31
- *
32
- * @var string
33
- */
34
- private $current_plugin_version;
35
-
36
- /**
37
- * Is checkbox checked?
38
- *
39
- * @var bool
40
- */
41
- private $is_checked;
42
-
43
- /**
44
- * Settings URL.
45
- *
46
- * @var string
47
- */
48
- private $settings_url;
49
-
50
- /**
51
- * WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox constructor.
52
- *
53
- * @param string $integration_id Integration ID.
54
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
55
- * @param string|null $required_plugin_version Required plugin version.
56
- * @param string $current_plugin_version Current plugin version.
57
- * @param bool $is_checked Checkbox is checked.
58
- * @param string $settings_url Settings URL.
59
- */
60
- public function __construct( $integration_id, $shipping_service, $required_plugin_version, $current_plugin_version, $is_checked, $settings_url ) {
61
- $this->integration_id = $integration_id;
62
- $this->shipping_service = $shipping_service;
63
- $this->required_plugin_version = $required_plugin_version;
64
- $this->current_plugin_version = $current_plugin_version;
65
- $this->is_checked = $is_checked;
66
- $this->settings_url = $settings_url;
67
- }
68
-
69
- /**
70
- * Add description to checkbox.
71
- *
72
- * @param array $checkbox_field Checkbox field.
73
- *
74
- * @return array
75
- */
76
- private function add_description_to_checkbox_for_required_plugin_version( array $checkbox_field ) {
77
- if ( empty( $this->required_plugin_version ) ) {
78
- $checkbox_field['description'] = __( 'Invalid requireWordpressPluginVersion capability!', 'flexible-shipping' );
79
- $checkbox_field['disabled'] = true;
80
- } elseif ( version_compare( $this->required_plugin_version, $this->current_plugin_version ) > 0 ) {
81
- $checkbox_field['description'] = sprintf(
82
- // Translators: plugin version.
83
- __( 'This integration requires Flexible Shipping Plugin in version %1$s or newer!', 'flexible-shipping' ),
84
- $this->required_plugin_version
85
- );
86
- $checkbox_field['disabled'] = true;
87
- } else {
88
- if ( $this->is_checked ) {
89
- $settings_url = $this->settings_url;
90
- $link_id = 'saas-settings-link-' . $this->shipping_service->get_id();
91
- // Translators: URL.
92
- $link_text = sprintf( __( 'Go to %s settings</a>', 'flexible-shipping' ), $this->shipping_service->get_name() );
93
-
94
- $checkbox_field['description'] = '<a id="' . esc_attr( $link_id ) . '" href="' . $settings_url . '">' . $link_text . '</a>';
95
- }
96
- }
97
- return $checkbox_field;
98
- }
99
-
100
- /**
101
- * Setup promoted service.
102
- *
103
- * @param array $checkbox_field
104
- *
105
- * @return array
106
- */
107
- private function setup_promoted( array $checkbox_field ) {
108
- $checkbox_field['title'] = sprintf(
109
- // Translators: span and service name.
110
- __( '%1$s%2$s (new)%3$s', 'flexible-shipping' ),
111
- '<span class="fs-new-service">',
112
- $this->shipping_service->get_name(),
113
- '</span>'
114
- );
115
- return $checkbox_field;
116
- }
117
-
118
- /**
119
- * Prepare checkbox.
120
- *
121
- * @return array
122
- */
123
- public function prepare_checkbox() {
124
- $checkbox_field = [
125
- 'type' => 'checkbox',
126
- 'title' => $this->shipping_service->get_name(),
127
- 'label' => __( 'Enable', 'flexible-shipping' ) . ' ' . $this->shipping_service->get_name(),
128
- 'class' => 'flexible-shipping-saas-shipping-provider',
129
- 'custom_attributes' => array(
130
- 'data-shipping_provider_id' => esc_attr( $this->shipping_service->get_id() ),
131
- 'data-shipping_provider_name' => esc_attr( $this->shipping_service->get_name() ),
132
- ),
133
- ];
134
-
135
- if ( $this->shipping_service->get_promoted() ) {
136
- $checkbox_field = $this->setup_promoted( $checkbox_field );
137
- }
138
-
139
- $checkbox_field = $this->add_description_to_checkbox_for_required_plugin_version( $checkbox_field );
140
-
141
- return $checkbox_field;
142
-
143
- }
144
-
145
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-settings.php DELETED
@@ -1,436 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
- */
6
-
7
- class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implements WPDesk_Flexible_Shipping_Saas_Connection_Aware {
8
-
9
- const METHOD_ID = 'flexible_shipping_connect';
10
-
11
- const FILTER_FLEXIBLE_SHIPPING_SAAS_SERVICES = 'flexible_shipping_saas_services';
12
-
13
- const WOOCOMMERCE_PAGE_WC_SETTINGS = 'wc-settings';
14
-
15
- const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
16
-
17
- const WPDESK_HELPER_OPTIONS = 'wpdesk_helper_options';
18
- /**
19
- * Shipping methods manager.
20
- *
21
- * @var WPDesk_Flexible_Shipping_SaaS_Services_Manager
22
- */
23
- private $shipping_methods_manager;
24
-
25
- /**
26
- * Saas connection.
27
- *
28
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
29
- */
30
- private $saas_connection = null;
31
-
32
- /**
33
- * Links.
34
- *
35
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
36
- */
37
- private $saas_platform_links;
38
-
39
- /**
40
- * Logger settings.
41
- *
42
- * @var WPDesk_Flexible_Shipping_SaaS_Logger_Settings
43
- */
44
- private $logger_settings;
45
-
46
- /**
47
- * Cache settings.
48
- *
49
- * @var WPDesk_Flexible_Shipping_SaaS_Logger_Settings
50
- */
51
- private $cache_settings;
52
-
53
- /**
54
- * New courier settings section.
55
- *
56
- * @var WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section
57
- */
58
- private $new_courier_settings_section;
59
-
60
- /**
61
- * Settings integration checkbox.
62
- *
63
- * @var WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
64
- */
65
- private $integration_checkbox;
66
-
67
- /**
68
- * WPDesk_Flexible_Shipping_Connect constructor.
69
- *
70
- * @param int $instance_id Instance id.
71
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
72
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
73
- * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
74
- * @param WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox Setting integration checkbox.
75
- */
76
- public function __construct(
77
- $instance_id = 0,
78
- $saas_connection = null,
79
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
80
- $shipping_methods_manager = null,
81
- WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox
82
-
83
- ) {
84
- parent::__construct( $instance_id );
85
- $this->id = self::METHOD_ID;
86
- $this->enabled = 'no';
87
- $this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
88
-
89
- $this->supports = array(
90
- 'settings',
91
- );
92
-
93
- $this->shipping_methods_manager = $shipping_methods_manager;
94
- $this->saas_connection = $saas_connection;
95
- $this->integration_checkbox = $integration_checkbox;
96
-
97
- if ( null === $saas_platform_links ) {
98
- $saas_platform_links = new WPDesk_Flexible_Shipping_SaaS_Platform_Links();
99
- }
100
- $this->saas_platform_links = $saas_platform_links;
101
-
102
- $this->logger_settings = new WPDesk_Flexible_Shipping_SaaS_Logger_Settings( $this );
103
-
104
- $this->cache_settings = new WPDesk_Flexible_Shipping_SaaS_Cache_Settings();
105
-
106
- $this->new_courier_settings_section = new WPDesk_Flexible_Shipping_SaaS_New_Courier_Settings_Section( $this->saas_platform_links );
107
-
108
- $this->init_form_fields();
109
-
110
- add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
111
- }
112
-
113
- /**
114
- * Set shipping methods manager.
115
- *
116
- * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
117
- */
118
- public function set_shipping_methods_manager( $shipping_methods_manager ) {
119
- $this->shipping_methods_manager = $shipping_methods_manager;
120
- }
121
-
122
- /**
123
- * Set SaaS Connection.
124
- *
125
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
126
- */
127
- public function set_saas_connection( $saas_connection ) {
128
- $this->saas_connection = $saas_connection;
129
- }
130
-
131
- /**
132
- * Update all shipping services.
133
- *
134
- * @param array $shipping_providers Shipping providers.
135
- */
136
- private function update_all_shipping_services( array $shipping_providers ) {
137
- $this->shipping_methods_manager->update_all_shipping_services( $shipping_providers );
138
- }
139
-
140
- /**
141
- * Update debug mode.
142
- */
143
- private function update_debug_mode() {
144
- $this->logger_settings->update_option_from_saas_settings( $this );
145
- }
146
-
147
- /**
148
- * Update cache settings.
149
- */
150
- private function update_cache_settings() {
151
- $this->cache_settings->update_option_from_saas_settings( $this );
152
- }
153
-
154
- /**
155
- * Process admin options.
156
- */
157
- public function process_admin_options() {
158
- parent::process_admin_options();
159
- $shipping_service = $this->get_shipping_services_from_platform();
160
- $this->update_all_shipping_services( $shipping_service );
161
- $enabled_shipping_services = array();
162
- /**
163
- * IDE type hint.
164
- *
165
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService $service
166
- */
167
- foreach ( $shipping_service as $service ) {
168
- $shipping_service = WPDesk_Flexible_Shipping_SaaS_Shipping_Service::create_from_platform_service(
169
- $this->saas_connection,
170
- $this->saas_platform_links,
171
- $service
172
- );
173
- if ( 'yes' === $this->get_option( $shipping_service->get_integration_id(), 'no' ) ) {
174
- $enabled_shipping_services[] = $service->getId();
175
- }
176
- }
177
- $this->update_debug_mode();
178
- $this->update_cache_settings();
179
- $this->shipping_methods_manager->update_enabled_shipping_services( $enabled_shipping_services );
180
- $url = admin_url( self::WOOCOMMERCE_SETTINGS_SHIPPING_URL );
181
- $url = add_query_arg( 'section', $this->id, $url );
182
- $url = add_query_arg(
183
- WPDesk_Flexible_Shipping_SaaS_Services_Manager::PARAMETER_SETTINGS_UPDATED,
184
- WPDesk_Flexible_Shipping_SaaS_Services_Manager::PARAMETER_SETTINGS_UPDATED_VALUE,
185
- $url
186
- );
187
- wp_safe_redirect( $url );
188
- exit;
189
- }
190
-
191
- /**
192
- * In settings screen?
193
- *
194
- * @return bool
195
- */
196
- public function is_in_settings() {
197
- if ( is_admin() && isset( $_GET['page'] ) && isset( $_GET['section'] ) ) {
198
- $page = $_GET['page'];
199
- $section = $_GET['section'];
200
- if ( self::WOOCOMMERCE_PAGE_WC_SETTINGS === $page && self::METHOD_ID === $section ) {
201
- return true;
202
- }
203
- }
204
-
205
- return false;
206
- }
207
-
208
- /**
209
- * Get shipping providers from platform.
210
- *
211
- * @return array
212
- * @throws Exception Exception.
213
- */
214
- private function get_shipping_services_from_platform() {
215
- try {
216
- $saas_shipping_services = $this->saas_connection->get_saas_shipping_services();
217
- $shipping_services_from_platform = $saas_shipping_services->get_shipping_services_from_platform();
218
- } catch ( WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception $e ) {
219
- $shipping_services_from_platform = array();
220
- }
221
-
222
- return $shipping_services_from_platform;
223
- }
224
-
225
- /**
226
- * Maybe update integration checkbox.
227
- *
228
- * @param string|null $required_plugin_version Required plugin version.
229
- * @param string $integration_id Integration ID.
230
- */
231
- private function maybe_update_integration_checkbox( $required_plugin_version, $integration_id ) {
232
- if ( empty( $required_plugin_version )
233
- || version_compare( $required_plugin_version, FLEXIBLE_SHIPPING_VERSION ) > 0
234
- ) {
235
- $this->update_option( $integration_id, 'no' );
236
- }
237
- }
238
-
239
- /**
240
- * Add shipping providers checkboxes to settings.
241
- *
242
- * @param array $settings Settings.
243
- * @param array $shipping_services_from_platform Shipping providers from platform.
244
- *
245
- * @return array
246
- */
247
- private function add_shipping_services_checkboxes_to_settings( array $settings, array $shipping_services_from_platform ) {
248
- if ( count( $shipping_services_from_platform ) ) {
249
- $settings[] = array(
250
- 'type' => 'title',
251
- 'title' => __( 'Connect Services', 'flexible-shipping' ),
252
- 'description' => __( 'Enable services to automate shipping and print labels with Flexible Shipping Connect.', 'flexible-shipping' ),
253
- );
254
- foreach ( $shipping_services_from_platform as $shipping_service_from_platform ) {
255
- $shipping_service = WPDesk_Flexible_Shipping_SaaS_Shipping_Service::create_from_platform_service(
256
- $this->saas_connection,
257
- $this->saas_platform_links,
258
- $shipping_service_from_platform
259
- );
260
-
261
- $integration_id = $shipping_service->get_integration_id();
262
-
263
- $required_plugin_version = $shipping_service->get_capability( 'requireWordpressPluginVersion' );
264
- $this->maybe_update_integration_checkbox( $required_plugin_version, $integration_id );
265
-
266
- $service_checkbox = new WPDesk_Flexible_Shipping_SaaS_Settings_Service_Checkbox(
267
- $integration_id,
268
- $shipping_service,
269
- $required_plugin_version,
270
- FLEXIBLE_SHIPPING_VERSION,
271
- 'yes' === $this->get_option( $integration_id ),
272
- admin_url( self::WOOCOMMERCE_SETTINGS_SHIPPING_URL . '&section=' . $integration_id )
273
- );
274
-
275
- $settings[ $integration_id ] = $service_checkbox->prepare_checkbox();
276
- }
277
- }
278
-
279
- return $settings;
280
- }
281
-
282
- /**
283
- * Initialise Settings Form Fields.
284
- */
285
- public function init_form_fields() {
286
- $this->form_fields = array(
287
- 'flexible_shipping' => array(
288
- 'type' => 'flexible_shipping',
289
- ),
290
- 'saas_connection' => array(
291
- 'type' => 'saas_connection',
292
- ),
293
- );
294
-
295
- if ( $this->is_in_settings() ) {
296
- if ( $this->saas_connection->is_connected() ) {
297
- $shipping_providers_from_platform = $this->get_shipping_services_from_platform();
298
- if ( count( $shipping_providers_from_platform ) ) {
299
- $this->form_fields = $this->add_shipping_services_checkboxes_to_settings( $this->form_fields, $shipping_providers_from_platform );
300
- }
301
- $this->form_fields = $this->new_courier_settings_section->add_fields_to_settings( $this->form_fields );
302
- }
303
- $this->form_fields[] = array(
304
- 'type' => 'title',
305
- 'title' => __( 'Advanced settings', 'flexible-shipping' ),
306
- );
307
- $this->form_fields = $this->logger_settings->add_fields_to_settings( $this->form_fields );
308
- $this->form_fields = $this->cache_settings->add_fields_to_settings( $this->form_fields );
309
- }
310
- }
311
-
312
- /**
313
- * Generate HTML for FC connect notice
314
- *
315
- * @param string $key Key.
316
- * @param array $data Data.
317
- *
318
- * @return string
319
- */
320
- public function generate_fsconnect_html( $key, $data ) {
321
- $saas_connected = $this->saas_connection->is_connected();
322
- $html_class_is_dismissible = 'is-dismissible';
323
- ob_start();
324
- include 'views/html-flexible-shipping-connect-notice.php';
325
- $notice_content = ob_get_contents();
326
- ob_end_clean();
327
- return $notice_content;
328
- }
329
-
330
- /**
331
- * Generate FC connect box
332
- *
333
- * @param string $key Key.
334
- * @param array $data Data.
335
- *
336
- * @return string
337
- */
338
- public function generate_flexible_shipping_html( $key, $data ) {
339
- $html_class_is_dismissible = 'is-dismissible';
340
- $integration_checkbox = $this->integration_checkbox->is_visible();
341
- $show_fs_connect = $this->saas_connection->is_connected();
342
-
343
- ob_start();
344
- include 'views/html-shipping-method-info-description.php';
345
- $notice_content = ob_get_contents();
346
- ob_end_clean();
347
- return $notice_content;
348
- }
349
-
350
- /**
351
- * Generate Flexibble Shipping box.
352
- *
353
- * @param string $key Key.
354
- * @param array $data Data.
355
- *
356
- * @return string
357
- */
358
- public function generate_saas_connection_html( $key, $data ) {
359
- ob_start();
360
- $saas_connection = $this->saas_connection;
361
- $integration_checkbox = $this->integration_checkbox->is_visible();
362
- $saas_platform_my_account_url = $this->saas_platform_links->add_utm(
363
- $this->saas_platform_links->get_my_account(),
364
- 'fs-configuration-myaccount',
365
- 'flexible-shipping',
366
- 'link',
367
- 'user-site',
368
- 'your-account'
369
- );
370
- $saas_platform_docs_url = $this->saas_platform_links->add_utm(
371
- $this->saas_platform_links->get_docs(),
372
- 'fs-configuration-howtostart',
373
- 'flexible-shipping',
374
- 'link',
375
- 'user-site',
376
- 'check-how-to-start-with-FS-Connect'
377
- );
378
- $saas_connected = $this->saas_connection->is_connected();
379
- include 'views/html-field-saas-connection.php';
380
-
381
- return ob_get_clean();
382
- }
383
-
384
-
385
- /**
386
- * Generate settings HTML.
387
- *
388
- * @param array $form_fields Form fields.
389
- * @param bool $echo Echo settings.
390
- *
391
- * @return string
392
- * @throws Exception Exception.
393
- */
394
- public function generate_settings_html( $form_fields = array(), $echo = true ) {
395
- ob_start();
396
- $this->saas_connection->clear_saas_client_cache();
397
- $html = parent::generate_settings_html( $form_fields, $echo );
398
- $saas_connected = $this->saas_connection->is_connected();
399
- $shipping_providers = $this->get_shipping_services_from_platform();
400
- if ( 0 === count( $shipping_providers ) ) {
401
- $saas_connected = false;
402
- } else {
403
- $this->update_all_shipping_services( $shipping_providers );
404
- }
405
- include 'views/html-settings-connect-script.php';
406
- $html .= ob_get_clean();
407
- if ( $echo ) {
408
- echo $html;
409
- } else {
410
- return $html;
411
- }
412
- }
413
-
414
- /**
415
- * Generate Text Input HTML.
416
- *
417
- * @param string $key Field key.
418
- * @param array $data Field data.
419
- *
420
- * @since 1.0.0
421
- * @return string
422
- */
423
- public function generate_long_row_html( $key, $data ) {
424
- $field_key = $this->get_field_key( $key );
425
- $defaults = array(
426
- 'content' => '',
427
- 'class' => '',
428
- );
429
- $data = wp_parse_args( $data, $defaults );
430
- ob_start();
431
- include 'views/html-settings-long-row.php';
432
-
433
- return ob_get_clean();
434
- }
435
-
436
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-auto-create.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create {
7
-
8
- /**
9
- * Integration id.
10
- *
11
- * @var string
12
- */
13
- private $integration_id;
14
-
15
- /**
16
- * Shipping service.
17
- *
18
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService
19
- */
20
- private $shipping_service;
21
-
22
- /**
23
- * Logger.
24
- *
25
- * @var \Psr\Log\LoggerInterface
26
- */
27
- private $logger;
28
-
29
- /**
30
- * WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Handler constructor.
31
- *
32
- * @param string $integration_id Integration id.
33
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
34
- * @param \Psr\Log\LoggerInterface $logger Logger.
35
- */
36
- public function __construct( $integration_id, $shipping_service, $logger ) {
37
- $this->integration_id = $integration_id;
38
- $this->shipping_service = $shipping_service;
39
- $this->logger = $logger;
40
- }
41
-
42
- /**
43
- * Hooks.
44
- */
45
- public function hooks() {
46
- add_action( 'woocommerce_order_status_changed', array( $this, 'handle_shipment_create' ), 10, 3 );
47
- }
48
-
49
- /**
50
- * Handle shipment create.
51
- *
52
- * @param int $order_id Order ID.
53
- * @param string $old_status Old status.
54
- * @param string $new_status New status.
55
- */
56
- public function handle_shipment_create( $order_id, $old_status, $new_status ) {
57
- if ( $this->shipping_service->is_auto_shipment_settings_auto_create() ) {
58
- if ( $this->shipping_service->is_order_status_shipment_settings_order_status( $new_status ) ) {
59
- $shipments = fs_get_order_shipments( $order_id, $this->integration_id );
60
- foreach ( $shipments as $shipment ) {
61
- if ( $shipment->is_status_fs_new() ) {
62
- try {
63
- $shipment->set_sent_via_auto();
64
- $shipment->api_create();
65
- } catch ( Exception $e ) {
66
- $this->logger->error( "Auto creating shipment error {$e->getMessage()}; {$e->getCode()}" );
67
- }
68
- }
69
- }
70
- }
71
- }
72
- }
73
-
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-order-auto-complete.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete {
7
-
8
- /**
9
- * Integration id.
10
- *
11
- * @var string
12
- */
13
- private $integration_id;
14
-
15
- /**
16
- * Shipping service.
17
- *
18
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService
19
- */
20
- private $shipping_service;
21
-
22
- /**
23
- * Logger.
24
- *
25
- * @var \Psr\Log\LoggerInterface
26
- */
27
- private $logger;
28
-
29
- /**
30
- * WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Handler constructor.
31
- *
32
- * @param string $integration_id Integration id.
33
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
34
- * @param \Psr\Log\LoggerInterface $logger Logger.
35
- */
36
- public function __construct( $integration_id, $shipping_service, $logger ) {
37
- $this->integration_id = $integration_id;
38
- $this->shipping_service = $shipping_service;
39
- $this->logger = $logger;
40
- }
41
-
42
- /**
43
- * Hooks.
44
- */
45
- public function hooks() {
46
- add_action( 'flexible_shipping_shipment_confirmed', array( $this, 'handle_complete_order' ) );
47
- }
48
-
49
- /**
50
- * Handle complete order.
51
- *
52
- * @param WPDesk_Flexible_Shipping_Shipment $shipment Shipment.
53
- */
54
- public function handle_complete_order( WPDesk_Flexible_Shipping_Shipment $shipment ) {
55
- if ( $this->integration_id === $shipment->get_meta( '_integration', '' ) ) {
56
- if ( $this->shipping_service->is_shipment_settings_complete_order() ) {
57
- $order = $shipment->get_order();
58
- if ( ! $order->has_status( 'completed' ) ) {
59
- $order->update_status( 'completed', __( 'Order status changed automatically by Flexible Shipping Plugin.', 'flexible-shipping' ) );
60
- }
61
- }
62
- }
63
- }
64
-
65
-
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipment-settings-field.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field {
7
-
8
- /**
9
- * Saas field.
10
- *
11
- * @var array
12
- */
13
- private $saas_field;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Settings_Field constructor.
17
- *
18
- * @param array $saas_field SaaS field.
19
- */
20
- public function __construct( array $saas_field ) {
21
- $this->saas_field = $saas_field;
22
- }
23
-
24
- /**
25
- * Add fields to settings.
26
- *
27
- * @param array $settings Settings.
28
- *
29
- * @return array
30
- */
31
- public function add_fields_to_settings( array $settings ) {
32
- $order_statuses = wc_get_order_statuses();
33
-
34
- $field_id = $this->saas_field['id'];
35
-
36
- $settings[ $field_id . '_auto_create' ] = array(
37
- 'title' => __( 'Create shipments', 'flexible-shipping' ),
38
- 'type' => 'select',
39
- 'class' => 'fs-settings-shipments',
40
- 'default' => 'manual',
41
- 'options' => array(
42
- 'manual' => __( 'Manually', 'flexible-shipping' ),
43
- 'auto' => __( 'Automatically', 'flexible-shipping' ),
44
- ),
45
- 'description' => __( 'Choose to create shipments manually or automatically based on the order status.', 'flexible-shipping' ),
46
- 'desc_tip' => true,
47
- );
48
- $settings[ $field_id . '_order_status' ] = array(
49
- 'title' => __( 'Order status', 'flexible-shipping' ),
50
- 'type' => 'select',
51
- 'class' => 'fs-settings-shipments',
52
- 'default' => 'wc-completed',
53
- 'options' => $order_statuses,
54
- 'description' => __( 'Select order status for automatic shipment creation.', 'flexible-shipping' ),
55
- 'desc_tip' => true,
56
- );
57
- $settings[ $field_id . '_complete_order' ] = array(
58
- 'title' => __( 'Complete order', 'flexible-shipping' ),
59
- 'type' => 'checkbox',
60
- 'class' => 'fs-settings-shipments',
61
- 'label' => __( 'Enable automatic order status change', 'flexible-shipping' ),
62
- 'default' => 'no',
63
- 'description' => __( 'Automatically change order status to completed after creating shipment.', 'flexible-shipping' ),
64
- 'desc_tip' => true,
65
- );
66
-
67
- return $settings;
68
- }
69
-
70
- /**
71
- * Add settings for platform.
72
- *
73
- * @param array $settings Settings.
74
- * @param array $settings_for_platform Settings for platform.
75
- *
76
- * @return array
77
- */
78
- public function add_settings_for_platform( array $settings, array $settings_for_platform ) {
79
- $field_id = $this->saas_field['id'];
80
-
81
- $field_key = $field_id . '_auto_create';
82
- $settings_for_platform[ $field_key ] = $settings[ $field_key ];
83
-
84
- $field_key = $field_id . '_order_status';
85
- $settings_for_platform[ $field_key ] = $settings[ $field_key ];
86
-
87
- $field_key = $field_id . '_complete_order';
88
- $settings_for_platform[ $field_key ] = $settings[ $field_key ];
89
-
90
- return $settings_for_platform;
91
- }
92
-
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-method-integration-settings.php DELETED
@@ -1,369 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings {
7
-
8
- const TYPE_TEXT = 'text';
9
- const TYPE_CHECKBOX = 'checkbox';
10
- const TYPE_SELECT = 'select';
11
- const TYPE_CUSTOM_SERVICES = 'custom_services';
12
-
13
- const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
14
-
15
- /**
16
- * SaaS connection.
17
- *
18
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
19
- */
20
- private $saas_connection;
21
-
22
- /**
23
- * Shipping service.
24
- *
25
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService
26
- */
27
- private $shipping_service;
28
-
29
- /**
30
- * Field name prefix.
31
- *
32
- * @var string
33
- */
34
- private $field_name_prefix;
35
-
36
- /**
37
- * Integration ID.
38
- *
39
- * @var string
40
- */
41
- private $integration_id;
42
-
43
- /**
44
- * Supported columns types.
45
- *
46
- * @var array
47
- */
48
- private $supported_columns_types;
49
-
50
- /**
51
- * Logger.
52
- *
53
- * @var \Psr\Log\LoggerInterface
54
- */
55
- private $logger;
56
-
57
- /**
58
- * Live rates handler.
59
- *
60
- * @var WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler
61
- */
62
- private $live_rates_handler;
63
-
64
- /**
65
- * Shipment auto create.
66
- *
67
- * @var WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create
68
- */
69
- private $shipment_auto_create;
70
-
71
- /**
72
- * Shipment Order auto complete.
73
- *
74
- * @var WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete
75
- */
76
- private $shipment_order_auto_complete;
77
-
78
- /**
79
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings constructor.
80
- *
81
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
82
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS Connection.
83
- * @param \Psr\Log\LoggerInterface $logger Logger.
84
- */
85
- public function __construct( $shipping_service, $saas_connection, \Psr\Log\LoggerInterface $logger = null ) {
86
- $this->shipping_service = $shipping_service;
87
- $this->saas_connection = $saas_connection;
88
- $this->integration_id = $shipping_service->get_integration_id();
89
- $this->field_name_prefix = $this->integration_id . '_';
90
-
91
- $this->supported_columns_types = array( self::TYPE_TEXT, self::TYPE_CHECKBOX, self::TYPE_SELECT, self::TYPE_CUSTOM_SERVICES );
92
-
93
- if ( $shipping_service->supports( 'supportsShipmentLiveRates' ) ) {
94
- $this->live_rates_handler = new WPDesk_Flexible_Shipping_SaaS_Live_Rates_Handler(
95
- $this->integration_id,
96
- $shipping_service,
97
- $saas_connection,
98
- $logger
99
- );
100
- }
101
-
102
- $this->shipment_auto_create = new WPDesk_Flexible_Shipping_SaaS_Shipment_Auto_Create(
103
- $this->integration_id,
104
- $shipping_service,
105
- $logger
106
- );
107
-
108
- $this->shipment_order_auto_complete = new WPDesk_Flexible_Shipping_SaaS_Shipment_Order_Auto_Complete(
109
- $this->integration_id,
110
- $shipping_service,
111
- $logger
112
- );
113
-
114
- $this->logger = $logger;
115
- }
116
-
117
- /**
118
- * Hooks.
119
- */
120
- public function hooks() {
121
- add_filter( 'flexible_shipping_integration_options', array( $this, 'add_shipping_integrations_options' ) );
122
-
123
- add_filter( 'flexible_shipping_method_settings', array( $this, 'get_settings_for_flexible_shipping_method' ), 10, 2 );
124
-
125
- add_action( 'flexible_shipping_method_script', array( $this, 'add_flexible_shipping_integration_script' ) );
126
-
127
- add_filter( 'flexible_shipping_process_admin_options', array( $this, 'process_flexible_shipping_integration_options' ), 10, 1 );
128
-
129
- add_filter( 'flexible_shipping_method_integration_col', array( $this, 'show_integration_in_flexible_shipping_integration_col' ), 10, 2 );
130
-
131
- if ( isset( $this->live_rates_handler ) ) {
132
- $this->live_rates_handler->hooks();
133
- }
134
-
135
- $this->shipment_auto_create->hooks();
136
-
137
- $this->shipment_order_auto_complete->hooks();
138
- }
139
-
140
- /**
141
- * Add shipping integrations
142
- *
143
- * @param array $options Options.
144
- *
145
- * @return array
146
- */
147
- public function add_shipping_integrations_options( array $options ) {
148
- $options[ $this->integration_id ] = $this->shipping_service->get_name();
149
- return $options;
150
- }
151
-
152
- /**
153
- * Add CSS class to fields.
154
- *
155
- * @param array $settings Settings.
156
- *
157
- * @return array
158
- */
159
- private function add_css_class_to_settings_fields( array $settings ) {
160
- foreach ( $settings as $field_key => $field ) {
161
- $settings[ $field_key ]['class'] = empty( $settings[ $field_key ]['class'] ) ? '' : $settings[ $field_key ]['class'] . ' ';
162
- $settings[ $field_key ]['class'] .= $this->integration_id;
163
- }
164
- return $settings;
165
- }
166
-
167
- /**
168
- * Add CSS class to fields.
169
- *
170
- * @param array $settings Settings.
171
- *
172
- * @return array
173
- */
174
- private function remove_required_attribute_from_settings_fields( array $settings ) {
175
- foreach ( $settings as $field_key => $field ) {
176
- $custom_attributes_key = 'custom_attributes';
177
- $custom_attributes = isset( $field[ $custom_attributes_key ] ) ? $field[ $custom_attributes_key ] : array();
178
- if ( isset( $custom_attributes['required'] ) ) {
179
- unset( $custom_attributes['required'] );
180
- }
181
- $settings[ $field_key ][ $custom_attributes_key ] = $custom_attributes;
182
- }
183
- return $settings;
184
- }
185
-
186
- /**
187
- * Setup shipping integrations settings values.
188
- *
189
- * @param array $settings Settings fields.
190
- * @param array $shipping_method Shipping method.
191
- *
192
- * @return array
193
- */
194
- private function setup_settings_values( array $settings, array $shipping_method ) {
195
- foreach ( $settings as $field_key => $field ) {
196
- if ( isset( $shipping_method[ $field_key ] ) ) {
197
- $settings[ $field_key ]['default'] = $shipping_method[ $field_key ];
198
- }
199
- }
200
- return $settings;
201
- }
202
-
203
- /**
204
- * Setup shipping integrations custom services values.
205
- *
206
- * @param array $settings Settings fields.
207
- * @param array $shipping_method Shipping method.
208
- *
209
- * @return array
210
- */
211
- private function setup_custom_services( array $settings, array $shipping_method ) {
212
- foreach ( $settings as $field_key => $field ) {
213
- if ( self::TYPE_CUSTOM_SERVICES === $settings[ $field_key ]['type'] ) {
214
- $custom_services_settings = new WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings(
215
- $settings[ $field_key ],
216
- isset( $shipping_method[ $field_key ] ) ? $shipping_method[ $field_key ] : array()
217
- );
218
- $settings[ $field_key ]['services'] = $custom_services_settings->setup_custom_services();
219
- }
220
- }
221
- return $settings;
222
- }
223
-
224
- /**
225
- * Get settings for shipping method instance.
226
- *
227
- * @param int $shiping_method_instance_id Shipping method instance ID.
228
- *
229
- * @return array
230
- */
231
- private function get_settings_for_shipping_method_instance( $shiping_method_instance_id ) {
232
- $shipping_zone = WC_Shipping_Zones::get_zone_by( 'instance_id', $shiping_method_instance_id );
233
- $shipping_zone_data_extractor = new WPDesk_Flexible_Shipping_Shipping_Zone_Data_Extractor( $shipping_zone );
234
- $countries = $shipping_zone_data_extractor->get_countries();
235
- $settings = $this->shipping_service->prepare_flexible_shipping_integration_settings_fields( $this->field_name_prefix, $countries );
236
- return $settings;
237
- }
238
-
239
-
240
- /**
241
- * Get settings for flexible shipping method.
242
- *
243
- * @param array $flexible_shipping_settings Flexible Shipping settings.
244
- * @param array $shipping_method Shipping method.
245
- *
246
- * @return array
247
- */
248
- public function get_settings_for_flexible_shipping_method( array $flexible_shipping_settings, array $shipping_method ) {
249
- try {
250
- $settings = $this->get_settings_for_shipping_method_instance( intval( $shipping_method['woocommerce_method_instance_id'] ) );
251
- $settings = $this->remove_required_attribute_from_settings_fields( $settings );
252
- $settings = $this->setup_settings_values( $settings, $shipping_method );
253
- $settings = $this->setup_custom_services( $settings, $shipping_method );
254
- } catch ( WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found $e ) {
255
- $settings = array(
256
- $this->field_name_prefix . '_error' => array(
257
- 'type' => 'saas_connection_error',
258
- 'description' => $this->shipping_service->prepare_settings_not_found_message(),
259
- 'class' => 'flexible_shipping_saas_connection_error',
260
- ),
261
- );
262
- } catch ( Exception $e ) {
263
- $settings = array(
264
- $this->field_name_prefix . '_error' => array(
265
- 'type' => 'saas_connection_error',
266
- 'description' => $this->saas_connection->prepare_fatal_error_notice(),
267
- 'class' => 'flexible_shipping_saas_connection_error',
268
- ),
269
- );
270
- }
271
- $settings = $this->add_css_class_to_settings_fields( $settings );
272
- return array_merge( $flexible_shipping_settings, $settings );
273
- }
274
-
275
- /**
276
- * Add Flexible Shipping integration script.
277
- */
278
- public function add_flexible_shipping_integration_script() {
279
- ?>
280
- <script type="text/javascript">
281
- jQuery(document).ready(function() {
282
- jQuery('#woocommerce_flexible_shipping_method_integration').change(function() {
283
- flexible_shipping_saas_integration_options('<?php echo $this->integration_id; ?>');
284
- });
285
- flexible_shipping_saas_integration_options('<?php echo $this->integration_id; ?>');
286
- });
287
- </script>
288
- <?php
289
- }
290
-
291
- /**
292
- * Grab Flexible Shipping integration option value.
293
- *
294
- * @param string $field_key Field key.
295
- * @param array $field Field.
296
- *
297
- * @return array|string
298
- */
299
- private function grab_flexible_shipping_integration_option_value( $field_key, $field ) {
300
- $post_field_name = 'woocommerce_flexible_shipping_' . $field_key;
301
- $field_value = '';
302
- $field_type = $field['type'];
303
- if ( self::TYPE_CHECKBOX === $field_type ) {
304
- $field_value = '0';
305
- }
306
- if ( isset( $_POST[ $post_field_name ] ) ) {
307
- $field_post_value = $_POST[ $post_field_name ];
308
- if ( in_array( $field_type, $this->supported_columns_types, true ) ) {
309
- if ( self::TYPE_CUSTOM_SERVICES === $field_type ) {
310
- $custom_services_settings = new WPDesk_Flexible_Shipping_SaaS_Custom_Services_Settings(
311
- $field_post_value,
312
- array()
313
- );
314
-
315
- $field_value = $custom_services_settings->process_custom_services_field( $field_post_value );
316
- } else {
317
- $field_value = sanitize_text_field( $field_post_value );
318
- if ( self::TYPE_CHECKBOX === $field_type ) {
319
- if ( '1' === $field_value ) {
320
- $field_value = 'yes';
321
- }
322
- }
323
- }
324
- }
325
- }
326
- return $field_value;
327
- }
328
-
329
- /**
330
- * Process Flexible Shipping integration options.
331
- *
332
- * @param array $shipping_method_options Shipping method options.
333
- *
334
- * @return mixed
335
- */
336
- public function process_flexible_shipping_integration_options( array $shipping_method_options ) {
337
- if ( isset( $shipping_method_options['method_integration'] )
338
- && $this->integration_id === $shipping_method_options['method_integration']
339
- ) {
340
- try {
341
- $settings = $this->get_settings_for_shipping_method_instance( intval( $shipping_method_options['woocommerce_method_instance_id'] ) );
342
- foreach ( $settings as $field_key => $field ) {
343
- $shipping_method_options[ $field_key ] = $this->grab_flexible_shipping_integration_option_value( $field_key, $field );
344
- }
345
- } catch ( Exception $e ) {
346
- $this->saas_connection->add_notice_fatal_error();
347
- do_action( 'admin_notices' );
348
- }
349
- }
350
- return $shipping_method_options;
351
- }
352
-
353
- /**
354
- * Show integration name in Flexible Shipping integration column.
355
- *
356
- * @param string $col Col value.
357
- * @param array $shipping_method Shipping method.
358
- *
359
- * @return string
360
- */
361
- public function show_integration_in_flexible_shipping_integration_col( $col, array $shipping_method ) {
362
- if ( isset( $shipping_method['method_integration'] ) && $this->integration_id === $shipping_method['method_integration'] ) {
363
- $col = sprintf( '<td width="1%%" class="integration default"><span>%1$s</span></td>', $this->shipping_service->get_name() );
364
- }
365
- return $col;
366
- }
367
-
368
-
369
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service-settings.php DELETED
@@ -1,445 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Integration settings in WooCommerce settings tab.
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Method
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings extends WC_Shipping_Method implements WPDesk_Flexible_Shipping_Saas_Connection_Aware {
9
-
10
- const OPTION_SHIPPING_METHOD_TYPE = 'fs_method_instance_type_';
11
-
12
- /**
13
- * Settings already saved.
14
- *
15
- * @var bool
16
- */
17
- private static $settings_saved = false;
18
-
19
- /**
20
- * Shipping methods manager.
21
- *
22
- * @var WPDesk_Flexible_Shipping_SaaS_Services_Manager
23
- */
24
- private $shipping_methods_manager;
25
-
26
- /**
27
- * Saas connection.
28
- *
29
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
30
- */
31
- private $saas_connection = null;
32
-
33
- /**
34
- * Shipping method has settings in SaaS?
35
- *
36
- * @var bool
37
- */
38
- private $has_saas_settings = false;
39
-
40
- /**
41
- * Shipping service id.
42
- *
43
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
44
- */
45
- private $shipping_service;
46
-
47
- /**
48
- * Save settings error.
49
- *
50
- * @var bool
51
- */
52
- private $save_settings_error = false;
53
-
54
- /**
55
- * WPDesk_Flexible_Shipping_Connect constructor.
56
- *
57
- * @param int $instance_id Instance id.
58
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
59
- */
60
- public function __construct(
61
- $instance_id = 0,
62
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service = null
63
- ) {
64
- parent::__construct( $instance_id );
65
-
66
- if ( ! empty( $shipping_service ) ) {
67
- $this->shipping_service = $shipping_service;
68
-
69
- $this->id = $this->shipping_service->get_integration_id();
70
- $this->method_title = $shipping_service->get_name();
71
- $this->title = $shipping_service->get_name();
72
- $this->method_description = $shipping_service->get_description();
73
-
74
- add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
75
-
76
- } else {
77
- $this->title = $this->get_option( 'title' );
78
- $parent_shipping_method = $this->get_parent_method();
79
- if ( ! empty( $parent_shipping_method ) ) {
80
- $this->shipping_service = $parent_shipping_method->get_shipping_service();
81
- $this->method_description = $parent_shipping_method->method_description;
82
- $this->id = $this->shipping_service->get_integration_id();
83
-
84
- $this->instance_form_fields['title']['default'] = $parent_shipping_method->method_title;
85
- $this->method_title = $parent_shipping_method->method_title;
86
- }
87
- }
88
-
89
- $this->enabled = 'no';
90
-
91
- $this->supports = array(
92
- 'settings',
93
- 'flexible-shipping',
94
- );
95
-
96
- $this->init();
97
-
98
- }
99
-
100
- /**
101
- * Set shipping methods manager.
102
- *
103
- * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
104
- */
105
- public function set_shipping_methods_manager( $shipping_methods_manager ) {
106
- $this->shipping_methods_manager = $shipping_methods_manager;
107
- }
108
-
109
- /**
110
- * Set SaaS Connection.
111
- *
112
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
113
- */
114
- public function set_saas_connection( $saas_connection ) {
115
- $this->saas_connection = $saas_connection;
116
- $this->init();
117
- }
118
-
119
- /**
120
- * Get has saas settings.
121
- *
122
- * @return bool
123
- */
124
- public function get_has_saas_settings() {
125
- return $this->has_saas_settings;
126
- }
127
-
128
- /**
129
- * Display admin error messages.
130
- */
131
- public function display_errors() {
132
- if ( $this->get_errors() ) {
133
- echo '<div id="notice-error" class="error notice is-dismissible">';
134
- foreach ( $this->get_errors() as $error ) {
135
- echo '<p>' . wp_kses_post( $error ) . '</p>';
136
- }
137
- echo '</div>';
138
- }
139
- }
140
-
141
- /**
142
- * Generate settings HTML.
143
- *
144
- * @param array $form_fields Form fields.
145
- * @param bool $echo Echo.
146
- *
147
- * @return string
148
- * @throws RuntimeException Exception.
149
- */
150
- public function generate_settings_html( $form_fields = array(), $echo = true ) {
151
- if ( 0 === $this->instance_id ) {
152
- $this->init_settings();
153
- if ( ! $this->save_settings_error ) {
154
- try {
155
- $this->saas_connection->clear_saas_client_cache();
156
- $platform = $this->saas_connection->get_platform();
157
- $shipping_service_settings = $platform->requestGetSettings( $this->get_shipping_service_id() );
158
- if ( $shipping_service_settings->isNotExists() ) {
159
- $this->settings = array( '' => '' );
160
- } elseif ( $shipping_service_settings->isError() ) {
161
- throw new RuntimeException( $shipping_service_settings->getResponseCode() );
162
- } else {
163
- $this->settings = $this->cast_settings_types( $shipping_service_settings->getSetting()->getJsonValue() );
164
- $country_state_field = WPDesk_Flexible_Shipping_SaaS_Country_State_Field::create_from_settings( $this->settings );
165
-
166
- $this->settings[ WPDesk_Flexible_Shipping_SaaS_Country_State_Field::COUNTRY_STATE_CODE_FIELD ] = $country_state_field->get_as_single_field();
167
-
168
- $this->has_saas_settings = true;
169
- }
170
- } catch ( Exception $e ) {
171
- $this->saas_connection->check_connection_and_show_notice_on_error();
172
- add_action( 'admin_notices', [ $this, 'hide_save_changes_button_on_connection_error' ] );
173
- return '';
174
- }
175
- }
176
- }
177
- return parent::generate_settings_html( $form_fields, $echo );
178
- }
179
-
180
- /**
181
- * Admin notices.
182
- */
183
- public function hide_save_changes_button_on_connection_error() {
184
- ?>
185
- <style>
186
- p.submit {
187
- display: none;
188
- }
189
- </style>
190
- <?php
191
- }
192
-
193
- /**
194
- * Get not empty array.
195
- *
196
- * @return array
197
- */
198
- private function create_not_empty_array() {
199
- return array( '' );
200
- }
201
-
202
- /**
203
- * Admin notices.
204
- */
205
- public function admin_notices() {
206
- ?>
207
- <script type="text/javascript">
208
- jQuery(document).ready(function () {
209
- jQuery('#message').remove();
210
- })
211
- </script>
212
- <style>
213
- #message {
214
- display: none;
215
- }
216
- </style>
217
- <?php
218
- }
219
-
220
- /**
221
- * Save settings fields to platform.
222
- *
223
- * @param array $settings Settings.
224
- *
225
- * @return mixed
226
- */
227
- private function save_settings_fields_to_platform( array $settings ) {
228
- $this->saas_connection->clear_saas_client_cache();
229
- $platform = $this->saas_connection->get_platform();
230
-
231
- $settings_for_platform = $this->shipping_service->prepare_settings_for_platform( $settings );
232
-
233
- if ( getenv( 'SAAS_FLEXIBLESHIPPING_URL' ) ) {
234
- $settings_for_platform['production'] = false;
235
- }
236
- if ( defined( 'SAAS_FLEXIBLESHIPPING_URL' ) ) {
237
- $settings_for_platform['production'] = false;
238
- }
239
-
240
- $shipping_service_settings = new \WPDesk\SaasPlatformClient\Model\ShippingServiceSetting();
241
- $shipping_service_settings->setJsonValue( $this->shipping_service->cast_raw_service_settings_to_valid_types( $settings_for_platform ) );
242
- $shipping_service_settings->setShippingService( $this->shipping_service->get_id() );
243
- $response = $platform->requestSaveSettings( $shipping_service_settings );
244
-
245
- if ( $response->isBadRequest() ) {
246
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
247
- $error_message = __( 'Invalid format - contact with flexibleshipping.com administrator.', 'flexible-shipping' );
248
- new \WPDesk\Notice\Notice( $error_message, 'error' );
249
- $this->save_settings_error = true;
250
- } elseif ( $response->isError() ) {
251
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
252
- $error_message = sprintf(
253
- // Translators: response code.
254
- __( 'Ups, something is wrong. Error code: %1$s.', 'flexible-shipping' ),
255
- $response->getResponseCode()
256
- );
257
- new \WPDesk\Notice\Notice( $error_message, 'error' );
258
- $this->save_settings_error = true;
259
- }
260
- return $settings;
261
- }
262
-
263
- /**
264
- * Process admin options.
265
- *
266
- * @return bool
267
- */
268
- public function process_admin_options() {
269
- $process_admin_options_return = parent::process_admin_options();
270
- if ( 0 === $this->instance_id ) {
271
- if ( false === self::$settings_saved ) {
272
- self::$settings_saved = true;
273
- $this->save_settings_fields_to_platform( $this->settings );
274
- }
275
- }
276
-
277
- return $process_admin_options_return;
278
- }
279
-
280
-
281
- /**
282
- * Get shipping service id.
283
- *
284
- * @return int
285
- */
286
- public function get_shipping_service_id() {
287
- return $this->shipping_service->get_id();
288
- }
289
-
290
- /**
291
- * Get shipping service.
292
- *
293
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service
294
- */
295
- public function get_shipping_service() {
296
- return $this->shipping_service;
297
- }
298
-
299
- /**
300
- * Init user set variables.
301
- */
302
- public function init() {
303
- $this->init_form_fields();
304
- }
305
-
306
- /**
307
- * Get parent method instance id.
308
- *
309
- * @return bool|string
310
- */
311
- private function get_parent_method_type() {
312
- return get_option( self::OPTION_SHIPPING_METHOD_TYPE . $this->instance_id, false );
313
- }
314
-
315
- /**
316
- * Get parent method.
317
- *
318
- * @return null|WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
319
- */
320
- private function get_parent_method() {
321
- $shipping_methods = WC()->shipping()->get_shipping_methods();
322
- /**
323
- * IDE type hint.
324
- *
325
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings $shipping_method
326
- */
327
- $shipping_method = null;
328
- if ( isset( $shipping_methods[ $this->get_parent_method_type() ] ) ) {
329
- $shipping_method = $shipping_methods[ $this->get_parent_method_type() ];
330
- }
331
- return $shipping_method;
332
- }
333
-
334
- /**
335
- * In settings screen?
336
- *
337
- * @return bool
338
- */
339
- public function is_in_settings() {
340
- if ( function_exists( 'get_current_screen' ) ) {
341
- $current_screen = get_current_screen();
342
- if ( isset( $current_screen ) ) {
343
- $section_parameter = 'section';
344
- if ( 'woocommerce_page_wc-settings' === $current_screen->id
345
- && isset( $_GET[ $section_parameter ] )
346
- && $this->id === $_GET[ $section_parameter ]
347
- ) {
348
- return true;
349
- }
350
- }
351
- }
352
-
353
- return false;
354
- }
355
-
356
- /**
357
- * Init form fields.
358
- */
359
- public function init_form_fields() {
360
- if ( ! empty( $this->shipping_service ) ) {
361
- $this->form_fields = $this->shipping_service->prepare_shipping_method_settings_fields();
362
- }
363
- }
364
-
365
- /**
366
- * Generate Connection Status HTML.
367
- *
368
- * @param string $key Field key.
369
- * @param array $data Field data.
370
-
371
- * @return string
372
- */
373
- public function generate_connection_status_html( $key, $data ) {
374
- $status_field = new WPDesk_Flexible_Shipping_SaaS_Connection_Status_Field( $this );
375
- return $status_field->generate_html( $key, $data );
376
- }
377
-
378
- /**
379
- * Prepare country state options.
380
- *
381
- * @return array
382
- */
383
- private function prepare_country_state_options() {
384
- $countries = WC()->countries->get_countries();
385
- $options = array();
386
- foreach ( $countries as $country_key => $country ) {
387
- $states = WC()->countries->get_states( $country_key );
388
- if ( $states ) {
389
- foreach ( $states as $state_key => $state ) {
390
- $options[ $country_key . ':' . $state_key ] = $country . ' &mdash; ' . $state;
391
- }
392
- } else {
393
- $options[ $country_key ] = $country;
394
- }
395
- }
396
- return $options;
397
- }
398
-
399
- /**
400
- * Generate select country state HTML.
401
- *
402
- * @param string $key Field key.
403
- * @param array $data Field data.
404
- *
405
- * @return string
406
- */
407
- public function generate_select_country_state_html( $key, array $data ) {
408
- $data['options'] = $this->prepare_country_state_options();
409
- $class = isset( $data['class'] ) ? $data['class'] . ' ' : '';
410
- $class .= 'fs_select2';
411
- $data['class'] = $class;
412
- return $this->generate_select_html( $key, $data );
413
- }
414
-
415
- /**
416
- * Cast settings types.
417
- *
418
- * @param array $settings Settings.
419
- *
420
- * @return array
421
- */
422
- private function cast_settings_types( $settings ) {
423
- foreach ( $settings as $key => $value ) {
424
- if ( is_bool( $value ) ) {
425
- if ( $value ) {
426
- $settings[ $key ] = 'yes';
427
- } else {
428
- $settings[ $key ] = 'no';
429
- }
430
- }
431
- }
432
- return $settings;
433
- }
434
-
435
- /**
436
- * Is connected.
437
- *
438
- * @return bool
439
- */
440
- private function is_connected() {
441
- return $this->saas_connection->is_connected();
442
- }
443
-
444
- }
445
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-service.php DELETED
@@ -1,789 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- if ( ! class_exists( 'WPDesk_Flexible_Shipping_SaaS_Shipping_Service' ) ) {
8
-
9
- /**
10
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Service
11
- */
12
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Service {
13
-
14
- const INTEGRATION_PREFIX = 'flexible_shipping_saas_';
15
-
16
- const FIELD_TYPE_CONNECTION_STATUS = 'connection_status';
17
-
18
- const FIELD_TITLE = 'title';
19
- const FIELD_LABEL = 'label';
20
- const FIELD_DESC = 'desc';
21
- const FIELD_DESCRIPTION = 'description';
22
- const FIELD_TOOLTIP = 'tooltip';
23
- const FIELD_DESC_TIP = 'desc_tip';
24
- const FIELD_CUSTOM_ATTRIBUTES = 'custom_attributes';
25
- const FIELD_TYPE = 'type';
26
- const FIELD_REQUIRED = 'required';
27
- const FIELD_SELECT_ADDITIONAL = 'select-additional';
28
- const FIELD_OPTIONS = 'options';
29
-
30
- const TYPE_TEXT = 'text';
31
- const TYPE_CHECKBOX = 'checkbox';
32
- const TYPE_SELECT = 'select';
33
- const TYPE_CUSTOM_SERVICES = 'custom_services';
34
-
35
- const WOOCOMMERCE_SETTINGS_SHIPPING_URL = 'admin.php?page=wc-settings&tab=shipping';
36
-
37
- /**
38
- * SaaS connection.
39
- *
40
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
41
- */
42
- private $saas_connection;
43
-
44
- /**
45
- * ID.
46
- *
47
- * @var int
48
- */
49
- private $id;
50
-
51
- /**
52
- * Name.
53
- *
54
- * @var string
55
- */
56
- private $name;
57
-
58
- /**
59
- * Description.
60
- *
61
- * @var string
62
- */
63
- private $description;
64
-
65
- /**
66
- * Promoted.
67
- *
68
- * @var bool
69
- */
70
- private $promoted;
71
-
72
- /**
73
- * Settings fields.
74
- *
75
- * @var array
76
- */
77
- private $settings_fields;
78
-
79
- /**
80
- * Definition of return values generated by settings.
81
- *
82
- * @var array
83
- */
84
- private $settings_fields_values;
85
-
86
- /**
87
- * Definition of request fields.
88
- *
89
- * @var array
90
- */
91
- private $request_fields;
92
-
93
- /**
94
- * Capabilities.
95
- *
96
- * @var array
97
- */
98
- private $capabilities;
99
-
100
- /**
101
- * Shipping method.
102
- *
103
- * @var null|WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
104
- */
105
- private $shipping_method = null;
106
-
107
- /**
108
- * Links.
109
- *
110
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
111
- */
112
- private $saas_platform_links;
113
-
114
- /**
115
- * Integration id.
116
- *
117
- * @var string
118
- */
119
- private $integration_id;
120
-
121
- /**
122
- * Collection points.
123
- *
124
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
125
- */
126
- private $collection_points;
127
-
128
- /**
129
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Service constructor.
130
- *
131
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Saas connection.
132
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
133
- * @param int $id Service ID.
134
- * @param string $name Service Name.
135
- * @param string $description Service description.
136
- * @param bool $promoted Promoted.
137
- * @param array $settings_fields Settings fields.
138
- * @param array $settings_fields_values Definition of return values generated by settings.
139
- * @param array $request_fields Request fields.
140
- * @param array $capabilities Capabilities.
141
- */
142
- public function __construct(
143
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
144
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
145
- $id,
146
- $name,
147
- $description,
148
- $promoted,
149
- array $settings_fields = array(),
150
- $settings_fields_values = array(),
151
- $request_fields = array(),
152
- $capabilities = array()
153
- ) {
154
- $this->saas_connection = $saas_connection;
155
- $this->saas_platform_links = $saas_platform_links;
156
- $this->id = $id;
157
- $this->name = $name;
158
- $this->description = $description;
159
- $this->promoted = $promoted;
160
- $this->settings_fields = $settings_fields;
161
- $this->settings_fields_values = $settings_fields_values;
162
- $this->request_fields = $request_fields;
163
- $this->capabilities = $capabilities;
164
-
165
- $this->integration_id = self::INTEGRATION_PREFIX . $id;
166
- }
167
-
168
- /**
169
- * Static creator form \WPDesk\SaasPlatformClient\Model\ShippingService.
170
- *
171
- * @param \WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
172
- * @param \WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
173
- * @param \WPDesk\SaasPlatformClient\Model\ShippingService $platform_service Service from platform.
174
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service
175
- */
176
- public static function create_from_platform_service(
177
- \WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
178
- \WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
179
- \WPDesk\SaasPlatformClient\Model\ShippingService $platform_service
180
- ) {
181
- return new self(
182
- $saas_connection,
183
- $saas_platform_links,
184
- $platform_service->getId(),
185
- $platform_service->getName(),
186
- $platform_service->getDescription(),
187
- $platform_service->getPromoted(),
188
- $platform_service->getConnectionSettingsDefinitionJson(),
189
- $platform_service->getConnectionSettingsValuesJsonSchema(),
190
- $platform_service->getRequestFieldsDefinitionJson(),
191
- $platform_service->getCapabilitiesJson()
192
- );
193
- }
194
-
195
- /**
196
- * Get ID.
197
- *
198
- * @return int
199
- */
200
- public function get_id() {
201
- return $this->id;
202
- }
203
-
204
- /**
205
- * Get name.
206
- *
207
- * @return string
208
- */
209
- public function get_name() {
210
- return $this->name;
211
- }
212
-
213
- /**
214
- * Get description.
215
- *
216
- * @return string
217
- */
218
- public function get_description() {
219
- return $this->description;
220
- }
221
-
222
- /**
223
- * Get promoted.
224
- *
225
- * @return bool
226
- */
227
- public function get_promoted() {
228
- return $this->promoted;
229
- }
230
-
231
- /**
232
- * Get settings fields.
233
- *
234
- * @return array
235
- */
236
- public function get_settings_fields() {
237
- return $this->settings_fields;
238
- }
239
-
240
- /**
241
- * Get settings fields values.
242
- *
243
- * @return array
244
- */
245
- public function get_settings_fields_values() {
246
- return $this->settings_fields_values;
247
- }
248
-
249
- /**
250
- * Get request fields.
251
- *
252
- * @return array
253
- */
254
- public function get_request_fields() {
255
- return $this->request_fields;
256
- }
257
-
258
- /**
259
- * Get capabilities.
260
- *
261
- * @return array
262
- */
263
- public function get_capabilities() {
264
- return $this->capabilities;
265
- }
266
-
267
- /**
268
- * Get integration id.
269
- *
270
- * @return string
271
- */
272
- public function get_integration_id() {
273
- return $this->integration_id;
274
- }
275
-
276
- /**
277
- * Is capability?
278
- *
279
- * @param string $capability_name Capability name.
280
- *
281
- * @return bool
282
- */
283
- public function supports( $capability_name ) {
284
- $capability = $this->get_capability( $capability_name );
285
- if ( isset( $this->capabilities[ $capability_name ] ) && $this->capabilities[ $capability_name ] ) {
286
- return true;
287
- }
288
- return false;
289
- }
290
-
291
- /**
292
- * Get capability.
293
- *
294
- * @param string $capability_name Capability name.
295
- *
296
- * @return string|null
297
- */
298
- public function get_capability( $capability_name ) {
299
- if ( isset( $this->capabilities[ $capability_name ] ) ) {
300
- return $this->capabilities[ $capability_name ];
301
- }
302
- return null;
303
- }
304
-
305
- /**
306
- * Prapare section heading field.
307
- *
308
- * @param array $section Section.
309
- *
310
- * @return array
311
- */
312
- private function prepare_section_heading_field( array $section ) {
313
- $section_heading = array(
314
- self::FIELD_TYPE => 'title',
315
- 'title' => $section['title'],
316
- );
317
- if ( isset( $section[ self::FIELD_DESCRIPTION ] ) ) {
318
- $section_heading['description'] = $section[ self::FIELD_DESCRIPTION ];
319
- }
320
-
321
- return $section_heading;
322
- }
323
-
324
- /**
325
- * Prepare default field value.
326
- *
327
- * @param array $field Field from SaaS platform.
328
- * @param array $settings_field WooCommerce settings field.
329
- *
330
- * @return array
331
- */
332
- private function prepare_default_field_value( array $field, array $settings_field ) {
333
- if ( isset( $field['default'] ) ) {
334
- $settings_field['default'] = $field['default'];
335
- }
336
- $default_woocommerce_id = 'default-woocommerce';
337
- if ( isset( $field[ $default_woocommerce_id ] ) ) {
338
- if ( ! isset( $settings_field['default'] ) ) {
339
- $settings_field['default'] = get_option( $field[ $default_woocommerce_id ], '' );
340
- }
341
- }
342
- $deafault_commpute = 'default-compute';
343
- if ( isset( $field[ $deafault_commpute ] ) ) {
344
- if ( ! isset( $settings_field['default'] ) ) {
345
- $default_compute_handler = new WPDesk_Flexible_Shipping_SaaS_Default_Value_Compute_Handler( $field[ $deafault_commpute ] );
346
- $settings_field['default'] = $default_compute_handler->compute();
347
- }
348
- }
349
- return $settings_field;
350
- }
351
-
352
- /**
353
- * Prepare settings field select options.
354
- *
355
- * @param array $field Field.
356
- * @param array $settings_field Settings field.
357
- *
358
- * @return mixed
359
- */
360
- private function prepare_field_select_options( array $field, array $settings_field ) {
361
- if ( self::TYPE_SELECT === $field[ self::FIELD_TYPE ] || self::TYPE_CUSTOM_SERVICES === $field[ self::FIELD_TYPE ] ) {
362
- if ( isset( $field[ self::FIELD_SELECT_ADDITIONAL ] ) && isset( $field[ self::FIELD_SELECT_ADDITIONAL ][ self::FIELD_OPTIONS ] ) ) {
363
- $options = array();
364
- foreach ( $field[ self::FIELD_SELECT_ADDITIONAL ][ self::FIELD_OPTIONS ] as $option ) {
365
- if ( ! empty( $option['value'] ) || ! empty( $option['text'] ) ) {
366
- $options[ $option['value'] ] = $option['text'];
367
- }
368
- }
369
- $settings_field[ self::FIELD_OPTIONS ] = $options;
370
- }
371
- }
372
- return $settings_field;
373
- }
374
-
375
- /**
376
- * Prepare settings field custom services options.
377
- *
378
- * @param array $field Field.
379
- * @param array $settings_field Settings field.
380
- *
381
- * @return mixed
382
- */
383
- private function prepare_field_custom_services_options( array $field, array $settings_field ) {
384
- if ( self::TYPE_SELECT === $field[ self::FIELD_TYPE ] || self::TYPE_CUSTOM_SERVICES === $field[ self::FIELD_TYPE ] ) {
385
- if ( isset( $field[ self::FIELD_SELECT_ADDITIONAL ] ) && isset( $field[ self::FIELD_SELECT_ADDITIONAL ][ self::FIELD_OPTIONS ] ) ) {
386
- $services = array();
387
- foreach ( $field[ self::FIELD_SELECT_ADDITIONAL ][ self::FIELD_OPTIONS ] as $option ) {
388
- if ( ! empty( $option['value'] ) || ! empty( $option['text'] ) ) {
389
- $services[ $option['value'] ] = array( 'name' => $option['text'] );
390
- }
391
- }
392
- $settings_field['services'] = $services;
393
- }
394
- }
395
- return $settings_field;
396
- }
397
-
398
- /**
399
- * Prepare settings field description.
400
- *
401
- * @param array $field Field.
402
- * @param array $settings_field Settings field.
403
- *
404
- * @return mixed
405
- */
406
- private function prepare_field_description( array $field, array $settings_field ) {
407
- if ( isset( $field[ self::FIELD_DESC ] ) ) {
408
- $settings_field[ self::FIELD_DESCRIPTION ] = do_shortcode( $field[ self::FIELD_DESC ] );
409
- }
410
- if ( isset( $field[ self::FIELD_TOOLTIP ] ) && is_array( $field[ self::FIELD_TOOLTIP ] ) ) {
411
- $settings_field[ self::FIELD_DESCRIPTION ] = do_shortcode( $field[ self::FIELD_TOOLTIP ][ self::FIELD_DESCRIPTION ] );
412
- $settings_field[ self::FIELD_DESC_TIP ] = true;
413
- }
414
- return $settings_field;
415
- }
416
-
417
- /**
418
- * Prepare setting field.
419
- *
420
- * @param array $field Field.
421
- *
422
- * @return array
423
- */
424
- private function prepare_setting_field( array $field ) {
425
- $settings_field = array(
426
- self::FIELD_TYPE => $field[ self::FIELD_TYPE ],
427
- self::FIELD_TITLE => do_shortcode( $field['name'] ),
428
- self::FIELD_CUSTOM_ATTRIBUTES => array(),
429
- );
430
- if ( isset( $field[ self::FIELD_LABEL ] ) ) {
431
- $settings_field[ self::FIELD_LABEL ] = $field[ self::FIELD_LABEL ];
432
- }
433
- if ( 'password' === $field[ self::FIELD_TYPE ] ) {
434
- $settings_field[ self::FIELD_CUSTOM_ATTRIBUTES ]['autocomplete'] = 'new-password';
435
- }
436
- if ( self::TYPE_CHECKBOX !== $field[ self::FIELD_TYPE ] && self::TYPE_SELECT !== $field[ self::FIELD_TYPE ]
437
- && isset( $field[ self::FIELD_REQUIRED ] ) && $field[ self::FIELD_REQUIRED ]
438
- ) {
439
- $settings_field[ self::FIELD_CUSTOM_ATTRIBUTES ][ self::FIELD_REQUIRED ] = self::FIELD_REQUIRED;
440
- }
441
- if ( self::TYPE_CUSTOM_SERVICES === $field[ self::FIELD_TYPE ] ) {
442
- $settings_field = $this->prepare_field_custom_services_options( $field, $settings_field );
443
- }
444
- $settings_field = $this->prepare_default_field_value( $field, $settings_field );
445
- $settings_field = $this->prepare_field_select_options( $field, $settings_field );
446
- $settings_field = $this->prepare_field_description( $field, $settings_field );
447
- return $settings_field;
448
- }
449
-
450
-
451
- /**
452
- * Prepare settings for platform.
453
- *
454
- * @param array $settings Settings.
455
- *
456
- * @return array
457
- */
458
- public function prepare_settings_for_platform( array $settings ) {
459
- $settings_for_platform = array();
460
- foreach ( $this->settings_fields as $section ) {
461
- foreach ( $section['fields'] as $field ) {
462
- $field_id = $field['id'];
463
- if ( isset( $field[ self::FIELD_TYPE ] ) && self::FIELD_TYPE_CONNECTION_STATUS !== $field[ self::FIELD_TYPE ] ) {
464
- if ( isset( $settings[ $field_id ] ) ) {
465
- $settings_for_platform[ $field_id ] = $settings[ $field_id ];
466
- } else {
467
- $settings_for_platform[ $field_id ] = '';
468
- }
469
- if ( self::TYPE_CHECKBOX === $field[ self::FIELD_TYPE ] ) {
470
- $settings_for_platform[ $field_id ] = 'yes' === $settings[ $field_id ];
471
- }
472
- if ( 'shipment_settings' === $field[ self::FIELD_TYPE ] ) {
473
- $shipment_settings = new WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field( $field );
474
-
475
- $settings_for_platform = $shipment_settings->add_settings_for_platform( $settings, $settings_for_platform );
476
- }
477
- }
478
- }
479
- }
480
- $country_state_field = WPDesk_Flexible_Shipping_SaaS_Country_State_Field::create_from_serialized_settings( $settings );
481
- $settings_for_platform = array_merge( $settings_for_platform, $country_state_field->get_as_array() );
482
- return $settings_for_platform;
483
- }
484
-
485
- /**
486
- * Prepare woocommerce settings fields from fields.
487
- *
488
- * @param array $fields Fields.
489
- *
490
- * @return array
491
- */
492
- private function prepare_woocommerce_settings_fields_from_fields( array $fields ) {
493
- $settings_fields = array();
494
- foreach ( $fields as $section ) {
495
- $settings_fields[] = $this->prepare_section_heading_field( $section );
496
- foreach ( $section['fields'] as $field ) {
497
- if ( 'shipment_settings' === $field[ self::FIELD_TYPE ] ) {
498
- $shipment_settings_field = new WPDesk_Flexible_Shipping_SaaS_Shipment_Settings_Field( $field );
499
-
500
- $settings_fields = $shipment_settings_field->add_fields_to_settings( $settings_fields );
501
- } else {
502
- $settings_fields[ $field['id'] ] = $this->prepare_setting_field( $field );
503
- }
504
- }
505
- }
506
- return $settings_fields;
507
- }
508
-
509
- /**
510
- * Get shipping method settings fields.
511
- *
512
- * @return array
513
- */
514
- public function prepare_shipping_method_settings_fields() {
515
- return $this->prepare_woocommerce_settings_fields_from_fields( $this->settings_fields );
516
- }
517
-
518
- /**
519
- * Set css class on field.
520
- *
521
- * @param array $field Settings field.
522
- * @param array $show_in Show in.
523
- *
524
- * @return array
525
- */
526
- private function set_css_class_on_field( array $field, array $show_in ) {
527
- if ( ! isset( $field['class'] ) ) {
528
- $field['class'] = '';
529
- }
530
- if ( in_array( 'method', $show_in, true ) ) {
531
- $field['class'] .= ' fs-method';
532
- }
533
- if ( in_array( 'live', $show_in, true ) ) {
534
- $field['class'] .= ' fs-live';
535
- }
536
- return $field;
537
- }
538
-
539
- /**
540
- * Prepare rates type field.
541
- *
542
- * @return array
543
- */
544
- private function prepare_rates_type_field() {
545
- $rates_type_field = array(
546
- 'title' => __( 'Rates type', 'flexible-shipping' ),
547
- 'type' => self::TYPE_SELECT,
548
- 'class' => 'fs-rates-type fs-method fs-live',
549
- 'options' => array(
550
- 'custom' => __( 'Custom', 'flexible-shipping' ),
551
- ),
552
- // Translators: service name.
553
- 'description' => sprintf( __(
554
- 'Choose custom rates to set a custom shipping cost (this method will be the selected %1$s service). Choose live rates if you want to present services and rates for the customer\'s address.',
555
- 'flexible-shipping'
556
- ), $this->get_name() ),
557
- 'desc_tip' => true,
558
- );
559
- if ( $this->supports( 'supportsShipmentLiveRates' ) ) {
560
- $rates_type_field['options'] = array(
561
- 'live' => __( 'Live', 'flexible-shipping' ),
562
- 'custom' => __( 'Custom', 'flexible-shipping' ),
563
- );
564
- $rates_type_field['default'] = 'live';
565
- }
566
- return $rates_type_field;
567
- }
568
-
569
- /**
570
- * Prepare custom services field.
571
- *
572
- * @param string $field_id Field Id.
573
- * @param array $field Field.
574
- * @param array $show_in Show in.
575
- *
576
- * @return array
577
- */
578
- private function prepare_custom_services_field( $field_id, $field, $show_in ) {
579
- $custom_services = array(
580
- 'title' => __( 'Custom services', 'flexible-shipping' ),
581
- self::FIELD_TYPE => self::TYPE_CHECKBOX,
582
- self::FIELD_DESC_TIP => true,
583
- self::FIELD_DESCRIPTION => $field[ self::FIELD_TOOLTIP ][ self::FIELD_DESCRIPTION ],
584
- 'label' => __( 'Enable services custom settings', 'flexible-shipping' ),
585
- );
586
- $custom_services = $this->set_css_class_on_field( $custom_services, $show_in );
587
-
588
- $custom_services['custom_attributes'] = array( 'data-dependent-field-id' => 'woocommerce_flexible_shipping_' . $field_id );
589
-
590
- $custom_services = $this->prepare_default_field_value( $field, $custom_services );
591
-
592
- return $custom_services;
593
- }
594
-
595
- /**
596
- * Prepare FS integration settings fields.
597
- *
598
- * @param string $field_name_prefix Field name prefix.
599
- * @param array $zone_targets Zone targets.
600
- * @return array
601
- */
602
- public function prepare_flexible_shipping_integration_settings_fields( $field_name_prefix, array $zone_targets ) {
603
- $settings = array( $field_name_prefix . 'rates_type' => $this->prepare_rates_type_field() );
604
- $fields = $this->get_fields_for_targets( $zone_targets );
605
- foreach ( $fields as $section ) {
606
- if ( in_array( 'method', $section['show-in'], true ) || in_array( 'live', $section['show-in'], true ) ) {
607
- foreach ( $section['fields'] as $field ) {
608
- $field_id = $field_name_prefix . $field['id'];
609
- if ( self::TYPE_CUSTOM_SERVICES === $field['type'] ) {
610
- $field_id = $field_id . '_custom_services';
611
- $settings[ $field_name_prefix . self::TYPE_CUSTOM_SERVICES ] = $this->prepare_custom_services_field(
612
- $field_id,
613
- $field,
614
- $section['show-in']
615
- );
616
- }
617
- $settings_field = $this->prepare_setting_field( $field );
618
- $settings_field = $this->set_css_class_on_field( $settings_field, $section['show-in'] );
619
-
620
- $settings[ $field_id ] = $settings_field;
621
- }
622
- }
623
- }
624
- if ( $this->supports( 'supportsShipmentLiveRates' ) ) {
625
- $settings_field = array(
626
- 'title' => __( 'Fallback', 'flexible-shipping' ),
627
- 'label' => __( 'Enable fallback', 'flexible-shipping' ),
628
- 'type' => 'checkbox',
629
- 'description' => __( 'Enable to offer flat rate cost for shipping so that the user can still checkout, if API returns no matching rates.', 'flexible-shipping' ),
630
- 'desc_tip' => true,
631
- 'custom_attributes' => array(
632
- 'data-dependent-row-class' => 'flexible_shipping_method_rules',
633
- 'data-dependent-field-id' => 'woocommerce_flexible_shipping_method_calculation_method',
634
- ),
635
- );
636
- $settings_field = $this->set_css_class_on_field( $settings_field, array( 'live' ) );
637
-
638
- $settings[ $field_name_prefix . 'fallback' ] = $settings_field;
639
- }
640
- return $settings;
641
- }
642
-
643
-
644
- /**
645
- * Cast raw service settings to valid types.
646
- *
647
- * @param array $settings Settings values.
648
- *
649
- * @return array Settings values with casting.
650
- */
651
- public function cast_raw_service_settings_to_valid_types( array $settings ) {
652
- foreach ( $this->settings_fields_values['properties'] as $key => $type ) {
653
- if ( 'integer' === $type[ self::FIELD_TYPE ] ) {
654
- $settings[ $key ] = (int) $settings[ $key ];
655
- }
656
- }
657
- return $settings;
658
- }
659
-
660
- /**
661
- * Get fields for zone targets.
662
- *
663
- * @param array $zone_targets Target countries.
664
- *
665
- * @return array
666
- * @throws WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception Exception.
667
- * @throws WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found Exception.
668
- * @throws WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception Exception.
669
- */
670
- public function get_fields_for_targets( array $zone_targets ) {
671
- $platform = $this->saas_connection->get_platform();
672
- $fields_response = $platform->requestGetFields( $this->get_id(), $zone_targets );
673
- if ( $fields_response->isBadCredentials() ) {
674
- throw new WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception( $this->saas_platform_links );
675
- } elseif ( $fields_response->isMaintenance() ) {
676
- throw new WPDesk_Flexible_Shipping_SaaS_Maintenance_Mode_Exception( $fields_response );
677
- } elseif ( $fields_response->isNotExists() ) {
678
- throw new WPDesk_Flexible_Shipping_SaaS_Service_Settings_Not_Found();
679
- }
680
- return $fields_response->getFields();
681
- }
682
-
683
- /**
684
- * Set shipping method.
685
- *
686
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings $shipping_method Shipping method.
687
- */
688
- public function set_shipping_method( WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings $shipping_method ) {
689
- $this->shipping_method = $shipping_method;
690
- }
691
-
692
- /**
693
- * Get option from shiping method.
694
- *
695
- * @param string $option_name Option name.
696
- *
697
- * @return string
698
- */
699
- public function get_option_from_shipping_method( $option_name ) {
700
- $option_value = '';
701
- if ( ! empty( $this->shipping_method ) ) {
702
- return $this->shipping_method->get_option( $option_name, '' );
703
- }
704
- return $option_value;
705
- }
706
-
707
- /**
708
- * Is auto selected in shipment_settings_auto_create option?
709
- *
710
- * @return bool
711
- */
712
- public function is_auto_shipment_settings_auto_create() {
713
- return 'auto' === $this->get_option_from_shipping_method( 'shipment_settings_auto_create' );
714
- }
715
-
716
- /**
717
- * Is manual selected in shipment_settings_auto_create option?
718
- *
719
- * @return bool
720
- */
721
- public function is_manual_shipment_settings_auto_create() {
722
- return 'manual' === $this->get_option_from_shipping_method( 'shipment_settings_auto_create' );
723
- }
724
-
725
- /**
726
- * Is order status set in shipment_settings_order_status option?
727
- *
728
- * @param string $order_status Order status.
729
- *
730
- * @return bool
731
- */
732
- public function is_order_status_shipment_settings_order_status( $order_status ) {
733
- return 'wc-' . $order_status === $this->get_option_from_shipping_method( 'shipment_settings_order_status' );
734
- }
735
-
736
- /**
737
- * Is shipment_settings_complete_order option checked?
738
- *
739
- * @return bool
740
- */
741
- public function is_shipment_settings_complete_order() {
742
- return 'yes' === $this->get_option_from_shipping_method( 'shipment_settings_complete_order' );
743
- }
744
-
745
- /**
746
- * Get settings URL.
747
- *
748
- * @return string
749
- */
750
- public function get_settings_url() {
751
- return admin_url( self::WOOCOMMERCE_SETTINGS_SHIPPING_URL . '&section=' . $this->integration_id );
752
- }
753
-
754
- /**
755
- * Prepare settings not found message.
756
- *
757
- * @return string
758
- */
759
- public function prepare_settings_not_found_message() {
760
- return sprintf(
761
- // Translators: links to settings.
762
- __( 'You need to configure the service. %1$sGo to %2$s settings.%3$s', 'flexible-shipping' ),
763
- '<a href="' . $this->get_settings_url() . '"">',
764
- $this->get_name(),
765
- '</a>'
766
- );
767
- }
768
-
769
- /**
770
- * Get collection points.
771
- *
772
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
773
- */
774
- public function get_collection_points() {
775
- return $this->collection_points;
776
- }
777
-
778
- /**
779
- * Set collection points.
780
- *
781
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $collection_points Collection points.
782
- */
783
- public function set_collection_points( $collection_points ) {
784
- $this->collection_points = $collection_points;
785
- }
786
-
787
- }
788
-
789
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services-manager.php DELETED
@@ -1,520 +0,0 @@
1
- <?php
2
- /**
3
- * Class WPDesk_Flexible_Shipping_Shipping_Methods_Manager
4
- */
5
-
6
- class WPDesk_Flexible_Shipping_SaaS_Services_Manager
7
- implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant, \WPDesk\PluginBuilder\Plugin\HookableCollection
8
- {
9
-
10
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
11
- use \WPDesk\PluginBuilder\Plugin\HookableParent;
12
-
13
- const OPTION_ALL_SHIPPING_SERVICES = 'fs_saas_all_shipping_servicess';
14
- const OPTION_ENABLED_SHIPPING_SERVICES = 'fs_saas_enabled_shipping_services';
15
-
16
- const PARAMETER_SETTINGS_UPDATED = 'settings-updated';
17
- const PARAMETER_SETTINGS_UPDATED_VALUE = 'flexible-shipping';
18
-
19
- const LOGGER_SOURCE = 'saas-methods-manager';
20
-
21
- const PRIORITY_FIRST = 1;
22
-
23
-
24
- /**
25
- * SaaS connection.
26
- *
27
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
28
- */
29
- private $saas_connection;
30
-
31
- /**
32
- * Flexible Shipping Connect shipping method.
33
- *
34
- * @var WPDesk_Flexible_Shipping_SaaS_Settings
35
- */
36
- private $shipping_method_connect = null;
37
-
38
- /**
39
- * SaaS shipping methods.
40
- *
41
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings[]
42
- */
43
- private $saas_shipping_methods = array();
44
-
45
- /**
46
- * SaaS shipping services.
47
- *
48
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service[]
49
- */
50
- private $saas_shipping_services = array();
51
-
52
- /**
53
- * Require UK states - there is enabled shipping method with requireUKStates capability.
54
- *
55
- * @var bool
56
- */
57
- private $require_uk_states = false;
58
-
59
- /**
60
- * Links.
61
- *
62
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
63
- */
64
- private $saas_platform_links;
65
-
66
- /**
67
- * Renderer.
68
- *
69
- * @var WPDesk\View\Renderer\Renderer;
70
- */
71
- private $renderer;
72
-
73
- /**
74
- * Logger.
75
- *
76
- * @var \Psr\Log\LoggerInterface
77
- */
78
- private $logger;
79
-
80
- /**
81
- * Settings integration checkbox.
82
- *
83
- * @var WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
84
- */
85
- private $integration_checkbox;
86
-
87
- /**
88
- * WPDesk_Flexible_Shipping_Services constructor.
89
- *
90
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
91
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
92
- * @param WPDesk\View\Renderer\Renderer $renderer Renderer.
93
- * @param \Psr\Log\LoggerInterface $logger Logger.
94
- */
95
- public function __construct(
96
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
97
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
98
- WPDesk\View\Renderer\Renderer $renderer,
99
- WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox $integration_checkbox,
100
- \Psr\Log\LoggerInterface $logger = null
101
- ) {
102
- $this->saas_connection = $saas_connection;
103
- $this->renderer = $renderer;
104
- if ( null !== $logger ) {
105
- $this->logger = $logger;
106
- } else {
107
- $this->logger = WPDesk_Flexible_Shipping_Logger_Factory::create_logger();
108
- }
109
-
110
- $this->saas_platform_links = $saas_platform_links;
111
- $this->integration_checkbox = $integration_checkbox;
112
- $this->create_saas_shipping_methods();
113
-
114
- }
115
-
116
- /**
117
- * Hooks.
118
- */
119
- public function hooks() {
120
-
121
- /** Important! Must be added before regular FS shipping method because of COD `Enable for shipping methods` functionality. */
122
- add_filter( 'woocommerce_shipping_methods',
123
- array( $this, 'add_flexible_shipping_connect_shipping_method' ), self::PRIORITY_FIRST
124
- );
125
- add_filter( 'woocommerce_shipping_methods', array( $this, 'add_shipping_methods_for_shipping_services' ) );
126
-
127
- add_filter( 'woocommerce_shipping_zone_shipping_methods',
128
- array( $this, 'inject_saas_connection_to_shipping_methods' )
129
- );
130
-
131
- add_action( 'woocommerce_shipping_zone_method_added', array( $this, 'set_shipping_method_type' ), 10, 3 );
132
- add_action( 'woocommerce_shipping_zone_method_deleted', array( $this, 'delete_shipping_method_type' ), 10,
133
- 3
134
- );
135
-
136
- add_action( 'current_screen', array( $this, 'clear_cache_at_settings_page' ) );
137
- add_action( 'current_screen', array( $this, 'handle_settings_updated_notice' ) );
138
-
139
- add_filter( 'flexible_shipping_shipment_class', array( $this, 'flexible_shipping_shipment_class' ), 10, 2 );
140
-
141
- $this->hooks_on_hookable_objects();
142
-
143
- }
144
-
145
- /**
146
- * Flexible Shipping shipment class for SaaS integration
147
- *
148
- * @param string $class_name Class name.
149
- * @param string $integration Integration.
150
- *
151
- * @return string
152
- */
153
- public function flexible_shipping_shipment_class( $class_name, $integration ) {
154
- if ( isset( $this->saas_shipping_methods[ $integration ] ) ) {
155
- return WPDesk_Flexible_Shipping_Shipment_Saas::class;
156
- }
157
-
158
- return $class_name;
159
- }
160
-
161
- /**
162
- * Handle settings updated notice.
163
- *
164
- * @param WP_Screen $current_screen Current screen.
165
- */
166
- public function handle_settings_updated_notice( $current_screen ) {
167
- if ( $this->is_in_shipping_settings( $current_screen ) ) {
168
- if ( isset( $_GET[ self::PARAMETER_SETTINGS_UPDATED ] )
169
- && $_GET[ self::PARAMETER_SETTINGS_UPDATED ] == self::PARAMETER_SETTINGS_UPDATED_VALUE
170
- ) {
171
- new \WPDesk\Notice\Notice(
172
- // Translators: strong tag.
173
- sprintf( __( '%1$sYour settings have been saved.%2$s', 'flexible-shipping' ), '<strong>',
174
- '</strong>'
175
- ),
176
- 'updated'
177
- );
178
- }
179
- }
180
- }
181
-
182
- /**
183
- * Create shipping method.
184
- *
185
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
186
- *
187
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings
188
- */
189
- private function create_shipping_method( $shipping_service ) {
190
- $shipping_method = new WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings( 0, $shipping_service );
191
- $shipping_method->set_saas_connection( $this->saas_connection );
192
- $shipping_method->set_shipping_methods_manager( $this );
193
- $shipping_service->set_shipping_method( $shipping_method );
194
-
195
- return $shipping_method;
196
- }
197
-
198
- /**
199
- * Inject SaaS connection to shipping methods.
200
- *
201
- * @param array $shipping_methods Shipping methods.
202
- *
203
- * @return mixed
204
- */
205
- public function inject_saas_connection_to_shipping_methods( array $shipping_methods ) {
206
- foreach ( $shipping_methods as $shipping_method_key => $shipping_method ) {
207
- if ( $shipping_method instanceof WPDesk_Flexible_Shipping_Saas_Connection_Aware ) {
208
- $shipping_method->set_saas_connection( $this->saas_connection );
209
- $shipping_method->set_shipping_methods_manager( $this );
210
- }
211
- }
212
-
213
- return $shipping_methods;
214
- }
215
-
216
- /**
217
- * Create shipping method integration settings.
218
- *
219
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
220
- *
221
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings
222
- */
223
- private function create_shipping_method_integration_settings( $shipping_service ) {
224
- $integration_settings = new WPDesk_Flexible_Shipping_SaaS_Shipping_Method_Integration_Settings( $shipping_service, $this->saas_connection, $this->logger );
225
- $integration_settings->hooks();
226
-
227
- return $integration_settings;
228
- }
229
-
230
- /**
231
- * Create shipping method integration settings.
232
- *
233
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
234
- *
235
- * @return WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler
236
- */
237
- private function create_add_shipping_options_handler( $shipping_service ) {
238
- return new WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler( $shipping_service );
239
- }
240
-
241
- /**
242
- * Create shipping service.
243
- *
244
- * @param array $shipping_service_data Shipping service data.
245
- *
246
- * @return WPDesk_Flexible_Shipping_SaaS_Shipping_Service
247
- */
248
- private function create_shipping_service( array $shipping_service_data ) {
249
- if ( empty( $shipping_service_data['settings_fields'] ) ) {
250
- $shipping_service_data['settings_fields'] = array();
251
- }
252
- if ( empty( $shipping_service_data['settings_fields_values'] ) ) {
253
- $shipping_service_data['settings_fields_values'] = array();
254
- }
255
- if ( empty( $shipping_service_data['request_fields'] ) ) {
256
- $shipping_service_data['request_fields'] = array();
257
- }
258
- if ( empty( $shipping_service_data['capabilities'] ) ) {
259
- $shipping_service_data['capabilities'] = array();
260
- }
261
- if ( empty( $shipping_service_data['promoted'] ) ) {
262
- $shipping_service_data['promoted'] = false;
263
- }
264
-
265
- $shipping_service = new WPDesk_Flexible_Shipping_SaaS_Shipping_Service(
266
- $this->saas_connection,
267
- $this->saas_platform_links,
268
- $shipping_service_data['id'],
269
- $shipping_service_data['name'],
270
- $shipping_service_data['description'],
271
- $shipping_service_data['promoted'],
272
- $shipping_service_data['settings_fields'],
273
- $shipping_service_data['settings_fields_values'],
274
- $shipping_service_data['request_fields'],
275
- $shipping_service_data['capabilities']
276
- );
277
-
278
- return $shipping_service;
279
- }
280
-
281
- /**
282
- * Create shipping methods.
283
- */
284
- public function create_saas_shipping_methods() {
285
- if ( $this->saas_connection->is_connected() ) {
286
-
287
- $all_services = $this->get_all_services();
288
- $enabled_services = $this->get_enabled_services();
289
- try {
290
- foreach ( $all_services as $service_id => $shipping_service_data ) {
291
- $shipping_service = $this->create_shipping_service( $shipping_service_data );
292
-
293
- $this->saas_shipping_services[ $service_id ] = $shipping_service;
294
- if ( in_array( $service_id, $enabled_services, true ) ) {
295
- $shipping_method = $this->create_shipping_method( $shipping_service );
296
-
297
- $this->saas_shipping_methods[ $shipping_method->id ] = $shipping_method;
298
-
299
- $this->create_shipping_method_integration_settings( $shipping_service );
300
-
301
- $shipping_options_handler = $this->create_add_shipping_options_handler( $shipping_service );
302
- $shipping_options_handler->hooks();
303
-
304
- if ( $shipping_service->supports( 'requireUKStates' ) ) {
305
- $this->require_uk_states = true;
306
- }
307
-
308
- $collection_points = new WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points(
309
- $this->saas_connection,
310
- $shipping_service
311
- );
312
- $this->add_hookable( $collection_points );
313
- $shipping_service->set_collection_points( $collection_points );
314
-
315
- $checkout_fields = new WPDesk_Flexible_Shipping_SaaS_Shipping_Checkout_Fields_Checkout(
316
- $shipping_service,
317
- $collection_points,
318
- $this->renderer
319
- );
320
- $this->add_hookable( $checkout_fields );
321
-
322
- }
323
- }
324
- } catch ( Exception $e ) {
325
- $this->logger->debug( "create_saas_shipping_methods method exception: {$e->getMessage()} code: {$e->getCode()}",
326
- [
327
- 'exception' => $e,
328
- ]
329
- );
330
- }
331
- }
332
- }
333
-
334
- /**
335
- * In settings screen?
336
- *
337
- * @param WP_Screen $current_screen Current screen.
338
- *
339
- * @return bool
340
- */
341
- private function is_in_shipping_settings( $current_screen = null ) {
342
- if ( ! isset( $current_screen ) ) {
343
- if ( function_exists( 'get_current_screen' ) ) {
344
- $current_screen = get_current_screen();
345
- }
346
- }
347
- if ( isset( $current_screen ) ) {
348
- $tab_parameter = 'tab';
349
- if ( 'woocommerce_page_wc-settings' === $current_screen->id
350
- && isset( $_GET[ $tab_parameter ] )
351
- && 'shipping' === $_GET[ $tab_parameter ]
352
- ) {
353
- return true;
354
- }
355
- }
356
-
357
- return false;
358
- }
359
-
360
- /**
361
- * Clear SaaS Cache on shipping settings pages.
362
- *
363
- * @param WP_Screen $current_screen Current screen.
364
- */
365
- public function clear_cache_at_settings_page( $current_screen ) {
366
- if ( $this->is_in_shipping_settings( $current_screen ) ) {
367
- $this->saas_connection->clear_saas_client_cache();
368
- }
369
- }
370
-
371
- /**
372
- * Set shipping method type - fired on woocommerce_shipping_zone_method_added action.
373
- *
374
- * @param int $instance_id Instance ID.
375
- * @param string $type Type.
376
- * @param int $zone_id Zone ID.
377
- */
378
- public function set_shipping_method_type( $instance_id, $type, $zone_id ) {
379
- update_option( WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings::OPTION_SHIPPING_METHOD_TYPE . $instance_id,
380
- $type
381
- );
382
- }
383
-
384
- /**
385
- * Delete shipping method type - fired on woocommerce_shipping_zone_method_deleted action.
386
- *
387
- * @param int $instance_id Instance ID.
388
- * @param int $method_id Method ID.
389
- * @param int $zone_id Zone ID.
390
- */
391
- public function delete_shipping_method_type( $instance_id, $method_id, $zone_id ) {
392
- delete_option( WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Settings::OPTION_SHIPPING_METHOD_TYPE . $instance_id );
393
- }
394
-
395
- /**
396
- * Add flexible shipping connect shipping method to woocommerce shipping methods.
397
- *
398
- * @param array $methods Methods.
399
- *
400
- * @return array
401
- */
402
- public function add_flexible_shipping_connect_shipping_method( $methods ) {
403
- if ( null === $this->shipping_method_connect ) {
404
- $this->shipping_method_connect = new WPDesk_Flexible_Shipping_SaaS_Settings(
405
- 0,
406
- $this->saas_connection,
407
- $this->saas_platform_links,
408
- null,
409
- $this->integration_checkbox
410
- );
411
- $this->shipping_method_connect->set_shipping_methods_manager( $this );
412
- }
413
- $methods[ WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID ] = $this->shipping_method_connect;
414
-
415
- return $methods;
416
- }
417
-
418
- /**
419
- * Add shipping methods for shipping services.
420
- *
421
- * @param array $methods Methods.
422
- *
423
- * @return mixed
424
- */
425
- public function add_shipping_methods_for_shipping_services( $methods ) {
426
- foreach ( $this->saas_shipping_methods as $method_id => $shipping_method ) {
427
- $methods[ $method_id ] = $shipping_method;
428
- }
429
-
430
- return $methods;
431
- }
432
-
433
- /**
434
- * Update all shipping services.
435
- *
436
- * @param array $shipping_services All shipping services.
437
- */
438
- public function update_all_shipping_services( array $shipping_services ) {
439
- $all_shipping_services = array();
440
- /**
441
- * IDE type hint.
442
- *
443
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService $service
444
- */
445
- foreach ( $shipping_services as $service ) {
446
- $all_shipping_services[ $service->getId() ] = array(
447
- 'id' => $service->getId(),
448
- 'name' => $service->getName(),
449
- 'description' => $service->getDescription(),
450
- 'promoted' => $service->getPromoted(),
451
- 'logo_url' => $service->getLogoUrl(),
452
- 'settings_fields' => $service->getConnectionSettingsDefinitionJson(),
453
- 'settings_fields_values' => $service->getConnectionSettingsValuesJsonSchema(),
454
- 'request_fields' => $service->getRequestFieldsDefinitionJson(),
455
- 'capabilities' => $service->getCapabilitiesJson(),
456
- );
457
- }
458
- update_option( self::OPTION_ALL_SHIPPING_SERVICES, $all_shipping_services );
459
- }
460
-
461
- /**
462
- * Update enabled shipping services.
463
- *
464
- * @param array $enabled_shipping_services Enabled shipping services.
465
- */
466
- public function update_enabled_shipping_services( array $enabled_shipping_services = array() ) {
467
- update_option( self::OPTION_ENABLED_SHIPPING_SERVICES, $enabled_shipping_services );
468
- }
469
-
470
- /**
471
- * Get require uk states.
472
- *
473
- * @return bool
474
- */
475
- public function is_require_uk_states() {
476
- return $this->require_uk_states;
477
- }
478
-
479
- /**
480
- * Get all services.
481
- *
482
- * @return array
483
- */
484
- public function get_all_services() {
485
- return get_option( self::OPTION_ALL_SHIPPING_SERVICES, array() );
486
- }
487
-
488
- /**
489
- * Get enabled services.
490
- *
491
- * @return array
492
- */
493
- public function get_enabled_services() {
494
- return get_option( self::OPTION_ENABLED_SHIPPING_SERVICES, array() );
495
- }
496
-
497
- /**
498
- * Get SaaS shipping service.
499
- *
500
- * @param int $service_id Service Id.
501
- *
502
- * @return null|WPDesk_Flexible_Shipping_SaaS_Shipping_Service
503
- */
504
- public function get_saas_shiping_service( $service_id ) {
505
- return isset( $this->saas_shipping_services[ $service_id ] ) ? $this->saas_shipping_services[ $service_id ] : null;
506
- }
507
-
508
- /**
509
- * Is enabled SaaS service.
510
- *
511
- * @param int $service_id Service Id.
512
- *
513
- * @return bool
514
- */
515
- public function is_enabled_saas_service( $service_id ) {
516
- $enabled_services = $this->get_enabled_services();
517
- return isset( $enabled_services[ $service_id ] );
518
- }
519
-
520
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-shipping-services.php DELETED
@@ -1,157 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- if ( ! class_exists( 'WPDesk_Flexible_Shipping_SaaS_Shipping_Services' ) ) {
8
-
9
- /**
10
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Services
11
- */
12
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Services {
13
-
14
- const SHIPPING_SERVICE_FIELD_PREFIX = 'shipping_service_';
15
-
16
- /**
17
- * Saas connection.
18
- *
19
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
20
- */
21
- private $saas_connection;
22
-
23
- /**
24
- * Logger.
25
- *
26
- * @var \Psr\Log\LoggerInterface
27
- */
28
- private $logger;
29
-
30
- /**
31
- * Links.
32
- *
33
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
34
- */
35
- private $saas_platform_links;
36
-
37
- /**
38
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Services constructor.
39
- *
40
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Saas connection.
41
- * @param \Psr\Log\LoggerInterface $logger Logger.
42
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
43
- */
44
- public function __construct(
45
- $saas_connection,
46
- \Psr\Log\LoggerInterface $logger,
47
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links
48
- ) {
49
- $this->saas_connection = $saas_connection;
50
- $this->logger = $logger;
51
- $this->saas_platform_links = $saas_platform_links;
52
- }
53
-
54
- /**
55
- * Get platform.
56
- *
57
- * @return \WPDesk\SaasPlatformClient\Platform
58
- */
59
- private function get_platform() {
60
- return $this->saas_connection->get_platform();
61
- }
62
-
63
- /**
64
- * Add shipping service checkbox to settings.
65
- *
66
- * @param array $settings Settings.
67
- * @param \WPDesk\SaasPlatformClient\Model\ShippingService $shipping_service Shipping service.
68
- *
69
- * @return array
70
- */
71
- private function add_shipping_service_checkbox_to_settings(
72
- array $settings,
73
- \WPDesk\SaasPlatformClient\Model\ShippingService $shipping_service
74
- ) {
75
- $settings[ self::SHIPPING_SERVICE_FIELD_PREFIX . $shipping_service->getId() ] = [
76
- 'class' => 'flexible-shipping-saas-shipping-service',
77
- 'title' => $shipping_service->getName(),
78
- 'description' => $shipping_service->getDescription(),
79
- 'type' => 'checkbox',
80
- 'custom_attributes' => array(
81
- 'data-shipping_service_id' => esc_attr( $shipping_service->getId() ),
82
- 'data-shipping_service_name' => esc_attr( $shipping_service->getName() ),
83
- ),
84
- ];
85
-
86
- return $settings;
87
- }
88
-
89
- /**
90
- * Add shipping services checkboxes to settings.
91
- *
92
- * @param array $settings Settings.
93
- *
94
- * @return mixed
95
- */
96
- public function add_shipping_services_checkboxes_to_settings( array $settings ) {
97
- if ( $this->saas_connection->is_connected() ) {
98
- try {
99
- $platform = $this->get_platform();
100
- $shipping_services = $platform->requestListShippingServices();
101
- $settings[] = array(
102
- 'title' => __( 'Services', 'flexible-shipping' ),
103
- 'type' => 'title',
104
- );
105
- foreach ( $shipping_services->getPage() as $shipping_service ) {
106
- $settings = $this->add_shipping_service_checkbox_to_settings( $settings, $shipping_service );
107
- }
108
- } catch ( Exception $e ) {
109
- $this->logger->debug( "add_shipping_services_checkboxes_to_settings method exception: {$e->getMessage()} code: {$e->getCode()}",
110
- [
111
- 'exception' => $e
112
- ] );
113
- }
114
- }
115
-
116
- return $settings;
117
- }
118
-
119
- /**
120
- * Get shipping services from platform.
121
- *
122
- * @return array
123
- * @throws Exception Exception.
124
- */
125
- public function get_shipping_services_from_platform() {
126
- $shipping_services_from_platform = array();
127
- $platform = $this->get_platform();
128
- try {
129
- $shipping_services = $platform->requestListShippingServices();
130
- if ( $shipping_services->isBadCredentials() ) {
131
- throw new WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception( $this->saas_platform_links );
132
- }
133
- /**
134
- * IDE type hint.
135
- *
136
- * @var \WPDesk\SaasPlatformClient\Model\ShippingService $shipping_service
137
- */
138
- foreach ( $shipping_services->getPage() as $shipping_service ) {
139
- $shipping_services_from_platform[] = $shipping_service;
140
- }
141
- } catch ( Exception $e ) {
142
- $this->logger->debug( "get_shipping_services_from_platform method exception: {$e->getMessage()} code: {$e->getCode()}",
143
- [
144
- 'exception' => $e,
145
- ]
146
- );
147
- if ( $e instanceof WPDesk_Flexible_Shipping_SaaS_Bad_Credentials_Exception ) {
148
- throw $e;
149
- }
150
- }
151
-
152
- return $shipping_services_from_platform;
153
- }
154
-
155
- }
156
-
157
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-saas-user-registration.php DELETED
@@ -1,442 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- if ( ! class_exists( 'WPDesk_Flexible_Shipping_SaaS_User_Registration' ) ) {
8
-
9
- /**
10
- * Class WPDesk_Flexible_Shipping_SaaS_User_Registration
11
- */
12
- class WPDesk_Flexible_Shipping_SaaS_User_Registration
13
- implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant, \WPDesk\PluginBuilder\Plugin\HookableCollection {
14
-
15
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
16
- use \WPDesk\PluginBuilder\Plugin\HookableParent;
17
-
18
- const PRIORITY_AFTER_DEFAULT = 11;
19
- const PRIORITY_AFTER_AFTER_DEFAULT = 12;
20
-
21
- const PAGE_WOOCOMMERCE_SETTINGS = 'wc-settings';
22
- const TAB_SHIPPING = 'shipping';
23
- const SECTION_FLEXIBLE_SHIPPING_CONNECT = 'flexible_shipping_connect';
24
-
25
- const SUBMIT_REGISTER_PARAMETER = 'flexible-shipping-submit-register';
26
-
27
- const SETTING_FLEXIBLE_SHIPPING_USER_EMAIL = 'flexible_shipping_user_email';
28
- const SETTING_FLEXIBLE_SHIPPING_API_KEY = 'flexible_shipping_api_key';
29
- const SETTING_FLEXIBLE_SHIPPING_REGISTERED = 'flexible_shipping_registered';
30
-
31
- const NONCE_REGISTRATION_ACTION = 'fsregister';
32
- const NONCE_REGISTRATION_NAME = '_nonce_fsregister';
33
-
34
- const SETTINGS_ERROR_SETTING = 'flexible-shipping-register';
35
- const SETTINGS_ERROR_CODE_SUCCESS = 'success';
36
-
37
- const NOTICE_NAME = 'fs_connect_notice';
38
-
39
- const REGISTER_PAGE_SLUG = 'flexible_shipping_connect_register';
40
- const FS_CONNECT_FIRST_NOTICE_NAME = 'fs_connect_start';
41
-
42
- /**
43
- * Show register form
44
- *
45
- * @var bool
46
- */
47
- private $show_register_form = true;
48
-
49
- /**
50
- * SaaS connection.
51
- *
52
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
53
- */
54
- private $saas_connection;
55
-
56
- /**
57
- * Links.
58
- *
59
- * @var WPDesk_Flexible_Shipping_SaaS_Platform_Links
60
- */
61
- private $saas_platform_links;
62
-
63
- /**
64
- * WPDesk_Flexible_Shipping_Services constructor.
65
- *
66
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
67
- * @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
68
- */
69
- public function __construct(
70
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
71
- WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links
72
- ) {
73
- $this->saas_connection = $saas_connection;
74
- $this->saas_platform_links = $saas_platform_links;
75
-
76
- if ( ! $this->saas_connection->is_connected() && ! $this->is_on_setings_page() ) {
77
- $this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice( self::FS_CONNECT_FIRST_NOTICE_NAME ) );
78
- }
79
- }
80
-
81
- /**
82
- * Is on settings page?
83
- *
84
- * @return bool
85
- */
86
- public function is_on_setings_page() {
87
- return ( isset( $_GET['page'] ) && self::PAGE_WOOCOMMERCE_SETTINGS === $_GET['page']
88
- && isset( $_GET['tab'] ) && self::TAB_SHIPPING === $_GET['tab']
89
- && isset( $_GET['section'] ) && self::SECTION_FLEXIBLE_SHIPPING_CONNECT === $_GET['section']
90
- );
91
- }
92
-
93
- /**
94
- * Is on registration page?
95
- *
96
- * @return bool
97
- */
98
- public function is_on_registration_page() {
99
- return ( isset( $_GET['page'] ) && self::REGISTER_PAGE_SLUG === $_GET['page'] );
100
- }
101
-
102
- /**
103
- * Is on submit page?
104
- *
105
- * @return bool
106
- */
107
- public function is_on_submit_page() {
108
- return ( isset( $_GET[ self::SUBMIT_REGISTER_PARAMETER ] ) && '1' === $_GET[ self::SUBMIT_REGISTER_PARAMETER ] );
109
- }
110
-
111
- /**
112
- * Hooks.
113
- */
114
- public function hooks() {
115
- add_filter( 'removable_query_args', [ $this, 'add_email_parameters_to_removable_query_args' ] );
116
- add_action( 'admin_init', [ $this, 'register_user_and_add_notice' ] );
117
- add_action( 'admin_init', [ $this, 'create_registration_notices' ] );
118
- add_action( 'admin_menu', [ $this, 'add_registration_page' ] );
119
- $this->hooks_on_hookable_objects();
120
- }
121
-
122
- /**
123
- * Add registration page to WordPress admin area.
124
- */
125
- public function add_registration_page() {
126
- add_submenu_page(
127
- null,
128
- __( 'Flexible Shipping Connect Registration', 'flexible-shipping' ),
129
- __( 'Flexible Shipping Connect Registration', 'flexible-shipping' ),
130
- 'edit_pages',
131
- self::REGISTER_PAGE_SLUG,
132
- [ $this, 'show_registration_page' ]
133
- );
134
- }
135
-
136
- /**
137
- * Display registration page.
138
- */
139
- public function show_registration_page() {
140
- $user_email = get_option( 'admin_email' );
141
- if ( isset( $_REQUEST['user_email'] ) ) {
142
- $user_email = $_REQUEST['user_email'];
143
- }
144
- $action = admin_url( 'admin.php' );
145
- $action = add_query_arg( self::SUBMIT_REGISTER_PARAMETER, '1', $action );
146
- $url_fs_com = $this->saas_platform_links->add_utm_general( $this->saas_platform_links->get_base_url() );
147
- $url_terms = $this->saas_platform_links->add_utm(
148
- $this->saas_platform_links->get_terms(),
149
- 'fs-signup-terms',
150
- 'flexible-shipping',
151
- 'link',
152
- 'user-site',
153
- 'terms-of-service'
154
- );
155
- $url_privacy = $this->saas_platform_links->add_utm(
156
- $this->saas_platform_links->get_privacy(),
157
- 'fs-signup-privacy',
158
- 'flexible-shipping',
159
- 'link',
160
- 'user-site',
161
- 'privacy-policy'
162
- );
163
- $saas_connected = $this->saas_connection->is_connected();
164
- $settings_url = admin_url( 'admin.php' );
165
- $settings_url = add_query_arg( 'page', self::PAGE_WOOCOMMERCE_SETTINGS, $settings_url );
166
- $settings_url = add_query_arg( 'tab', self::TAB_SHIPPING, $settings_url );
167
- $settings_url = add_query_arg( 'section', self::SECTION_FLEXIBLE_SHIPPING_CONNECT, $settings_url );
168
- include 'views/html-registration-page.php';
169
- }
170
-
171
- /**
172
- * Show registration notices.
173
- */
174
- public function create_registration_notices() {
175
- $settings_errors = get_settings_errors( self::SETTINGS_ERROR_SETTING );
176
- $notices = array();
177
- foreach ( $settings_errors as $error ) {
178
- $notices[] = new \WPDesk\Notice\Notice( $error['message'], $error['type'] );
179
- }
180
- return $notices;
181
- }
182
-
183
- /**
184
- * Removable query args.
185
- *
186
- * @param array $removable_query_args Query args.
187
- *
188
- * @return array
189
- */
190
- public function add_email_parameters_to_removable_query_args( $removable_query_args ) {
191
- $removable_query_args[] = 'user_email';
192
- $removable_query_args[] = '_nonce_fsregister';
193
- $removable_query_args[] = '_wp_http_referer';
194
- return $removable_query_args;
195
- }
196
-
197
-
198
- /**
199
- * Add platform unavailable notice.
200
- */
201
- private function add_notice_connecton_problem() {
202
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
203
- $notice_content = __( 'There are some connection problems. Please try again in few minutes. Thanks!', 'flexible-shipping' );
204
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
205
- }
206
-
207
- /**
208
- * Add invalid email notice.
209
- */
210
- private function add_notice_invalid_email() {
211
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
212
- $notice_content = __( 'Please enter a valid email!', 'flexible-shipping' );
213
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
214
- }
215
-
216
- /**
217
- * Add notice user registered.
218
- *
219
- * @param string $user_email User email.
220
- */
221
- private function add_notice_user_registered( $user_email ) {
222
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_SUCCESS;
223
- $notice_content = sprintf(
224
- /* Translators: email and url */
225
- __( '%1$sAccount created, please check your email and click the activation link to connect (%3$s).%2$s If you haven\'t received the email, please %4$scontact us%5$s.', 'flexible-shipping' ),
226
- '<strong>',
227
- '</strong>',
228
- $user_email,
229
- '<a href=' . $this->saas_platform_links->add_utm(
230
- $this->saas_platform_links->get_support(),
231
- 'fs-signup-support',
232
- 'flexible-shipping',
233
- 'link',
234
- 'user-site',
235
- ''
236
- ) . ' tagret="_blank">',
237
- '</a>'
238
- );
239
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
240
- }
241
-
242
- /**
243
- * Add notice domain occupied.
244
- */
245
- private function add_notice_domain_occupied() {
246
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
247
- $notice_content = sprintf(
248
- /* Translators: email and url */
249
- __( 'Your store (%1$s) is already registered with another account! You can register your domain with one account. If you have questions, %2$scontact us%3$s.', 'flexible-shipping' ),
250
- site_url(),
251
- '<a target="_blank" href=' . $this->saas_platform_links->add_utm(
252
- $this->saas_platform_links->get_support(),
253
- 'fs-register-contactus',
254
- 'flexible-shipping',
255
- 'link',
256
- 'user-site',
257
- 'contact-us'
258
- ) . ' tagret="_blank">',
259
- '</a>'
260
- );
261
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
262
- }
263
-
264
- /**
265
- * Add notice domain not allowed.
266
- */
267
- private function add_notice_domain_not_allowed() {
268
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
269
- $notice_content = sprintf(
270
- /* Translators: email and url */
271
- __( 'Our demo does not support Flexible Shipping Connect registration. Try FS Connect for free. %1$sCheck now →%2$s', 'flexible-shipping' ),
272
- '<a target="_blank" href=' . $this->saas_platform_links->add_utm(
273
- $this->saas_platform_links->get_connect(),
274
- 'fs-demo-doesnt-support',
275
- 'flexible-shipping',
276
- 'link',
277
- 'demo',
278
- 'check-now'
279
- ) . ' tagret="_blank">',
280
- '</a>'
281
- );
282
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
283
- }
284
-
285
- /**
286
- * Add notice user already exists.
287
- *
288
- * @param string $user_email User email.
289
- */
290
- private function add_notice_user_already_exists( $user_email ) {
291
- $settings_url = admin_url( 'admin.php' );
292
- $settings_url = add_query_arg( 'page', self::PAGE_WOOCOMMERCE_SETTINGS, $settings_url );
293
- $settings_url = add_query_arg( 'tab', self::TAB_SHIPPING, $settings_url );
294
- $settings_url = add_query_arg( 'section', self::SECTION_FLEXIBLE_SHIPPING_CONNECT, $settings_url );
295
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_INFO;
296
- $notice_content = sprintf(
297
- /* Translators: email and url */
298
- __( 'Account with this email is already registered! We emailed your Connect Key to %1$s.<br>Enter your key %2$shere%4$s. You can also get your key by logging to %3$syour account%4$s.', 'flexible-shipping' ),
299
- $user_email,
300
- '<a href=' . $settings_url . '>',
301
- '<a href=' . $this->saas_platform_links->get_my_account() . ' target="_blank">',
302
- '</a>'
303
- );
304
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
305
- }
306
-
307
- /**
308
- * Add admin notice.
309
- *
310
- * @param int $response_code Notice code.
311
- */
312
- private function add_notice_from_response( $response_code ) {
313
- $notice_type = WPDesk\Notice\Notice::NOTICE_TYPE_ERROR;
314
- $notice_content = sprintf(
315
- /* Translators: notice code */
316
- __( 'Unknown response code from Flexible Shipping Connect API (%s).', 'flexible-shipping' ),
317
- $response_code
318
- );
319
- add_settings_error( self::SETTINGS_ERROR_SETTING, self::SETTINGS_ERROR_CODE_SUCCESS, $notice_content, $notice_type );
320
- }
321
-
322
- /**
323
- * Registers user trough FS Connect platform
324
- *
325
- * @param string $email Email.
326
- * @param WPDesk_Flexible_Shipping_SaaS_Auth_Params $params Params.
327
- *
328
- * @return \WPDesk\SaasPlatformClient\Response\Authentication\RegisterResponse
329
- */
330
- private function register_user( $email, WPDesk_Flexible_Shipping_SaaS_Auth_Params $params ) {
331
- $platform = $this->saas_connection->get_platform();
332
-
333
- return $platform->requestRegister( $email, $params->get_user_domain(), $params->get_user_locale(), admin_url( 'admin.php' ) );
334
- }
335
-
336
- /**
337
- * Register user and show notice.
338
- */
339
- public function register_user_and_add_notice() {
340
- if ( $this->is_on_submit_page() ) {
341
- $user_email = '';
342
- if ( isset( $_REQUEST[ self::NONCE_REGISTRATION_NAME ] )
343
- && wp_verify_nonce( $_REQUEST[ self::NONCE_REGISTRATION_NAME ], self::NONCE_REGISTRATION_ACTION )
344
- && isset( $_REQUEST['user_email'] )
345
- ) {
346
- $user_email = $_REQUEST['user_email'];
347
- $registered = get_option( self::SETTING_FLEXIBLE_SHIPPING_REGISTERED, '' );
348
- if ( '' !== $user_email && '' === $registered && is_email( $user_email ) ) {
349
- try {
350
- $register_response = $this->register_user(
351
- $user_email,
352
- new WPDesk_Flexible_Shipping_SaaS_Auth_Params()
353
- );
354
- if ( $register_response->isUserRegistered() ) {
355
- $this->add_notice_user_registered( $user_email );
356
-
357
- } else {
358
- if ( $register_response->isDomainOccupied() ) {
359
- $this->add_notice_domain_occupied();
360
- } elseif ( $register_response->isUserAlreadyExists() ) {
361
- $this->add_notice_user_already_exists( $user_email );
362
- } elseif ( $register_response->isBadRequest() ) {
363
- $this->add_notice_connecton_problem();
364
- } elseif ( $register_response->isServerFatalError() ) {
365
- $this->add_notice_connecton_problem();
366
- } elseif ( $register_response->isDomainNotAllowed() ) {
367
- $this->add_notice_domain_not_allowed();
368
- } else {
369
- $this->add_notice_from_response( $register_response->getResponseCode() );
370
- }
371
- }
372
- } catch ( Exception $e ) {
373
- $this->add_notice_connecton_problem();
374
- }
375
- } else {
376
- $this->add_notice_invalid_email();
377
- }
378
- }
379
- set_transient( 'settings_errors', get_settings_errors(), 30 );
380
- $url = admin_url( 'admin.php' );
381
- $url = add_query_arg( 'page', self::REGISTER_PAGE_SLUG, $url );
382
- $url = add_query_arg( 'settings-updated', 'true', $url );
383
- $url = add_query_arg( 'user_email', urlencode( $user_email ), $url );
384
- wp_safe_redirect( $url );
385
- exit;
386
- }
387
- }
388
-
389
- /**
390
- * Show register form - handle hook.
391
- */
392
- public function register_form_notice() {
393
- if ( $this->show_register_form ) {
394
- if ( ! $this->saas_connection->is_connected() ) {
395
- $this->display_registration_notice();
396
- }
397
- }
398
- }
399
-
400
- /**
401
- * Get registration notice content.
402
- *
403
- * @return false|string
404
- */
405
- private function get_registration_notice_content() {
406
- $html_class_is_dismissible = 'is-dismissible';
407
- if ( $this->is_on_setings_page() ) {
408
- $html_class_is_dismissible = '';
409
- }
410
-
411
- ob_start();
412
- include 'views/html-flexible-shipping-connect-notice.php';
413
- $notice_content = ob_get_contents();
414
- ob_end_clean();
415
-
416
- return $notice_content;
417
- }
418
-
419
- /**
420
- * Display registration form.
421
- */
422
- private function display_registration_notice() {
423
-
424
- $notice_content = $this->get_registration_notice_content();
425
-
426
- if ( ! $this->is_on_setings_page() && ! $this->is_on_registration_page() ) {
427
- new \WPDesk\Notice\PermanentDismissibleNotice(
428
- $notice_content,
429
- self::FS_CONNECT_FIRST_NOTICE_NAME,
430
- \WPDesk\Notice\Notice::NOTICE_TYPE_INFO,
431
- 10,
432
- array(
433
- 'class' => 'fs-connect__container',
434
- 'id' => 'fs_connect_notice',
435
- )
436
- );
437
- }
438
- }
439
-
440
- }
441
-
442
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-sass-settings-integration-checkbox.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
-
3
- class WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox
4
- implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
5
-
6
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
7
-
8
- const OPTION_NAME = 'flexible_shipping_connect_integration_box';
9
-
10
- /**
11
- * Connection
12
- *
13
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
14
- */
15
- private $connection;
16
-
17
- /**
18
- * WPDesk_Flexible_Shipping_SaaS_Settings_Integration_Checkbox constructor.
19
- *
20
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $connection
21
- */
22
- public function __construct( WPDesk_Flexible_Shipping_SaaS_Connection $connection ) {
23
- $this->connection = $connection;
24
- }
25
-
26
- public function hooks() {
27
- add_action( 'wp_ajax_update_fs_connect_integration_setting', [ $this, 'wp_ajax_update_integration_setting' ] );
28
- }
29
-
30
- /**
31
- * Handle AJAX update setting request.
32
- */
33
- public function wp_ajax_update_integration_setting() {
34
- $state = $_POST['fs_box_state'];
35
- update_option( self::OPTION_NAME, $state );
36
- wp_send_json_success( [ 'state' => $state ] );
37
- }
38
-
39
- /**
40
- * Is FS Connect visible
41
- *
42
- * @return bool
43
- */
44
- public function is_visible() {
45
- return $this->connection->is_connected();
46
- }
47
-
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/class-shipping-zone-data-extractor.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_UK_States
5
- */
6
- class WPDesk_Flexible_Shipping_Shipping_Zone_Data_Extractor {
7
-
8
- /**
9
- * Shipping zone.
10
- *
11
- * @var WC_Shipping_Zone
12
- */
13
- private $shipping_zone;
14
-
15
- /**
16
- * WPDesk_Flexible_Shipping_Shipping_Zone_Data_Extractor constructor.
17
- *
18
- * @param WC_Shipping_Zone $shipping_zone Shipping zone.
19
- */
20
- public function __construct( $shipping_zone ) {
21
- $this->shipping_zone = $shipping_zone;
22
- }
23
-
24
- /**
25
- * Get zone countries.
26
- *
27
- * @return array
28
- */
29
- public function get_countries() {
30
- $countries = array();
31
- $locations = $this->shipping_zone->get_zone_locations();
32
- foreach ( $locations as $location ) {
33
- if ( 'country' === $location->type ) {
34
- $countries[ $location->code ] = $location->code;
35
- }
36
- if ( 'continent' === $location->type ) {
37
- $continents = WC()->countries->get_continents();
38
- $countries = $continents[ $location->code ]['countries'];
39
- foreach ( $countries as $country ) {
40
- $countries[ $country ] = $country;
41
- }
42
- }
43
- }
44
- if ( 0 === count( $countries ) ) {
45
- $countries[] = 'other';
46
- }
47
- return $countries;
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax-request-data.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Loads map with collection points.
5
- *
6
- * WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data extends WPDesk_Flexible_Shipping_Checkout_Ajax_Request_Data {
9
-
10
- /**
11
- * WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data.
12
- *
13
- * @param array $request Request.
14
- */
15
- public function __construct( $request ) {
16
- parent::__construct( $request );
17
- $this->post_data = $request;
18
- }
19
-
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-ajax.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Loads map with collection points.
5
- *
6
- * WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax {
9
-
10
- const STATUS_OK = 'ok';
11
- const STATUS_ERROR = 'error';
12
-
13
- /**
14
- * SaaS connection.
15
- *
16
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
17
- */
18
- private $saas_connection;
19
-
20
- /**
21
- * Shipping service.
22
- *
23
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
24
- */
25
- private $shipping_service;
26
-
27
- const NONCE_ACTION = 'fs_collection_points_map';
28
-
29
- /**
30
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points constructor.
31
- *
32
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
33
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
34
- */
35
- public function __construct(
36
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
37
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service
38
- ) {
39
- $this->saas_connection = $saas_connection;
40
- $this->shipping_service = $shipping_service;
41
- }
42
-
43
- /**
44
- * Handle request.
45
- *
46
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points Service collection points.
47
- * @throws RuntimeException Exception.
48
- */
49
- public function handle_request( WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points $service_collection_points ) {
50
- if ( check_ajax_referer( self::NONCE_ACTION, 'security', false ) ) {
51
- $response = array(
52
- 'status' => self::STATUS_OK,
53
- );
54
-
55
- $request_data = new WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax_Request_Data( $_REQUEST );
56
-
57
- $address = new \WPDesk\SaasPlatformClient\Model\Shipment\Address();
58
- $address->setAddressLine1( $request_data->get_shipping_address_1() );
59
- $address->setAddressLine2( $request_data->get_shipping_address_2() );
60
- $address->setPostalCode( $request_data->get_shipping_postcode() );
61
- $address->setCity( $request_data->get_shipping_city() );
62
- $address->setStateCode( $request_data->get_shipping_state() );
63
- $address->setCountryCode( $request_data->get_shipping_country() );
64
- try {
65
- $collection_points = $service_collection_points->get_nearest_collection_points( $address );
66
- $response['points'] = $collection_points->getPoints()->points;
67
- } catch ( Exception $e ) {
68
- $response = array(
69
- 'status' => self::STATUS_ERROR,
70
- 'message' => $e->getMessage(),
71
- );
72
- }
73
- } else {
74
- $response = array(
75
- 'status' => self::STATUS_ERROR,
76
- 'message' => __( 'Invalid nonce!', 'flexible-shipping' ),
77
- );
78
- }
79
- wp_send_json( $response );
80
- }
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-collection-points-map.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Loads map with collection points.
5
- *
6
- * WPDesk_Flexible_Shipping_SaaS_Collection_Points_Map_Loader
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Collection_Points_Map_Loader implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
9
-
10
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
11
-
12
- const URL_MAP_PARAMETER = 'flexible-shipping-collection-point-map';
13
- const SCRIPT_HANDLE = 'fs_collection_points_map';
14
-
15
- /**
16
- * Scripts version.
17
- *
18
- * @var string
19
- */
20
- private $scripts_version = FLEXIBLE_SHIPPING_VERSION . '.5';
21
-
22
- /**
23
- * Hooks.
24
- */
25
- public function hooks() {
26
- add_action( 'init', array( $this, 'maybe_load_map' ) );
27
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
28
- }
29
-
30
- /**
31
- * Admin scripts.
32
- */
33
- public function enqueue_scripts() {
34
- if ( is_checkout() ) {
35
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
36
- wp_register_script( self::SCRIPT_HANDLE,
37
- trailingslashit( $this->plugin->get_plugin_assets_url() ) . 'js/collection-points-map' . $suffix . '.js', array( 'jquery' ),
38
- $this->scripts_version, true
39
- );
40
-
41
- wp_localize_script( self::SCRIPT_HANDLE, self::SCRIPT_HANDLE, array(
42
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
43
- 'collection_points_map_url' => site_url( '?' . self::URL_MAP_PARAMETER ),
44
- 'loading_image' => $this->plugin->get_plugin_url() .'assets/images/ajax-loading.gif',
45
- 'marker_icon' => $this->plugin->get_plugin_url() .'assets/images/marker-icon.png',
46
- 'lang' => array(
47
- 'no_points' => __( 'Points can not be found. Check the shipping address.', 'flexible-shipping'),
48
- 'user_location' => __( 'It\'s your location', 'flexible-shipping'),
49
- ),
50
- 'ajax_nonce' => wp_create_nonce( WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax::NONCE_ACTION )
51
- ) );
52
- wp_enqueue_script( self::SCRIPT_HANDLE );
53
- }
54
- }
55
-
56
- /**
57
- * Maybe load map.
58
- */
59
- public function maybe_load_map() {
60
- if ( isset( $_GET[ self::URL_MAP_PARAMETER ] ) ) {
61
- include 'views/map.php';
62
- die();
63
- }
64
- }
65
-
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/class-saas-shipping-service-collection-points.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Handles collection points .
5
- *
6
- * Class WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points
7
- */
8
- class WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points implements \WPDesk\PluginBuilder\Plugin\Hookable {
9
-
10
- /**
11
- * SaaS connection.
12
- *
13
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
14
- */
15
- private $saas_connection;
16
-
17
- /**
18
- * Shipping service.
19
- *
20
- * @var WPDesk_Flexible_Shipping_SaaS_Shipping_Service
21
- */
22
- private $shipping_service;
23
-
24
- /**
25
- * WPDesk_Flexible_Shipping_SaaS_Shipping_Service_Collection_Points constructor.
26
- *
27
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
28
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service Shipping service.
29
- */
30
- public function __construct(
31
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
32
- WPDesk_Flexible_Shipping_SaaS_Shipping_Service $shipping_service
33
- ) {
34
- $this->saas_connection = $saas_connection;
35
- $this->shipping_service = $shipping_service;
36
- }
37
-
38
- /**
39
- * Hooks.
40
- */
41
- public function hooks() {
42
- $ajax_action = 'fs_collection_points_' . $this->shipping_service->get_id();
43
- add_action( 'wp_ajax_' . $ajax_action, array( $this, 'handle_ajax_get_collection_points' ) );
44
- add_action( 'wp_ajax_nopriv_' . $ajax_action, array( $this, 'handle_ajax_get_collection_points' ) );
45
- }
46
-
47
- /**
48
- * Handle AJAX.
49
- */
50
- public function handle_ajax_get_collection_points() {
51
- $ajax_handler = new WPDesk_Flexible_Shipping_SaaS_Collection_Points_Ajax( $this->saas_connection, $this->shipping_service );
52
- $ajax_handler->handle_request( $this );
53
- }
54
-
55
- /**
56
- * Get nearest collection points.
57
- *
58
- * @param \WPDesk\SaasPlatformClient\Model\Shipment\Address $address Address.
59
- * @return \WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints\PostSearchResponse
60
- */
61
- public function get_nearest_collection_points( \WPDesk\SaasPlatformClient\Model\Shipment\Address $address ) {
62
- $platform = $this->saas_connection->get_platform();
63
- $search_request = new WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SearchRequest();
64
- $search_request->setAddress( $address );
65
- $search_request->setRadius( 50 );
66
- return $platform->requestPostSearchParcelCollectionPoints( $search_request, $this->shipping_service->get_id() );
67
- }
68
-
69
- /**
70
- * Prepare collection point options for address.
71
- *
72
- * @param \WPDesk\SaasPlatformClient\Model\Shipment\Address $address Address.
73
- * @return array
74
- */
75
- public function prepare_collection_points_options_for_address( \WPDesk\SaasPlatformClient\Model\Shipment\Address $address ) {
76
- $collection_points = $this->get_nearest_collection_points( $address );
77
- $collection_points_options = array();
78
- if ( $collection_points->isCollectionPointError() ) {
79
- $collection_points_options[''] = __( 'Cannot get data for this address!', 'flexible-shipping' );
80
- } else {
81
- foreach ( $collection_points->getPoints()->points as $collection_point ) {
82
- $label = $collection_point->getName();
83
- $label .= ', ' . $collection_point->getAddress()->getCity();
84
- $label .= ' ' . $collection_point->getAddress()->getPostalCode();
85
- $label .= ', ' . $collection_point->getAddress()->getAddressLine1();
86
- $label .= ' ' . $collection_point->getAddress()->getAddressLine2();
87
-
88
- $collection_points_options[ $collection_point->getId() ] = ucwords( strtolower( $label ) );
89
- }
90
- }
91
- return $collection_points_options;
92
- }
93
-
94
- /**
95
- * Get collection point.
96
- *
97
- * @param string $collection_point_id Collection point id.
98
- *
99
- * @return mixed
100
- */
101
- public function get_collection_point( $collection_point_id ) {
102
- $platform = $this->saas_connection->get_platform();
103
- $single_request = new WPDesk\SaasPlatformClient\Model\ParcelCollectionPoints\SingleRequest();
104
- $single_request->setId( $collection_point_id );
105
- return $platform->requestGetSingleCollectionPoint( $single_request, $this->shipping_service->get_id() );
106
- }
107
-
108
- /**
109
- * Format single point description from response.
110
- *
111
- * @param \WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints\GetSingleResponse $response Response.
112
- *
113
- * @return string
114
- */
115
- public function format_single_point_description_from_response( \WPDesk\SaasPlatformClient\Response\ParcelCollectionPoints\GetSingleResponse $response ) {
116
- $description = $response->getSingleResponse()->point->getName();
117
- $description .= ', ' . $response->getSingleResponse()->point->getAddress()->getAddressLine1();
118
- if ( ! empty( $response->getSingleResponse()->point->getAddress()->getAddressLine2() ) ) {
119
- $description .= ' ' . $response->getSingleResponse()->point->getAddress()->getAddressLine2();
120
- }
121
- $description .= ', ' . $response->getSingleResponse()->point->getAddress()->getPostalCode();
122
- $description .= ' ' . $response->getSingleResponse()->point->getAddress()->getCity();
123
- return $description;
124
- }
125
-
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/collection-points/views/map.php DELETED
@@ -1,174 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="pl">
3
- <head>
4
- <title><?php _e('Select point', 'flexible-shipping'); ?></title>
5
- <meta charset="utf-8"/>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
8
- integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
9
- crossorigin=""/>
10
- <script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"
11
- integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg=="
12
- crossorigin=""></script>
13
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"
14
- integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
15
- <link href="https://unpkg.com/leaflet-geosearch@latest/assets/css/leaflet.css" rel="stylesheet"/>
16
- <script src="https://unpkg.com/leaflet-geosearch@latest/dist/bundle.min.js"></script>
17
- <script>
18
- var parent = window.opener;
19
- var ajax_url = parent.fs_collection_points_map.ajax_url;
20
- var loading_image = parent.fs_collection_points_map.loading_image;
21
- var marker_icon = parent.fs_collection_points_map.marker_icon;
22
- var lang = parent.fs_collection_points_map.lang;
23
-
24
- var OpenStreetMapProvider = window.GeoSearch.OpenStreetMapProvider;
25
- var provider = new OpenStreetMapProvider();
26
- var markers = [];
27
- var selectedMarker = null;
28
-
29
- $(document).ready(function () {
30
- var map = L.map('map');
31
-
32
- var userLocationIcon = L.icon({
33
- iconUrl: marker_icon,
34
- iconSize: [25, 41],
35
- });
36
- window.opener.postMessage({action: 'get_adresses_data'}, window.location.origin);
37
- window.addEventListener('message', function (event) {
38
- if (event.origin === window.location.origin && 'send_address_data' === event.data.action) {
39
- var ajax_data = event.data.addresses_data;
40
- provider
41
- .search({query: get_shipping_address(ajax_data)})
42
- .then(function (result) {
43
- if (result[0].y && result[0].x) {
44
- var userMarker = L.marker([parseFloat(result[0].y), parseFloat(result[0].x)], {title: lang.user_location, icon: userLocationIcon}).addTo(map);
45
- userMarker.bindPopup( lang.user_location );
46
- markers.push(userMarker);
47
- }
48
- });
49
-
50
- jQuery('#map').css('background-image', 'url(' + loading_image + ')');
51
- $.post(ajax_url, ajax_data, function (response) {
52
- if (response.points && 'ok' === response.status) {
53
- var points = response.points;
54
- var group = new L.featureGroup();
55
- if (map) {
56
- $('#map').css('background-image', 'none');
57
- }
58
- L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
59
- attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
60
- }).addTo(map);
61
- $.each(points, function (i, point) {
62
- var marker = L.marker([parseFloat(point.mapLocation.lat), parseFloat(point.mapLocation.lng)], {title: point.name});
63
- marker.bindPopup(popup_point_html(point));
64
- markers.push(marker);
65
- if (point.id === event.data.addresses_data.selected_point) {
66
- selectedMarker = marker;
67
- }
68
- });
69
- var group = L.featureGroup(markers).addTo(map);
70
- map.fitBounds(group.getBounds());
71
- if (null !== selectedMarker) {
72
- selectedMarker.fireEvent('click');
73
- }
74
- } else if ('error' === response.status) {
75
- alert(response.message);
76
- window.close();
77
- } else {
78
- alert(lang.no_points);
79
- window.close();
80
- }
81
- });
82
- }
83
- }, true);
84
- });
85
-
86
- function get_shipping_address(data) {
87
- var address, city, postcode;
88
- if (data.different_addres === true) {
89
- address = data.shipping_address_1;
90
- city = data.shipping_city;
91
- postcode = data.shipping_postcode;
92
- } else {
93
- address = data.billing_address_1;
94
- city = data.billing_city;
95
- postcode = data.billing_postcode;
96
- }
97
- var new_address = address.split('/');
98
- if( new_address[0] ) {
99
- address = new_address[0];
100
- }
101
- return address + ', ' + postcode + ', ' + city;
102
- }
103
-
104
- function popup_point_html(point) {
105
- if (point.address.addressLine2 === null) {
106
- point.address.addressLine2 = '';
107
- } else {
108
- point.address.addressLine2 = '<br/>' + point.address.addressLine2;
109
- }
110
- var output = '<div class="point-popup">';
111
- output += '<h4>' + point.name + '</h4>';
112
- output += '<p>' + point.address.addressLine1 + point.address.addressLine2 + '</p>';
113
- output += '<p>' + point.address.postalCode + '</p>';
114
- output += '<p>' + point.address.city + '</p>';
115
- output += '<p>' + point.description + '</p>';
116
- output += '<p class="submit-button"><a href="javascript:select_point( \'' + point.id + '\' )"><?php _e('Select', 'flexible-shipping'); ?></a></p>';
117
- output += '</div>';
118
- return output;
119
- }
120
-
121
- function select_point(id) {
122
- window.opener.postMessage({action: 'select_point', point_id: id}, window.location.origin);
123
- window.close();
124
- }
125
- </script>
126
- <style>
127
- html, body {
128
- height: 100%;
129
- margin: 0;
130
- }
131
-
132
- #map {
133
- width: 100%;
134
- height: 100%;
135
- background-color: #EEE;
136
- background-repeat: no-repeat;
137
- background-position: center;
138
- }
139
-
140
- .leaflet-popup-content-wrapper {
141
- border-radius: 2px;
142
- }
143
-
144
- .point-popup p {
145
- margin: 0 0 5px;
146
- padding: 0 0;
147
- }
148
-
149
- .submit-button a {
150
- display: inline-block;
151
- text-decoration: none;
152
- font-size: 13px;
153
- line-height: 26px;
154
- height: 28px;
155
- margin: 0;
156
- padding: 0 10px 1px;
157
- cursor: pointer;
158
- border-width: 1px;
159
- border-style: solid;
160
- -webkit-appearance: none;
161
- border-radius: 3px;
162
- white-space: nowrap;
163
- box-sizing: border-box;
164
- background: #0085ba;
165
- border-color: #0073aa #006799 #006799;
166
- box-shadow: 0 1px 0 #006799;
167
- color: #fff;
168
- }
169
- </style>
170
- </head>
171
- <body>
172
- <div id='map'></div>
173
- </body>
174
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/interface-saas-connection-aware.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Interface WPDesk_Flexible_Shipping_Saas_Connection_Aware
5
- */
6
- interface WPDesk_Flexible_Shipping_Saas_Connection_Aware {
7
-
8
- /**
9
- * Set SaaS Connection.
10
- *
11
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
12
- */
13
- public function set_saas_connection( $saas_connection );
14
-
15
- /**
16
- * Set shipping methods manager.
17
- *
18
- * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $shipping_methods_manager Shipping methods manager.
19
- */
20
- public function set_shipping_methods_manager( $shipping_methods_manager );
21
-
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-saas-tracker.php DELETED
@@ -1,192 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_SaaS_Settings
5
- */
6
- class WPDesk_Flexible_Shipping_SaaS_Tracker implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant {
7
-
8
- use \WPDesk\PluginBuilder\Plugin\PluginAccess;
9
-
10
- const PRIORITY_AFTER_DEFAULT = 11;
11
-
12
- /**
13
- * SaaS connection.
14
- *
15
- * @var WPDesk_Flexible_Shipping_SaaS_Connection
16
- */
17
- private $saas_connection;
18
-
19
- /**
20
- * Services manager.
21
- *
22
- * @var WPDesk_Flexible_Shipping_SaaS_Services_Manager $services_manager
23
- */
24
- private $services_manager;
25
-
26
- /**
27
- * WPDesk_Flexible_Shipping_SaaS_Tracker constructor.
28
- *
29
- * @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection SaaS connection.
30
- * @param WPDesk_Flexible_Shipping_SaaS_Services_Manager $services_manager Services manager.
31
- */
32
- public function __construct(
33
- WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
34
- WPDesk_Flexible_Shipping_SaaS_Services_Manager $services_manager
35
- ) {
36
- $this->saas_connection = $saas_connection;
37
- $this->services_manager = $services_manager;
38
- }
39
-
40
- /**
41
- * Hooks
42
- */
43
- public function hooks() {
44
- // @TODO: not now, probably to remove: https://trello.com/c/xv9Rm0YG/2804-trackowanie-i-analiza-danych
45
- //add_filter( 'wpdesk_tracker_data', array( $this, 'collect_tracker_data' ), self::PRIORITY_AFTER_DEFAULT );
46
- }
47
-
48
- /**
49
- * Collect tracked data.
50
- *
51
- * @param array $tracked_data Tracked data.
52
- * @return array
53
- */
54
- public function collect_tracker_data( array $tracked_data ) {
55
- $saas_data = array();
56
- if ( $this->saas_connection->is_connected() ) {
57
- $sass_data['connected'] = '1';
58
- $services_data = $this->collect_sass_services_data();
59
- $saas_data['services'] = $services_data;
60
- $saas_data['summaries'] = $this->compute_summaries( $services_data );
61
- } else {
62
- $sass_data['connected'] = '0';
63
- }
64
- $tracked_data['flexible-shipping-saas'] = $saas_data;
65
- return $tracked_data;
66
- }
67
-
68
- /**
69
- * Min first shipment.
70
- *
71
- * @param array $array1 Array 1.
72
- * @param array $array2 Array 2.
73
- *
74
- * @return mixed
75
- */
76
- private function min_first_shipment_from_arrays( array $array1, array $array2 ) {
77
- if ( ! isset( $array1[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ] ) ) {
78
- return $array2[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ];
79
- } else {
80
- return min(
81
- $array1[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ],
82
- $array2[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ]
83
- );
84
- }
85
- }
86
-
87
- /**
88
- * Max last shipment.
89
- *
90
- * @param array $array1 Array 1.
91
- * @param array $array2 Array 2.
92
- *
93
- * @return mixed
94
- */
95
- private function max_last_shipment_from_arrays( array $array1, array $array2 ) {
96
- if ( ! isset( $array1[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ] ) ) {
97
- return $array2[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ];
98
- } else {
99
- return max(
100
- $array1[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ],
101
- $array2[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ]
102
- );
103
- }
104
- }
105
-
106
- /**
107
- * Compute summaries.
108
- *
109
- * @param array $services_data Services data.
110
- * @return array
111
- */
112
- private function compute_summaries( array $services_data ) {
113
- $summaries = array(
114
- WPDesk_Flexible_Shipping_Shipment_Counter::ALL_SHIPMENTS => 0,
115
- WPDesk_Flexible_Shipping_Shipment_Counter::STATUS => array(),
116
- );
117
- foreach ( $services_data as $service_data ) {
118
- $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::ALL_SHIPMENTS ]
119
- += $service_data[ WPDesk_Flexible_Shipping_Shipment_Counter::ALL_SHIPMENTS ];
120
-
121
- $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ] =
122
- $this->min_first_shipment_from_arrays( $summaries, $service_data );
123
-
124
- $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ] =
125
- $this->max_last_shipment_from_arrays( $summaries, $service_data );
126
-
127
- foreach ( $services_data[ WPDesk_Flexible_Shipping_Shipment_Counter::STATUS ] as $status => $status_counters ) {
128
- if ( ! isset( $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::STATUS ][ $status ] ) ) {
129
- $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::STATUS ][ $status ] = $status_counters;
130
- } else {
131
- $summary_status_counters = $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::STATUS ][ $status ];
132
-
133
- $summary_status_counters[ WPDesk_Flexible_Shipping_Shipment_Counter::ALL_SHIPMENTS ]
134
- += $status_counters[ WPDesk_Flexible_Shipping_Shipment_Counter::ALL_SHIPMENTS ];
135
-
136
- $summary_status_counters[ WPDesk_Flexible_Shipping_Shipment_Counter::FIRST_SHIPMENT ] =
137
- $this->min_first_shipment_from_arrays( $summary_status_counters, $status_counters );
138
-
139
- $summary_status_counters[ WPDesk_Flexible_Shipping_Shipment_Counter::LAST_SHIPMENT ] =
140
- $this->max_last_shipment_from_arrays( $summary_status_counters, $status_counters );
141
-
142
- $summaries[ WPDesk_Flexible_Shipping_Shipment_Counter::STATUS ][ $status ] = $summary_status_counters;
143
- }
144
- }
145
- }
146
- return $summaries;
147
- }
148
-
149
- /**
150
- * Collect tracker SaaS data.
151
- *
152
- * @return array
153
- */
154
- private function collect_sass_services_data() {
155
- $services_data = array();
156
- $all_services = $this->services_manager->get_all_services();
157
- foreach ( $all_services as $service_id => $saas_service ) {
158
- $service = $this->services_manager->get_saas_shiping_service( $service_id );
159
- if ( ! empty( $service ) ) {
160
- $services_data[ $service->get_integration_id() ] = $this->collect_saas_service_data( $service );
161
- }
162
- }
163
- return $services_data;
164
- }
165
-
166
- /**
167
- * Collect service data.
168
- *
169
- * @param WPDesk_Flexible_Shipping_SaaS_Shipping_Service $service Service.
170
- *
171
- * @return array
172
- */
173
- private function collect_saas_service_data( $service ) {
174
- $service_data = array();
175
- $service_id = $service->get_id();
176
- $integration_id = $service->get_integration_id();
177
- if ( $this->services_manager->is_enabled_saas_service( $service_id ) ) {
178
- $enabled = '1';
179
- } else {
180
- $enabled = '0';
181
- }
182
- $service_data['enabled'] = $enabled;
183
-
184
- global $wpdb;
185
- $shipment_counter = new WPDesk_Flexible_Shipping_Shipment_Counter( $integration_id, $wpdb );
186
-
187
- $service_data['counters'] = $shipment_counter->count_shipments();
188
-
189
- return $service_data;
190
- }
191
-
192
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/tracker/class-shipment-counter.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPDesk_Flexible_Shipping_Shipment_Counter
5
- */
6
- class WPDesk_Flexible_Shipping_Shipment_Counter {
7
-
8
- const COUNTER_SHIPMENTS = 'shipments';
9
- const FIRST_SHIPMENT = 'first_shipment';
10
- const LAST_SHIPMENT = 'last_shipment';
11
- const ALL_SHIPMENTS = 'all_shipments';
12
- const STATUS = 'status';
13
-
14
-
15
- /**
16
- * Integration.
17
- *
18
- * @var string
19
- */
20
- private $integration;
21
-
22
- /**
23
- * Wpdb.
24
- *
25
- * @var wpdb
26
- */
27
- private $wpdb;
28
-
29
- /**
30
- * WPDesk_Flexible_Shipping_Shipment_Counter constructor.
31
- *
32
- * @param string $integration Integration.
33
- * @param wpdb $wpdb wpdb.
34
- */
35
- public function __construct( $integration, $wpdb ) {
36
- $this->integration = $integration;
37
- $this->wpdb = $wpdb;
38
- }
39
-
40
- /**
41
- * Set counters from row.
42
- *
43
- * @param array $counters Counters.
44
- * @param object $row Row.
45
- *
46
- * @return array
47
- */
48
- private function set_counters( array $counters, $row ) {
49
- $counters[ self::STATUS ][ $row->shipment_status ] = array(
50
- self::COUNTER_SHIPMENTS => $row->shipments,
51
- self::FIRST_SHIPMENT => $row->first_shipment,
52
- self::LAST_SHIPMENT => $row->last_shipment,
53
- );
54
-
55
- $counters[ self::ALL_SHIPMENTS ] = $counters[ self::ALL_SHIPMENTS ] + $row->shipments;
56
- $counters[ self::FIRST_SHIPMENT ] = ! isset( $counters[ self::FIRST_SHIPMENT ] ) ? $row->first_shipment : min( $counters[ self::FIRST_SHIPMENT ], $row->first_shipment );
57
- $counters[ self::LAST_SHIPMENT ] = ! isset( $counters[ self::LAST_SHIPMENT ] ) ? $row->last_shipment : max( $counters[ self::LAST_SHIPMENT ], $row->last_shipment );
58
-
59
- return $counters;
60
- }
61
-
62
- /**
63
- * Count shipments.
64
- *
65
- * @return array
66
- */
67
- public function count_shipments() {
68
- $counters = array( self::ALL_SHIPMENTS => 0 );
69
- $query = $this->wpdb->get_results(
70
- $this->wpdb->prepare(
71
- "SELECT count(p.ID) AS shipments, p.post_status AS shipment_status, min(p.post_date) AS first_shipment, max(p.post_date) AS last_shipment
72
- FROM {$this->wpdb->posts} p, {$this->wpdb->postmeta} m
73
- WHERE p.post_type = %s
74
- AND p.ID = m.post_id
75
- AND m.meta_key = %s
76
- AND m.meta_value = %s
77
- GROUP BY p.post_status",
78
- WPDesk_Flexible_Shipping_Shipment_CPT::POST_TYPE_SHIPMENT,
79
- '_integration',
80
- $this->integration
81
- )
82
- );
83
- if ( $query ) {
84
- foreach ( $query as $row ) {
85
- $counters = $this->set_counters( $counters, $row );
86
- }
87
- }
88
- return $counters;
89
- }
90
-
91
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-boxes-content.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- $boxes_content = array(
3
- array(
4
- 'title' => __( 'Print Labels', 'flexible-shipping' ),
5
- 'heading' => __( 'Print Labels', 'flexible-shipping' ),
6
- 'description' => __( 'Download printable PDF shipping labels directly from WooCommerce orders list in bulk or one by one from order details.', 'flexible-shipping' ),
7
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M280 96h-16c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-64 0h-16c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zM592 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h544c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm16 464c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V48c0-8.8 7.2-16 16-16h544c8.8 0 16 7.2 16 16v416zM152 96h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm384 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-128 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8z"/></svg>'
8
- ),
9
- array(
10
- 'title' => __( 'Calculate Rates', 'flexible-shipping' ),
11
- 'heading' => __( 'Calculate Rates', 'flexible-shipping' ),
12
- 'description' => __( 'Calculate shipping rates in real time, and get available service types and expected delivery time based on customer\'s address.', 'flexible-shipping' ),
13
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M80 448h288c8.84 0 16-7.16 16-16V240c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16zm208-96v-96h64v160h-64v-64zm-96-96h64v64h-64v-64zm0 96h64v64h-64v-64zm-96-96h64v64H96v-64zm0 96h64v64H96v-64zM400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zm16 464c0 7.93-8.07 16-16 16H48c-7.93 0-16-8.07-16-16V192h384v272zm0-304H32V48c0-7.93 8.07-16 16-16h352c7.93 0 16 8.07 16 16v112z"/></svg>'
14
- ),
15
- array(
16
- 'title' => __( 'Track Parcels', 'flexible-shipping' ),
17
- 'heading' => __( 'Track Parcels', 'flexible-shipping' ),
18
- 'description' => __( 'Always keep your customers (and yourself) up to date with automatic confirmation emails with tracking link and delivery status.', 'flexible-shipping' ),
19
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208 96c-49.53 0-89.81 40.3-89.81 89.83 0 34.66 38.34 87.2 70.53 125.2 4.81 5.7 11.84 8.97 19.28 8.97s14.47-3.27 19.31-8.97c32.16-38 70.5-90.55 70.5-125.2C297.81 136.3 257.53 96 208 96zm0 188.23c-35.31-42.7-57.81-80.89-57.81-98.41 0-31.89 25.94-57.83 57.81-57.83s57.81 25.94 57.81 57.83c0 17.52-22.5 55.71-57.81 98.41zM208 160c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm300.47 321.58l-128.99-129c-2.3-2.3-5.3-3.5-8.5-3.5h-10.3c34.3-37.1 55.3-86.6 55.3-141.09C415.98 93.1 322.88 0 207.99 0S0 93.1 0 207.99c0 114.89 93.1 207.99 207.99 207.99 54.5 0 103.99-21 141.09-55.2v10.2c0 3.2 1.3 6.2 3.5 8.5l128.99 128.99c4.7 4.7 12.3 4.7 17 0l9.9-9.9c4.71-4.69 4.71-12.29 0-16.99zm-300.48-97.6C110.7 383.98 32 305.29 32 207.99 32 110.69 110.7 32 207.99 32s175.99 78.7 175.99 175.99c0 97.3-78.69 175.99-175.99 175.99z"/></svg>'
20
- ),
21
- array(
22
- 'title' => __( 'Automate Shipping', 'flexible-shipping' ),
23
- 'heading' => __( 'Automate Shipping', 'flexible-shipping' ),
24
- 'description' => __( 'Automatically create shipments and print labels based on order status. Change order status after shipment creation.', 'flexible-shipping' ),
25
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M48 416c-8.82 0-16-7.18-16-16V256h160v40c0 13.25 10.75 24 24 24h80c13.25 0 24-10.75 24-24v-40h40.23c10.06-12.19 21.81-22.9 34.77-32H32v-80c0-8.82 7.18-16 16-16h416c8.82 0 16 7.18 16 16v48.81c5.28-.48 10.6-.81 16-.81s10.72.33 16 .81V144c0-26.51-21.49-48-48-48H352V24c0-13.26-10.74-24-24-24H184c-13.26 0-24 10.74-24 24v72H48c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h291.37a174.574 174.574 0 0 1-12.57-32H48zm176-160h64v32h-64v-32zM192 32h128v64H192V32zm358.29 320H512v-54.29c0-5.34-4.37-9.71-9.71-9.71h-12.57c-5.34 0-9.71 4.37-9.71 9.71v76.57c0 5.34 4.37 9.71 9.71 9.71h60.57c5.34 0 9.71-4.37 9.71-9.71v-12.57c0-5.34-4.37-9.71-9.71-9.71zM496 224c-79.59 0-144 64.41-144 144s64.41 144 144 144 144-64.41 144-144-64.41-144-144-144zm0 256c-61.76 0-112-50.24-112-112s50.24-112 112-112 112 50.24 112 112-50.24 112-112 112z"/></svg>'
26
- ),
27
- array(
28
- 'title' => __( 'Create Shipments', 'flexible-shipping' ),
29
- 'heading' => __( 'Create Shipments', 'flexible-shipping' ),
30
- 'description' => __( 'Create shipments with predefined services, sizes and weights automatically filled in from order items.', 'flexible-shipping' ),
31
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M492.5 133.4L458.9 32.8C452.4 13.2 434.1 0 413.4 0H98.6c-20.7 0-39 13.2-45.5 32.8L2.5 184.6c-1.6 4.9-2.5 10-2.5 15.2V464c0 26.5 21.5 48 48 48h400c106 0 192-86 192-192 0-90.7-63-166.5-147.5-186.6zM272 32h141.4c6.9 0 13 4.4 15.2 10.9l28.5 85.5c-3-.1-6-.5-9.1-.5-56.8 0-107.7 24.8-142.8 64H272V32zM83.4 42.9C85.6 36.4 91.7 32 98.6 32H240v160H33.7L83.4 42.9zM48 480c-8.8 0-16-7.2-16-16V224h249.9c-16.4 28.3-25.9 61-25.9 96 0 66.8 34.2 125.6 86 160H48zm400 0c-88.2 0-160-71.8-160-160s71.8-160 160-160 160 71.8 160 160-71.8 160-160 160zm64.6-221.7c-3.1-3.1-8.1-3.1-11.2 0l-69.9 69.3-30.3-30.6c-3.1-3.1-8.1-3.1-11.2 0l-18.7 18.6c-3.1 3.1-3.1 8.1 0 11.2l54.4 54.9c3.1 3.1 8.1 3.1 11.2 0l94.2-93.5c3.1-3.1 3.1-8.1 0-11.2l-18.5-18.7z"/></svg>'
32
- ),
33
- array(
34
- 'title' => __( 'Manage Orders', 'flexible-shipping' ),
35
- 'heading' => __( 'Manage Orders', 'flexible-shipping' ),
36
- 'description' => __( 'Get a complete overview of your orders and shipments in your WooCommerce dashboard with shipments statuses and filters.', 'flexible-shipping' ),
37
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M112 256h352c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H112c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16zM256 32h64v76.2l-32-16-32 16V32zm-128 0h96v128l64-32 64 32V32h96v192H128V32zm430.3 301.6c-9.6-8.6-22.1-13.4-35.2-13.4-12.5 0-24.8 4.3-34.6 12.2l-61.6 49.3c-1.9 1.5-4.2 2.3-6.7 2.3h-41.6c4.6-9.6 6.5-20.7 4.8-32.3-4-27.9-29.6-47.7-57.8-47.7H181.3c-20.8 0-41 6.7-57.6 19.2L85.3 352H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h88l46.9-35.2c11.1-8.3 24.6-12.8 38.4-12.8H328c13.3 0 24 10.7 24 24s-10.7 24-24 24h-88c-8.8 0-16 7.2-16 16s7.2 16 16 16h180.2c9.7 0 19.1-3.3 26.7-9.3l61.6-49.2c4.2-3.4 9.5-5.2 14.6-5.2 5 0 9.9 1.7 13.8 5.2 10.1 9.1 9.3 24.5-.9 32.6l-100.8 80.7c-7.6 6.1-17 9.3-26.7 9.3H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h400.5c17 0 33.4-5.8 46.6-16.4L556 415c12.2-9.8 19.5-24.4 20-40s-6-30.8-17.7-41.4z"/></svg>'
38
- )
39
- );
40
- ?>
41
-
42
- <div class="fs-box text-center">
43
- <h3><?php _e( 'Ship your orders faster with Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
44
-
45
- <div class="fs-cols">
46
- <?php
47
- foreach ( $boxes_content as $key => $value ) {
48
-
49
- echo '<div class="fs-inner-box">';
50
-
51
- echo $value['icon'];
52
-
53
- echo '<h4>' . $value['title'] . '</h4>';
54
-
55
- echo '<p>' . $value['description'] . '</p>';
56
-
57
- echo '</div>';
58
- }
59
- ?>
60
- </div>
61
-
62
- <p><a class="button button-large <?php echo $button_class; ?>" href="<?php echo $button_link; ?>"><?php _e( 'Sign up now!', 'flexible-shipping' ); ?></a></p>
63
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-connection-status.php DELETED
@@ -1,36 +0,0 @@
1
- <tr valign="top">
2
- <th scope="row" class="titledesc">
3
- <label for="<?php echo $field_id; ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $tooltip_html; ?></label>
4
- </th>
5
- <td class="forminp">
6
- <fieldset>
7
- <legend class="screen-reader-text"><span><?php echo wp_kses_post( $title ); ?></span></legend>
8
- <span id="<?php echo $field_id; ?>"><?php echo $status_html; ?></span>
9
- <?php echo $description_html; ?>
10
- </fieldset>
11
- <?php if ( $ajax_action ) : ?>
12
- <script type="text/javascript">
13
- jQuery(document).ready(function(){
14
- var data = {
15
- 'action' : '<?php echo $ajax_action; ?>',
16
- 'nonce' : '<?php echo $ajax_nonce; ?>',
17
- 'service_id' : <?php echo $service_id; ?>,
18
- };
19
- var status_span = jQuery('#<?php echo $field_id; ?>');
20
- jQuery.post(ajaxurl, data, function( response ) {
21
- status_span.html(response.message);
22
- if ( response.status == '<?php echo WPDesk_Flexible_Shipping_SaaS_Connection_Status_Ajax::STATUS_OK; ?>' ) {
23
- status_span.css('color', 'green');
24
- }
25
- else {
26
- status_span.css('color', 'red');
27
- }
28
- }).fail(function() {
29
- status_span.css('color', 'red');
30
- status_span.html('<?php echo $ajax_error_message; ?>');
31
- });
32
- })
33
- </script>
34
- <?php endif; ?>
35
- </td>
36
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-field-saas-connection.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /** @var $integration_checkbox bool */
3
- ?>
4
-
5
- </table>
6
-
7
- <div class="fs-page-wrap fs-connect-integration-box <?php echo ! $integration_checkbox ? 'hide-fs-connect-integration-box' : ''; ?>">
8
- <div class="fs-box">
9
- <h3 class="wc-settings-sub-title"><?php _e( 'Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
10
-
11
- <?php if ( ! $saas_connected ) : ?>
12
- <p>
13
- <?php
14
- printf(
15
- /* Translators: url */
16
- __( 'Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s.', 'flexible-shipping' ),
17
- '<a target="_blank" href="https://flexibleshipping.com/connect/">',
18
- '</a>'
19
- );
20
- ?>
21
- </p>
22
- <p></p>
23
- <p>
24
- <?php printf(
25
- /* Translators: url */
26
- __( '%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to %2$syour account%3$s to get your key.', 'flexible-shipping' ),
27
- '<a href="' . admin_url( 'admin.php?page=' . WPDesk_Flexible_Shipping_SaaS_User_Registration::REGISTER_PAGE_SLUG ) . '">',
28
- '<a href="' . $saas_platform_my_account_url . '">',
29
- '</a>'
30
- ); ?>
31
- </p>
32
- <?php else : ?>
33
- <p><a href="<?php echo $saas_platform_docs_url; ?>" target="_blank"><?php _e( 'Check how to start with FS Connect &rarr;', 'flexible-shipping' ); ?></a></p>
34
- <?php endif; ?>
35
-
36
- <?php $saas_connection->display_connection_form(); ?>
37
- </div>
38
-
39
- <?php
40
- /* Fake saas_connected - always true for debug mode settings. */
41
- $saas_connected = true;
42
- ?>
43
- <?php if ( $saas_connected ) : ?>
44
- <div class="fs-box fs-services">
45
- <table>
46
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-notice.php DELETED
@@ -1,180 +0,0 @@
1
- <?php
2
- if( !$saas_connected ):
3
- ob_start();
4
-
5
- echo '<p>' . __( 'Welcome to new Flexible Shipping Connect installation guide.', 'flexible-shipping' ) . '</p>';
6
-
7
- echo '<p><strong>' . __( 'To complete the installation please click the Sign up for Connect button below.', 'flexible-shipping' ) . '</strong></p>';
8
-
9
- echo '<p>' . sprintf( __( 'The %saccount is free (no credit card needed)%s and allows you to send packages directly from here!', 'flexible-shipping' ), '<strong>', '</strong>' ) . '</p>';
10
-
11
- echo '<p>' . __( 'If you want to learn more about other benefits, you may click one of the tabs on the left.', 'flexible-shipping' ) . '</p>';
12
-
13
- $fs_description = ob_get_contents();
14
- ob_end_clean();
15
-
16
- $fs_content = array(
17
- array(
18
- 'title' => 'Flexible Shipping',
19
- 'heading' => __( 'Ship your orders faster with Flexible Shipping Connect', 'flexible-shipping' ),
20
- 'description' => $fs_description,
21
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6zm-16.2 55.1l-352 208C45.6 483.9 32 476.6 32 464V47.9c0-16.3 16.4-18.4 24.1-13.8l352 208.1c10.5 6.2 10.5 21.4.1 27.6z"/></svg>'
22
- )
23
- );
24
-
25
- $couriers = array(
26
- array(
27
- 'title' => 'UPS',
28
- 'country' => array(),
29
- 'label' => '',
30
- 'logo' => 'https://s3.eu-central-1.amazonaws.com/wpdeskcdn/couriers/ups.svg'
31
- ),
32
- array(
33
- 'title' => 'FedEx',
34
- 'country' => array(),
35
- 'label' => __( 'soon!', 'flexible-shipping' ),
36
- 'logo' => 'https://s3.eu-central-1.amazonaws.com/wpdeskcdn/couriers/fedex.svg'
37
- ),
38
- array(
39
- 'title' => 'DPD UK',
40
- 'country' => array( 'GB' ),
41
- 'label' => __( 'soon!', 'flexible-shipping' ),
42
- 'logo' => 'https://s3.eu-central-1.amazonaws.com/wpdeskcdn/couriers/dpd.svg'
43
- ),
44
- array(
45
- 'title' => 'Royal Mail',
46
- 'country' => array( 'GB' ),
47
- 'label' => __( 'soon!', 'flexible-shipping' ),
48
- 'logo' => 'https://s3.eu-central-1.amazonaws.com/wpdeskcdn/couriers/royal-mail.png'
49
- )
50
- );
51
-
52
- $base_location = wc_get_base_location();
53
-
54
- ob_start();
55
-
56
- _e( 'Using Flexible Shipping Connect, you can send packages via:', 'flexible-shipping' );
57
-
58
- echo '<div class="fs-couriers">';
59
-
60
- foreach ( $couriers as $key => $value ) :
61
-
62
- if ( empty( $value['country'] ) || in_array( $base_location['country'], $value['country'] ) ) :
63
- echo '<div class="fs-courier">';
64
-
65
- echo '<img src="' . $value['logo'] . '">';
66
-
67
- if ( $value['label'] )
68
- echo '<span class="fs-courier-label">' . $value['label'] . '</span>';
69
-
70
- echo '</div>';
71
- endif;
72
-
73
- endforeach;
74
-
75
- echo '</div>';
76
-
77
- echo '<a href="https://flexibleshipping.com/product-category/integrations/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=possible-integrations&utm_content=fs-notice-integrations" target="_blank">' . __( 'Read more about possible integrations &rarr;', 'flexible-shipping') . '</a>';
78
-
79
- $couriers_description = ob_get_contents();
80
- ob_end_clean();
81
-
82
- $boxes_content = array(
83
- array(
84
- 'title' => __( 'Create & Print Labels', 'flexible-shipping' ),
85
- 'heading' => __( 'Create & Print Labels', 'flexible-shipping' ),
86
- 'description' => __( 'Create shipments with predefined services, sizes and weights automatically filled in from order items. Download printable PDF shipping labels directly from WooCommerce orders list in bulk or one by one from order details.', 'flexible-shipping' ),
87
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M280 96h-16c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-64 0h-16c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zM592 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h544c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm16 464c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V48c0-8.8 7.2-16 16-16h544c8.8 0 16 7.2 16 16v416zM152 96h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm384 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-128 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8z"/></svg>'
88
- ),
89
- array(
90
- 'title' => __( 'Calculate Rates', 'flexible-shipping' ),
91
- 'heading' => __( 'Calculate Rates', 'flexible-shipping' ),
92
- 'description' => __( 'Calculate shipping rates in real time, and get available service types and expected delivery time based on customer\'s address.', 'flexible-shipping' ),
93
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M80 448h288c8.84 0 16-7.16 16-16V240c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16zm208-96v-96h64v160h-64v-64zm-96-96h64v64h-64v-64zm0 96h64v64h-64v-64zm-96-96h64v64H96v-64zm0 96h64v64H96v-64zM400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zm16 464c0 7.93-8.07 16-16 16H48c-7.93 0-16-8.07-16-16V192h384v272zm0-304H32V48c0-7.93 8.07-16 16-16h352c7.93 0 16 8.07 16 16v112z"/></svg>'
94
- ),
95
- array(
96
- 'title' => __( 'Track Parcels', 'flexible-shipping' ),
97
- 'heading' => __( 'Track Parcels', 'flexible-shipping' ),
98
- 'description' => __( 'Always keep your customers (and yourself) up to date with automatic confirmation emails with tracking link and delivery status.', 'flexible-shipping' ),
99
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208 96c-49.53 0-89.81 40.3-89.81 89.83 0 34.66 38.34 87.2 70.53 125.2 4.81 5.7 11.84 8.97 19.28 8.97s14.47-3.27 19.31-8.97c32.16-38 70.5-90.55 70.5-125.2C297.81 136.3 257.53 96 208 96zm0 188.23c-35.31-42.7-57.81-80.89-57.81-98.41 0-31.89 25.94-57.83 57.81-57.83s57.81 25.94 57.81 57.83c0 17.52-22.5 55.71-57.81 98.41zM208 160c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm300.47 321.58l-128.99-129c-2.3-2.3-5.3-3.5-8.5-3.5h-10.3c34.3-37.1 55.3-86.6 55.3-141.09C415.98 93.1 322.88 0 207.99 0S0 93.1 0 207.99c0 114.89 93.1 207.99 207.99 207.99 54.5 0 103.99-21 141.09-55.2v10.2c0 3.2 1.3 6.2 3.5 8.5l128.99 128.99c4.7 4.7 12.3 4.7 17 0l9.9-9.9c4.71-4.69 4.71-12.29 0-16.99zm-300.48-97.6C110.7 383.98 32 305.29 32 207.99 32 110.69 110.7 32 207.99 32s175.99 78.7 175.99 175.99c0 97.3-78.69 175.99-175.99 175.99z"/></svg>'
100
- ),
101
- array(
102
- 'title' => __( 'Automate Shipping', 'flexible-shipping' ),
103
- 'heading' => __( 'Automate Shipping', 'flexible-shipping' ),
104
- 'description' => __( 'Automatically create shipments and print labels based on order status. Change order status after shipment creation.', 'flexible-shipping' ),
105
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M48 416c-8.82 0-16-7.18-16-16V256h160v40c0 13.25 10.75 24 24 24h80c13.25 0 24-10.75 24-24v-40h40.23c10.06-12.19 21.81-22.9 34.77-32H32v-80c0-8.82 7.18-16 16-16h416c8.82 0 16 7.18 16 16v48.81c5.28-.48 10.6-.81 16-.81s10.72.33 16 .81V144c0-26.51-21.49-48-48-48H352V24c0-13.26-10.74-24-24-24H184c-13.26 0-24 10.74-24 24v72H48c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h291.37a174.574 174.574 0 0 1-12.57-32H48zm176-160h64v32h-64v-32zM192 32h128v64H192V32zm358.29 320H512v-54.29c0-5.34-4.37-9.71-9.71-9.71h-12.57c-5.34 0-9.71 4.37-9.71 9.71v76.57c0 5.34 4.37 9.71 9.71 9.71h60.57c5.34 0 9.71-4.37 9.71-9.71v-12.57c0-5.34-4.37-9.71-9.71-9.71zM496 224c-79.59 0-144 64.41-144 144s64.41 144 144 144 144-64.41 144-144-64.41-144-144-144zm0 256c-61.76 0-112-50.24-112-112s50.24-112 112-112 112 50.24 112 112-50.24 112-112 112z"/></svg>'
106
- ),
107
- array(
108
- 'title' => __( 'Manage Orders', 'flexible-shipping' ),
109
- 'heading' => __( 'Manage Orders', 'flexible-shipping' ),
110
- 'description' => __( 'Get a complete overview of your orders and shipments in your WooCommerce dashboard with shipments statuses and filters.', 'flexible-shipping' ),
111
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M112 256h352c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H112c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16zM256 32h64v76.2l-32-16-32 16V32zm-128 0h96v128l64-32 64 32V32h96v192H128V32zm430.3 301.6c-9.6-8.6-22.1-13.4-35.2-13.4-12.5 0-24.8 4.3-34.6 12.2l-61.6 49.3c-1.9 1.5-4.2 2.3-6.7 2.3h-41.6c4.6-9.6 6.5-20.7 4.8-32.3-4-27.9-29.6-47.7-57.8-47.7H181.3c-20.8 0-41 6.7-57.6 19.2L85.3 352H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h88l46.9-35.2c11.1-8.3 24.6-12.8 38.4-12.8H328c13.3 0 24 10.7 24 24s-10.7 24-24 24h-88c-8.8 0-16 7.2-16 16s7.2 16 16 16h180.2c9.7 0 19.1-3.3 26.7-9.3l61.6-49.2c4.2-3.4 9.5-5.2 14.6-5.2 5 0 9.9 1.7 13.8 5.2 10.1 9.1 9.3 24.5-.9 32.6l-100.8 80.7c-7.6 6.1-17 9.3-26.7 9.3H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h400.5c17 0 33.4-5.8 46.6-16.4L556 415c12.2-9.8 19.5-24.4 20-40s-6-30.8-17.7-41.4z"/></svg>'
112
- ),
113
- array(
114
- 'title' => __( 'Couriers', 'flexible-shipping' ),
115
- 'heading' => __( 'Couriers', 'flexible-shipping' ),
116
- 'description' => $couriers_description,
117
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M632 384h-24V275.9c0-16.8-6.8-33.3-18.8-45.2l-83.9-83.9c-11.8-12-28.3-18.8-45.2-18.8H416V78.6c0-25.7-22.2-46.6-49.4-46.6H49.4C22.2 32 0 52.9 0 78.6v290.8C0 395.1 22.2 416 49.4 416h16.2c-1.1 5.2-1.6 10.5-1.6 16 0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16h195.2c-1.1 5.2-1.6 10.5-1.6 16 0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16H632c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8zM460.1 160c8.4 0 16.7 3.4 22.6 9.4l83.9 83.9c.8.8 1.1 1.9 1.8 2.8H416v-96h44.1zM144 480c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm63.6-96C193 364.7 170 352 144 352s-49 12.7-63.6 32h-31c-9.6 0-17.4-6.5-17.4-14.6V78.6C32 70.5 39.8 64 49.4 64h317.2c9.6 0 17.4 6.5 17.4 14.6V384H207.6zM496 480c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-128c-26.1 0-49 12.7-63.6 32H416v-96h160v96h-16.4c-14.6-19.3-37.5-32-63.6-32z"/></svg>'
118
- )
119
- );
120
-
121
- $content = array_merge( $fs_content, $boxes_content );
122
- ?>
123
- <div class="fs-connect__inner-container">
124
- <div class="fs-connect__vertical-nav">
125
- <div class="fs-connect__vertical-nav-container">
126
- <?php
127
- $count = 1;
128
-
129
- foreach ( $content as $key => $value ) :
130
- ?>
131
- <div class="vertical-menu__feature-item <?php if ( $count === 1 ) : ?>vertical-menu__feature-item-is-selected<?php endif; ?>">
132
- <div class="vertical-menu__feature-item-icon">
133
- <?php echo $value['icon']; ?>
134
- </div>
135
-
136
- <span class="vertical-menu__feature-item-label"><?php echo $value['title']; ?></span>
137
- </div>
138
- <?php
139
- $count++;
140
-
141
- endforeach;
142
- ?>
143
- </div>
144
- </div>
145
-
146
- <div class="fs-connect__content-container">
147
- <?php
148
- $count = 1;
149
-
150
- foreach ( $content as $key => $value ) :
151
- ?>
152
- <div class="fs-connect__slide <?php if ( $count === 1 ) : ?>fs__slide-is-active<?php endif; ?>">
153
- <h2><?php echo $value['heading']; ?></h2>
154
-
155
- <?php if ( $count != 7 ) : ?>
156
- <div class="fs-connect__content-icon fs-connect-illo">
157
- <?php echo $value['icon']; ?>
158
- </div>
159
- <?php endif; ?>
160
-
161
- <p><?php echo $value['description']; ?></p>
162
-
163
- <p class="fs-banner__button-container">
164
- <a class="button button-primary button-large" href="<?php echo add_query_arg( 'page', WPDesk_Flexible_Shipping_SaaS_User_Registration::REGISTER_PAGE_SLUG, admin_url( 'admin.php' ) ); ?>"><?php _e( 'Sign up for Connect', 'flexible-shipping' ); ?></a>
165
-
166
- <?php $button_text = $count === 1 ? __( 'Start quick tour', 'flexible-shipping' ) : __( 'Next feature', 'flexible-shipping' ); ?>
167
-
168
- <?php if ( $count != 7 ) : ?>
169
- <a class="button next-feature" href="#"><?php echo $button_text; ?></a>
170
- <?php endif; ?>
171
- </p>
172
- </div>
173
- <?php
174
- $count++;
175
-
176
- endforeach;
177
- ?>
178
- </div>
179
- </div>
180
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-flexible-shipping-connect-second-notice.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
- echo sprintf(
3
- __( 'You never sign up to Flexible Shipping Connect. You may finish the registration process here %1$sSign up for Connect%2$s', 'flexible-shipping' ),
4
- '<a href="' . $link . '" class="button button-primary">',
5
- '</a>'
6
- );
7
- ?>
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-fallback-message.php DELETED
@@ -1 +0,0 @@
1
- <div class="fs-order-item-fallback"><strong><?php _e( 'Fallback:', 'flexible-shipping' ); ?></strong> <?php echo $fallback ;?></div>
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-free-shipping.php DELETED
@@ -1 +0,0 @@
1
- <div class="fs-order-item-fallback"><strong><?php _e( 'Free shipping', 'flexible-shipping' ); ?></strong></div>
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-order-message-stock.php DELETED
@@ -1 +0,0 @@
1
- <div class="fs-order-item-fallback"><strong><?php _e( 'Additional info:', 'flexible-shipping' ); ?></strong> <?php echo $message ;?></div>
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-registration-page.php DELETED
@@ -1,45 +0,0 @@
1
- <?php if ( $saas_connected ) : ?>
2
- <div class="fs-page-wrap">
3
- <div class="fs-box">
4
- <p><?php printf( __( 'You are connected. %1$sGo to Flexible Shipping Connect settings &rarr;%2$s', 'flexible-shipping' ), '<a href="' . $settings_url . '">', '</a>' ); ?>
5
- </div>
6
- </div>
7
- <?php else : ?>
8
- <div id="register" class="wrap">
9
- <div class="fs-page-wrap">
10
- <h1><?php _e( 'Join Flexible Shipping Connect Now!', 'flexible-shipping' ); ?></h1>
11
-
12
- <div class="fs-box">
13
- <form id="flexible_shipping_signup_form" action="<?php echo $action; ?>" method="POST">
14
- <?php wp_nonce_field( WPDesk_Flexible_Shipping_SaaS_User_Registration::NONCE_REGISTRATION_ACTION, WPDesk_Flexible_Shipping_SaaS_User_Registration::NONCE_REGISTRATION_NAME ); ?>
15
-
16
- <h3><?php printf( __( 'Sign up for automatic shipments, label printing, live rates and more!', 'flexible-shipping' ), '<a href="' . $url_fs_com . '" target="_blank">', '</a>' ); ?></h3>
17
-
18
- <p><small><?php printf( __( 'By signing up, you agree to the %1$sTerms of Service%3$s and to %2$sPrivacy Policy%3$s', 'flexible-shipping' ), '<a href="' . $url_terms . '" target="_blank">', '<a href="' . $url_privacy . '" target="_blank">', '</a>' ); ?></small></p>
19
-
20
- <p><input class="regular-text" type="email" required="required" name="user_email" value="<?php echo $user_email; ?>" /></p>
21
-
22
- <p class="fs-actions">
23
- <button id="flexible_shipping_signup" class="button button-primary button-large" type="submit"><?php _e( 'Sign Up', 'flexible-shipping' ); ?></button>
24
-
25
- <span class="spinner"></span>
26
- </p>
27
-
28
- </form>
29
- </div>
30
-
31
- <?php
32
- $button_class = '';
33
- $button_link = '#register';
34
- include( 'html-boxes-content.php' );
35
- ?>
36
- </div>
37
- </div>
38
-
39
- <script type="text/javascript">
40
- jQuery('#flexible_shipping_signup_form').on('submit', function(e){
41
- jQuery('#flexible_shipping_signup').prop('disabled', 'disabled');
42
- jQuery('.spinner').css('visibility', 'visible');
43
- });
44
- </script>
45
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-saas-connection-form.php DELETED
@@ -1,50 +0,0 @@
1
- <?php wp_nonce_field( WPDesk_Flexible_Shipping_SaaS_Connection::NONCE_CONNECTION_ACTION, WPDesk_Flexible_Shipping_SaaS_Connection::NONCE_CONNECTION_NAME ); ?>
2
- <input type="hidden" id="<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::SUBMIT_CONNECTION_PARAMETER; ?>" name="<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::SUBMIT_CONNECTION_PARAMETER; ?>" value="0" />
3
- <table class="form-table">
4
- <tr valign="top">
5
- <th scope="row" class="titledesc">
6
- <label for="api_key"><?php _e( 'Connect Key', 'flexible-shipping' ); ?></label>
7
- </th>
8
- <td class="forminp">
9
- <input class="input-text regular-input " type="text" name="api_key" id="api_key" value="<?php echo $api_key ?>" <?php echo $readonly;?> />
10
- </td>
11
- </tr>
12
- </table>
13
-
14
- <p class="flexible-shipping-connect-submit">
15
- <input type="submit" id="<?php echo $button_id; ?>" class="button-primary woocommerce-save-button" value="<?php echo $submit_button_value; ?>" />
16
- <?php ?>
17
- </p>
18
-
19
- <script type="text/javascript">
20
- jQuery(document).ready(function(){
21
- jQuery('#<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::BUTTON_ID_DISCONNECT; ?>').click(function(e){
22
- if ( !confirm( '<?php _e( 'Are you sure you want do disconnect your store from Flexible Shipping Connect?\n\nAll shipping services will be disabled.', 'flexible-shipping' ); ?>' ) ) {
23
- e.preventDefault();
24
- return false;
25
- }
26
- else {
27
- jQuery('#<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::SUBMIT_CONNECTION_PARAMETER; ?>').val('1');
28
- }
29
- });
30
- function api_key_key_up() {
31
- var button_connect = jQuery('#<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::BUTTON_ID_CONNECT; ?>');
32
- if ( jQuery('#api_key').val() != '' ) {
33
- button_connect.prop('disabled', false);
34
- }
35
- else {
36
- button_connect.prop('disabled', true);
37
- }
38
- }
39
- api_key_key_up();
40
- jQuery('#api_key').keyup(function(){
41
- api_key_key_up();
42
- })
43
- jQuery('#api_key').change(function(){
44
- api_key_key_up();
45
- })
46
- jQuery('#<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::BUTTON_ID_CONNECT; ?>').click(function(){
47
- jQuery('#<?php echo WPDesk_Flexible_Shipping_SaaS_Connection::SUBMIT_CONNECTION_PARAMETER; ?>').val('1');
48
- });
49
- })
50
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-settings-connect-script.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- /* Fake saas_connected - always true for debug mode settings. */
3
- $saas_connected = true;
4
- ?>
5
- </table>
6
- <script type="text/javascript">
7
- jQuery(document).ready(function () {
8
- jQuery('#mainform p.submit').appendTo( jQuery('.fs-box.fs-services') );
9
- <?php if ( $saas_connected ) : ?>
10
- <?php else : ?>
11
- jQuery('p.submit').hide();
12
- <?php endif; ?>
13
- })
14
- </script>
15
- <table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/wpdesk/wp-wpdesk-connect/src/saas/views/html-settings-long-row.php DELETED
@@ -1,6 +0,0 @@
1
- <?php /** @var $data array */ ?>
2
- <tr valign="top" class="<?php echo esc_attr( $data['class'] ); ?>">
3
- <td scope="row" class="titledesc" colspan="2">
4
- <div><?php echo $data['content']; ?></div>
5
- </td>
6
- </tr>