WooCommerce PayPal Powered by Braintree Payment Gateway - Version 2.4.0

Version Description

Download this release

Release Info

Developer SkyVerge
Plugin Icon 128x128 WooCommerce PayPal Powered by Braintree Payment Gateway
Version 2.4.0
Comparing to
See all releases

Code changes from version 2.3.11 to 2.4.0

Files changed (149) hide show
  1. assets/css/frontend/wc-braintree.min.css +1 -1
  2. assets/js/frontend/wc-braintree-apple-pay.min.js +1 -1
  3. assets/js/frontend/wc-braintree.min.js +1 -1
  4. class-wc-braintree.php +126 -35
  5. i18n/languages/woocommerce-gateway-paypal-powered-by-braintree.pot +175 -147
  6. includes/Integrations/Product_Addons.php +3 -3
  7. includes/PayPal/Buttons/Abstract_Button.php +115 -41
  8. includes/PayPal/Buttons/Cart.php +23 -20
  9. includes/PayPal/Buttons/Product.php +36 -32
  10. includes/api/class-wc-braintree-api-response-message-helper.php +2 -2
  11. includes/api/class-wc-braintree-api.php +35 -22
  12. includes/api/requests/abstract-wc-braintree-api-request.php +7 -4
  13. includes/api/requests/class-wc-braintree-api-customer-request.php +6 -6
  14. includes/api/requests/class-wc-braintree-api-transaction-request.php +3 -3
  15. includes/api/responses/abstract-wc-braintree-api-response.php +2 -2
  16. includes/api/responses/abstract-wc-braintree-api-transaction-response.php +2 -2
  17. includes/api/responses/abstract-wc-braintree-api-vault-response.php +2 -2
  18. includes/api/responses/class-wc-braintree-api-client-token-response.php +1 -1
  19. includes/api/responses/class-wc-braintree-api-credit-card-transaction-response.php +3 -3
  20. includes/api/responses/class-wc-braintree-api-customer-response.php +2 -2
  21. includes/api/responses/class-wc-braintree-api-merchant-configuration-response.php +1 -1
  22. includes/api/responses/class-wc-braintree-api-payment-method-response.php +2 -2
  23. includes/api/responses/class-wc-braintree-api-paypal-transaction-response.php +2 -2
  24. includes/apple-pay/api/class-wc-braintree-apple-pay-api-payment-response.php +2 -2
  25. includes/apple-pay/class-wc-braintree-apple-pay-frontend.php +20 -24
  26. includes/apple-pay/class-wc-braintree-apple-pay.php +2 -2
  27. includes/class-wc-braintree-capture.php +5 -5
  28. includes/class-wc-braintree-frontend.php +1 -1
  29. includes/class-wc-braintree-lifecycle.php +3 -3
  30. includes/class-wc-braintree-payment-method-handler.php +2 -2
  31. includes/class-wc-braintree-payment-method.php +2 -2
  32. includes/class-wc-gateway-braintree-credit-card.php +27 -25
  33. includes/class-wc-gateway-braintree-paypal.php +25 -4
  34. includes/class-wc-gateway-braintree.php +45 -29
  35. includes/integrations/Pre_Orders.php +151 -0
  36. includes/payment-forms/abstract-wc-braintree-payment-form.php +77 -15
  37. includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php +50 -37
  38. includes/payment-forms/class-wc-braintree-paypal-payment-form.php +17 -2
  39. lib/skyverge/woocommerce/assets/css/admin/sv-wc-plugin-admin-setup-wizard.min.css.map +0 -7
  40. lib/skyverge/woocommerce/assets/css/mixins.scss +0 -61
  41. lib/skyverge/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js +0 -1
  42. lib/skyverge/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js.map +0 -10
  43. lib/skyverge/woocommerce/assets/js/admin/sv-wp-admin-job-batch-handler.min.js.map +0 -10
  44. lib/skyverge/woocommerce/class-sv-wc-helper.php +0 -1087
  45. lib/skyverge/woocommerce/class-sv-wc-plugin-compatibility.php +0 -316
  46. lib/skyverge/woocommerce/compatibility/class-sv-wc-product-compatibility.php +0 -272
  47. lib/skyverge/woocommerce/i18n/languages/woocommerce-plugin-framework-et.mo +0 -0
  48. lib/skyverge/woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php +0 -196
  49. lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-admin-order.min.css.map +0 -7
  50. lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-admin-order.scss +0 -27
  51. lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-token-editor.min.css.map +0 -7
  52. lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-token-editor.scss +0 -52
  53. lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-my-payment-methods.min.css.map +0 -7
  54. lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-my-payment-methods.scss +0 -227
  55. lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css +0 -1
  56. lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css.map +0 -7
  57. lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.scss +0 -136
  58. lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-invalid.png +0 -0
  59. lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-invalid.svg +0 -1
  60. lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-plain.png +0 -0
  61. lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-plain.svg +0 -1
  62. lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-admin-order.coffee +0 -103
  63. lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-admin-order.min.js.map +0 -10
  64. lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-token-editor.coffee +0 -186
  65. lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-token-editor.min.js.map +0 -10
  66. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee +0 -431
  67. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.min.js +0 -1
  68. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-frontend.min.map +0 -1
  69. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee +0 -218
  70. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.min.js +0 -1
  71. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee +0 -364
  72. lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.min.js +0 -1
  73. readme.txt +59 -68
  74. vendor/autoload.php +1 -1
  75. vendor/composer/LICENSE +0 -2
  76. vendor/composer/autoload_real.php +4 -4
  77. vendor/composer/autoload_static.php +4 -4
  78. vendor/composer/installed.json +27 -0
  79. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/license.txt +1 -1
  80. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Addresses/Address.php +26 -24
  81. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Addresses/Customer_Address.php +23 -27
  82. vendor/skyverge/wc-plugin-framework/woocommerce/Country_Helper.php +661 -0
  83. vendor/skyverge/wc-plugin-framework/woocommerce/Handlers/Script_Handler.php +343 -0
  84. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Lifecycle.php +190 -17
  85. vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Abstract_Settings.php +536 -0
  86. vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Control.php +270 -0
  87. vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Setting.php +478 -0
  88. vendor/skyverge/wc-plugin-framework/woocommerce/admin/Notes_Helper.php +149 -0
  89. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php +48 -51
  90. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-json-request.php +6 -4
  91. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-json-response.php +5 -4
  92. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-xml-request.php +8 -5
  93. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-xml-response.php +7 -5
  94. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/class-sv-wc-api-base.php +52 -48
  95. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/class-sv-wc-api-exception.php +10 -8
  96. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/interface-sv-wc-api-request.php +6 -4
  97. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/interface-sv-wc-api-response.php +6 -4
  98. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/css/admin/sv-wc-plugin-admin-setup-wizard.min.css +0 -0
  99. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/images/ajax-loader.gif +0 -0
  100. vendor/skyverge/wc-plugin-framework/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js +1 -0
  101. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/js/admin/sv-wp-admin-job-batch-handler.min.js +0 -0
  102. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/changelog.txt +72 -1
  103. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-admin-notice-handler.php +7 -5
  104. vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-framework-bootstrap.php +407 -0
  105. vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-helper.php +1040 -0
  106. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-hook-deprecator.php +7 -6
  107. vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin-compatibility.php +496 -0
  108. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin-dependencies.php +80 -33
  109. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin-exception.php +10 -8
  110. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin.php +396 -207
  111. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wp-admin-message-handler.php +6 -4
  112. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php +47 -95
  113. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/class-sv-wc-datetime.php +50 -11
  114. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/class-sv-wc-order-compatibility.php +171 -217
  115. vendor/skyverge/wc-plugin-framework/woocommerce/compatibility/class-sv-wc-product-compatibility.php +242 -0
  116. vendor/skyverge/wc-plugin-framework/woocommerce/i18n/languages/woocommerce-plugin-framework-et.mo +0 -0
  117. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/i18n/languages/woocommerce-plugin-framework-et.po +700 -522
  118. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/i18n/languages/woocommerce-plugin-framework.pot +639 -498
  119. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/index.php +1 -1
  120. vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php +389 -0
  121. vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php +505 -0
  122. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/Handlers/Capture.php +41 -36
  123. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php +6 -4
  124. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php +36 -39
  125. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php +55 -42
  126. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php +12 -6
  127. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php +14 -13
  128. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-order-partial-capture.php +8 -8
  129. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php +2 -2
  130. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor.php +2 -2
  131. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-profile-field-customer-id.php +2 -2
  132. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-profile-section.php +1 -1
  133. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php +33 -30
  134. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php +14 -8
  135. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php +8 -5
  136. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php +18 -15
  137. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php +9 -6
  138. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php +17 -11
  139. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php +11 -7
  140. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php +17 -11
  141. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php +9 -7
  142. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php +6 -4
  143. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php +15 -6
  144. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php +8 -6
  145. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php +6 -4
  146. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php +6 -4
  147. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php +12 -11
  148. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php +7 -5
  149. {lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php +7 -4
assets/css/frontend/wc-braintree.min.css CHANGED
@@ -1 +1 @@
1
- .woocommerce #wc_braintree_paypal_container,.woocommerce #wc_braintree_paypal_credit_container{margin-bottom:1em}.woocommerce #wc_braintree_paypal_container #braintree-paypal-button,.woocommerce #wc_braintree_paypal_container button,.woocommerce #wc_braintree_paypal_credit_container #braintree-paypal-button,.woocommerce #wc_braintree_paypal_credit_container button{box-shadow:none;margin-bottom:10px;background:none;border:none}.woocommerce #wc_braintree_paypal_container img,.woocommerce #wc_braintree_paypal_credit_container img{float:none!important;max-height:100%!important}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account{padding:1em 0;border-top:1px solid #bbb;border-bottom:1px solid #bbb}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .name,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .name{display:inline-block;margin-right:.5em;font-weight:700}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .email,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .email{opacity:.5}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .cancel,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .cancel{float:right}.woocommerce #payment div.payment_method_braintree_credit_card label.sv-wc-payment-gateway-payment-form-saved-payment-method,.woocommerce #payment div.payment_method_braintree_credit_card label[for=wc-braintree-credit-card-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_credit_card label[for=wc-braintree-paypal-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_paypal label.sv-wc-payment-gateway-payment-form-saved-payment-method,.woocommerce #payment div.payment_method_braintree_paypal label[for=wc-braintree-credit-card-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_paypal label[for=wc-braintree-paypal-use-new-payment-method]{margin-left:3px}.woocommerce #payment div.payment_method_braintree_credit_card iframe{margin:0 0 0 6px}.woocommerce #payment div.payment_method_braintree_credit_card div.form-row{padding:3px}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field{height:3em;padding:3px;border:1px solid #ccc;border-radius:3px;transition:border-color .16s;-webkit-transition:border-color .16s;background-color:#fff}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-plain.svg);background-repeat:no-repeat;background-position:99%;background-size:50px 31px}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-visa{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-visa.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-master-card{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-mastercard.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-american-express{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-amex.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-diners-club{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-dinersclub.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-maestro{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-maestro.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-jcb{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-jcb.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-discover{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-discover.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-invalid{background-image:url(../../../lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-invalid.svg)}@media only screen and (max-width:320px){.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number{background-image:none}}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused{box-shadow:0 0 .1875em #3498db}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused.braintree-hosted-fields-invalid,.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused.braintree-hosted-fields-valid{box-shadow:0 0 .1875em #69bf29}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-valid{border-color:#69bf29}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-invalid{border-color:#a00}#wc-braintree-credit-card-3dsecure-container{display:none;position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:3000;cursor:pointer}#wc-braintree-credit-card-3dsecure-container iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0;background:#fff;padding:1em;box-sizing:content-box;border-radius:5px}#add_payment_method ul.payment_methods li{list-style-type:none}#add_payment_method ul.payment_methods li label[for=payment_method_braintree_credit_card],#add_payment_method ul.payment_methods li label[for=payment_method_braintree_paypal]{line-height:2.3em}#add_payment_method ul.payment_methods li input[type=radio]#payment_method_braintree_credit_card,#add_payment_method ul.payment_methods li input[type=radio]#payment_method_braintree_paypal{margin-left:5px}#add_payment_method ul.payment_methods li img{vertical-align:middle;margin:3px 0 0 .5em;padding:0;position:relative;box-shadow:none}#add_payment_method ul.payment_methods li img+img{margin-left:2px}#add_payment_method ul.payment_methods li #braintree-paypal-loggedout img{max-height:none;margin:0}
1
+ .woocommerce #wc_braintree_paypal_container,.woocommerce #wc_braintree_paypal_credit_container{margin-bottom:1em}.woocommerce #wc_braintree_paypal_container #braintree-paypal-button,.woocommerce #wc_braintree_paypal_container button,.woocommerce #wc_braintree_paypal_credit_container #braintree-paypal-button,.woocommerce #wc_braintree_paypal_credit_container button{box-shadow:none;margin-bottom:10px;background:none;border:none}.woocommerce #wc_braintree_paypal_container img,.woocommerce #wc_braintree_paypal_credit_container img{float:none!important;max-height:100%!important}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account{padding:1em 0;border-top:1px solid #bbb;border-bottom:1px solid #bbb}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .name,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .name{display:inline-block;margin-right:.5em;font-weight:700}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .email,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .email{opacity:.5}.woocommerce #wc_braintree_paypal_container .wc-braintree-paypal-account .cancel,.woocommerce #wc_braintree_paypal_credit_container .wc-braintree-paypal-account .cancel{float:right}.woocommerce #payment div.payment_method_braintree_credit_card label.sv-wc-payment-gateway-payment-form-saved-payment-method,.woocommerce #payment div.payment_method_braintree_credit_card label[for=wc-braintree-credit-card-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_credit_card label[for=wc-braintree-paypal-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_paypal label.sv-wc-payment-gateway-payment-form-saved-payment-method,.woocommerce #payment div.payment_method_braintree_paypal label[for=wc-braintree-credit-card-use-new-payment-method],.woocommerce #payment div.payment_method_braintree_paypal label[for=wc-braintree-paypal-use-new-payment-method]{margin-left:3px}.woocommerce #payment div.payment_method_braintree_credit_card iframe{margin:0 0 0 6px}.woocommerce #payment div.payment_method_braintree_credit_card div.form-row{padding:3px}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field{height:3em;padding:3px;border:1px solid #ccc;border-radius:3px;transition:border-color .16s;-webkit-transition:border-color .16s;background-color:#fff}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-cc-plain.svg);background-repeat:no-repeat;background-position:99%;background-size:50px 31px}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-visa{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-visa.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-master-card{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-mastercard.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-american-express{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-amex.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-diners-club{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-dinersclub.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-maestro{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-maestro.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-jcb{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-jcb.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-discover{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-discover.svg)}.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number.card-type-invalid{background-image:url(../../../vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-cc-invalid.svg)}@media only screen and (max-width:320px){.woocommerce #payment div.payment_method_braintree_credit_card .wc-braintree-hosted-field-card-number{background-image:none}}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused{box-shadow:0 0 .1875em #3498db}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused.braintree-hosted-fields-invalid,.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-focused.braintree-hosted-fields-valid{box-shadow:0 0 .1875em #69bf29}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-valid{border-color:#69bf29}.woocommerce #payment div.payment_method_braintree_credit_card .braintree-hosted-fields-invalid{border-color:#a00}#wc-braintree-credit-card-3dsecure-container{display:none;position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:3000;cursor:pointer}#wc-braintree-credit-card-3dsecure-container iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0;background:#fff;padding:1em;box-sizing:content-box;border-radius:5px}#add_payment_method ul.payment_methods li{list-style-type:none}#add_payment_method ul.payment_methods li label[for=payment_method_braintree_credit_card],#add_payment_method ul.payment_methods li label[for=payment_method_braintree_paypal]{line-height:2.3em}#add_payment_method ul.payment_methods li input[type=radio]#payment_method_braintree_credit_card,#add_payment_method ul.payment_methods li input[type=radio]#payment_method_braintree_paypal{margin-left:5px}#add_payment_method ul.payment_methods li img{vertical-align:middle;margin:3px 0 0 .5em;padding:0;position:relative;box-shadow:none}#add_payment_method ul.payment_methods li img+img{margin-left:2px}#add_payment_method ul.payment_methods li #braintree-paypal-loggedout img{max-height:none;margin:0}
assets/js/frontend/wc-braintree-apple-pay.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";var _createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(function(){function i(e,t){if(!(e instanceof t))throw new Error("Bound instance method accessed before binding")}jQuery(document).ready(function(t){var r;return r=window.WC_Braintree_Apple_Pay_Handler=(_inherits(o,SV_WC_Apple_Pay_Handler),_createClass(o,[{key:"is_available",value:function(){return window.ApplePaySession&&ApplePaySession.canMakePayments()}},{key:"init",value:function(){if(this.is_available())return this.instance?_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"init",this).call(this):this.create_client()}},{key:"create_client",value:function(){var t=this;return this.get_client_token().done(function(e){if(e.success)return braintree.client.create({authorization:e.data}).then(function(e){return t.client=e,t.create_instance()}).catch(function(e){return console.error("Could not create Braintree client"),console.error(e)})}).fail(function(e,t,n){return console.error("Could not retrieve the client token via AJAX: "+n)})}},{key:"get_client_token",value:function(){var e={action:"wc_"+this.gateway_id+"_get_client_token",nonce:this.client_token_nonce};return t.post(this.ajax_url,e)}},{key:"create_instance",value:function(){var t=this;return braintree.applePay.create({client:this.client}).then(function(e){return t.instance=e,ApplePaySession.canMakePaymentsWithActiveCard(e.merchantIdentifier).then(function(e){if(e)return t.init()})}).catch(function(e){return console.error("Could not create Braintree Apple Pay instance. "+e.message),console.error(e)})}},{key:"get_new_session",value:function(e){var t=this.instance.createPaymentRequest(e);return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"get_new_session",this).call(this,t)}},{key:"on_validate_merchant",value:function(e){var t=this;return i(this,r),this.instance.performValidation({validationURL:e.validationURL,displayName:this.store_name}).then(function(e){return t.session.completeMerchantValidation(e)}).catch(function(e){return t.session.abort(),t.fail_payment("Merchant could not be validated. "+e.message)})}},{key:"process_authorization",value:function(t){var n=this;return i(this,r),this.instance.tokenize({token:t.token}).then(function(e){return t.braintree_nonce=e.nonce,_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"process_authorization",n).call(n,t)}).catch(function(e){return n.set_payment_status(!1),n.fail_payment("Payment could not be processed. "+e)})}}]),o);function o(e){_classCallCheck(this,o);var t=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.on_validate_merchant=t.on_validate_merchant.bind(t),t.process_authorization=t.process_authorization.bind(t),t.store_name=e.store_name,t.client_token_nonce=e.client_token_nonce,t}})}).call(void 0);
1
+ "use strict";var _createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(function(){function i(e,t){if(!(e instanceof t))throw new Error("Bound instance method accessed before binding")}jQuery(document).ready(function(t){var r;function o(e){_classCallCheck(this,o);var t=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.on_validate_merchant=t.on_validate_merchant.bind(t),t.process_authorization=t.process_authorization.bind(t),t.store_name=e.store_name,t.client_token_nonce=e.client_token_nonce,t}return r=window.WC_Braintree_Apple_Pay_Handler=(_inherits(o,SV_WC_Apple_Pay_Handler_v5_7_1),_createClass(o,[{key:"is_available",value:function(){return window.ApplePaySession&&ApplePaySession.canMakePayments()}},{key:"init",value:function(){if(this.is_available())return this.instance?_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"init",this).call(this):this.create_client()}},{key:"create_client",value:function(){var t=this;return this.get_client_token().done(function(e){if(e.success)return braintree.client.create({authorization:e.data}).then(function(e){return t.client=e,t.create_instance()}).catch(function(e){return console.error("Could not create Braintree client"),console.error(e)})}).fail(function(e,t,n){return console.error("Could not retrieve the client token via AJAX: "+n)})}},{key:"get_client_token",value:function(){var e={action:"wc_"+this.gateway_id+"_get_client_token",nonce:this.client_token_nonce};return t.post(this.ajax_url,e)}},{key:"create_instance",value:function(){var t=this;return braintree.applePay.create({client:this.client}).then(function(e){return t.instance=e,ApplePaySession.canMakePaymentsWithActiveCard(e.merchantIdentifier).then(function(e){if(e)return t.init()})}).catch(function(e){return console.error("Could not create Braintree Apple Pay instance. "+e.message),console.error(e)})}},{key:"get_new_session",value:function(e){var t=this.instance.createPaymentRequest(e);return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"get_new_session",this).call(this,t)}},{key:"on_validate_merchant",value:function(e){var t=this;return i(this,r),this.instance.performValidation({validationURL:e.validationURL,displayName:this.store_name}).then(function(e){return t.session.completeMerchantValidation(e)}).catch(function(e){return t.session.abort(),t.fail_payment("Merchant could not be validated. "+e.message)})}},{key:"process_authorization",value:function(t){var n=this;return i(this,r),this.instance.tokenize({token:t.token}).then(function(e){return t.braintree_nonce=e.nonce,_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"process_authorization",n).call(n,t)}).catch(function(e){return n.set_payment_status(!1),n.fail_payment("Payment could not be processed. "+e)})}}]),o),t(document.body).trigger("wc_braintree_apple_pay_handler_loaded")})}).call(void 0);
assets/js/frontend/wc-braintree.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";var _get=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},_createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(function(){function s(e,t){if(!(e instanceof t))throw new Error("Bound instance method accessed before binding")}var u=[].indexOf;jQuery(document).ready(function(d){var e,n,r;function t(e){_classCallCheck(this,t),this.show_integration_ui=this.show_integration_ui.bind(this),this.hide_integration_ui=this.hide_integration_ui.bind(this),this.id=e.id,this.id_dasherized=e.id_dasherized,this.name=e.name,this.type=e.type,this.debug=e.debug,this.client_token_nonce=e.client_token_nonce,this.ajax_url=e.ajax_url,this.integration_error_message=e.integration_error_message,this.payment_error_message=e.payment_error_message,this.params=window.sv_wc_payment_gateway_payment_form_params}function o(e){_classCallCheck(this,o);var t=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.show_integration_ui=t.show_integration_ui.bind(t),t.hide_integration_ui=t.hide_integration_ui.bind(t),t.csc_required=e.csc_required,t.hosted_fields_styles=e.hosted_fields_styles,t.threeds=e.threeds,t.enabled_card_types=e.enabled_card_types,t.init(),t}function i(e){_classCallCheck(this,i);var t=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t.do_integration_ready=t.do_integration_ready.bind(t),t.on_authorize=t.on_authorize.bind(t),t.get_linked_account_html=t.get_linked_account_html.bind(t),t.is_test_environment=e.is_test_environment,t.is_paypal_credit_enabled=e.is_paypal_credit_enabled,t.must_login_message=e.must_login_message,t.must_login_add_method_message=e.must_login_add_method_message,t.button_styles=e.button_styles,t.cart_payment_nonce=e.cart_payment_nonce,t.init(),t}function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e));return t.set_payment_method_nonce=e.set_payment_method_nonce,t.cart_handler_url=e.cart_handler_url,t.form=d("form.woocommerce-cart-form"),t.form_ui_selector="",t.setup_braintree(),d(document.body).on("updated_cart_totals",function(){return t.setup_braintree()}),t}return window.WC_Braintree_Payment_Form_Handler=(_createClass(t,[{key:"init",value:function(){return this.is_sdk_ready()?d("form.checkout").length?this.handle_checkout_page():d("form#order_review").length?this.handle_pay_page():d("form#add_payment_method").length?this.handle_add_payment_method_page():void 0:console.error("Braintree SDK is missing.")}},{key:"handle_checkout_page",value:function(){var e=this;return this.form=d("form.checkout"),this.form_ui_selector=".woocommerce-checkout-payment",d(document.body).on("updated_checkout",function(){if(!e.setting_up)return e.setup_braintree()}),d(document.body).on("updated_checkout",function(){return e.handle_saved_payment_methods()}),d(document.body).on("checkout_error",function(){return e.handle_checkout_error()}),this.form.on("checkout_place_order_"+this.id,function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"handle_checkout_error",value:function(){return this.unblock_ui()}},{key:"handle_pay_page",value:function(){var e=this;return this.form=d("form#order_review"),this.form_ui_selector="#payment",this.handle_saved_payment_methods(),this.setup_braintree(),this.form.submit(function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"handle_add_payment_method_page",value:function(){var e=this;return this.form=d("form#add_payment_method"),this.form_ui_selector="#payment",this.setup_braintree(),this.form.submit(function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"verify_form",value:function(){return!!this.using_payment_token()||!!this.has_payment_nonce()&&void 0}},{key:"submit_form",value:function(e){return d("input[name=wc_"+this.id+"_payment_nonce]").val(e),this.form.submit()}},{key:"handle_saved_payment_methods",value:function(){var n=this,e=d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form");if(d("input.js-wc-"+this.id_dasherized+"-payment-token").change(function(){return d("input.js-wc-"+n.id_dasherized+"-payment-token:checked").val()?e.slideUp(200):e.slideDown(200)}).change(),d("input#createaccount").change(function(e){var t=d("input.js-wc-"+n.id_dasherized+"-tokenize-payment-method").closest("p.form-row");return d(e.target).is(":checked")?(t.slideDown(),t.next().show()):(t.hide(),t.next().hide())}),!d("input#createaccount").is(":checked"))return d("input#createaccount").change()}},{key:"setup_braintree",value:function(){if(!d("#wc-"+this.id_dasherized+"-account-number-hosted iframe").data("ready"))return this.setting_up=!0,this.block_ui(),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),this.create_client()}},{key:"create_client",value:function(){var r=this;return this.log("Creating client."),this.get_client_token().done(function(e){return e.success?braintree.client.create({authorization:e.data}).then(function(e){return r.client=e,r.log("Client ready."),r.setup_integration()}).catch(function(e){return r.handle_integration_error(e),r.unblock_ui()}):r.handle_integration_error(e.data)}).fail(function(e,t,n){return r.handle_integration_error({message:"Could not retrieve the client token via AJAX: "+n}),r.unblock_ui()})}},{key:"get_client_token",value:function(){this.id;var e={action:"wc_"+this.id+"_get_client_token",nonce:this.client_token_nonce};return d.post(this.ajax_url,e)}},{key:"setup_integration",value:function(){var t=this;return this.log("Creating integration."),this.get_integration_class().create(this.get_integration_options()).then(function(e){return t.integration=e,t.show_integration_ui(),d("#wc-"+t.id_dasherized+"-account-number-hosted iframe").data("ready",!0),t.do_integration_ready(),d(document).trigger("wc_"+t.id+"_integration_ready",t.integration),t.log("Integration ready."),t.setting_up=!1}).catch(function(e){return t.handle_integration_error(e),t.unblock_ui(),t.setting_up=!1})}},{key:"refresh_braintree",value:function(){var e=this;if(null!=this.integration&&!this.refreshing&&!this.setting_up)return this.log("Refreshing integration."),this.refreshing=!0,this.block_ui(),this.integration.teardown(function(){return e.integration=null,e.refreshing=!1,e.setup_braintree()})}},{key:"teardown_braintree",value:function(){var e=this;if(null!=this.integration)return this.block_ui(),this.integration.teardown(function(){return e.integration=null,e.unblock_ui()})}},{key:"do_integration_ready",value:function(){}},{key:"get_integration_options",value:function(){return{client:this.client}}},{key:"get_integration_class",value:function(){}},{key:"handle_integration_error",value:function(e){return this.log("Integration error. "+e.message,e,"error"),this.hide_integration_ui(),this.unblock_ui()}},{key:"handle_payment_error",value:function(e){return this.log("Payment error. "+e.message,e,"error"),this.render_error(this.get_user_message(e)),this.unblock_ui()}},{key:"render_error",value:function(e){return d(".woocommerce-error, .woocommerce-message").remove(),this.form.prepend('<div class="woocommerce-error">'+e+"</div>").removeClass("processing").unblock(),d("html, body").animate({scrollTop:this.form.offset().top-100},1e3),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),this.form.trigger("wc_"+this.id+"_rendered_error"),d(document.body).trigger("checkout_error"),this.unblock_ui()}},{key:"get_user_message",value:function(){return this.payment_error_message}},{key:"show_integration_ui",value:function(){if(d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".woocommerce-error").remove(),d("input#createaccount").length&&d("input#createaccount").is(":checked"))return d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".form-row").show()}},{key:"hide_integration_ui",value:function(){return d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").prepend('<div class="woocommerce-error">'+this.integration_error_message+"</div>"),d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".form-row").hide()}},{key:"block_ui",value:function(){return d(this.form_ui_selector).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return d(this.form_ui_selector).unblock()}},{key:"is_selected",value:function(){return this.get_selected_gateway_id()===this.id}},{key:"is_sdk_ready",value:function(){return"undefined"!=typeof braintree&&null!==braintree&&null!=braintree.client&&null!=this.get_integration_class()}},{key:"has_payment_nonce",value:function(){return this.form.find("input[name=wc_"+this.id+"_payment_nonce]").val()}},{key:"using_payment_token",value:function(){return this.form.find("input.js-wc-"+this.id_dasherized+"-payment-token:checked").val()}},{key:"get_selected_gateway_id",value:function(){return this.form.find("input[name=payment_method]:checked").val()}},{key:"log",value:function(e,t,n){var r=1<arguments.length&&void 0!==t?t:null;if(this.debug)return console.log(this.name+": "+e),r?console.log(r):void 0}}]),t),e=window.WC_Braintree_Credit_Card_Payment_Form_Handler=(_inherits(o,WC_Braintree_Payment_Form_Handler),_createClass(o,[{key:"handle_checkout_error",value:function(){return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"handle_checkout_error",this).call(this),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),d("input[name=wc-"+this.id_dasherized+"-card-type]").val(""),d("input[name=wc-"+this.id_dasherized+"-3d-secure-verified]").val(0)}},{key:"verify_form",value:function(){var e;return this.has_payment_nonce()||!this.csc_required&&this.using_payment_token()?(e=d("input.js-wc-braintree-credit-card-payment-token:checked"),this.should_verify_3d_secure_token(e)?(this.verify_3d_secure(e.data("nonce"),null,e),!1):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"verify_form",this).call(this)):(this.tokenize_payment(),!1)}},{key:"tokenize_payment",value:function(){var t=this;return this.integration.tokenize().then(function(e){if(t.log("Payment method received.",e),null!=e.nonce&&null!=e.details&&null!=e.details.bin)return t.should_verify_3d_secure(e)?t.verify_3d_secure(e.nonce,e.details.bin):t.submit_form(e.nonce)}).catch(function(e){return t.handle_payment_error(e)})}},{key:"get_integration_options",value:function(){var e={client:this.client,fields:{number:{selector:"#wc-braintree-credit-card-account-number-hosted",placeholder:d("#wc-braintree-credit-card-account-number-hosted").data("placeholder")},cvv:{selector:"#wc-braintree-credit-card-csc-hosted",placeholder:d("#wc-braintree-credit-card-csc-hosted").data("placeholder")},expirationDate:{selector:"#wc-braintree-credit-card-expiry-hosted",placeholder:d("#wc-braintree-credit-card-expiry-hosted").data("placeholder")}},styles:this.hosted_fields_styles};return this.csc_required&&this.using_payment_token()&&(delete e.fields.number,delete e.fields.expirationDate),this.csc_required||delete e.fields.cvv,e}},{key:"get_integration_class",value:function(){return braintree.hostedFields}},{key:"do_integration_ready",value:function(){var t=this;return this.integration.on("cardTypeChange",function(e){return t.on_card_type_change(e)}),!this.csc_required&&d("input.js-wc-braintree-credit-card-payment-token:checked").val()&&this.teardown_braintree(),this.unblock_ui()}},{key:"handle_saved_payment_methods",value:function(){var e,t,n=this;return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"handle_saved_payment_methods",this).call(this),t=d("div.js-wc-braintree-credit-card-new-payment-method-form"),e=d("div.wc-braintree-hosted-field-card-csc-parent"),d("input.js-wc-braintree-credit-card-payment-token").change(function(){return d("input.js-wc-braintree-credit-card-payment-token:checked").val()?n.csc_required&&e.hasClass("form-row-last")?(e.removeClass("form-row-last").addClass("form-row-first"),t.after(e),n.refresh_braintree()):void 0:(n.csc_required&&e.hasClass("form-row-first")&&(e.removeClass("form-row-first").addClass("form-row-last"),t.find("div.wc-braintree-hosted-field-card-expiry-parent").after(e)),n.refresh_braintree())}).change()}},{key:"get_user_message",value:function(e){var t,n,r,i,a=[];if("CUSTOMER"===e.type)switch(e.code){case"HOSTED_FIELDS_FIELDS_EMPTY":this.csc_required&&a.push(this.params.cvv_missing),this.using_payment_token()||(a.push(this.params.card_number_missing),a.push(this.params.card_exp_date_invalid));break;case"HOSTED_FIELDS_FIELDS_INVALID":if(null!=e.details)for(t=0,n=(i=e.details.invalidFieldKeys).length;t<n;t++)switch(i[t]){case"number":a.push(this.params.card_number_invalid);break;case"cvv":a.push(this.params.cvv_length_invalid);break;case"expirationDate":a.push(this.params.card_exp_date_invalid)}}else"NETWORK"===e.type&&null!=e.details.originalError.error.message&&(r=e.details.originalError.error.message,/given name format is invalid/.test(r)&&a.push(this.params.first_name_unsupported_characters),/surname format is invalid/.test(r)&&a.push(this.params.last_name_unsupported_characters));return a.length?a.join("<br/>"):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"get_user_message",this).call(this)}},{key:"on_card_type_change",value:function(e){var t,n,r;if(null!=e.cards)return(t=d("#wc-braintree-credit-card-account-number-hosted")).attr("class",function(e,t){return t.replace(/(^|\s)card-type-\S+/g,"")}),e.cards.length?1===e.cards.length?(n=e.cards[0],d("input[name=wc-"+this.id_dasherized+"-card-type]").val(n.type),null!=n.type&&(r=n.type,0<=u.call(this.enabled_card_types,r))?t.addClass("card-type-"+n.type):t.addClass("card-type-invalid")):void 0:t.addClass("card-type-invalid")}},{key:"is_3d_secure_enabled",value:function(){return this.threeds.enabled&&null!=braintree.threeDSecure}},{key:"setup_integration",value:function(){var t=this;return this.threeds.enabled&&(this.threeds.enabled=this.client.getConfiguration().gatewayConfiguration.threeDSecureEnabled),this.is_3d_secure_enabled()?(d("input[name=wc-"+this.id_dasherized+"-3d-secure-enabled]").val(1),this.threeDSecure&&this.threeDSecure.teardown(),braintree.threeDSecure.create({version:2,client:this.client}).then(function(e){return t.threeDSecure=e,d(document.body).on("click","#wc-braintree-credit-card-3dsecure-container",function(e){return d(e.currentTarget).fadeOut(200),t.threeDSecure.cancelVerifyCard(),t.unblock_ui()}),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"setup_integration",t).call(t)}).catch(function(e){return t.handle_integration_error(e)})):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"setup_integration",this).call(this)}},{key:"should_verify_3d_secure",value:function(e){var t=e.details.cardType;return this.is_3d_secure_enabled()&&"CreditCard"===e.type&&0<=u.call(this.threeds.card_types,t)}},{key:"should_verify_3d_secure_token",value:function(e){if(this.is_3d_secure_enabled()&&e.val()&&e.data("nonce")&&!e.data("verified"))return!0}},{key:"verify_3d_secure",value:function(e,t,n){var r=this,i=2<arguments.length&&void 0!==n?n:null,a=d("#billing_state").val(),o=d("#billing_country").val(),_=d("#shipping_state").val(),s=d("#shipping_country").val(),u=d("input[name=billing_first_name]").val()?{givenName:d("input[name=billing_first_name]").val().latinise(),surname:d("input[name=billing_last_name]").val().latinise(),phoneNumber:d("input[name=billing_phone]").val(),streetAddress:d("input[name=billing_address_1]").val(),extendedAddress:d("input[name=billing_address_2]").val(),locality:d("#billing_city").val(),region:"string"==typeof a&&a.length<=2?a:"",postalCode:d("input[name=billing_postcode]").val(),countryCodeAlpha2:"string"==typeof o&&o.length<=2?o:""}:{},c=d("input[name=shipping_first_name]").val()?{shippingGivenName:d("input[name=shipping_first_name]").val().latinise(),shippingSurname:d("input[name=shipping_last_name]").val().latinise(),shippingAddress:{streetAddress:d("input[name=shipping_address_1]").val(),extendedAddress:d("input[name=shipping_address_2]").val(),locality:d("input[name=shipping_city]").val(),region:"string"==typeof _&&_.length<=2?_:"",postalCode:d("input[name=shipping_postcode]").val(),countryCodeAlpha2:"string"==typeof s&&s.length<=2?s:""}}:{},l={nonce:e,amount:d("input[name=wc-"+this.id_dasherized+"-3d-secure-order-total]").val(),email:d("input[name=billing_email]").val(),billingAddress:u,additionalInformation:c,onLookupComplete:function(e,t){r.log("3D Secure lookup complete.",e);try{return t()}catch(e){return r.handle_payment_error(e)}}};return"1"===d("input[name=wc-"+this.id_dasherized+"-cart-contains-subscription]").val()&&(l.challengeRequested=!0),this.log("Verifying 3D Secure.",l),this.threeDSecure.verifyCard(l).then(function(e){return r.log("3D Secure response received.",e),r.threeds.liability_shift_always_required&&!e.liabilityShifted?r.render_error(r.threeds.failure_message):(null!=i&&i.data("verified",!0),d("input[name=wc-"+r.id_dasherized+"-3d-secure-verified]").val(1),r.submit_form(e.nonce))}).catch(function(e){return r.handle_payment_error(e)})}},{key:"show_integration_ui",value:function(){return s(this,e),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"show_integration_ui",this).call(this),d(".wc-braintree-hosted-field-parent").show()}},{key:"hide_integration_ui",value:function(){return s(this,e),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"hide_integration_ui",this).call(this),d(".wc-braintree-hosted-field-parent").hide()}}]),o),n=window.WC_Braintree_PayPal_Payment_Form_Handler=(_inherits(i,WC_Braintree_Payment_Form_Handler),_createClass(i,[{key:"init",value:function(){var t=this;return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this),d("input[name=wc_"+this.id+"_payment_nonce]").val(this.cart_payment_nonce),d(document.body).on("click",'input[name="payment_method"], input.js-wc-braintree-paypal-payment-token',function(){return t.toggle_order_button()}),d(document.body).on("payment_method_selected",function(){return t.toggle_order_button()}),d(document.body).on("click",".wc-braintree-paypal-account .cancel",function(e){return e.preventDefault(),d(e.currentTarget).parent().remove(),t.setup_braintree()})}},{key:"toggle_order_button",value:function(){return!this.is_selected()||this.has_payment_nonce()||this.using_payment_token()?d("#place_order").show():d("#place_order").hide()}},{key:"verify_form",value:function(){var e=_get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"verify_form",this).call(this);return this.has_payment_nonce()||this.using_payment_token()||this.render_error(this.must_login_message),e}},{key:"handle_payment_error",value:function(e){return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"handle_payment_error",this).call(this,e),this.cart_payment_nonce=!1,this.setup_braintree()}},{key:"get_integration_class",value:function(){return braintree.paypalCheckout}},{key:"setup_braintree",value:function(){return this.cart_payment_nonce?this.unblock_ui():(_get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"setup_braintree",this).call(this),d("input.js-wc-braintree-paypal-tokenize-payment-method").prop("disabled",!1),this.toggle_order_button())}},{key:"do_integration_ready",value:function(){var e,t=this;return s(this,n),this.cart_payment_nonce?this.unblock_ui():(e=this.is_single_use()?"checkout":"vault",this.render_button(this.integration.createPayment({flow:e,amount:this.get_order_amount(),currency:this.get_store_currency(),locale:this.get_store_locale()}),this.get_button_styles(),"#wc_braintree_paypal_container").then(function(){return d("#wc_braintree_paypal_container").css({width:"100%"}),t.unblock_ui()}).catch(function(e){return t.log("Could not render the PayPal button. "+e.message,e),t.hide_integration_ui(),t.unblock_ui()}))}},{key:"render_button",value:function(e,t,n){var r,i,a=this;return d(n).html(""),r=this.is_paypal_credit_enabled&&"USD"===this.get_store_currency()?{allowed:[paypal.FUNDING.CREDIT]}:{disallowed:[paypal.FUNDING.CREDIT]},i={env:this.is_test_environment?"sandbox":"production",commit:this.button_is_pay_now(),style:t,funding:r,payment:function(){return e},onAuthorize:function(e,t){return a.on_authorize(e,t)},onError:function(e){return a.handle_integration_error(e)}},paypal.Button.render(i,n)}},{key:"button_is_pay_now",value:function(){return!d("form#add_payment_method").length}},{key:"get_button_styles",value:function(){return this.button_styles}},{key:"on_authorize",value:function(e){var t=this;return s(this,n),this.block_ui(),this.integration.tokenizePayment(e).then(function(e){return t.log("Payment method tokenized.",e),t.set_payment_method(e)}).catch(function(e){return t.handle_payment_error(e),t.unblock_ui()})}},{key:"set_payment_method",value:function(e){return d("input[name=wc_"+this.id+"_payment_nonce]").val(e.nonce),d("#wc_braintree_paypal_container").html(this.get_linked_account_html(e.details)),this.is_single_use()&&d("input.js-wc-braintree-paypal-tokenize-payment-method").prop("disabled",!0),d("#place_order").show(),this.form.submit()}},{key:"handle_saved_payment_methods",value:function(){var t=this;return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"handle_saved_payment_methods",this).call(this),d("input.js-wc-braintree-paypal-tokenize-payment-method").change(function(e){if(null!=t.integration&&d(e.target).is(":visible"))return t.block_ui(),t.do_integration_ready()}).change()}},{key:"get_linked_account_html",value:function(e){var t;return s(this,n),t=d("<div class='wc-"+this.id_dasherized+"-account'></div>"),null!=e.firstName&&null!=e.lastName&&t.append("<span class='name'>"+e.firstName+" "+e.lastName+"</span>"),t.append("<span class='email'>"+e.email+"</span>"),t.append("<a href='#' class='cancel'>Cancel</a>"),t}},{key:"is_single_use",value:function(){var e=d("input[name=wc-braintree-paypal-tokenize-payment-method]");return 0===e.length||("checkbox"===e.attr("type")?!e.is(":checked"):!e.val())}},{key:"get_order_amount",value:function(){return d("input[name=wc_braintree_paypal_amount]").val()}},{key:"get_store_currency",value:function(){return d("input[name=wc_braintree_paypal_currency]").val()}},{key:"get_store_locale",value:function(){return d("input[name=wc_braintree_paypal_locale]").val()}},{key:"is_sdk_ready",value:function(){return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"is_sdk_ready",this).call(this)&&"undefined"!=typeof paypal&&null!==paypal}}]),i),window.WC_Braintree_PayPal_Cart_Handler=(_inherits(a,WC_Braintree_PayPal_Payment_Form_Handler),_createClass(a,[{key:"button_is_pay_now",value:function(){return!1}},{key:"set_payment_method",value:function(e){var t=this;if(null!=e.nonce)return e.wp_nonce=this.set_payment_method_nonce,d.ajax({type:"POST",url:this.cart_handler_url,data:e,dataType:"json"}).done(function(e){if(t.log("Cart response received.",e),null!=e.redirect_url)return window.location=e.redirect_url}).fail(function(e){return t.log("Error setting the PayPal cart data.",e,"error")}).always(function(){return t.unblock_ui()})}},{key:"is_single_use",value:function(){return"1"===d("input[name=wc_braintree_paypal_single_use]").val()}},{key:"has_payment_nonce",value:function(){return!1}}]),a),r=window.WC_Braintree_PayPal_Product_Button_Handler=(_inherits(_,WC_Braintree_PayPal_Payment_Form_Handler),_createClass(_,[{key:"handle_product_page",value:function(){return this.product_form={element:d("form.cart"),is_variable:d("form.cart").hasClass("variations_form")},this.should_validate_product_data&&this.product_form.element.on("change",this.validate_product_button),this.product_form.is_variable&&d(document.body).on("woocommerce_variation_has_changed",this.validate_product_button),this.validate_product_button()}},{key:"do_integration_ready",value:function(){if(s(this,r),_get(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"do_integration_ready",this).call(this),this.is_product_page)return this.validate_product_button()}},{key:"validate_product_button",value:function(){if(s(this,r),this.product_form.is_variable&&this.product_form.element.find(".single_add_to_cart_button").is(".disabled"))this.hide_button();else{if(!this.should_validate_product_data)return this.show_button();this.validate_product_data(this.show_button,this.hide_button)}}},{key:"validate_product_data",value:function(t,n){return s(this,r),d.ajax({type:"POST",url:this.validate_product_url,data:{wp_nonce:this.validate_product_nonce,product_id:d("input[name=wc_braintree_paypal_product_id]").val(),cart_form:d("form.cart").serialize()}}).done(function(e){return(e.data.is_valid?t:n)()}).fail(n)}},{key:"hide_button",value:function(){return d("#wc_braintree_paypal_container").slideUp()}},{key:"show_button",value:function(){return d("#wc_braintree_paypal_container").slideDown()}},{key:"button_is_pay_now",value:function(){return!1}},{key:"set_payment_method",value:function(e){var t,n=this;if(null!=e.nonce)return(t=e).wp_nonce=this.product_checkout_nonce,t.product_id=d("input[name=wc_braintree_paypal_product_id]").val(),t.cart_form=d("form.cart").serialize(),d.ajax({type:"POST",url:this.product_checkout_url,data:t,dataType:"json"}).done(function(e){if(n.log("Cart response received.",e),null!=e.redirect_url)return window.location=e.redirect_url}).fail(function(e){return n.log("Error setting the PayPal cart data.",e,"error")}).always(function(){return n.unblock_ui()})}},{key:"is_single_use",value:function(){return"1"===d("input[name=wc_braintree_paypal_single_use]").val()}},{key:"has_payment_nonce",value:function(){return!1}}]),_);function _(e){_classCallCheck(this,_);var t=_possibleConstructorReturn(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,e));return t.do_integration_ready=t.do_integration_ready.bind(t),t.validate_product_button=t.validate_product_button.bind(t),t.validate_product_data=t.validate_product_data.bind(t),t.product_checkout_nonce=e.product_checkout_nonce,t.product_checkout_url=e.product_checkout_url,t.is_product_page=e.is_product_page,t.validate_product_url=e.validate_product_url,t.validate_product_nonce=e.validate_product_nonce,t.should_validate_product_data=e.should_validate_product_data,t.form=d("form.woocommerce-cart-form"),t.form_ui_selector="",t.is_product_page&&t.handle_product_page(),t.setup_braintree(),d(document.body).on("updated_cart_totals",function(){return t.setup_braintree()}),t}})}).call(void 0);
1
+ "use strict";var _get=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},_createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(function(){function s(e,t){if(!(e instanceof t))throw new Error("Bound instance method accessed before binding")}var c=[].indexOf;jQuery(document).ready(function(d){var e,n,r;function t(e){_classCallCheck(this,t),this.show_integration_ui=this.show_integration_ui.bind(this),this.hide_integration_ui=this.hide_integration_ui.bind(this),this.id=e.id,this.id_dasherized=e.id_dasherized,this.name=e.name,this.type=e.type,this.debug=e.debug,this.client_token_nonce=e.client_token_nonce,this.ajax_url=e.ajax_url,this.integration_error_message=e.integration_error_message,this.payment_error_message=e.payment_error_message,this.params=window.sv_wc_payment_gateway_payment_form_params}function o(e){_classCallCheck(this,o);var t=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.show_integration_ui=t.show_integration_ui.bind(t),t.hide_integration_ui=t.hide_integration_ui.bind(t),t.csc_required=e.csc_required,t.hosted_fields_styles=e.hosted_fields_styles,t.threeds=e.threeds,t.enabled_card_types=e.enabled_card_types,t.init(),t}function i(e){_classCallCheck(this,i);var t=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t.do_integration_ready=t.do_integration_ready.bind(t),t.on_authorize=t.on_authorize.bind(t),t.get_linked_account_html=t.get_linked_account_html.bind(t),t.is_test_environment=e.is_test_environment,t.is_paypal_credit_enabled=e.is_paypal_credit_enabled,t.must_login_message=e.must_login_message,t.must_login_add_method_message=e.must_login_add_method_message,t.button_styles=e.button_styles,t.cart_payment_nonce=e.cart_payment_nonce,t.init(),t}function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e));return t.set_payment_method_nonce=e.set_payment_method_nonce,t.cart_handler_url=e.cart_handler_url,t.form=d("form.woocommerce-cart-form"),t.form_ui_selector="",t.setup_braintree(),d(document.body).on("updated_cart_totals",function(){return t.setup_braintree()}),t}function _(e){_classCallCheck(this,_);var t=_possibleConstructorReturn(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,e));return t.do_integration_ready=t.do_integration_ready.bind(t),t.validate_product_button=t.validate_product_button.bind(t),t.validate_product_data=t.validate_product_data.bind(t),t.product_checkout_nonce=e.product_checkout_nonce,t.product_checkout_url=e.product_checkout_url,t.is_product_page=e.is_product_page,t.validate_product_url=e.validate_product_url,t.validate_product_nonce=e.validate_product_nonce,t.should_validate_product_data=e.should_validate_product_data,t.form=d("form.woocommerce-cart-form"),t.form_ui_selector="",t.is_product_page&&t.handle_product_page(),t.setup_braintree(),d(document.body).on("updated_cart_totals",function(){return t.setup_braintree()}),t}return window.WC_Braintree_Payment_Form_Handler=(_createClass(t,[{key:"init",value:function(){return this.is_sdk_ready()?d("form.checkout").length?this.handle_checkout_page():d("form#order_review").length?this.handle_pay_page():d("form#add_payment_method").length?this.handle_add_payment_method_page():void 0:console.error("Braintree SDK is missing.")}},{key:"handle_checkout_page",value:function(){var e=this;return this.form=d("form.checkout"),this.form_ui_selector=".woocommerce-checkout-payment",d(document.body).on("updated_checkout",function(){if(!e.setting_up)return e.setup_braintree()}),d(document.body).on("updated_checkout",function(){return e.handle_saved_payment_methods()}),d(document.body).on("checkout_error",function(){return e.handle_checkout_error()}),this.form.on("checkout_place_order_"+this.id,function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"handle_checkout_error",value:function(){return this.unblock_ui()}},{key:"handle_pay_page",value:function(){var e=this;return this.form=d("form#order_review"),this.form_ui_selector="#payment",this.handle_saved_payment_methods(),this.setup_braintree(),this.form.submit(function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"handle_add_payment_method_page",value:function(){var e=this;return this.form=d("form#add_payment_method"),this.form_ui_selector="#payment",this.setup_braintree(),this.form.submit(function(){if(e.is_selected())return e.block_ui(),e.verify_form()})}},{key:"verify_form",value:function(){return!!this.using_payment_token()||!!this.has_payment_nonce()&&void 0}},{key:"submit_form",value:function(e){return d("input[name=wc_"+this.id+"_payment_nonce]").val(e),this.form.submit()}},{key:"handle_saved_payment_methods",value:function(){var n=this,e=d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form");if(d("input.js-wc-"+this.id_dasherized+"-payment-token").change(function(){return d("input.js-wc-"+n.id_dasherized+"-payment-token:checked").val()?e.slideUp(200):e.slideDown(200)}).change(),d("input#createaccount").change(function(e){var t=d("input.js-wc-"+n.id_dasherized+"-tokenize-payment-method").closest("p.form-row");return d(e.target).is(":checked")?(t.slideDown(),t.next().show()):(t.hide(),t.next().hide())}),!d("input#createaccount").is(":checked"))return d("input#createaccount").change()}},{key:"setup_braintree",value:function(){if(!d("#wc-"+this.id_dasherized+"-account-number-hosted iframe").data("ready"))return this.setting_up=!0,this.block_ui(),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),this.create_client()}},{key:"create_client",value:function(){var r=this;return this.log("Creating client."),this.get_client_token().done(function(e){return e.success?braintree.client.create({authorization:e.data}).then(function(e){return r.client=e,r.log("Client ready."),r.setup_integration()}).catch(function(e){return r.handle_integration_error(e),r.unblock_ui()}):r.handle_integration_error(e.data)}).fail(function(e,t,n){return r.handle_integration_error({message:"Could not retrieve the client token via AJAX: "+n}),r.unblock_ui()})}},{key:"get_client_token",value:function(){this.id;var e={action:"wc_"+this.id+"_get_client_token",nonce:this.client_token_nonce};return d.post(this.ajax_url,e)}},{key:"setup_integration",value:function(){var t=this;return this.log("Creating integration."),this.get_integration_class().create(this.get_integration_options()).then(function(e){return t.integration=e,t.show_integration_ui(),d("#wc-"+t.id_dasherized+"-account-number-hosted iframe").data("ready",!0),t.do_integration_ready(),d(document).trigger("wc_"+t.id+"_integration_ready",t.integration),t.log("Integration ready."),t.setting_up=!1}).catch(function(e){return t.handle_integration_error(e),t.unblock_ui(),t.setting_up=!1})}},{key:"refresh_braintree",value:function(){var e=this;if(null!=this.integration&&!this.refreshing&&!this.setting_up)return this.log("Refreshing integration."),this.refreshing=!0,this.block_ui(),this.integration.teardown(function(){return e.integration=null,e.refreshing=!1,e.setup_braintree()})}},{key:"teardown_braintree",value:function(){var e=this;if(null!=this.integration)return this.block_ui(),this.integration.teardown(function(){return e.integration=null,e.unblock_ui()})}},{key:"do_integration_ready",value:function(){}},{key:"get_integration_options",value:function(){return{client:this.client}}},{key:"get_integration_class",value:function(){}},{key:"handle_integration_error",value:function(e){return this.log("Integration error. "+e.message,e,"error"),this.hide_integration_ui(),this.unblock_ui()}},{key:"handle_payment_error",value:function(e){return this.log("Payment error. "+e.message,e,"error"),this.render_error(this.get_user_message(e)),this.unblock_ui()}},{key:"render_error",value:function(e){return d(".woocommerce-error, .woocommerce-message").remove(),this.form.prepend('<div class="woocommerce-error">'+e+"</div>").removeClass("processing").unblock(),d("html, body").animate({scrollTop:this.form.offset().top-100},1e3),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),this.form.trigger("wc_"+this.id+"_rendered_error"),d(document.body).trigger("checkout_error"),this.unblock_ui()}},{key:"get_user_message",value:function(){return this.payment_error_message}},{key:"show_integration_ui",value:function(){if(d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".woocommerce-error").remove(),d("input#createaccount").length&&d("input#createaccount").is(":checked"))return d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".form-row").show()}},{key:"hide_integration_ui",value:function(){return d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").prepend('<div class="woocommerce-error">'+this.integration_error_message+"</div>"),d("div.js-wc-"+this.id_dasherized+"-new-payment-method-form").find(".form-row").hide()}},{key:"block_ui",value:function(){return d(this.form_ui_selector).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return d(this.form_ui_selector).unblock()}},{key:"is_selected",value:function(){return this.get_selected_gateway_id()===this.id}},{key:"is_sdk_ready",value:function(){return"undefined"!=typeof braintree&&null!==braintree&&null!=braintree.client&&null!=this.get_integration_class()}},{key:"has_payment_nonce",value:function(){return this.form.find("input[name=wc_"+this.id+"_payment_nonce]").val()}},{key:"using_payment_token",value:function(){return this.form.find("input.js-wc-"+this.id_dasherized+"-payment-token:checked").val()}},{key:"get_selected_gateway_id",value:function(){return this.form.find("input[name=payment_method]:checked").val()}},{key:"log",value:function(e,t,n){var r=1<arguments.length&&void 0!==t?t:null;if(this.debug)return console.log(this.name+": "+e),r?console.log(r):void 0}}]),t),d(document.body).trigger("wc_braintree_payment_form_handler_loaded"),e=window.WC_Braintree_Credit_Card_Payment_Form_Handler=(_inherits(o,WC_Braintree_Payment_Form_Handler),_createClass(o,[{key:"handle_checkout_error",value:function(){return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"handle_checkout_error",this).call(this),d("input[name=wc_"+this.id+"_payment_nonce]").val(""),d("input[name=wc-"+this.id_dasherized+"-card-type]").val(""),d("input[name=wc-"+this.id_dasherized+"-3d-secure-verified]").val(0)}},{key:"verify_form",value:function(){var e;return this.has_payment_nonce()||!this.csc_required&&this.using_payment_token()?(e=d("input.js-wc-braintree-credit-card-payment-token:checked"),this.should_verify_3d_secure_token(e)?(this.verify_3d_secure(e.data("nonce"),null,e),!1):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"verify_form",this).call(this)):(this.tokenize_payment(),!1)}},{key:"tokenize_payment",value:function(){var t=this;return this.integration.tokenize().then(function(e){if(t.log("Payment method received.",e),null!=e.nonce&&null!=e.details&&null!=e.details.bin)return t.should_verify_3d_secure(e)?t.verify_3d_secure(e.nonce,e.details.bin):t.submit_form(e.nonce)}).catch(function(e){return t.handle_payment_error(e)})}},{key:"get_integration_options",value:function(){var e={client:this.client,fields:{number:{selector:"#wc-braintree-credit-card-account-number-hosted",placeholder:d("#wc-braintree-credit-card-account-number-hosted").data("placeholder")},cvv:{selector:"#wc-braintree-credit-card-csc-hosted",placeholder:d("#wc-braintree-credit-card-csc-hosted").data("placeholder")},expirationDate:{selector:"#wc-braintree-credit-card-expiry-hosted",placeholder:d("#wc-braintree-credit-card-expiry-hosted").data("placeholder")}},styles:this.hosted_fields_styles};return this.csc_required&&this.using_payment_token()&&(delete e.fields.number,delete e.fields.expirationDate),this.csc_required||delete e.fields.cvv,e}},{key:"get_integration_class",value:function(){return braintree.hostedFields}},{key:"do_integration_ready",value:function(){var t=this;return this.integration.on("cardTypeChange",function(e){return t.on_card_type_change(e)}),!this.csc_required&&d("input.js-wc-braintree-credit-card-payment-token:checked").val()&&this.teardown_braintree(),this.unblock_ui()}},{key:"handle_saved_payment_methods",value:function(){var e,t,n=this;return _get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"handle_saved_payment_methods",this).call(this),t=d("div.js-wc-braintree-credit-card-new-payment-method-form"),e=d("div.wc-braintree-hosted-field-card-csc-parent"),d("input.js-wc-braintree-credit-card-payment-token").change(function(){return d("input.js-wc-braintree-credit-card-payment-token:checked").val()?n.csc_required&&e.hasClass("form-row-last")?(e.removeClass("form-row-last").addClass("form-row-first"),t.after(e),n.refresh_braintree()):void 0:(n.csc_required&&e.hasClass("form-row-first")&&(e.removeClass("form-row-first").addClass("form-row-last"),t.find("div.wc-braintree-hosted-field-card-expiry-parent").after(e)),n.refresh_braintree())}).change()}},{key:"get_user_message",value:function(e){var t,n,r,i,a=[];if("CUSTOMER"===e.type)switch(e.code){case"HOSTED_FIELDS_FIELDS_EMPTY":this.csc_required&&a.push(this.params.cvv_missing),this.using_payment_token()||(a.push(this.params.card_number_missing),a.push(this.params.card_exp_date_invalid));break;case"HOSTED_FIELDS_FIELDS_INVALID":if(null!=e.details)for(t=0,n=(i=e.details.invalidFieldKeys).length;t<n;t++)switch(i[t]){case"number":a.push(this.params.card_number_invalid);break;case"cvv":a.push(this.params.cvv_length_invalid);break;case"expirationDate":a.push(this.params.card_exp_date_invalid)}}else"NETWORK"===e.type&&null!=e.details.originalError.error.message&&(r=e.details.originalError.error.message,/given name format is invalid/.test(r)&&a.push(this.params.first_name_unsupported_characters),/surname format is invalid/.test(r)&&a.push(this.params.last_name_unsupported_characters));return a.length?a.join("<br/>"):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"get_user_message",this).call(this)}},{key:"on_card_type_change",value:function(e){var t,n,r;if(null!=e.cards)return(t=d("#wc-braintree-credit-card-account-number-hosted")).attr("class",function(e,t){return t.replace(/(^|\s)card-type-\S+/g,"")}),e.cards.length?1===e.cards.length?(n=e.cards[0],d("input[name=wc-"+this.id_dasherized+"-card-type]").val(n.type),null!=n.type&&(r=n.type,0<=c.call(this.enabled_card_types,r))?t.addClass("card-type-"+n.type):t.addClass("card-type-invalid")):void 0:t.addClass("card-type-invalid")}},{key:"is_3d_secure_enabled",value:function(){return this.threeds.enabled&&null!=braintree.threeDSecure}},{key:"setup_integration",value:function(){var t=this;return this.threeds.enabled&&(this.threeds.enabled=this.client.getConfiguration().gatewayConfiguration.threeDSecureEnabled),this.is_3d_secure_enabled()?(d("input[name=wc-"+this.id_dasherized+"-3d-secure-enabled]").val(1),this.threeDSecure&&this.threeDSecure.teardown(),braintree.threeDSecure.create({version:2,client:this.client}).then(function(e){return t.threeDSecure=e,d(document.body).on("click","#wc-braintree-credit-card-3dsecure-container",function(e){return d(e.currentTarget).fadeOut(200),t.threeDSecure.cancelVerifyCard(),t.unblock_ui()}),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"setup_integration",t).call(t)}).catch(function(e){return t.handle_integration_error(e)})):_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"setup_integration",this).call(this)}},{key:"should_verify_3d_secure",value:function(e){var t=e.details.cardType;return this.is_3d_secure_enabled()&&"CreditCard"===e.type&&0<=c.call(this.threeds.card_types,t)}},{key:"should_verify_3d_secure_token",value:function(e){if(this.is_3d_secure_enabled()&&e.val()&&e.data("nonce")&&!e.data("verified"))return!0}},{key:"verify_3d_secure",value:function(e,t,n){var r=this,i=2<arguments.length&&void 0!==n?n:null,a=d("#billing_state").val(),o=d("#billing_country").val(),_=d("#shipping_state").val(),s=d("#shipping_country").val(),c=d("input[name=billing_first_name]").val()?{givenName:d("input[name=billing_first_name]").val().latinise(),surname:d("input[name=billing_last_name]").val().latinise(),phoneNumber:d("input[name=billing_phone]").val(),streetAddress:d("input[name=billing_address_1]").val(),extendedAddress:d("input[name=billing_address_2]").val(),locality:d("#billing_city").val(),region:"string"==typeof a&&a.length<=2?a:"",postalCode:d("input[name=billing_postcode]").val(),countryCodeAlpha2:"string"==typeof o&&o.length<=2?o:""}:{},u=d("input[name=shipping_first_name]").val()?{shippingGivenName:d("input[name=shipping_first_name]").val().latinise(),shippingSurname:d("input[name=shipping_last_name]").val().latinise(),shippingAddress:{streetAddress:d("input[name=shipping_address_1]").val(),extendedAddress:d("input[name=shipping_address_2]").val(),locality:d("input[name=shipping_city]").val(),region:"string"==typeof _&&_.length<=2?_:"",postalCode:d("input[name=shipping_postcode]").val(),countryCodeAlpha2:"string"==typeof s&&s.length<=2?s:""}}:{},l={nonce:e,amount:d("input[name=wc-"+this.id_dasherized+"-3d-secure-order-total]").val(),email:d("input[name=billing_email]").val(),billingAddress:c,additionalInformation:u,onLookupComplete:function(e,t){r.log("3D Secure lookup complete.",e);try{return t()}catch(e){return r.handle_payment_error(e)}}};return"1"===d("input[name=wc-"+this.id_dasherized+"-cart-contains-subscription]").val()&&(l.challengeRequested=!0),this.log("Verifying 3D Secure.",l),this.threeDSecure.verifyCard(l).then(function(e){return r.log("3D Secure response received.",e),r.threeds.liability_shift_always_required&&!e.liabilityShifted?r.render_error(r.threeds.failure_message):(null!=i&&i.data("verified",!0),d("input[name=wc-"+r.id_dasherized+"-3d-secure-verified]").val(1),r.submit_form(e.nonce))}).catch(function(e){return r.handle_payment_error(e)})}},{key:"show_integration_ui",value:function(){return s(this,e),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"show_integration_ui",this).call(this),d(".wc-braintree-hosted-field-parent").show()}},{key:"hide_integration_ui",value:function(){return s(this,e),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"hide_integration_ui",this).call(this),d(".wc-braintree-hosted-field-parent").hide()}}]),o),d(document.body).trigger("wc_braintree_credit_card_payment_form_handler_loaded"),n=window.WC_Braintree_PayPal_Payment_Form_Handler=(_inherits(i,WC_Braintree_Payment_Form_Handler),_createClass(i,[{key:"init",value:function(){var t=this;return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this),d("input[name=wc_"+this.id+"_payment_nonce]").val(this.cart_payment_nonce),d(document.body).on("click",'input[name="payment_method"], input.js-wc-braintree-paypal-payment-token',function(){return t.toggle_order_button()}),d(document.body).on("payment_method_selected",function(){return t.toggle_order_button()}),d(document.body).on("click",".wc-braintree-paypal-account .cancel",function(e){return e.preventDefault(),d(e.currentTarget).parent().remove(),t.setup_braintree()})}},{key:"toggle_order_button",value:function(){return!this.is_selected()||this.has_payment_nonce()||this.using_payment_token()?d("#place_order").show():d("#place_order").hide()}},{key:"verify_form",value:function(){var e=_get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"verify_form",this).call(this);return this.has_payment_nonce()||this.using_payment_token()||this.render_error(this.must_login_message),e}},{key:"handle_payment_error",value:function(e){return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"handle_payment_error",this).call(this,e),this.cart_payment_nonce=!1,this.setup_braintree()}},{key:"get_integration_class",value:function(){return braintree.paypalCheckout}},{key:"setup_braintree",value:function(){return this.cart_payment_nonce?this.unblock_ui():(_get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"setup_braintree",this).call(this),d("input.js-wc-braintree-paypal-tokenize-payment-method").prop("disabled",!1),this.toggle_order_button())}},{key:"do_integration_ready",value:function(){var e,t=this;return s(this,n),this.cart_payment_nonce?this.unblock_ui():(e=this.is_single_use()?"checkout":"vault",this.render_button(this.integration.createPayment({flow:e,amount:this.get_order_amount(),currency:this.get_store_currency(),locale:this.get_store_locale()}),this.get_button_styles(),"#wc_braintree_paypal_container").then(function(){return d("#wc_braintree_paypal_container").css({width:"100%"}),t.unblock_ui()}).catch(function(e){return t.log("Could not render the PayPal button. "+e.message,e),t.hide_integration_ui(),t.unblock_ui()}))}},{key:"render_button",value:function(e,t,n){var r,i,a=this;return d(n).html(""),r=this.is_paypal_credit_enabled&&"USD"===this.get_store_currency()?{allowed:[paypal.FUNDING.CREDIT]}:{disallowed:[paypal.FUNDING.CREDIT]},i={env:this.is_test_environment?"sandbox":"production",commit:this.button_is_pay_now(),style:t,funding:r,payment:function(){return e},onAuthorize:function(e,t){return a.on_authorize(e,t)},onError:function(e){return a.handle_integration_error(e)}},paypal.Button.render(i,n)}},{key:"button_is_pay_now",value:function(){return!d("form#add_payment_method").length}},{key:"get_button_styles",value:function(){return this.button_styles}},{key:"on_authorize",value:function(e){var t=this;return s(this,n),this.block_ui(),this.integration.tokenizePayment(e).then(function(e){return t.log("Payment method tokenized.",e),t.set_payment_method(e)}).catch(function(e){return t.handle_payment_error(e),t.unblock_ui()})}},{key:"set_payment_method",value:function(e){return d("input[name=wc_"+this.id+"_payment_nonce]").val(e.nonce),d("#wc_braintree_paypal_container").html(this.get_linked_account_html(e.details)),this.is_single_use()&&d("input.js-wc-braintree-paypal-tokenize-payment-method").prop("disabled",!0),d("#place_order").show(),this.form.submit()}},{key:"handle_saved_payment_methods",value:function(){var t=this;return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"handle_saved_payment_methods",this).call(this),d("input.js-wc-braintree-paypal-tokenize-payment-method").change(function(e){if(null!=t.integration&&d(e.target).is(":visible"))return t.block_ui(),t.do_integration_ready()}).change()}},{key:"get_linked_account_html",value:function(e){var t;return s(this,n),t=d("<div class='wc-"+this.id_dasherized+"-account'></div>"),null!=e.firstName&&null!=e.lastName&&t.append("<span class='name'>"+e.firstName+" "+e.lastName+"</span>"),t.append("<span class='email'>"+e.email+"</span>"),t.append("<a href='#' class='cancel'>Cancel</a>"),t}},{key:"is_single_use",value:function(){var e=d("input[name=wc-braintree-paypal-tokenize-payment-method]");return 0===e.length||("checkbox"===e.attr("type")?!e.is(":checked"):!e.val())}},{key:"get_order_amount",value:function(){return d("input[name=wc_braintree_paypal_amount]").val()}},{key:"get_store_currency",value:function(){return d("input[name=wc_braintree_paypal_currency]").val()}},{key:"get_store_locale",value:function(){return d("input[name=wc_braintree_paypal_locale]").val()}},{key:"is_sdk_ready",value:function(){return _get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"is_sdk_ready",this).call(this)&&"undefined"!=typeof paypal&&null!==paypal}}]),i),d(document.body).trigger("wc_braintree_paypal_payment_form_handler_loaded"),window.WC_Braintree_PayPal_Cart_Handler=(_inherits(a,WC_Braintree_PayPal_Payment_Form_Handler),_createClass(a,[{key:"button_is_pay_now",value:function(){return!1}},{key:"set_payment_method",value:function(e){var t=this;if(null!=e.nonce)return e.wp_nonce=this.set_payment_method_nonce,d.ajax({type:"POST",url:this.cart_handler_url,data:e,dataType:"json"}).done(function(e){if(t.log("Cart response received.",e),null!=e.redirect_url)return window.location=e.redirect_url}).fail(function(e){return t.log("Error setting the PayPal cart data.",e,"error")}).always(function(){return t.unblock_ui()})}},{key:"is_single_use",value:function(){return"1"===d("input[name=wc_braintree_paypal_single_use]").val()}},{key:"has_payment_nonce",value:function(){return!1}}]),a),d(document.body).trigger("wc_braintree_paypal_cart_handler_loaded"),r=window.WC_Braintree_PayPal_Product_Button_Handler=(_inherits(_,WC_Braintree_PayPal_Payment_Form_Handler),_createClass(_,[{key:"handle_product_page",value:function(){return this.product_form={element:d("form.cart"),is_variable:d("form.cart").hasClass("variations_form")},this.should_validate_product_data&&this.product_form.element.on("change",this.validate_product_button),this.product_form.is_variable&&d(document.body).on("woocommerce_variation_has_changed",this.validate_product_button),this.validate_product_button()}},{key:"do_integration_ready",value:function(){if(s(this,r),_get(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"do_integration_ready",this).call(this),this.is_product_page)return this.validate_product_button()}},{key:"validate_product_button",value:function(){if(s(this,r),this.product_form.is_variable&&this.product_form.element.find(".single_add_to_cart_button").is(".disabled"))this.hide_button();else{if(!this.should_validate_product_data)return this.show_button();this.validate_product_data(this.show_button,this.hide_button)}}},{key:"validate_product_data",value:function(t,n){return s(this,r),d.ajax({type:"POST",url:this.validate_product_url,data:{wp_nonce:this.validate_product_nonce,product_id:d("input[name=wc_braintree_paypal_product_id]").val(),cart_form:d("form.cart").serialize()}}).done(function(e){return(e.data.is_valid?t:n)()}).fail(n)}},{key:"hide_button",value:function(){return d("#wc_braintree_paypal_container").slideUp()}},{key:"show_button",value:function(){return d("#wc_braintree_paypal_container").slideDown()}},{key:"button_is_pay_now",value:function(){return!1}},{key:"set_payment_method",value:function(e){var t,n=this;if(null!=e.nonce)return(t=e).wp_nonce=this.product_checkout_nonce,t.product_id=d("input[name=wc_braintree_paypal_product_id]").val(),t.cart_form=d("form.cart").serialize(),d.ajax({type:"POST",url:this.product_checkout_url,data:t,dataType:"json"}).done(function(e){if(n.log("Cart response received.",e),null!=e.redirect_url)return window.location=e.redirect_url}).fail(function(e){return n.log("Error setting the PayPal cart data.",e,"error")}).always(function(){return n.unblock_ui()})}},{key:"is_single_use",value:function(){return"1"===d("input[name=wc_braintree_paypal_single_use]").val()}},{key:"has_payment_nonce",value:function(){return!1}}]),_),d(document.body).trigger("wc_braintree_paypal_product_button_handler_loaded")})}).call(void 0);
class-wc-braintree.php CHANGED
@@ -22,25 +22,10 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- // if WooCommerce is inactive, render a notice and bail
30
- if ( ! WC_Braintree::is_woocommerce_active() ) {
31
-
32
- add_action( 'admin_notices', function() {
33
-
34
- echo '<div class="error"><p>';
35
- esc_html_e( 'WooCommerce PayPal Powered by Braintree is inactive because WooCommerce is not installed.', 'woocommerce-gateway-paypal-powered-by-braintree' );
36
- echo '</p></div>';
37
-
38
- } );
39
-
40
- return;
41
- }
42
-
43
-
44
  /**
45
  * # WooCommerce Gateway Braintree Main Plugin Class
46
  *
@@ -84,11 +69,11 @@ if ( ! WC_Braintree::is_woocommerce_active() ) {
84
  * + `_wc_braintree_customer_id` - the braintree customer ID for the user
85
  *
86
  */
87
- class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
88
 
89
 
90
  /** plugin version number */
91
- const VERSION = '2.3.11';
92
 
93
  /** Braintree JS SDK version */
94
  const BRAINTREE_JS_SDK_VERSION = '3.48.0';
@@ -146,6 +131,9 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
146
  // include required files
147
  $this->includes();
148
 
 
 
 
149
  // handle Braintree Auth connect/disconnect
150
  add_action( 'admin_init', [ $this, 'handle_auth_connect' ] );
151
  add_action( 'admin_init', [ $this, 'handle_auth_disconnect' ] );
@@ -191,6 +179,112 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
191
  }
192
 
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  /**
195
  * Gets the deprecated hooks and their replacements, if any.
196
  *
@@ -248,7 +342,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
248
  }
249
 
250
  // if there was already a successful disconnect, just display a notice
251
- if ( $connected = WC_Braintree_Framework\SV_WC_Helper::get_request( 'wc_braintree_connected' ) ) {
252
 
253
  if ( $connected ) {
254
  $message = __( 'Connected successfully.', 'woocommerce-gateway-paypal-powered-by-braintree' );
@@ -270,7 +364,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
270
  return;
271
  }
272
 
273
- $nonce = WC_Braintree_Framework\SV_WC_Helper::get_request( 'wc_paypal_braintree_admin_nonce' );
274
 
275
  // if no nonce is present, then this probably wasn't a connection response
276
  if ( ! $nonce ) {
@@ -287,7 +381,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
287
  wp_die( __( 'Invalid connection request', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
288
  }
289
 
290
- if ( $access_token = sanitize_text_field( urldecode( WC_Braintree_Framework\SV_WC_Helper::get_request( 'braintree_access_token' ) ) ) ) {
291
 
292
  update_option( 'wc_braintree_auth_access_token', $access_token );
293
 
@@ -323,7 +417,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
323
  }
324
 
325
  // if there was already a successful disconnect, just display a notice
326
- if ( WC_Braintree_Framework\SV_WC_Helper::get_request( 'wc_braintree_disconnected' ) ) {
327
 
328
  $this->get_admin_notice_handler()->add_admin_notice(
329
  __( 'Disconnected successfully.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
@@ -338,11 +432,11 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
338
  }
339
 
340
  // if this is not a disconnect request, bail
341
- if ( ! WC_Braintree_Framework\SV_WC_Helper::get_request( 'disconnect_paypal_braintree' ) ) {
342
  return;
343
  }
344
 
345
- $nonce = WC_Braintree_Framework\SV_WC_Helper::get_request( 'wc_paypal_braintree_admin_nonce' );
346
 
347
  // if no nonce is present, then this probably wasn't a disconnect request
348
  if ( ! $nonce ) {
@@ -371,7 +465,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
371
  */
372
  public function maybe_init_paypal_cart() {
373
 
374
- WC_Braintree_Framework\SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '2.3.0' );
375
  }
376
 
377
 
@@ -383,7 +477,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
383
  */
384
  public function get_paypal_cart_instance() {
385
 
386
- WC_Braintree_Framework\SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '2.3.0' );
387
  }
388
 
389
 
@@ -438,6 +532,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
438
  // show any dependency notices
439
  parent::add_admin_notices();
440
 
 
441
  $credit_card_gateway = $this->get_gateway( self::CREDIT_CARD_GATEWAY_ID );
442
 
443
  if ( $credit_card_gateway->is_advanced_fraud_tool_enabled() && ! $this->get_admin_notice_handler()->is_notice_dismissed( 'fraud-tool-notice' ) ) {
@@ -461,7 +556,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
461
  $this->get_admin_notice_handler()->add_admin_notice(
462
  sprintf(
463
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
464
- __( 'PayPal powered by Braintree is almost ready. To get started, %1$sconnect your Braintree account%2$s.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
465
  '<a href="' . esc_url( $this->get_settings_url() ) . '">', '</a>'
466
  ), 'install-notice', array( 'notice_class' => 'updated' )
467
  );
@@ -473,7 +568,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
473
  $this->get_admin_notice_handler()->add_admin_notice(
474
  sprintf(
475
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
476
- __( 'Upgrade successful! WooCommerce Braintree deactivated, and PayPal Powered by Braintree has been %1$sconfigured with your previous settings%2$s.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
477
  '<a href="' . esc_url( $this->get_settings_url() ) . '">', '</a>'
478
  ), 'install-notice', array( 'notice_class' => 'updated' )
479
  );
@@ -481,8 +576,8 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
481
  }
482
 
483
  // SSL check (only when PayPal is enabled in production mode)
484
- if ( isset( $paypal_settings['enabled'] ) && 'yes' == $paypal_settings['enabled'] ) {
485
- if ( isset( $paypal_settings['environment'] ) && 'production' == $paypal_settings['environment'] ) {
486
 
487
  if ( ! wc_checkout_is_https() && ! $this->get_admin_notice_handler()->is_notice_dismissed( 'ssl-recommended-notice' ) ) {
488
 
@@ -574,7 +669,7 @@ class WC_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin {
574
  * @return string the plugin name
575
  */
576
  public function get_plugin_name() {
577
- return __( 'WooCommerce PayPal Powered by Braintree Gateway', 'woocommerce-gateway-paypal-powered-by-braintree' );
578
  }
579
 
580
 
@@ -663,7 +758,3 @@ function wc_braintree() {
663
 
664
  return WC_Braintree::instance();
665
  }
666
-
667
-
668
- // fire it up!
669
- wc_braintree();
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * # WooCommerce Gateway Braintree Main Plugin Class
31
  *
69
  * + `_wc_braintree_customer_id` - the braintree customer ID for the user
70
  *
71
  */
72
+ class WC_Braintree extends Framework\SV_WC_Payment_Gateway_Plugin {
73
 
74
 
75
  /** plugin version number */
76
+ const VERSION = '2.4.0';
77
 
78
  /** Braintree JS SDK version */
79
  const BRAINTREE_JS_SDK_VERSION = '3.48.0';
131
  // include required files
132
  $this->includes();
133
 
134
+ // add class aliases for framework classes renamed in 2.4.0.
135
+ $this->add_framework_class_aliases();
136
+
137
  // handle Braintree Auth connect/disconnect
138
  add_action( 'admin_init', [ $this, 'handle_auth_connect' ] );
139
  add_action( 'admin_init', [ $this, 'handle_auth_disconnect' ] );
179
  }
180
 
181
 
182
+ /**
183
+ * Adds class aliases for framework classes renamed in 2.4.0.
184
+ *
185
+ * TODO: remove this method by version 3.0.0 or by 2021-06-10 {WV 2020-06-10}
186
+ *
187
+ * @since 2.4.0
188
+ */
189
+ private function add_framework_class_aliases() {
190
+
191
+ // framework classes available in version 2.3.x of the plugin
192
+ $class_names = [
193
+ 'Addresses\\Address',
194
+ 'Addresses\\Customer_Address',
195
+ 'Admin\\Setup_Wizard',
196
+ 'Payment_Gateway\\Admin\\Setup_Wizard',
197
+ 'Payment_Gateway\\Handlers\\Capture',
198
+ 'Payment_Gateway\\REST_API',
199
+ 'Plugin\\Lifecycle',
200
+ 'REST_API',
201
+ 'SV_WC_API_Base',
202
+ 'SV_WC_API_Exception',
203
+ 'SV_WC_API_JSON_Request',
204
+ 'SV_WC_API_JSON_Response',
205
+ 'SV_WC_API_Request',
206
+ 'SV_WC_API_Response',
207
+ 'SV_WC_API_XML_Request',
208
+ 'SV_WC_API_XML_Response',
209
+ 'SV_WC_Admin_Notice_Handler',
210
+ 'SV_WC_Data_Compatibility',
211
+ 'SV_WC_DateTime',
212
+ 'SV_WC_Helper',
213
+ 'SV_WC_Hook_Deprecator',
214
+ 'SV_WC_Order_Compatibility',
215
+ 'SV_WC_Payment_Gateway',
216
+ 'SV_WC_Payment_Gateway_API',
217
+ 'SV_WC_Payment_Gateway_API_Authorization_Response',
218
+ 'SV_WC_Payment_Gateway_API_Create_Payment_Token_Response',
219
+ 'SV_WC_Payment_Gateway_API_Customer_Response',
220
+ 'SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response',
221
+ 'SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response',
222
+ 'SV_WC_Payment_Gateway_API_Payment_Notification_Response',
223
+ 'SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response',
224
+ 'SV_WC_Payment_Gateway_API_Request',
225
+ 'SV_WC_Payment_Gateway_API_Response',
226
+ 'SV_WC_Payment_Gateway_API_Response_Message_Helper',
227
+ 'SV_WC_Payment_Gateway_Admin_Order',
228
+ 'SV_WC_Payment_Gateway_Admin_Payment_Token_Editor',
229
+ 'SV_WC_Payment_Gateway_Admin_User_Handler',
230
+ 'SV_WC_Payment_Gateway_Apple_Pay',
231
+ 'SV_WC_Payment_Gateway_Apple_Pay_AJAX',
232
+ 'SV_WC_Payment_Gateway_Apple_Pay_API',
233
+ 'SV_WC_Payment_Gateway_Apple_Pay_API_Request',
234
+ 'SV_WC_Payment_Gateway_Apple_Pay_API_Response',
235
+ 'SV_WC_Payment_Gateway_Apple_Pay_Admin',
236
+ 'SV_WC_Payment_Gateway_Apple_Pay_Frontend',
237
+ 'SV_WC_Payment_Gateway_Apple_Pay_Orders',
238
+ 'SV_WC_Payment_Gateway_Apple_Pay_Payment_Response',
239
+ 'SV_WC_Payment_Gateway_Direct',
240
+ 'SV_WC_Payment_Gateway_Exception',
241
+ 'SV_WC_Payment_Gateway_Helper',
242
+ 'SV_WC_Payment_Gateway_Hosted',
243
+ 'SV_WC_Payment_Gateway_Integration',
244
+ 'SV_WC_Payment_Gateway_My_Payment_Methods',
245
+ 'SV_WC_Payment_Gateway_Payment_Form',
246
+ 'SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response',
247
+ 'SV_WC_Payment_Gateway_Payment_Token',
248
+ 'SV_WC_Payment_Gateway_Payment_Tokens_Handler',
249
+ 'SV_WC_Payment_Gateway_Plugin',
250
+ 'SV_WC_Payment_Gateway_Privacy',
251
+ 'SV_WC_Plugin',
252
+ 'SV_WC_Plugin_Compatibility',
253
+ 'SV_WC_Plugin_Dependencies',
254
+ 'SV_WC_Plugin_Exception',
255
+ 'SV_WC_Product_Compatibility',
256
+ 'SV_WP_Admin_Message_Handler',
257
+ 'SV_WP_Async_Request',
258
+ 'SV_WP_Background_Job_Handler',
259
+ 'SV_WP_Job_Batch_Handler',
260
+ ];
261
+
262
+ // subscriptions
263
+ if ( $this->is_subscriptions_active() ) {
264
+ $class_names[] = 'SV_WC_Payment_Gateway_Integration_Subscriptions';
265
+ }
266
+
267
+ // pre-orders
268
+ if ( $this->is_pre_orders_active() ) {
269
+ $class_names[] = 'SV_WC_Payment_Gateway_Integration_Pre_Orders';
270
+ }
271
+
272
+ // require classes that are not loaded by default to prevent 'Class not found' warnings while defining aliases
273
+ require_once $this->get_framework_path() . '/utilities/class-sv-wp-async-request.php';
274
+ require_once $this->get_framework_path() . '/utilities/class-sv-wp-background-job-handler.php';
275
+ require_once $this->get_framework_path() . '/utilities/class-sv-wp-job-batch-handler.php';
276
+
277
+ require_once $this->get_payment_gateway_framework_path() . '/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php';
278
+ require_once $this->get_payment_gateway_framework_path() . '/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php';
279
+ require_once $this->get_payment_gateway_framework_path() . '/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php';
280
+ require_once $this->get_payment_gateway_framework_path() . '/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php';
281
+
282
+ foreach ( $class_names as $class_name ) {
283
+ class_alias( "SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\{$class_name}", "WC_Braintree\\Plugin_Framework\\{$class_name}" );
284
+ }
285
+ }
286
+
287
+
288
  /**
289
  * Gets the deprecated hooks and their replacements, if any.
290
  *
342
  }
343
 
344
  // if there was already a successful disconnect, just display a notice
345
+ if ( $connected = Framework\SV_WC_Helper::get_requested_value( 'wc_braintree_connected' ) ) {
346
 
347
  if ( $connected ) {
348
  $message = __( 'Connected successfully.', 'woocommerce-gateway-paypal-powered-by-braintree' );
364
  return;
365
  }
366
 
367
+ $nonce = Framework\SV_WC_Helper::get_requested_value( 'wc_paypal_braintree_admin_nonce' );
368
 
369
  // if no nonce is present, then this probably wasn't a connection response
370
  if ( ! $nonce ) {
381
  wp_die( __( 'Invalid connection request', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
382
  }
383
 
384
+ if ( $access_token = sanitize_text_field( urldecode( Framework\SV_WC_Helper::get_requested_value( 'braintree_access_token' ) ) ) ) {
385
 
386
  update_option( 'wc_braintree_auth_access_token', $access_token );
387
 
417
  }
418
 
419
  // if there was already a successful disconnect, just display a notice
420
+ if ( Framework\SV_WC_Helper::get_requested_value( 'wc_braintree_disconnected' ) ) {
421
 
422
  $this->get_admin_notice_handler()->add_admin_notice(
423
  __( 'Disconnected successfully.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
432
  }
433
 
434
  // if this is not a disconnect request, bail
435
+ if ( ! Framework\SV_WC_Helper::get_requested_value( 'disconnect_paypal_braintree' ) ) {
436
  return;
437
  }
438
 
439
+ $nonce = Framework\SV_WC_Helper::get_requested_value( 'wc_paypal_braintree_admin_nonce' );
440
 
441
  // if no nonce is present, then this probably wasn't a disconnect request
442
  if ( ! $nonce ) {
465
  */
466
  public function maybe_init_paypal_cart() {
467
 
468
+ wc_deprecated_function( __METHOD__, '2.3.0' );
469
  }
470
 
471
 
477
  */
478
  public function get_paypal_cart_instance() {
479
 
480
+ wc_deprecated_function( __METHOD__, '2.3.0' );
481
  }
482
 
483
 
532
  // show any dependency notices
533
  parent::add_admin_notices();
534
 
535
+ /** @var \WC_Gateway_Braintree_Credit_Card $credit_card_gateway */
536
  $credit_card_gateway = $this->get_gateway( self::CREDIT_CARD_GATEWAY_ID );
537
 
538
  if ( $credit_card_gateway->is_advanced_fraud_tool_enabled() && ! $this->get_admin_notice_handler()->is_notice_dismissed( 'fraud-tool-notice' ) ) {
556
  $this->get_admin_notice_handler()->add_admin_notice(
557
  sprintf(
558
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
559
+ __( 'Braintree for WooCommerce is almost ready. To get started, %1$sconnect your Braintree account%2$s.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
560
  '<a href="' . esc_url( $this->get_settings_url() ) . '">', '</a>'
561
  ), 'install-notice', array( 'notice_class' => 'updated' )
562
  );
568
  $this->get_admin_notice_handler()->add_admin_notice(
569
  sprintf(
570
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
571
+ __( 'Upgrade successful! WooCommerce Braintree deactivated, and Braintree for WooCommerce has been %1$sconfigured with your previous settings%2$s.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
572
  '<a href="' . esc_url( $this->get_settings_url() ) . '">', '</a>'
573
  ), 'install-notice', array( 'notice_class' => 'updated' )
574
  );
576
  }
577
 
578
  // SSL check (only when PayPal is enabled in production mode)
579
+ if ( isset( $paypal_settings['enabled'] ) && 'yes' === $paypal_settings['enabled'] ) {
580
+ if ( isset( $paypal_settings['environment'] ) && 'production' === $paypal_settings['environment'] ) {
581
 
582
  if ( ! wc_checkout_is_https() && ! $this->get_admin_notice_handler()->is_notice_dismissed( 'ssl-recommended-notice' ) ) {
583
 
669
  * @return string the plugin name
670
  */
671
  public function get_plugin_name() {
672
+ return __( 'Braintree for WooCommerce Payment Gateway', 'woocommerce-gateway-paypal-powered-by-braintree' );
673
  }
674
 
675
 
758
 
759
  return WC_Braintree::instance();
760
  }
 
 
 
 
i18n/languages/woocommerce-gateway-paypal-powered-by-braintree.pot CHANGED
@@ -1,11 +1,11 @@
1
  # Copyright (C) 2020 WooCommerce
2
- # This file is distributed under the same license as the WooCommerce PayPal Powered by Braintree Gateway package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce PayPal Powered by Braintree Gateway 2.3.11\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
- "POT-Creation-Date: 2020-06-03 21:19:24+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -13,58 +13,52 @@ msgstr ""
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
- #: class-wc-braintree.php:35
17
- msgid ""
18
- "WooCommerce PayPal Powered by Braintree is inactive because WooCommerce is "
19
- "not installed."
20
- msgstr ""
21
-
22
- #: class-wc-braintree.php:254
23
  msgid "Connected successfully."
24
  msgstr ""
25
 
26
- #: class-wc-braintree.php:257
27
  msgid "There was an error connecting your Braintree account. Please try again."
28
  msgstr ""
29
 
30
- #: class-wc-braintree.php:287
31
  msgid "Invalid connection request"
32
  msgstr ""
33
 
34
- #: class-wc-braintree.php:329
35
  msgid "Disconnected successfully."
36
  msgstr ""
37
 
38
- #: class-wc-braintree.php:354
39
  msgid "Invalid disconnect request"
40
  msgstr ""
41
 
42
- #: class-wc-braintree.php:446
43
  msgid ""
44
  "Heads up! You've enabled advanced fraud tools for Braintree. Please make "
45
  "sure that advanced fraud tools are also enabled in your Braintree account. "
46
  "Need help? See the %1$sdocumentation%2$s."
47
  msgstr ""
48
 
49
- #: class-wc-braintree.php:464
50
  msgid ""
51
- "PayPal powered by Braintree is almost ready. To get started, %1$sconnect "
52
- "your Braintree account%2$s."
53
  msgstr ""
54
 
55
- #: class-wc-braintree.php:476
56
  msgid ""
57
- "Upgrade successful! WooCommerce Braintree deactivated, and PayPal Powered "
58
- "by Braintree has been %1$sconfigured with your previous settings%2$s."
59
  msgstr ""
60
 
61
- #: class-wc-braintree.php:489
62
  msgid ""
63
  "WooCommerce is not being forced over SSL -- Using PayPal with Braintree "
64
  "requires that checkout to be forced over SSL."
65
  msgstr ""
66
 
67
- #: class-wc-braintree.php:524
68
  #. translators: Placeholders: %1$s - payment gateway name tag, %2$s - <a> tag,
69
  #. %3$s - </a> tag
70
  msgid ""
@@ -73,19 +67,19 @@ msgid ""
73
  msgstr ""
74
 
75
  #. Plugin Name of the plugin/theme
76
- msgid "WooCommerce PayPal Powered by Braintree Gateway"
77
  msgstr ""
78
 
79
- #: class-wc-braintree.php:630
80
  msgid "Configure Credit Card"
81
  msgstr ""
82
 
83
- #: class-wc-braintree.php:630
84
  msgid "Configure PayPal"
85
  msgstr ""
86
 
87
- #: includes/PayPal/Buttons/Abstract_Button.php:510
88
- #: includes/class-wc-gateway-braintree.php:565
89
  msgid "Cancel"
90
  msgstr ""
91
 
@@ -96,41 +90,41 @@ msgid ""
96
  "method."
97
  msgstr ""
98
 
99
- #: includes/api/class-wc-braintree-api.php:198
100
  msgid "The billing address for this transaction does not match the cardholders."
101
  msgstr ""
102
 
103
- #: includes/api/class-wc-braintree-api.php:202
104
  msgid "The CSC for the transaction was invalid or incorrect."
105
  msgstr ""
106
 
107
- #: includes/api/class-wc-braintree-api.php:544
108
  msgid ""
109
  "Invalid Credentials, please double-check your API credentials (Merchant ID, "
110
  "Public Key, Private Key, and Merchant Account ID) and try again."
111
  msgstr ""
112
 
113
- #: includes/api/class-wc-braintree-api.php:548
114
  msgid ""
115
  "Authorization Failed, please verify the user for the API credentials "
116
  "provided can perform transactions and that the request data is correct."
117
  msgstr ""
118
 
119
- #: includes/api/class-wc-braintree-api.php:552
120
  msgid "Braintree is currently down for maintenance, please try again later."
121
  msgstr ""
122
 
123
- #: includes/api/class-wc-braintree-api.php:556
124
  msgid "The record cannot be found, please contact support."
125
  msgstr ""
126
 
127
- #: includes/api/class-wc-braintree-api.php:560
128
  msgid ""
129
  "Braintree encountered an error when processing your request, please try "
130
  "again later or contact support."
131
  msgstr ""
132
 
133
- #: includes/api/class-wc-braintree-api.php:564
134
  msgid ""
135
  "Braintree cannot verify your server's SSL certificate. Please contact your "
136
  "hosting provider or try again later."
@@ -175,27 +169,27 @@ msgstr ""
175
  msgid "Last name contains unsupported characters"
176
  msgstr ""
177
 
178
- #: includes/class-wc-gateway-braintree-credit-card.php:199
179
  msgid "Basic"
180
  msgstr ""
181
 
182
- #: includes/class-wc-gateway-braintree-credit-card.php:200
183
  msgid "Advanced"
184
  msgstr ""
185
 
186
- #: includes/class-wc-gateway-braintree-credit-card.php:205
187
  msgid "Kount Direct"
188
  msgstr ""
189
 
190
- #: includes/class-wc-gateway-braintree-credit-card.php:212
191
  msgid "Fraud Settings"
192
  msgstr ""
193
 
194
- #: includes/class-wc-gateway-braintree-credit-card.php:216
195
  msgid "Fraud Tool"
196
  msgstr ""
197
 
198
- #: includes/class-wc-gateway-braintree-credit-card.php:219
199
  msgid ""
200
  "Select the fraud tool you want to use. Basic is enabled by default and "
201
  "requires no additional configuration. Advanced requires you to enable "
@@ -203,66 +197,66 @@ msgid ""
203
  "you must contact Braintree support."
204
  msgstr ""
205
 
206
- #: includes/class-wc-gateway-braintree-credit-card.php:223
207
  msgid "Kount merchant ID"
208
  msgstr ""
209
 
210
- #: includes/class-wc-gateway-braintree-credit-card.php:226
211
  msgid "Speak with your account management team at Braintree to get this."
212
  msgstr ""
213
 
214
- #: includes/class-wc-gateway-braintree-credit-card.php:258
215
  msgid "3D Secure"
216
  msgstr ""
217
 
218
- #: includes/class-wc-gateway-braintree-credit-card.php:260
219
  msgid ""
220
  "3D Secure benefits cardholders and merchants by providing an additional "
221
  "layer of verification using Verified by Visa, MasterCard SecureCode, and "
222
  "American Express SafeKey. %1$sLearn more about 3D Secure%2$s."
223
  msgstr ""
224
 
225
- #: includes/class-wc-gateway-braintree-credit-card.php:263
226
  msgid "Level"
227
  msgstr ""
228
 
229
- #: includes/class-wc-gateway-braintree-credit-card.php:265
230
  msgid "Only accept payments when the liability is shifted"
231
  msgstr ""
232
 
233
- #: includes/class-wc-gateway-braintree-credit-card.php:268
234
  msgid "Standard"
235
  msgstr ""
236
 
237
- #: includes/class-wc-gateway-braintree-credit-card.php:269
238
  msgid "Strict"
239
  msgstr ""
240
 
241
- #: includes/class-wc-gateway-braintree-credit-card.php:273
242
  msgid "Supported Card Types"
243
  msgstr ""
244
 
245
- #: includes/class-wc-gateway-braintree-credit-card.php:276
246
  msgid "3D Secure validation will only occur for these cards."
247
  msgstr ""
248
 
249
- #: includes/class-wc-gateway-braintree-credit-card.php:298
250
  msgid "Card Verification (CSC)"
251
  msgstr ""
252
 
253
- #: includes/class-wc-gateway-braintree-credit-card.php:299
254
  msgid "Display and Require the Card Security Code (CVV/CID) field on checkout"
255
  msgstr ""
256
 
257
- #: includes/class-wc-gateway-braintree-credit-card.php:950
258
- #: includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php:138
259
  msgid ""
260
  "We cannot process your order with the payment information that you "
261
  "provided. Please use an alternate payment method."
262
  msgstr ""
263
 
264
- #: includes/class-wc-gateway-braintree-credit-card.php:958
265
- #: includes/class-wc-gateway-braintree.php:188
266
  msgid ""
267
  "Oops, there was a temporary payment error. Please try another payment "
268
  "method or contact us to complete your transaction."
@@ -276,208 +270,209 @@ msgstr ""
276
  msgid "Allow customers to securely pay using their PayPal account via Braintree."
277
  msgstr ""
278
 
279
- #: includes/class-wc-gateway-braintree-paypal.php:183
280
  msgid "Token ID"
281
  msgstr ""
282
 
283
- #: includes/class-wc-gateway-braintree-paypal.php:188
284
  msgid "Email"
285
  msgstr ""
286
 
287
- #: includes/class-wc-gateway-braintree-paypal.php:226
288
  msgid "Use a new PayPal account"
289
  msgstr ""
290
 
291
- #: includes/class-wc-gateway-braintree-paypal.php:230
292
  msgid "PayPal Accounts"
293
  msgstr ""
294
 
295
- #: includes/class-wc-gateway-braintree-paypal.php:251
296
  msgid "Unlink"
297
  msgstr ""
298
 
299
- #: includes/class-wc-gateway-braintree-paypal.php:273
300
  msgid "Button Appearance"
301
  msgstr ""
302
 
303
- #: includes/class-wc-gateway-braintree-paypal.php:278
304
  msgid "Button Color"
305
  msgstr ""
306
 
307
- #: includes/class-wc-gateway-braintree-paypal.php:280
308
  msgid "Gold"
309
  msgstr ""
310
 
311
- #: includes/class-wc-gateway-braintree-paypal.php:281
312
  msgid "Blue"
313
  msgstr ""
314
 
315
- #: includes/class-wc-gateway-braintree-paypal.php:282
316
  msgid "Silver"
317
  msgstr ""
318
 
319
- #: includes/class-wc-gateway-braintree-paypal.php:283
320
  msgid "White"
321
  msgstr ""
322
 
323
- #: includes/class-wc-gateway-braintree-paypal.php:284
324
  msgid "Black"
325
  msgstr ""
326
 
327
- #: includes/class-wc-gateway-braintree-paypal.php:291
328
  msgid "Button Size"
329
  msgstr ""
330
 
331
- #: includes/class-wc-gateway-braintree-paypal.php:293
332
  msgid "Medium"
333
  msgstr ""
334
 
335
- #: includes/class-wc-gateway-braintree-paypal.php:294
336
  msgid "Large"
337
  msgstr ""
338
 
339
- #: includes/class-wc-gateway-braintree-paypal.php:295
340
  msgid "Responsive"
341
  msgstr ""
342
 
343
- #: includes/class-wc-gateway-braintree-paypal.php:302
344
  msgid "Button Shape"
345
  msgstr ""
346
 
347
- #: includes/class-wc-gateway-braintree-paypal.php:311
348
  msgid "PayPal Credit"
349
  msgstr ""
350
 
351
- #: includes/class-wc-gateway-braintree-paypal.php:314
352
  msgid "Show the PayPal credit button beneath the standard PayPal button"
353
  msgstr ""
354
 
355
- #: includes/class-wc-gateway-braintree-paypal.php:315
356
  msgid "Currently disabled because PayPal Credit is only available for US merchants"
357
  msgstr ""
358
 
359
- #: includes/class-wc-gateway-braintree-paypal.php:324
360
  msgid "Buy Now on Product Pages"
361
  msgstr ""
362
 
363
- #: includes/class-wc-gateway-braintree-paypal.php:325
364
  msgid "Add the PayPal Buy Now button to product pages."
365
  msgstr ""
366
 
367
- #: includes/class-wc-gateway-braintree-paypal.php:331
368
  msgid "Enable Cart Checkout"
369
  msgstr ""
370
 
371
- #: includes/class-wc-gateway-braintree-paypal.php:333
372
  msgid "Allow customers to check out with PayPal from the Cart page"
373
  msgstr ""
374
 
375
- #: includes/class-wc-gateway-braintree-paypal.php:412
376
  msgid "Preview"
377
  msgstr ""
378
 
379
- #: includes/class-wc-gateway-braintree-paypal.php:536
380
  #. translators: Placeholders: %1$s - payment method title (e.g. PayPal), %2$s -
381
  #. transaction environment (either Sandbox or blank string), %3$s - type of
382
  #. transaction (either Authorization or Payment)
383
  msgid "%1$s %2$s %3$s Approved"
384
  msgstr ""
385
 
386
- #: includes/class-wc-gateway-braintree-paypal.php:538
387
- #: includes/class-wc-gateway-braintree.php:1427
388
  msgid "Sandbox"
389
  msgstr ""
390
 
391
- #: includes/class-wc-gateway-braintree-paypal.php:539
392
  msgid "Authorization"
393
  msgstr ""
394
 
395
- #: includes/class-wc-gateway-braintree-paypal.php:539
396
  msgid "Payment"
397
  msgstr ""
398
 
399
- #: includes/class-wc-gateway-braintree-paypal.php:545
 
400
  #. translators: Placeholders: %s - transaction ID
401
  msgid "(Transaction ID %s)"
402
  msgstr ""
403
 
404
- #: includes/class-wc-gateway-braintree-paypal.php:566
405
  msgid "PayPal Account Saved: %s"
406
  msgstr ""
407
 
408
- #: includes/class-wc-gateway-braintree-paypal.php:658
409
  msgid "PayPal"
410
  msgstr ""
411
 
412
- #: includes/class-wc-gateway-braintree-paypal.php:672
413
  msgid ""
414
  "Click the PayPal icon below to sign into your PayPal account and pay "
415
  "securely."
416
  msgstr ""
417
 
418
- #: includes/class-wc-gateway-braintree.php:358
419
  msgid "Merchant ID"
420
  msgstr ""
421
 
422
- #: includes/class-wc-gateway-braintree.php:361
423
  msgid "The Merchant ID for your Braintree account."
424
  msgstr ""
425
 
426
- #: includes/class-wc-gateway-braintree.php:365
427
  msgid "Public Key"
428
  msgstr ""
429
 
430
- #: includes/class-wc-gateway-braintree.php:368
431
  msgid "The Public Key for your Braintree account."
432
  msgstr ""
433
 
434
- #: includes/class-wc-gateway-braintree.php:372
435
  msgid "Private Key"
436
  msgstr ""
437
 
438
- #: includes/class-wc-gateway-braintree.php:375
439
  msgid "The Private Key for your Braintree account."
440
  msgstr ""
441
 
442
- #: includes/class-wc-gateway-braintree.php:380
443
  msgid "Sandbox Merchant ID"
444
  msgstr ""
445
 
446
- #: includes/class-wc-gateway-braintree.php:383
447
  msgid "The Merchant ID for your Braintree sandbox account."
448
  msgstr ""
449
 
450
- #: includes/class-wc-gateway-braintree.php:387
451
  msgid "Sandbox Public Key"
452
  msgstr ""
453
 
454
- #: includes/class-wc-gateway-braintree.php:390
455
  msgid "The Public Key for your Braintree sandbox account."
456
  msgstr ""
457
 
458
- #: includes/class-wc-gateway-braintree.php:394
459
  msgid "Sandbox Private Key"
460
  msgstr ""
461
 
462
- #: includes/class-wc-gateway-braintree.php:397
463
  msgid "The Private Key for your Braintree sandbox account."
464
  msgstr ""
465
 
466
- #: includes/class-wc-gateway-braintree.php:402
467
  msgid "Merchant Account IDs"
468
  msgstr ""
469
 
470
- #: includes/class-wc-gateway-braintree.php:405
471
  msgid ""
472
  "Enter additional merchant account IDs if you do not want to use your "
473
  "Braintree account default. %1$sLearn more about merchant account IDs%2$s"
474
  msgstr ""
475
 
476
- #: includes/class-wc-gateway-braintree.php:414
477
  msgid "Dynamic Descriptors"
478
  msgstr ""
479
 
480
- #: includes/class-wc-gateway-braintree.php:417
481
  #. translators: Placeholders: %1$s - <p> tag, %2$s - </p> tag, %3$s - <a> tag,
482
  #. %4$s - </a> tag
483
  msgid ""
@@ -487,11 +482,11 @@ msgid ""
487
  "dynamic descriptors%4$s and are using an accepted format.%2$s"
488
  msgstr ""
489
 
490
- #: includes/class-wc-gateway-braintree.php:421
491
  msgid "Name"
492
  msgstr ""
493
 
494
- #: includes/class-wc-gateway-braintree.php:424
495
  msgid ""
496
  "The value in the business name field of a customer's statement. Company "
497
  "name/DBA section must be either 3, 7 or 12 characters and the product "
@@ -499,65 +494,65 @@ msgid ""
499
  "between for a total descriptor name of 22 characters)."
500
  msgstr ""
501
 
502
- #: includes/class-wc-gateway-braintree.php:429
503
  msgid "Phone"
504
  msgstr ""
505
 
506
- #: includes/class-wc-gateway-braintree.php:432
507
  msgid ""
508
  "The value in the phone number field of a customer's statement. Phone must "
509
  "be exactly 10 characters and can only contain numbers, dashes, parentheses "
510
  "and periods."
511
  msgstr ""
512
 
513
- #: includes/class-wc-gateway-braintree.php:437
514
  msgid "URL"
515
  msgstr ""
516
 
517
- #: includes/class-wc-gateway-braintree.php:440
518
  msgid ""
519
  "The value in the URL/web address field of a customer's statement. The URL "
520
  "must be 13 characters or less."
521
  msgstr ""
522
 
523
- #: includes/class-wc-gateway-braintree.php:480
524
  msgid "Enter connection credentials manually"
525
  msgstr ""
526
 
527
- #: includes/class-wc-gateway-braintree.php:522
528
  msgid "Connect/Disconnect"
529
  msgstr ""
530
 
531
- #: includes/class-wc-gateway-braintree.php:526
532
  msgid ""
533
  "You just connected your Braintree account to WooCommerce. You can start "
534
  "taking payments now."
535
  msgstr ""
536
 
537
- #: includes/class-wc-gateway-braintree.php:527
538
  msgid ""
539
  "Once you have processed a payment, PayPal will review your application for "
540
  "final approval. Before you ship any goods make sure you have received a "
541
  "final approval for your Braintree account."
542
  msgstr ""
543
 
544
- #: includes/class-wc-gateway-braintree.php:528
545
  msgid "Questions? We are a phone call away: 1-855-489-0345."
546
  msgstr ""
547
 
548
- #: includes/class-wc-gateway-braintree.php:539
549
- msgid "Disconnect from PayPal Powered by Braintree"
550
  msgstr ""
551
 
552
- #: includes/class-wc-gateway-braintree.php:549
553
- msgid "PayPal Powered by Braintree"
554
  msgstr ""
555
 
556
- #: includes/class-wc-gateway-braintree.php:551
557
  msgid "Close modal panel and cancel"
558
  msgstr ""
559
 
560
- #: includes/class-wc-gateway-braintree.php:557
561
  #. translators: Placeholders %1$s - opening HTML <a> link tag, closing HTML
562
  #. </a> link tag
563
  msgid ""
@@ -565,69 +560,102 @@ msgid ""
565
  "keys%2$s to reconnect. Do you want to proceed with disconnecting?"
566
  msgstr ""
567
 
568
- #: includes/class-wc-gateway-braintree.php:569
569
  msgid "Disconnect"
570
  msgstr ""
571
 
572
- #: includes/class-wc-gateway-braintree.php:699
573
  msgid "Add merchant account ID for %s"
574
  msgstr ""
575
 
576
- #: includes/class-wc-gateway-braintree.php:706
577
  msgid "Add merchant account ID"
578
  msgstr ""
579
 
580
- #: includes/class-wc-gateway-braintree.php:803
581
  msgid "Add merchant account ID for "
582
  msgstr ""
583
 
584
- #: includes/class-wc-gateway-braintree.php:901
585
  msgid "Merchant Account ID (%s)"
586
  msgstr ""
587
 
588
- #: includes/class-wc-gateway-braintree.php:912
589
  msgid "Enter merchant account ID"
590
  msgstr ""
591
 
592
- #: includes/class-wc-gateway-braintree.php:913
593
  msgid "Remove this merchant account ID"
594
  msgstr ""
595
 
596
- #: includes/class-wc-gateway-braintree.php:1427
597
  msgid "Production"
598
  msgstr ""
599
 
600
- #: includes/payment-forms/abstract-wc-braintree-payment-form.php:94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
  msgid "Currently unavailable. Please try a different payment method."
602
  msgstr ""
603
 
604
- #: includes/payment-forms/abstract-wc-braintree-payment-form.php:95
605
  msgid "Oops, something went wrong. Please try a different payment method."
606
  msgstr ""
607
 
608
- #: includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php:86
609
  msgid "Expiration (MMYY)"
610
  msgstr ""
611
 
612
- #: includes/payment-forms/class-wc-braintree-paypal-payment-form.php:83
613
  msgid ""
614
  "Please click the \"PayPal\" button below to log into your PayPal account "
615
  "before placing your order."
616
  msgstr ""
617
 
618
- #: includes/payment-forms/class-wc-braintree-paypal-payment-form.php:84
619
  msgid ""
620
  "Please click the \"PayPal\" button below to log into your PayPal account "
621
  "before adding your payment method."
622
  msgstr ""
623
 
624
- #: woocommerce-gateway-paypal-powered-by-braintree.php:118
625
  msgid ""
626
- "WooCommerce PayPal powered by Braintree is inactive. Please deactivate the "
627
- "retired WooCommerce Braintree plugin."
628
  msgstr ""
629
 
630
- #: woocommerce-gateway-paypal-powered-by-braintree.php:211
 
 
 
 
631
  msgid ""
632
  "The minimum PHP version required for this plugin is %1$s. You are running "
633
  "%2$s."
@@ -641,9 +669,9 @@ msgstr ""
641
 
642
  #. Description of the plugin/theme
643
  msgid ""
644
- "Receive credit card or PayPal payments using Paypal Powered by Braintree. "
645
- "A server with cURL, SSL support, and a valid SSL certificate is required "
646
- "(for security reasons) for this gateway to function. Requires PHP 5.4+"
647
  msgstr ""
648
 
649
  #. Author of the plugin/theme
@@ -659,12 +687,12 @@ msgctxt "Payment Method Type"
659
  msgid "Type"
660
  msgstr ""
661
 
662
- #: includes/class-wc-gateway-braintree-paypal.php:304
663
  msgctxt "button shape option"
664
  msgid "Pill"
665
  msgstr ""
666
 
667
- #: includes/class-wc-gateway-braintree-paypal.php:305
668
  msgctxt "button shape option"
669
  msgid "Rectangle"
670
  msgstr ""
1
  # Copyright (C) 2020 WooCommerce
2
+ # This file is distributed under the same license as the Braintree for WooCommerce Payment Gateway package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Braintree for WooCommerce Payment Gateway 2.4.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
+ "POT-Creation-Date: 2020-08-12 20:25:36+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
+ #: class-wc-braintree.php:348
 
 
 
 
 
 
17
  msgid "Connected successfully."
18
  msgstr ""
19
 
20
+ #: class-wc-braintree.php:351
21
  msgid "There was an error connecting your Braintree account. Please try again."
22
  msgstr ""
23
 
24
+ #: class-wc-braintree.php:381
25
  msgid "Invalid connection request"
26
  msgstr ""
27
 
28
+ #: class-wc-braintree.php:423
29
  msgid "Disconnected successfully."
30
  msgstr ""
31
 
32
+ #: class-wc-braintree.php:448
33
  msgid "Invalid disconnect request"
34
  msgstr ""
35
 
36
+ #: class-wc-braintree.php:541
37
  msgid ""
38
  "Heads up! You've enabled advanced fraud tools for Braintree. Please make "
39
  "sure that advanced fraud tools are also enabled in your Braintree account. "
40
  "Need help? See the %1$sdocumentation%2$s."
41
  msgstr ""
42
 
43
+ #: class-wc-braintree.php:559
44
  msgid ""
45
+ "Braintree for WooCommerce is almost ready. To get started, %1$sconnect your "
46
+ "Braintree account%2$s."
47
  msgstr ""
48
 
49
+ #: class-wc-braintree.php:571
50
  msgid ""
51
+ "Upgrade successful! WooCommerce Braintree deactivated, and Braintree for "
52
+ "WooCommerce has been %1$sconfigured with your previous settings%2$s."
53
  msgstr ""
54
 
55
+ #: class-wc-braintree.php:584
56
  msgid ""
57
  "WooCommerce is not being forced over SSL -- Using PayPal with Braintree "
58
  "requires that checkout to be forced over SSL."
59
  msgstr ""
60
 
61
+ #: class-wc-braintree.php:619
62
  #. translators: Placeholders: %1$s - payment gateway name tag, %2$s - <a> tag,
63
  #. %3$s - </a> tag
64
  msgid ""
67
  msgstr ""
68
 
69
  #. Plugin Name of the plugin/theme
70
+ msgid "Braintree for WooCommerce Payment Gateway"
71
  msgstr ""
72
 
73
+ #: class-wc-braintree.php:725
74
  msgid "Configure Credit Card"
75
  msgstr ""
76
 
77
+ #: class-wc-braintree.php:725
78
  msgid "Configure PayPal"
79
  msgstr ""
80
 
81
+ #: includes/PayPal/Buttons/Abstract_Button.php:558
82
+ #: includes/class-wc-gateway-braintree.php:580
83
  msgid "Cancel"
84
  msgstr ""
85
 
90
  "method."
91
  msgstr ""
92
 
93
+ #: includes/api/class-wc-braintree-api.php:203
94
  msgid "The billing address for this transaction does not match the cardholders."
95
  msgstr ""
96
 
97
+ #: includes/api/class-wc-braintree-api.php:207
98
  msgid "The CSC for the transaction was invalid or incorrect."
99
  msgstr ""
100
 
101
+ #: includes/api/class-wc-braintree-api.php:557
102
  msgid ""
103
  "Invalid Credentials, please double-check your API credentials (Merchant ID, "
104
  "Public Key, Private Key, and Merchant Account ID) and try again."
105
  msgstr ""
106
 
107
+ #: includes/api/class-wc-braintree-api.php:561
108
  msgid ""
109
  "Authorization Failed, please verify the user for the API credentials "
110
  "provided can perform transactions and that the request data is correct."
111
  msgstr ""
112
 
113
+ #: includes/api/class-wc-braintree-api.php:565
114
  msgid "Braintree is currently down for maintenance, please try again later."
115
  msgstr ""
116
 
117
+ #: includes/api/class-wc-braintree-api.php:569
118
  msgid "The record cannot be found, please contact support."
119
  msgstr ""
120
 
121
+ #: includes/api/class-wc-braintree-api.php:573
122
  msgid ""
123
  "Braintree encountered an error when processing your request, please try "
124
  "again later or contact support."
125
  msgstr ""
126
 
127
+ #: includes/api/class-wc-braintree-api.php:577
128
  msgid ""
129
  "Braintree cannot verify your server's SSL certificate. Please contact your "
130
  "hosting provider or try again later."
169
  msgid "Last name contains unsupported characters"
170
  msgstr ""
171
 
172
+ #: includes/class-wc-gateway-braintree-credit-card.php:201
173
  msgid "Basic"
174
  msgstr ""
175
 
176
+ #: includes/class-wc-gateway-braintree-credit-card.php:202
177
  msgid "Advanced"
178
  msgstr ""
179
 
180
+ #: includes/class-wc-gateway-braintree-credit-card.php:207
181
  msgid "Kount Direct"
182
  msgstr ""
183
 
184
+ #: includes/class-wc-gateway-braintree-credit-card.php:214
185
  msgid "Fraud Settings"
186
  msgstr ""
187
 
188
+ #: includes/class-wc-gateway-braintree-credit-card.php:218
189
  msgid "Fraud Tool"
190
  msgstr ""
191
 
192
+ #: includes/class-wc-gateway-braintree-credit-card.php:221
193
  msgid ""
194
  "Select the fraud tool you want to use. Basic is enabled by default and "
195
  "requires no additional configuration. Advanced requires you to enable "
197
  "you must contact Braintree support."
198
  msgstr ""
199
 
200
+ #: includes/class-wc-gateway-braintree-credit-card.php:225
201
  msgid "Kount merchant ID"
202
  msgstr ""
203
 
204
+ #: includes/class-wc-gateway-braintree-credit-card.php:228
205
  msgid "Speak with your account management team at Braintree to get this."
206
  msgstr ""
207
 
208
+ #: includes/class-wc-gateway-braintree-credit-card.php:260
209
  msgid "3D Secure"
210
  msgstr ""
211
 
212
+ #: includes/class-wc-gateway-braintree-credit-card.php:262
213
  msgid ""
214
  "3D Secure benefits cardholders and merchants by providing an additional "
215
  "layer of verification using Verified by Visa, MasterCard SecureCode, and "
216
  "American Express SafeKey. %1$sLearn more about 3D Secure%2$s."
217
  msgstr ""
218
 
219
+ #: includes/class-wc-gateway-braintree-credit-card.php:265
220
  msgid "Level"
221
  msgstr ""
222
 
223
+ #: includes/class-wc-gateway-braintree-credit-card.php:267
224
  msgid "Only accept payments when the liability is shifted"
225
  msgstr ""
226
 
227
+ #: includes/class-wc-gateway-braintree-credit-card.php:270
228
  msgid "Standard"
229
  msgstr ""
230
 
231
+ #: includes/class-wc-gateway-braintree-credit-card.php:271
232
  msgid "Strict"
233
  msgstr ""
234
 
235
+ #: includes/class-wc-gateway-braintree-credit-card.php:275
236
  msgid "Supported Card Types"
237
  msgstr ""
238
 
239
+ #: includes/class-wc-gateway-braintree-credit-card.php:278
240
  msgid "3D Secure validation will only occur for these cards."
241
  msgstr ""
242
 
243
+ #: includes/class-wc-gateway-braintree-credit-card.php:300
244
  msgid "Card Verification (CSC)"
245
  msgstr ""
246
 
247
+ #: includes/class-wc-gateway-braintree-credit-card.php:301
248
  msgid "Display and Require the Card Security Code (CVV/CID) field on checkout"
249
  msgstr ""
250
 
251
+ #: includes/class-wc-gateway-braintree-credit-card.php:952
252
+ #: includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php:151
253
  msgid ""
254
  "We cannot process your order with the payment information that you "
255
  "provided. Please use an alternate payment method."
256
  msgstr ""
257
 
258
+ #: includes/class-wc-gateway-braintree-credit-card.php:960
259
+ #: includes/class-wc-gateway-braintree.php:203
260
  msgid ""
261
  "Oops, there was a temporary payment error. Please try another payment "
262
  "method or contact us to complete your transaction."
270
  msgid "Allow customers to securely pay using their PayPal account via Braintree."
271
  msgstr ""
272
 
273
+ #: includes/class-wc-gateway-braintree-paypal.php:187
274
  msgid "Token ID"
275
  msgstr ""
276
 
277
+ #: includes/class-wc-gateway-braintree-paypal.php:192
278
  msgid "Email"
279
  msgstr ""
280
 
281
+ #: includes/class-wc-gateway-braintree-paypal.php:232
282
  msgid "Use a new PayPal account"
283
  msgstr ""
284
 
285
+ #: includes/class-wc-gateway-braintree-paypal.php:236
286
  msgid "PayPal Accounts"
287
  msgstr ""
288
 
289
+ #: includes/class-wc-gateway-braintree-paypal.php:257
290
  msgid "Unlink"
291
  msgstr ""
292
 
293
+ #: includes/class-wc-gateway-braintree-paypal.php:279
294
  msgid "Button Appearance"
295
  msgstr ""
296
 
297
+ #: includes/class-wc-gateway-braintree-paypal.php:284
298
  msgid "Button Color"
299
  msgstr ""
300
 
301
+ #: includes/class-wc-gateway-braintree-paypal.php:286
302
  msgid "Gold"
303
  msgstr ""
304
 
305
+ #: includes/class-wc-gateway-braintree-paypal.php:287
306
  msgid "Blue"
307
  msgstr ""
308
 
309
+ #: includes/class-wc-gateway-braintree-paypal.php:288
310
  msgid "Silver"
311
  msgstr ""
312
 
313
+ #: includes/class-wc-gateway-braintree-paypal.php:289
314
  msgid "White"
315
  msgstr ""
316
 
317
+ #: includes/class-wc-gateway-braintree-paypal.php:290
318
  msgid "Black"
319
  msgstr ""
320
 
321
+ #: includes/class-wc-gateway-braintree-paypal.php:297
322
  msgid "Button Size"
323
  msgstr ""
324
 
325
+ #: includes/class-wc-gateway-braintree-paypal.php:299
326
  msgid "Medium"
327
  msgstr ""
328
 
329
+ #: includes/class-wc-gateway-braintree-paypal.php:300
330
  msgid "Large"
331
  msgstr ""
332
 
333
+ #: includes/class-wc-gateway-braintree-paypal.php:301
334
  msgid "Responsive"
335
  msgstr ""
336
 
337
+ #: includes/class-wc-gateway-braintree-paypal.php:308
338
  msgid "Button Shape"
339
  msgstr ""
340
 
341
+ #: includes/class-wc-gateway-braintree-paypal.php:317
342
  msgid "PayPal Credit"
343
  msgstr ""
344
 
345
+ #: includes/class-wc-gateway-braintree-paypal.php:320
346
  msgid "Show the PayPal credit button beneath the standard PayPal button"
347
  msgstr ""
348
 
349
+ #: includes/class-wc-gateway-braintree-paypal.php:321
350
  msgid "Currently disabled because PayPal Credit is only available for US merchants"
351
  msgstr ""
352
 
353
+ #: includes/class-wc-gateway-braintree-paypal.php:330
354
  msgid "Buy Now on Product Pages"
355
  msgstr ""
356
 
357
+ #: includes/class-wc-gateway-braintree-paypal.php:331
358
  msgid "Add the PayPal Buy Now button to product pages."
359
  msgstr ""
360
 
361
+ #: includes/class-wc-gateway-braintree-paypal.php:337
362
  msgid "Enable Cart Checkout"
363
  msgstr ""
364
 
365
+ #: includes/class-wc-gateway-braintree-paypal.php:339
366
  msgid "Allow customers to check out with PayPal from the Cart page"
367
  msgstr ""
368
 
369
+ #: includes/class-wc-gateway-braintree-paypal.php:418
370
  msgid "Preview"
371
  msgstr ""
372
 
373
+ #: includes/class-wc-gateway-braintree-paypal.php:542
374
  #. translators: Placeholders: %1$s - payment method title (e.g. PayPal), %2$s -
375
  #. transaction environment (either Sandbox or blank string), %3$s - type of
376
  #. transaction (either Authorization or Payment)
377
  msgid "%1$s %2$s %3$s Approved"
378
  msgstr ""
379
 
380
+ #: includes/class-wc-gateway-braintree-paypal.php:544
381
+ #: includes/class-wc-gateway-braintree.php:1443
382
  msgid "Sandbox"
383
  msgstr ""
384
 
385
+ #: includes/class-wc-gateway-braintree-paypal.php:545
386
  msgid "Authorization"
387
  msgstr ""
388
 
389
+ #: includes/class-wc-gateway-braintree-paypal.php:545
390
  msgid "Payment"
391
  msgstr ""
392
 
393
+ #: includes/class-wc-gateway-braintree-paypal.php:551
394
+ #: includes/integrations/Pre_Orders.php:109
395
  #. translators: Placeholders: %s - transaction ID
396
  msgid "(Transaction ID %s)"
397
  msgstr ""
398
 
399
+ #: includes/class-wc-gateway-braintree-paypal.php:572
400
  msgid "PayPal Account Saved: %s"
401
  msgstr ""
402
 
403
+ #: includes/class-wc-gateway-braintree-paypal.php:679
404
  msgid "PayPal"
405
  msgstr ""
406
 
407
+ #: includes/class-wc-gateway-braintree-paypal.php:693
408
  msgid ""
409
  "Click the PayPal icon below to sign into your PayPal account and pay "
410
  "securely."
411
  msgstr ""
412
 
413
+ #: includes/class-wc-gateway-braintree.php:373
414
  msgid "Merchant ID"
415
  msgstr ""
416
 
417
+ #: includes/class-wc-gateway-braintree.php:376
418
  msgid "The Merchant ID for your Braintree account."
419
  msgstr ""
420
 
421
+ #: includes/class-wc-gateway-braintree.php:380
422
  msgid "Public Key"
423
  msgstr ""
424
 
425
+ #: includes/class-wc-gateway-braintree.php:383
426
  msgid "The Public Key for your Braintree account."
427
  msgstr ""
428
 
429
+ #: includes/class-wc-gateway-braintree.php:387
430
  msgid "Private Key"
431
  msgstr ""
432
 
433
+ #: includes/class-wc-gateway-braintree.php:390
434
  msgid "The Private Key for your Braintree account."
435
  msgstr ""
436
 
437
+ #: includes/class-wc-gateway-braintree.php:395
438
  msgid "Sandbox Merchant ID"
439
  msgstr ""
440
 
441
+ #: includes/class-wc-gateway-braintree.php:398
442
  msgid "The Merchant ID for your Braintree sandbox account."
443
  msgstr ""
444
 
445
+ #: includes/class-wc-gateway-braintree.php:402
446
  msgid "Sandbox Public Key"
447
  msgstr ""
448
 
449
+ #: includes/class-wc-gateway-braintree.php:405
450
  msgid "The Public Key for your Braintree sandbox account."
451
  msgstr ""
452
 
453
+ #: includes/class-wc-gateway-braintree.php:409
454
  msgid "Sandbox Private Key"
455
  msgstr ""
456
 
457
+ #: includes/class-wc-gateway-braintree.php:412
458
  msgid "The Private Key for your Braintree sandbox account."
459
  msgstr ""
460
 
461
+ #: includes/class-wc-gateway-braintree.php:417
462
  msgid "Merchant Account IDs"
463
  msgstr ""
464
 
465
+ #: includes/class-wc-gateway-braintree.php:420
466
  msgid ""
467
  "Enter additional merchant account IDs if you do not want to use your "
468
  "Braintree account default. %1$sLearn more about merchant account IDs%2$s"
469
  msgstr ""
470
 
471
+ #: includes/class-wc-gateway-braintree.php:429
472
  msgid "Dynamic Descriptors"
473
  msgstr ""
474
 
475
+ #: includes/class-wc-gateway-braintree.php:432
476
  #. translators: Placeholders: %1$s - <p> tag, %2$s - </p> tag, %3$s - <a> tag,
477
  #. %4$s - </a> tag
478
  msgid ""
482
  "dynamic descriptors%4$s and are using an accepted format.%2$s"
483
  msgstr ""
484
 
485
+ #: includes/class-wc-gateway-braintree.php:436
486
  msgid "Name"
487
  msgstr ""
488
 
489
+ #: includes/class-wc-gateway-braintree.php:439
490
  msgid ""
491
  "The value in the business name field of a customer's statement. Company "
492
  "name/DBA section must be either 3, 7 or 12 characters and the product "
494
  "between for a total descriptor name of 22 characters)."
495
  msgstr ""
496
 
497
+ #: includes/class-wc-gateway-braintree.php:444
498
  msgid "Phone"
499
  msgstr ""
500
 
501
+ #: includes/class-wc-gateway-braintree.php:447
502
  msgid ""
503
  "The value in the phone number field of a customer's statement. Phone must "
504
  "be exactly 10 characters and can only contain numbers, dashes, parentheses "
505
  "and periods."
506
  msgstr ""
507
 
508
+ #: includes/class-wc-gateway-braintree.php:452
509
  msgid "URL"
510
  msgstr ""
511
 
512
+ #: includes/class-wc-gateway-braintree.php:455
513
  msgid ""
514
  "The value in the URL/web address field of a customer's statement. The URL "
515
  "must be 13 characters or less."
516
  msgstr ""
517
 
518
+ #: includes/class-wc-gateway-braintree.php:495
519
  msgid "Enter connection credentials manually"
520
  msgstr ""
521
 
522
+ #: includes/class-wc-gateway-braintree.php:537
523
  msgid "Connect/Disconnect"
524
  msgstr ""
525
 
526
+ #: includes/class-wc-gateway-braintree.php:541
527
  msgid ""
528
  "You just connected your Braintree account to WooCommerce. You can start "
529
  "taking payments now."
530
  msgstr ""
531
 
532
+ #: includes/class-wc-gateway-braintree.php:542
533
  msgid ""
534
  "Once you have processed a payment, PayPal will review your application for "
535
  "final approval. Before you ship any goods make sure you have received a "
536
  "final approval for your Braintree account."
537
  msgstr ""
538
 
539
+ #: includes/class-wc-gateway-braintree.php:543
540
  msgid "Questions? We are a phone call away: 1-855-489-0345."
541
  msgstr ""
542
 
543
+ #: includes/class-wc-gateway-braintree.php:554
544
+ msgid "Disconnect from Braintree for WooCommerce"
545
  msgstr ""
546
 
547
+ #: includes/class-wc-gateway-braintree.php:564
548
+ msgid "Braintree for WooCommerce"
549
  msgstr ""
550
 
551
+ #: includes/class-wc-gateway-braintree.php:566
552
  msgid "Close modal panel and cancel"
553
  msgstr ""
554
 
555
+ #: includes/class-wc-gateway-braintree.php:572
556
  #. translators: Placeholders %1$s - opening HTML <a> link tag, closing HTML
557
  #. </a> link tag
558
  msgid ""
560
  "keys%2$s to reconnect. Do you want to proceed with disconnecting?"
561
  msgstr ""
562
 
563
+ #: includes/class-wc-gateway-braintree.php:584
564
  msgid "Disconnect"
565
  msgstr ""
566
 
567
+ #: includes/class-wc-gateway-braintree.php:714
568
  msgid "Add merchant account ID for %s"
569
  msgstr ""
570
 
571
+ #: includes/class-wc-gateway-braintree.php:721
572
  msgid "Add merchant account ID"
573
  msgstr ""
574
 
575
+ #: includes/class-wc-gateway-braintree.php:819
576
  msgid "Add merchant account ID for "
577
  msgstr ""
578
 
579
+ #: includes/class-wc-gateway-braintree.php:917
580
  msgid "Merchant Account ID (%s)"
581
  msgstr ""
582
 
583
+ #: includes/class-wc-gateway-braintree.php:928
584
  msgid "Enter merchant account ID"
585
  msgstr ""
586
 
587
+ #: includes/class-wc-gateway-braintree.php:929
588
  msgid "Remove this merchant account ID"
589
  msgstr ""
590
 
591
+ #: includes/class-wc-gateway-braintree.php:1443
592
  msgid "Production"
593
  msgstr ""
594
 
595
+ #: includes/integrations/Pre_Orders.php:56
596
+ msgid "%s - Pre-Order Release Payment for Order %s"
597
+ msgstr ""
598
+
599
+ #: includes/integrations/Pre_Orders.php:60
600
+ msgid "Payment token missing/invalid."
601
+ msgstr ""
602
+
603
+ #: includes/integrations/Pre_Orders.php:85
604
+ msgid "%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)"
605
+ msgstr ""
606
+
607
+ #: includes/integrations/Pre_Orders.php:96
608
+ msgid "%s eCheck Pre-Order Release Payment Approved: %s ending in %s"
609
+ msgstr ""
610
+
611
+ #: includes/integrations/Pre_Orders.php:102
612
+ #. translators: Placeholders: %s - payment method title, like PayPal
613
+ msgid "%s Pre-Order Release Payment Approved"
614
+ msgstr ""
615
+
616
+ #: includes/integrations/Pre_Orders.php:126
617
+ msgid "Authorization only transaction"
618
+ msgstr ""
619
+
620
+ #: includes/integrations/Pre_Orders.php:145
621
+ msgid "Pre-Order Release Payment Failed: %s"
622
+ msgstr ""
623
+
624
+ #: includes/payment-forms/abstract-wc-braintree-payment-form.php:146
625
  msgid "Currently unavailable. Please try a different payment method."
626
  msgstr ""
627
 
628
+ #: includes/payment-forms/abstract-wc-braintree-payment-form.php:147
629
  msgid "Oops, something went wrong. Please try a different payment method."
630
  msgstr ""
631
 
632
+ #: includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php:99
633
  msgid "Expiration (MMYY)"
634
  msgstr ""
635
 
636
+ #: includes/payment-forms/class-wc-braintree-paypal-payment-form.php:98
637
  msgid ""
638
  "Please click the \"PayPal\" button below to log into your PayPal account "
639
  "before placing your order."
640
  msgstr ""
641
 
642
+ #: includes/payment-forms/class-wc-braintree-paypal-payment-form.php:99
643
  msgid ""
644
  "Please click the \"PayPal\" button below to log into your PayPal account "
645
  "before adding your payment method."
646
  msgstr ""
647
 
648
+ #: woocommerce-gateway-paypal-powered-by-braintree.php:124
649
  msgid ""
650
+ "Braintree for WooCommerce is inactive. Please deactivate the retired "
651
+ "WooCommerce Braintree plugin."
652
  msgstr ""
653
 
654
+ #: woocommerce-gateway-paypal-powered-by-braintree.php:146
655
+ msgid "Braintree for WooCommerce is inactive because WooCommerce is not installed."
656
+ msgstr ""
657
+
658
+ #: woocommerce-gateway-paypal-powered-by-braintree.php:261
659
  msgid ""
660
  "The minimum PHP version required for this plugin is %1$s. You are running "
661
  "%2$s."
669
 
670
  #. Description of the plugin/theme
671
  msgid ""
672
+ "Receive credit card or PayPal payments using Braintree for WooCommerce. A "
673
+ "server with cURL, SSL support, and a valid SSL certificate is required (for "
674
+ "security reasons) for this gateway to function. Requires PHP 5.4+"
675
  msgstr ""
676
 
677
  #. Author of the plugin/theme
687
  msgid "Type"
688
  msgstr ""
689
 
690
+ #: includes/class-wc-gateway-braintree-paypal.php:310
691
  msgctxt "button shape option"
692
  msgid "Pill"
693
  msgstr ""
694
 
695
+ #: includes/class-wc-gateway-braintree-paypal.php:311
696
  msgctxt "button shape option"
697
  msgid "Rectangle"
698
  msgstr ""
includes/Integrations/Product_Addons.php CHANGED
@@ -25,7 +25,7 @@
25
  namespace WC_Braintree\Integrations;
26
 
27
  use WC_Braintree\PayPal\Buttons;
28
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
29
 
30
  defined( 'ABSPATH' ) or exit;
31
 
@@ -67,8 +67,8 @@ class Product_Addons {
67
 
68
  if ( $cart_handler instanceof \WC_Product_Addons_Cart ) {
69
 
70
- $product_id = (int) WC_Braintree_Framework\SV_WC_Helper::get_post( 'product_id' );
71
- $serialized = WC_Braintree_Framework\SV_WC_Helper::get_post( 'cart_form' );
72
  $post_data = [];
73
 
74
  if ( ! empty( $serialized ) ) {
25
  namespace WC_Braintree\Integrations;
26
 
27
  use WC_Braintree\PayPal\Buttons;
28
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
29
 
30
  defined( 'ABSPATH' ) or exit;
31
 
67
 
68
  if ( $cart_handler instanceof \WC_Product_Addons_Cart ) {
69
 
70
+ $product_id = (int) Framework\SV_WC_Helper::get_posted_value( 'product_id' );
71
+ $serialized = Framework\SV_WC_Helper::get_posted_value( 'cart_form' );
72
  $post_data = [];
73
 
74
  if ( ! empty( $serialized ) ) {
includes/PayPal/Buttons/Abstract_Button.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.3.0
35
  */
36
- abstract class Abstract_Button {
37
 
38
 
39
  /** @var \WC_Gateway_Braintree_PayPal PayPal gateway instance */
@@ -54,9 +54,7 @@ abstract class Abstract_Button {
54
 
55
  $this->gateway = $gateway;
56
 
57
- if ( $this->is_enabled() ) {
58
- $this->add_hooks();
59
- }
60
  }
61
 
62
 
@@ -74,12 +72,28 @@ abstract class Abstract_Button {
74
 
75
 
76
  /**
77
- * Adds any actions and filters needed for the button.
78
  *
79
  * @since 2.3.0
80
  */
81
  protected function add_hooks() {
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  // handle the PayPal token generated by Braintree JS
84
  add_action( 'woocommerce_api_' . strtolower( get_class( $this->get_gateway() ) ), [ $this, 'handle_wc_api' ] );
85
 
@@ -145,7 +159,7 @@ abstract class Abstract_Button {
145
  */
146
  protected function process_wc_api_request() {
147
 
148
- WC()->session->set( 'wc_braintree_paypal_cart_nonce', WC_Braintree_Framework\SV_WC_Helper::get_post( 'nonce' ) );
149
 
150
  if ( ! empty( $_POST['details'] ) ) {
151
  $this->set_customer_data( $_POST['details'] );
@@ -175,13 +189,26 @@ abstract class Abstract_Button {
175
 
176
 
177
  /**
178
- * Gets the JS handler params.
179
  *
180
- * @since 2.3.0
181
  *
182
  * @return array
183
  */
184
- protected function get_js_handler_params() {
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  /**
187
  * Filters the JS handler params.
@@ -191,15 +218,25 @@ abstract class Abstract_Button {
191
  * @param array params
192
  * @param Abstract_Button button handler instance
193
  */
194
- return (array) apply_filters( 'wc_' . $this->get_gateway()->get_id() . '_button_js_handler_params', array_merge( [
195
- 'id' => $this->get_gateway()->get_id(),
196
- 'id_dasherized' => $this->get_gateway()->get_id_dasherized(),
197
- 'name' => $this->get_gateway()->get_method_title(),
198
- 'debug' => $this->get_gateway()->debug_log(),
199
- 'client_token_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' ),
200
- 'set_payment_method_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_cart_set_payment_method' ),
201
- 'cart_handler_url' => add_query_arg( 'wc-api', get_class( $this->get_gateway() ), home_url() )
202
- ], $this->get_form_handler_params(), $this->get_additional_js_handler_params() ), $this );
 
 
 
 
 
 
 
 
 
 
203
  }
204
 
205
 
@@ -223,14 +260,27 @@ abstract class Abstract_Button {
223
  */
224
  protected function render_js() {
225
 
226
- wc_enqueue_js(
227
- sprintf(
228
- 'window.%1$s = new %2$s(%3$s); window.%1$s.init()',
229
- esc_attr( $this->get_js_handler_object_name() ),
230
- esc_attr( $this->get_js_handler_name() ),
231
- json_encode( $this->get_js_handler_params() )
232
- )
233
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  }
235
 
236
 
@@ -273,7 +323,7 @@ abstract class Abstract_Button {
273
  * @param Abstract_Button button handler instance
274
  */
275
  return (array) apply_filters( 'wc_' . $this->get_gateway()->get_id() . '_button_markup_params', array_merge( [
276
- 'amount' => WC_Braintree_Framework\SV_WC_Helper::number_format( $this->get_button_total() ),
277
  'currency' => $this->get_button_currency(),
278
  'locale' => $this->get_button_locale(),
279
  'single_use' => $this->is_single_use(),
@@ -356,23 +406,21 @@ abstract class Abstract_Button {
356
 
357
 
358
  /**
359
- * Gets the JS handler object name.
 
 
360
  *
361
  * @since 2.3.0
 
362
  *
363
  * @return string
364
  */
365
- abstract protected function get_js_handler_object_name();
366
 
 
367
 
368
- /**
369
- * Gets the JS handler class name.
370
- *
371
- * @since 2.3.0
372
- *
373
- * @return string
374
- */
375
- abstract protected function get_js_handler_name();
376
 
377
 
378
  /**
@@ -388,12 +436,12 @@ abstract class Abstract_Button {
388
 
389
  $details = WC()->session->get( 'wc_braintree_paypal_cart_customer_details' );
390
 
391
- if ( WC_Braintree_Framework\SV_WC_Helper::str_starts_with( $key, 'billing' ) ) {
392
 
393
  $type = 'billing';
394
  $key = str_replace( 'billing_', '', $key );
395
 
396
- } elseif ( WC_Braintree_Framework\SV_WC_Helper::str_starts_with( $key, 'shipping' ) ) {
397
 
398
  $type = 'shipping';
399
  $key = str_replace( 'shipping_', '', $key );
@@ -632,4 +680,30 @@ abstract class Abstract_Button {
632
  }
633
 
634
 
635
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
33
  *
34
  * @since 2.3.0
35
  */
36
+ abstract class Abstract_Button extends Framework\Handlers\Script_Handler {
37
 
38
 
39
  /** @var \WC_Gateway_Braintree_PayPal PayPal gateway instance */
54
 
55
  $this->gateway = $gateway;
56
 
57
+ parent::__construct();
 
 
58
  }
59
 
60
 
72
 
73
 
74
  /**
75
+ * Adds the action and filter hooks.
76
  *
77
  * @since 2.3.0
78
  */
79
  protected function add_hooks() {
80
 
81
+ if ( $this->is_enabled() ) {
82
+
83
+ parent::add_hooks();
84
+
85
+ $this->add_button_hooks();
86
+ }
87
+ }
88
+
89
+
90
+ /**
91
+ * Adds any actions and filters needed for the button, if the button is enabled.
92
+ *
93
+ * @since 2.4.0
94
+ */
95
+ protected function add_button_hooks() {
96
+
97
  // handle the PayPal token generated by Braintree JS
98
  add_action( 'woocommerce_api_' . strtolower( get_class( $this->get_gateway() ) ), [ $this, 'handle_wc_api' ] );
99
 
159
  */
160
  protected function process_wc_api_request() {
161
 
162
+ WC()->session->set( 'wc_braintree_paypal_cart_nonce', Framework\SV_WC_Helper::get_posted_value( 'nonce' ) );
163
 
164
  if ( ! empty( $_POST['details'] ) ) {
165
  $this->set_customer_data( $_POST['details'] );
189
 
190
 
191
  /**
192
+ * Gets the JS handler arguments.
193
  *
194
+ * @since 2.4.0
195
  *
196
  * @return array
197
  */
198
+ protected function get_js_handler_args() {
199
+
200
+ $args = array_merge( [
201
+ 'id' => $this->get_gateway()->get_id(),
202
+ 'id_dasherized' => $this->get_gateway()->get_id_dasherized(),
203
+ 'name' => $this->get_gateway()->get_method_title(),
204
+ 'debug' => $this->get_gateway()->debug_log(),
205
+ 'client_token_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' ),
206
+ 'set_payment_method_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_cart_set_payment_method' ),
207
+ 'cart_handler_url' => add_query_arg( 'wc-api', get_class( $this->get_gateway() ), home_url() )
208
+ ],
209
+ $this->get_form_handler_params(),
210
+ $this->get_additional_js_handler_params()
211
+ );
212
 
213
  /**
214
  * Filters the JS handler params.
218
  * @param array params
219
  * @param Abstract_Button button handler instance
220
  */
221
+ return (array) apply_filters( 'wc_' . $this->get_gateway()->get_id() . '_button_js_handler_params', $args, $this );
222
+ }
223
+
224
+
225
+ /**
226
+ * Gets the JS handler params.
227
+ *
228
+ * TODO: remove this method by version 3.0.0 or by 2021-05-07 {WV 2020-05-07}
229
+ *
230
+ * @since 2.3.0
231
+ * @deprecated 2.4.0
232
+ *
233
+ * @return array
234
+ */
235
+ protected function get_js_handler_params() {
236
+
237
+ wc_deprecated_function( __METHOD__, '2.4.0', __CLASS__ . '::get_js_handler_args()' );
238
+
239
+ return $this->get_js_handler_args();
240
  }
241
 
242
 
260
  */
261
  protected function render_js() {
262
 
263
+ wc_enqueue_js( $this->get_safe_handler_js() );
264
+ }
265
+
266
+
267
+ /**
268
+ * Gets the handler instantiation JS.
269
+ *
270
+ * @since 2.4.0
271
+ *
272
+ * @param array $additional_args additional handler arguments, if any
273
+ * @param string $handler_name handler name, if different from self::get_js_handler_class_name()
274
+ * @param string $object_name object name, if different from self::get_js_handler_object_name()
275
+ * @return string
276
+ */
277
+ protected function get_handler_js( array $additional_args = [], $handler_name = '', $object_name = '' ) {
278
+
279
+ $js = parent::get_handler_js( $additional_args, $handler_name, $object_name );
280
+
281
+ $js .= sprintf( 'window.%s.init();', $object_name ?: $this->get_js_handler_object_name() );
282
+
283
+ return $js;
284
  }
285
 
286
 
323
  * @param Abstract_Button button handler instance
324
  */
325
  return (array) apply_filters( 'wc_' . $this->get_gateway()->get_id() . '_button_markup_params', array_merge( [
326
+ 'amount' => Framework\SV_WC_Helper::number_format( $this->get_button_total() ),
327
  'currency' => $this->get_button_currency(),
328
  'locale' => $this->get_button_locale(),
329
  'single_use' => $this->is_single_use(),
406
 
407
 
408
  /**
409
+ * Gets the JS handler class name.
410
+ *
411
+ * TODO: remove this method by version 3.0.0 or by 2021-05-07 {WV 2020-05-07}
412
  *
413
  * @since 2.3.0
414
+ * @deprecated 2.4.0
415
  *
416
  * @return string
417
  */
418
+ protected function get_js_handler_name() {
419
 
420
+ wc_deprecated_function( __METHOD__, '2.4.0', __CLASS__ . '::get_js_handler_class_name()' );
421
 
422
+ return $this->get_js_handler_class_name();
423
+ }
 
 
 
 
 
 
424
 
425
 
426
  /**
436
 
437
  $details = WC()->session->get( 'wc_braintree_paypal_cart_customer_details' );
438
 
439
+ if ( Framework\SV_WC_Helper::str_starts_with( $key, 'billing' ) ) {
440
 
441
  $type = 'billing';
442
  $key = str_replace( 'billing_', '', $key );
443
 
444
+ } elseif ( Framework\SV_WC_Helper::str_starts_with( $key, 'shipping' ) ) {
445
 
446
  $type = 'shipping';
447
  $key = str_replace( 'shipping_', '', $key );
680
  }
681
 
682
 
683
+ /**
684
+ * Adds a log entry.
685
+ *
686
+ * @since 2.4.0
687
+ *
688
+ * @param string $message message to log
689
+ */
690
+ protected function log_event( $message ) {
691
+
692
+ $this->get_gateway()->add_debug_message( $message );
693
+ }
694
+
695
+
696
+ /**
697
+ * Determines whether logging is enabled.
698
+ *
699
+ * @since 2.4.0
700
+ *
701
+ * @return bool
702
+ */
703
+ protected function is_logging_enabled() {
704
+
705
+ return $this->get_gateway()->debug_log();
706
+ }
707
+
708
+
709
+ }
includes/PayPal/Buttons/Cart.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -36,6 +36,19 @@ defined( 'ABSPATH' ) or exit;
36
  class Cart extends Abstract_Button {
37
 
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Checks if this button should be enabled or not.
41
  *
@@ -53,10 +66,11 @@ class Cart extends Abstract_Button {
53
  * Adds any actions and filters needed for the button.
54
  *
55
  * @since 2.3.0
 
56
  */
57
- protected function add_hooks() {
58
 
59
- parent::add_hooks();
60
 
61
  // add the PayPal button below "Proceed to Checkout"
62
  add_action( 'woocommerce_proceed_to_checkout', [ $this, 'render' ], 50 );
@@ -72,7 +86,7 @@ class Cart extends Abstract_Button {
72
  */
73
  protected function is_wc_api_request_valid() {
74
 
75
- return (bool) wp_verify_nonce( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_cart_set_payment_method' );
76
  }
77
 
78
 
@@ -118,27 +132,16 @@ class Cart extends Abstract_Button {
118
 
119
 
120
  /**
121
- * Gets the JS handler class name.
122
  *
123
- * @since 2.3.0
124
  *
125
  * @return string
126
  */
127
- protected function get_js_handler_name() {
128
- return 'WC_Braintree_PayPal_Cart_Handler';
129
- }
130
-
131
 
132
- /**
133
- * Gets the JS handler object name.
134
- *
135
- * @since 2.3.0
136
- *
137
- * @return string
138
- */
139
- protected function get_js_handler_object_name() {
140
- return 'wc_braintree_paypal_cart_handler';
141
  }
142
 
143
 
144
- }
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
36
  class Cart extends Abstract_Button {
37
 
38
 
39
+ /**
40
+ * Gets the JS handler class name.
41
+ *
42
+ * @since 2.4.0
43
+ *
44
+ * @return string
45
+ */
46
+ protected function get_js_handler_class_name() {
47
+
48
+ return 'WC_Braintree_PayPal_Cart_Handler';
49
+ }
50
+
51
+
52
  /**
53
  * Checks if this button should be enabled or not.
54
  *
66
  * Adds any actions and filters needed for the button.
67
  *
68
  * @since 2.3.0
69
+ * @since 2.4.0 renamed add_hooks() to add_button_hooks()
70
  */
71
+ protected function add_button_hooks() {
72
 
73
+ parent::add_button_hooks();
74
 
75
  // add the PayPal button below "Proceed to Checkout"
76
  add_action( 'woocommerce_proceed_to_checkout', [ $this, 'render' ], 50 );
86
  */
87
  protected function is_wc_api_request_valid() {
88
 
89
+ return (bool) wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_cart_set_payment_method' );
90
  }
91
 
92
 
132
 
133
 
134
  /**
135
+ * Gets the ID of this script handler.
136
  *
137
+ * @since 2.4.0
138
  *
139
  * @return string
140
  */
141
+ public function get_id() {
 
 
 
142
 
143
+ return $this->get_gateway()->get_id() . '_cart';
 
 
 
 
 
 
 
 
144
  }
145
 
146
 
147
+ }
includes/PayPal/Buttons/Product.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -40,6 +40,19 @@ class Product extends Abstract_Button {
40
  protected $product;
41
 
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Checks if this button should be enabled or not.
45
  *
@@ -57,10 +70,11 @@ class Product extends Abstract_Button {
57
  * Adds necessary actions and filters for this button.
58
  *
59
  * @since 2.3.0
 
60
  */
61
- protected function add_hooks() {
62
 
63
- parent::add_hooks();
64
 
65
  add_action( 'wp', function() { $this->init_product(); } );
66
 
@@ -125,7 +139,7 @@ class Product extends Abstract_Button {
125
  */
126
  protected function is_wc_api_request_valid() {
127
 
128
- return (bool) wp_verify_nonce( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_product_button_checkout' );
129
  }
130
 
131
 
@@ -136,14 +150,14 @@ class Product extends Abstract_Button {
136
  */
137
  protected function process_wc_api_request() {
138
 
139
- $product_id = (int) WC_Braintree_Framework\SV_WC_Helper::get_post( 'product_id' );
140
  $product = wc_get_product( $product_id );
141
 
142
  if ( ! $product instanceof \WC_Product ) {
143
  wp_send_json_error( 'Invalid Product Data' );
144
  }
145
 
146
- $serialized = WC_Braintree_Framework\SV_WC_Helper::get_post( 'cart_form' );
147
  $cart_data = [];
148
 
149
  if ( ! empty( $serialized ) ) {
@@ -200,7 +214,7 @@ class Product extends Abstract_Button {
200
  */
201
  public function validate_product_data() {
202
 
203
- if ( ! wp_verify_nonce( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_validate_product_data' ) ) {
204
  return;
205
  }
206
 
@@ -270,30 +284,6 @@ class Product extends Abstract_Button {
270
  }
271
 
272
 
273
- /**
274
- * Gets the JS handler class name.
275
- *
276
- * @since 2.3.0
277
- *
278
- * @return string
279
- */
280
- protected function get_js_handler_object_name() {
281
- return 'wc_braintree_paypal_product_button_handler';
282
- }
283
-
284
-
285
- /**
286
- * Gets the JS handler class name.
287
- *
288
- * @since 2.3.0
289
- *
290
- * @return string
291
- */
292
- protected function get_js_handler_name() {
293
- return 'WC_Braintree_PayPal_Product_Button_Handler';
294
- }
295
-
296
-
297
  /**
298
  * Returns whether the button is for single-use transaction or not.
299
  *
@@ -335,4 +325,18 @@ class Product extends Abstract_Button {
335
  return $this->product;
336
  }
337
 
338
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  namespace WC_Braintree\PayPal\Buttons;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
40
  protected $product;
41
 
42
 
43
+ /**
44
+ * Gets the JS handler class name.
45
+ *
46
+ * @since 2.4.0
47
+ *
48
+ * @return string
49
+ */
50
+ protected function get_js_handler_class_name() {
51
+
52
+ return 'WC_Braintree_PayPal_Product_Button_Handler';
53
+ }
54
+
55
+
56
  /**
57
  * Checks if this button should be enabled or not.
58
  *
70
  * Adds necessary actions and filters for this button.
71
  *
72
  * @since 2.3.0
73
+ * @since 2.4.0 renamed add_hooks() to add_button_hooks()
74
  */
75
+ protected function add_button_hooks() {
76
 
77
+ parent::add_button_hooks();
78
 
79
  add_action( 'wp', function() { $this->init_product(); } );
80
 
139
  */
140
  protected function is_wc_api_request_valid() {
141
 
142
+ return (bool) wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_product_button_checkout' );
143
  }
144
 
145
 
150
  */
151
  protected function process_wc_api_request() {
152
 
153
+ $product_id = (int) Framework\SV_WC_Helper::get_posted_value( 'product_id' );
154
  $product = wc_get_product( $product_id );
155
 
156
  if ( ! $product instanceof \WC_Product ) {
157
  wp_send_json_error( 'Invalid Product Data' );
158
  }
159
 
160
+ $serialized = Framework\SV_WC_Helper::get_posted_value( 'cart_form' );
161
  $cart_data = [];
162
 
163
  if ( ! empty( $serialized ) ) {
214
  */
215
  public function validate_product_data() {
216
 
217
+ if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'wp_nonce' ), 'wc_' . $this->get_gateway()->get_id() . '_validate_product_data' ) ) {
218
  return;
219
  }
220
 
284
  }
285
 
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  /**
288
  * Returns whether the button is for single-use transaction or not.
289
  *
325
  return $this->product;
326
  }
327
 
328
+
329
+ /**
330
+ * Gets the ID of this script handler.
331
+ *
332
+ * @since 2.4.0
333
+ *
334
+ * @return string
335
+ */
336
+ public function get_id() {
337
+
338
+ return $this->get_gateway()->get_id() . '_product_button';
339
+ }
340
+
341
+
342
+ }
includes/api/class-wc-braintree-api-response-message-helper.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -38,7 +38,7 @@ defined( 'ABSPATH' ) or exit;
38
  * @since 3.0.0
39
  * @see SV_WC_Payment_Gateway_API_Response_Message_Helper
40
  */
41
- class WC_Braintree_API_Response_Message_Helper extends WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Response_Message_Helper {
42
 
43
 
44
  /** @var \WC_Braintree_API_Response response */
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
38
  * @since 3.0.0
39
  * @see SV_WC_Payment_Gateway_API_Response_Message_Helper
40
  */
41
+ class WC_Braintree_API_Response_Message_Helper extends Framework\SV_WC_Payment_Gateway_API_Response_Message_Helper {
42
 
43
 
44
  /** @var \WC_Braintree_API_Response response */
includes/api/class-wc-braintree-api.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -36,7 +36,7 @@ defined( 'ABSPATH' ) or exit;
36
  *
37
  * @since 3.0.0
38
  */
39
- class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements WC_Braintree_Framework\SV_WC_Payment_Gateway_API {
40
 
41
 
42
  /** Braintree Partner ID for transactions using Braintree Auth */
@@ -74,7 +74,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
74
  * @since 2.2.0
75
  *
76
  * @return WC_Braintree_API_Merchant_Configuration_Response
77
- * @throws WC_Braintree_Framework\SV_WC_API_Exception
78
  */
79
  public function get_merchant_configuration() {
80
 
@@ -84,7 +84,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
84
 
85
  // sanity check that the client key has valid JSON to decode
86
  if ( ! json_decode( $data ) ) {
87
- throw new WC_Braintree_Framework\SV_WC_API_Exception( 'The client key contained invalid JSON.', 500 );
88
  }
89
 
90
  return new WC_Braintree_API_Merchant_Configuration_Response( $data );
@@ -95,9 +95,10 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
95
  * Get a client token for initializing the hosted fields or PayPal forms
96
  *
97
  * @since 3.0.0
 
98
  * @param array $args
99
  * @return \WC_Braintree_API_Client_Token_Response
100
- * @throws \SV_WC_Payment_Gateway_Exception
101
  */
102
  public function get_client_token( Array $args = array() ) {
103
 
@@ -115,10 +116,12 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
115
  * Create a new credit card charge transaction
116
  *
117
  * @since 3.0.0
 
118
  * @see SV_WC_Payment_Gateway_API::credit_card_charge()
 
119
  * @param \WC_Order $order order
120
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response|\WC_Braintree_API_PayPal_Transaction_Response
121
- * @throws \SV_WC_Payment_Gateway_Exception
122
  */
123
  public function credit_card_charge( WC_Order $order ) {
124
 
@@ -142,10 +145,11 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
142
  * Create a new credit card auth transaction
143
  *
144
  * @since 3.0.0
 
145
  * @see SV_WC_Payment_Gateway_API::credit_card_authorization()
146
  * @param \WC_Order $order order
147
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response|\WC_Braintree_API_PayPal_Transaction_Response
148
- * @throws \SV_WC_Payment_Gateway_Exception
149
  */
150
  public function credit_card_authorization( WC_Order $order ) {
151
 
@@ -170,8 +174,9 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
170
  * is required. This must be done prior to processing the actual transaction.
171
  *
172
  * @since 3.0.0
173
- * @param \WC_Order $ordero rder
174
- * @throws \SV_WC_Payment_Gateway_Exception if CSC verification fails
 
175
  */
176
  public function verify_csc( WC_Order $order ) {
177
 
@@ -206,7 +211,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
206
  $message = $result->get_user_message();
207
  }
208
 
209
- throw new WC_Braintree_Framework\SV_WC_Payment_Gateway_Exception( $message );
210
  }
211
  }
212
  }
@@ -216,10 +221,11 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
216
  * Capture funds for a credit card authorization
217
  *
218
  * @since 3.0.0
 
219
  * @see SV_WC_Payment_Gateway_API::credit_card_capture()
220
  * @param \WC_Order $order order
221
  * @return \WC_Braintree_API_Transaction_Response
222
- * @throws \SV_WC_Payment_Gateway_Exception
223
  */
224
  public function credit_card_capture( WC_Order $order ) {
225
 
@@ -248,9 +254,10 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
248
  * Perform a refund for the order
249
  *
250
  * @since 3.0.0
 
251
  * @param \WC_Order $order the order
252
  * @return \WC_Braintree_API_Transaction_Response
253
- * @throws \SV_WC_Payment_Gateway_Exception
254
  */
255
  public function refund( WC_Order $order ) {
256
 
@@ -269,9 +276,10 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
269
  * Perform a void for the order
270
  *
271
  * @since 3.0.0
 
272
  * @param \WC_Order $order the order
273
  * @return \WC_Braintree_API_Transaction_Response
274
- * @throws \SV_WC_Payment_Gateway_Exception
275
  */
276
  public function void( WC_Order $order ) {
277
 
@@ -293,9 +301,11 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
293
  * Tokenize the payment method associated with the order
294
  *
295
  * @since 3.0.0
 
296
  * @see SV_WC_Payment_Gateway_API::tokenize_payment_method()
297
  * @param WC_Order $order the order with associated payment and customer info
298
  * @return \WC_Braintree_API_Customer_Response|\WC_Braintree_API_Payment_Method_Response
 
299
  */
300
  public function tokenize_payment_method( WC_Order $order ) {
301
 
@@ -328,10 +338,11 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
328
  * Get the tokenized payment methods for the customer
329
  *
330
  * @since 3.0.0
 
331
  * @see SV_WC_Payment_Gateway_API::get_tokenized_payment_methods()
332
  * @param string $customer_id unique
333
  * @return \WC_Braintree_API_Customer_response
334
- * @throws \SV_WC_API_Exception
335
  */
336
  public function get_tokenized_payment_methods( $customer_id ) {
337
 
@@ -373,10 +384,12 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
373
  * Remove the given tokenized payment method for the customer
374
  *
375
  * @since 3.0.0
 
376
  * @see SV_WC_Payment_Gateway_API::remove_tokenized_payment_method()
377
  * @param string $token the payment method token
378
  * @param string $customer_id unique
379
- * @return \WC_Authorize_Net_CIM_API_Payment_Profile_Response
 
380
  */
381
  public function remove_tokenized_payment_method( $token, $customer_id ) {
382
 
@@ -419,7 +432,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
419
  * @since 3.0.0
420
  * @param string $nonce payment nonce
421
  * @return \WC_Braintree_API_Payment_Method_Nonce_Response
422
- * @throws WC_Braintree_Framework\SV_WC_Plugin_Exception
423
  */
424
  public function get_payment_method_from_nonce( $nonce ) {
425
 
@@ -438,7 +451,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
438
  * @since 3.0.0
439
  * @param string $token payment method token ID
440
  * @return \WC_Braintree_API_Payment_Method_Nonce_Response
441
- * @throws WC_Braintree_Framework\SV_WC_Plugin_Exception
442
  */
443
  public function get_nonce_from_payment_token( $token ) {
444
 
@@ -506,13 +519,13 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
506
  * @since 3.0.0
507
  * @param mixed $response directly from Braintree SDK
508
  * @return \WC_Braintree_API_Response
509
- * @throws \SV_WC_API_Exception braintree errors
510
  */
511
  protected function handle_response( $response ) {
512
 
513
  // check if Braintree response contains exception and convert to framework exception
514
  if ( $response instanceof Exception ) {
515
- throw new WC_Braintree_Framework\SV_WC_API_Exception( $this->get_braintree_exception_message( $response ), $response->getCode(), $response );
516
  }
517
 
518
  $handler_class = $this->get_response_handler();
@@ -628,7 +641,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
628
  * @since 3.0.0
629
  * @see SV_WC_API_Base::get_new_request()
630
  * @param array $args
631
- * @throws SV_WC_API_Exception for invalid request types
632
  * @return \WC_Braintree_API_Client_Token_Request|\WC_Braintree_API_Transaction_Request|\WC_Braintree_API_Customer_Request|\WC_Braintree_API_Payment_Method_Request|\WC_Braintree_API_Payment_Method_Nonce_Request
633
  */
634
  protected function get_new_request( $args = array() ) {
@@ -662,7 +675,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
662
  return new WC_Braintree_API_Payment_Method_Nonce_Request();
663
 
664
  default:
665
- throw new WC_Braintree_Framework\SV_WC_API_Exception( 'Invalid request type' );
666
  }
667
  }
668
 
@@ -713,7 +726,7 @@ class WC_Braintree_API extends WC_Braintree_Framework\SV_WC_API_Base implements
713
  * Return the gateway plugin
714
  *
715
  * @since 3.0.0
716
- * @return \SV_WC_Payment_Gateway_Plugin
717
  */
718
  public function get_plugin() {
719
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
36
  *
37
  * @since 3.0.0
38
  */
39
+ class WC_Braintree_API extends Framework\SV_WC_API_Base implements Framework\SV_WC_Payment_Gateway_API {
40
 
41
 
42
  /** Braintree Partner ID for transactions using Braintree Auth */
74
  * @since 2.2.0
75
  *
76
  * @return WC_Braintree_API_Merchant_Configuration_Response
77
+ * @throws Framework\SV_WC_Plugin_Exception
78
  */
79
  public function get_merchant_configuration() {
80
 
84
 
85
  // sanity check that the client key has valid JSON to decode
86
  if ( ! json_decode( $data ) ) {
87
+ throw new Framework\SV_WC_API_Exception( 'The client key contained invalid JSON.', 500 );
88
  }
89
 
90
  return new WC_Braintree_API_Merchant_Configuration_Response( $data );
95
  * Get a client token for initializing the hosted fields or PayPal forms
96
  *
97
  * @since 3.0.0
98
+ *
99
  * @param array $args
100
  * @return \WC_Braintree_API_Client_Token_Response
101
+ * @throws Framework\SV_WC_Plugin_Exception
102
  */
103
  public function get_client_token( Array $args = array() ) {
104
 
116
  * Create a new credit card charge transaction
117
  *
118
  * @since 3.0.0
119
+ *
120
  * @see SV_WC_Payment_Gateway_API::credit_card_charge()
121
+ *
122
  * @param \WC_Order $order order
123
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response|\WC_Braintree_API_PayPal_Transaction_Response
124
+ * @throws Framework\SV_WC_Plugin_Exception
125
  */
126
  public function credit_card_charge( WC_Order $order ) {
127
 
145
  * Create a new credit card auth transaction
146
  *
147
  * @since 3.0.0
148
+ *
149
  * @see SV_WC_Payment_Gateway_API::credit_card_authorization()
150
  * @param \WC_Order $order order
151
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response|\WC_Braintree_API_PayPal_Transaction_Response
152
+ * @throws Framework\SV_WC_Plugin_Exception
153
  */
154
  public function credit_card_authorization( WC_Order $order ) {
155
 
174
  * is required. This must be done prior to processing the actual transaction.
175
  *
176
  * @since 3.0.0
177
+ *
178
+ * @param \WC_Order $order order
179
+ * @throws Framework\SV_WC_Plugin_Exception if CSC verification fails
180
  */
181
  public function verify_csc( WC_Order $order ) {
182
 
211
  $message = $result->get_user_message();
212
  }
213
 
214
+ throw new Framework\SV_WC_Payment_Gateway_Exception( $message );
215
  }
216
  }
217
  }
221
  * Capture funds for a credit card authorization
222
  *
223
  * @since 3.0.0
224
+ *
225
  * @see SV_WC_Payment_Gateway_API::credit_card_capture()
226
  * @param \WC_Order $order order
227
  * @return \WC_Braintree_API_Transaction_Response
228
+ * @throws Framework\SV_WC_Plugin_Exception
229
  */
230
  public function credit_card_capture( WC_Order $order ) {
231
 
254
  * Perform a refund for the order
255
  *
256
  * @since 3.0.0
257
+ *
258
  * @param \WC_Order $order the order
259
  * @return \WC_Braintree_API_Transaction_Response
260
+ * @throws Framework\SV_WC_Plugin_Exception
261
  */
262
  public function refund( WC_Order $order ) {
263
 
276
  * Perform a void for the order
277
  *
278
  * @since 3.0.0
279
+ *
280
  * @param \WC_Order $order the order
281
  * @return \WC_Braintree_API_Transaction_Response
282
+ * @throws Framework\SV_WC_Plugin_Exception
283
  */
284
  public function void( WC_Order $order ) {
285
 
301
  * Tokenize the payment method associated with the order
302
  *
303
  * @since 3.0.0
304
+ *
305
  * @see SV_WC_Payment_Gateway_API::tokenize_payment_method()
306
  * @param WC_Order $order the order with associated payment and customer info
307
  * @return \WC_Braintree_API_Customer_Response|\WC_Braintree_API_Payment_Method_Response
308
+ * @throws Framework\SV_WC_Plugin_Exception
309
  */
310
  public function tokenize_payment_method( WC_Order $order ) {
311
 
338
  * Get the tokenized payment methods for the customer
339
  *
340
  * @since 3.0.0
341
+ *
342
  * @see SV_WC_Payment_Gateway_API::get_tokenized_payment_methods()
343
  * @param string $customer_id unique
344
  * @return \WC_Braintree_API_Customer_response
345
+ * @throws Framework\SV_WC_API_Exception
346
  */
347
  public function get_tokenized_payment_methods( $customer_id ) {
348
 
384
  * Remove the given tokenized payment method for the customer
385
  *
386
  * @since 3.0.0
387
+ *
388
  * @see SV_WC_Payment_Gateway_API::remove_tokenized_payment_method()
389
  * @param string $token the payment method token
390
  * @param string $customer_id unique
391
+ * @return \WC_Braintree_API_Payment_Method_Response
392
+ * @throws Framework\SV_WC_Plugin_Exception
393
  */
394
  public function remove_tokenized_payment_method( $token, $customer_id ) {
395
 
432
  * @since 3.0.0
433
  * @param string $nonce payment nonce
434
  * @return \WC_Braintree_API_Payment_Method_Nonce_Response
435
+ * @throws Framework\SV_WC_Plugin_Exception
436
  */
437
  public function get_payment_method_from_nonce( $nonce ) {
438
 
451
  * @since 3.0.0
452
  * @param string $token payment method token ID
453
  * @return \WC_Braintree_API_Payment_Method_Nonce_Response
454
+ * @throws Framework\SV_WC_Plugin_Exception
455
  */
456
  public function get_nonce_from_payment_token( $token ) {
457
 
519
  * @since 3.0.0
520
  * @param mixed $response directly from Braintree SDK
521
  * @return \WC_Braintree_API_Response
522
+ * @throws Framework\SV_WC_API_Exception braintree errors
523
  */
524
  protected function handle_response( $response ) {
525
 
526
  // check if Braintree response contains exception and convert to framework exception
527
  if ( $response instanceof Exception ) {
528
+ throw new Framework\SV_WC_API_Exception( $this->get_braintree_exception_message( $response ), $response->getCode(), $response );
529
  }
530
 
531
  $handler_class = $this->get_response_handler();
641
  * @since 3.0.0
642
  * @see SV_WC_API_Base::get_new_request()
643
  * @param array $args
644
+ * @throws Framework\SV_WC_API_Exception for invalid request types
645
  * @return \WC_Braintree_API_Client_Token_Request|\WC_Braintree_API_Transaction_Request|\WC_Braintree_API_Customer_Request|\WC_Braintree_API_Payment_Method_Request|\WC_Braintree_API_Payment_Method_Nonce_Request
646
  */
647
  protected function get_new_request( $args = array() ) {
675
  return new WC_Braintree_API_Payment_Method_Nonce_Request();
676
 
677
  default:
678
+ throw new Framework\SV_WC_API_Exception( 'Invalid request type' );
679
  }
680
  }
681
 
726
  * Return the gateway plugin
727
  *
728
  * @since 3.0.0
729
+ * @return \WC_Braintree
730
  */
731
  public function get_plugin() {
732
 
includes/api/requests/abstract-wc-braintree-api-request.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 3.0.0
35
  */
36
- abstract class WC_Braintree_API_Request implements WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Request {
37
 
38
 
39
  /** @var string Braintree SDK resource for the request, e.g. `transaction` */
@@ -197,7 +197,7 @@ abstract class WC_Braintree_API_Request implements WC_Braintree_Framework\SV_WC_
197
  */
198
  public function get_request_data() {
199
 
200
- WC_Braintree_Framework\SV_WC_Plugin_Compatibility::wc_deprecated_function( __FUNCTION__, '2.2.0', 'WC_Braintree_API_Request::get_data' );
201
 
202
  return $this->get_data();
203
  }
@@ -249,7 +249,10 @@ abstract class WC_Braintree_API_Request implements WC_Braintree_Framework\SV_WC_
249
  */
250
  public function get_order_prop( $prop ) {
251
 
252
- return WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $this->get_order(), $prop );
 
 
 
253
  }
254
 
255
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
33
  *
34
  * @since 3.0.0
35
  */
36
+ abstract class WC_Braintree_API_Request implements Framework\SV_WC_Payment_Gateway_API_Request {
37
 
38
 
39
  /** @var string Braintree SDK resource for the request, e.g. `transaction` */
197
  */
198
  public function get_request_data() {
199
 
200
+ Framework\SV_WC_Plugin_Compatibility::wc_deprecated_function( __FUNCTION__, '2.2.0', 'WC_Braintree_API_Request::get_data' );
201
 
202
  return $this->get_data();
203
  }
249
  */
250
  public function get_order_prop( $prop ) {
251
 
252
+ $order = $this->get_order();
253
+ $method = "get_{$prop}";
254
+
255
+ return $order instanceof \WC_Order && is_callable( [ $order, $method ] ) ? $order->$method( 'edit' ) : '';
256
  }
257
 
258
 
includes/api/requests/class-wc-braintree-api-customer-request.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -52,11 +52,11 @@ class WC_Braintree_API_Customer_Request extends WC_Braintree_API_Vault_Request {
52
  $this->set_callback( 'create' );
53
 
54
  $this->request_data = array(
55
- 'company' => WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_company' ),
56
- 'email' => WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_email' ),
57
- 'phone' => WC_Braintree_Framework\SV_WC_Helper::str_truncate( preg_replace( '/[^\d\-().]/', '', WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_phone' ) ), 14, '' ),
58
- 'firstName' => WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_first_name' ),
59
- 'lastName' => WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_last_name' ),
60
  'paymentMethodNonce' => $order->payment->nonce,
61
  );
62
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
52
  $this->set_callback( 'create' );
53
 
54
  $this->request_data = array(
55
+ 'company' => $order->get_billing_company( 'edit' ),
56
+ 'email' => $order->get_billing_email( 'edit' ),
57
+ 'phone' => Framework\SV_WC_Helper::str_truncate( preg_replace( '/[^\d\-().]/', '', $order->get_billing_phone( 'edit' ) ), 14, '' ),
58
+ 'firstName' => $order->get_billing_first_name( 'edit' ),
59
+ 'lastName' => $order->get_billing_last_name( 'edit' ),
60
  'paymentMethodNonce' => $order->payment->nonce,
61
  );
62
 
includes/api/requests/class-wc-braintree-api-transaction-request.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -156,7 +156,7 @@ class WC_Braintree_API_Transaction_Request extends WC_Braintree_API_Request {
156
  'options' => $this->get_options( $settlement_type ),
157
  'channel' => $this->get_channel(),
158
  'deviceData' => empty( $this->get_order()->payment->device_data ) ? null : $this->get_order()->payment->device_data,
159
- 'taxAmount' => WC_Braintree_Framework\SV_WC_Helper::number_format( $this->get_order()->get_total_tax() ),
160
  'taxExempt' => $this->get_order()->get_user_id() > 0 && is_callable( array( WC()->customer, 'is_vat_exempt' ) ) ? WC()->customer->is_vat_exempt() : false,
161
  );
162
 
@@ -206,7 +206,7 @@ class WC_Braintree_API_Transaction_Request extends WC_Braintree_API_Request {
206
  'firstName' => $this->get_order_prop( 'billing_first_name' ),
207
  'lastName' => $this->get_order_prop( 'billing_last_name' ),
208
  'company' => $this->get_order_prop( 'billing_company' ),
209
- 'phone' => WC_Braintree_Framework\SV_WC_Helper::str_truncate( preg_replace( '/[^\d\-().]/', '', $this->get_order_prop( 'billing_phone' ) ), 14, '' ),
210
  'email' => $this->get_order_prop( 'billing_email' ),
211
  );
212
  }
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
156
  'options' => $this->get_options( $settlement_type ),
157
  'channel' => $this->get_channel(),
158
  'deviceData' => empty( $this->get_order()->payment->device_data ) ? null : $this->get_order()->payment->device_data,
159
+ 'taxAmount' => Framework\SV_WC_Helper::number_format( $this->get_order()->get_total_tax() ),
160
  'taxExempt' => $this->get_order()->get_user_id() > 0 && is_callable( array( WC()->customer, 'is_vat_exempt' ) ) ? WC()->customer->is_vat_exempt() : false,
161
  );
162
 
206
  'firstName' => $this->get_order_prop( 'billing_first_name' ),
207
  'lastName' => $this->get_order_prop( 'billing_last_name' ),
208
  'company' => $this->get_order_prop( 'billing_company' ),
209
+ 'phone' => Framework\SV_WC_Helper::str_truncate( preg_replace( '/[^\d\-().]/', '', $this->get_order_prop( 'billing_phone' ) ), 14, '' ),
210
  'email' => $this->get_order_prop( 'billing_email' ),
211
  );
212
  }
includes/api/responses/abstract-wc-braintree-api-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 3.0.0
35
  */
36
- abstract class WC_Braintree_API_Response implements WC_Braintree_Framework\SV_WC_API_Response {
37
 
38
 
39
  /** @var mixed raw response from the Braintree SDK */
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
33
  *
34
  * @since 3.0.0
35
  */
36
+ abstract class WC_Braintree_API_Response implements Framework\SV_WC_API_Response {
37
 
38
 
39
  /** @var mixed raw response from the Braintree SDK */
includes/api/responses/abstract-wc-braintree-api-transaction-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -35,7 +35,7 @@ defined( 'ABSPATH' ) or exit;
35
  *
36
  * @since 3.0.0
37
  */
38
- abstract class WC_Braintree_API_Transaction_Response extends WC_Braintree_API_Response implements WC_Braintree_Framework\SV_WC_Payment_Gateway_API_response, WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Authorization_Response, WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Customer_Response {
39
 
40
 
41
  /** Braintree's CSC match value */
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
35
  *
36
  * @since 3.0.0
37
  */
38
+ abstract class WC_Braintree_API_Transaction_Response extends WC_Braintree_API_Response implements Framework\SV_WC_Payment_Gateway_API_response, Framework\SV_WC_Payment_Gateway_API_Authorization_Response, Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, Framework\SV_WC_Payment_Gateway_API_Customer_Response {
39
 
40
 
41
  /** Braintree's CSC match value */
includes/api/responses/abstract-wc-braintree-api-vault-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -52,7 +52,7 @@ abstract class WC_Braintree_API_Vault_Response extends WC_Braintree_API_Response
52
  'default' => false,
53
  'type' => WC_Braintree_Payment_Method::CREDIT_CARD_TYPE,
54
  'last_four' => $payment_method->last4,
55
- 'card_type' => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $payment_method->bin ),
56
  'exp_month' => $payment_method->expirationMonth,
57
  'exp_year' => $payment_method->expirationYear,
58
  'billing_address_id' => ( isset( $payment_method->billingAddress ) && ! empty( $payment_method->billingAddress->id ) ) ? $payment_method->billingAddress->id : null,
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
52
  'default' => false,
53
  'type' => WC_Braintree_Payment_Method::CREDIT_CARD_TYPE,
54
  'last_four' => $payment_method->last4,
55
+ 'card_type' => Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $payment_method->bin ),
56
  'exp_month' => $payment_method->expirationMonth,
57
  'exp_year' => $payment_method->expirationYear,
58
  'billing_address_id' => ( isset( $payment_method->billingAddress ) && ! empty( $payment_method->billingAddress->id ) ) ? $payment_method->billingAddress->id : null,
includes/api/responses/class-wc-braintree-api-client-token-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
includes/api/responses/class-wc-braintree-api-credit-card-transaction-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -61,7 +61,7 @@ class WC_Braintree_API_Credit_Card_Transaction_Response extends WC_Braintree_API
61
  public function get_payment_token() {
62
 
63
  if ( empty( $this->response->transaction->creditCardDetails->token ) ) {
64
- throw new WC_Braintree_Framework\SV_WC_Payment_Gateway_Exception( __( 'Required credit card token is missing or empty!', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
65
  }
66
 
67
  $data = array(
@@ -87,7 +87,7 @@ class WC_Braintree_API_Credit_Card_Transaction_Response extends WC_Braintree_API
87
  public function get_card_type() {
88
 
89
  // note that creditCardDetails->cardType is not used here as it is already prettified (e.g. American Express instead of amex)
90
- return WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $this->get_bin() );
91
  }
92
 
93
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
61
  public function get_payment_token() {
62
 
63
  if ( empty( $this->response->transaction->creditCardDetails->token ) ) {
64
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Required credit card token is missing or empty!', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
65
  }
66
 
67
  $data = array(
87
  public function get_card_type() {
88
 
89
  // note that creditCardDetails->cardType is not used here as it is already prettified (e.g. American Express instead of amex)
90
+ return Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $this->get_bin() );
91
  }
92
 
93
 
includes/api/responses/class-wc-braintree-api-customer-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 3.0.0
35
  */
36
- class WC_Braintree_API_Customer_Response extends WC_Braintree_API_Vault_Response implements WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response, WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Customer_Response {
37
 
38
 
39
  /** @var \Braintree\CreditCard|\Braintree_PayPalAccount created payment method */
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
33
  *
34
  * @since 3.0.0
35
  */
36
+ class WC_Braintree_API_Customer_Response extends WC_Braintree_API_Vault_Response implements Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, Framework\SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response, Framework\SV_WC_Payment_Gateway_API_Customer_Response {
37
 
38
 
39
  /** @var \Braintree\CreditCard|\Braintree_PayPalAccount created payment method */
includes/api/responses/class-wc-braintree-api-merchant-configuration-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
includes/api/responses/class-wc-braintree-api-payment-method-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 3.0.0
35
  */
36
- class WC_Braintree_API_Payment_Method_Response extends WC_Braintree_API_Vault_Response implements WC_Braintree_Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response {
37
 
38
 
39
  /**
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
33
  *
34
  * @since 3.0.0
35
  */
36
+ class WC_Braintree_API_Payment_Method_Response extends WC_Braintree_API_Vault_Response implements Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response {
37
 
38
 
39
  /**
includes/api/responses/class-wc-braintree-api-paypal-transaction-response.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -63,7 +63,7 @@ class WC_Braintree_API_PayPal_Transaction_Response extends WC_Braintree_API_Tran
63
  public function get_payment_token() {
64
 
65
  if ( empty( $this->response->transaction->paypalDetails->token ) ) {
66
- throw new WC_Braintree_Framework\SV_WC_Payment_Gateway_Exception( __( 'Required PayPal token is missing or empty!', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
67
  }
68
 
69
  $data = array(
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
63
  public function get_payment_token() {
64
 
65
  if ( empty( $this->response->transaction->paypalDetails->token ) ) {
66
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Required PayPal token is missing or empty!', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
67
  }
68
 
69
  $data = array(
includes/apple-pay/api/class-wc-braintree-apple-pay-api-payment-response.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree\Apple_Pay\API;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.2.0
35
  */
36
- class Payment_Response extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response {
37
 
38
 
39
  /**
24
 
25
  namespace WC_Braintree\Apple_Pay\API;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
33
  *
34
  * @since 2.2.0
35
  */
36
+ class Payment_Response extends Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response {
37
 
38
 
39
  /**
includes/apple-pay/class-wc-braintree-apple-pay-frontend.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree\Apple_Pay;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -33,13 +33,26 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.2.0
35
  */
36
- class Frontend extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend {
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
 
39
  /**
40
  * Enqueues the scripts.
41
  *
42
- * @see WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend::enqueue_scripts()
43
  *
44
  * @since 2.2.0
45
  */
@@ -56,35 +69,18 @@ class Frontend extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Fr
56
  }
57
 
58
 
59
- /**
60
- * Gets the JS handler name.
61
- *
62
- * Braintree requires its own JS handler that extends the FW implementation.
63
- *
64
- * @see WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend::get_js_handler_name()
65
- *
66
- * @since 2.2.0
67
- *
68
- * @return string
69
- */
70
- protected function get_js_handler_name() {
71
-
72
- return 'WC_Braintree_Apple_Pay_Handler';
73
- }
74
-
75
-
76
  /**
77
  * Gets the parameters to be passed to the JS handler.
78
  *
79
- * @see WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend::get_js_handler_params()
80
  *
81
- * @since 2.2.0
82
  *
83
  * @return array
84
  */
85
- protected function get_js_handler_params() {
86
 
87
- $params = parent::get_js_handler_params();
88
 
89
  $params['store_name'] = get_bloginfo( 'name' );
90
  $params['client_token_nonce'] = wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' );
24
 
25
  namespace WC_Braintree\Apple_Pay;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
33
  *
34
  * @since 2.2.0
35
  */
36
+ class Frontend extends Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend {
37
+
38
+
39
+ /**
40
+ * Gets the JS handler class name.
41
+ *
42
+ * @since 2.4.0
43
+ *
44
+ * @return string
45
+ */
46
+ protected function get_js_handler_class_name() {
47
+
48
+ return 'WC_Braintree_Apple_Pay_Handler';
49
+ }
50
 
51
 
52
  /**
53
  * Enqueues the scripts.
54
  *
55
+ * @see Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend::enqueue_scripts()
56
  *
57
  * @since 2.2.0
58
  */
69
  }
70
 
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  /**
73
  * Gets the parameters to be passed to the JS handler.
74
  *
75
+ * @see Framework\SV_WC_Payment_Gateway_Apple_Pay_Frontend::get_js_handler_args()
76
  *
77
+ * @since 2.4.0
78
  *
79
  * @return array
80
  */
81
+ protected function get_js_handler_args() {
82
 
83
+ $params = parent::get_js_handler_args();
84
 
85
  $params['store_name'] = get_bloginfo( 'name' );
86
  $params['client_token_nonce'] = wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' );
includes/apple-pay/class-wc-braintree-apple-pay.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.2.0
35
  */
36
- class Apple_Pay extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay {
37
 
38
 
39
  /**
24
 
25
  namespace WC_Braintree;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
33
  *
34
  * @since 2.2.0
35
  */
36
+ class Apple_Pay extends Framework\SV_WC_Payment_Gateway_Apple_Pay {
37
 
38
 
39
  /**
includes/class-wc-braintree-capture.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.2.0
35
  */
36
- class Capture extends WC_Braintree_Framework\Payment_Gateway\Handlers\Capture {
37
 
38
 
39
  /**
@@ -47,12 +47,12 @@ class Capture extends WC_Braintree_Framework\Payment_Gateway\Handlers\Capture {
47
  public function has_order_authorization_expired( \WC_Order $order ) {
48
 
49
  if ( ! $this->get_gateway()->get_order_meta( $order, 'trans_id' ) ) {
50
- $this->get_gateway()->update_order_meta( $order, 'trans_id', WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'transaction_id' ) );
51
  }
52
 
53
- $date_created = WC_Braintree_Framework\SV_WC_Order_Compatibility::get_date_created( $order );
54
 
55
- if ( ! $this->get_gateway()->get_order_meta( $order, 'trans_date' ) && $date_created ) {
56
  $this->get_gateway()->update_order_meta( $order, 'trans_date', $date_created->date( 'Y-m-d H:i:s' ) );
57
  }
58
 
24
 
25
  namespace WC_Braintree;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
33
  *
34
  * @since 2.2.0
35
  */
36
+ class Capture extends Framework\Payment_Gateway\Handlers\Capture {
37
 
38
 
39
  /**
47
  public function has_order_authorization_expired( \WC_Order $order ) {
48
 
49
  if ( ! $this->get_gateway()->get_order_meta( $order, 'trans_id' ) ) {
50
+ $this->get_gateway()->update_order_meta( $order, 'trans_id', $order->get_transaction_id( 'edit' ) );
51
  }
52
 
53
+ $date_created = $order->get_date_created( 'edit' );
54
 
55
+ if ( $date_created && ! $this->get_gateway()->get_order_meta( $order, 'trans_date' ) ) {
56
  $this->get_gateway()->update_order_meta( $order, 'trans_date', $date_created->date( 'Y-m-d H:i:s' ) );
57
  }
58
 
includes/class-wc-braintree-frontend.php CHANGED
@@ -27,7 +27,7 @@ defined( 'ABSPATH' ) or exit;
27
  /**
28
  * Braintree Frontend class
29
  *
30
- * Modifies the "My Payment Methods" table output from WC_Braintree_Framework files.
31
  *
32
  * TODO: This class can be removed if / when the SV Plugin Framework implements card icons in their own table cells.
33
  * @see https://github.com/skyverge/wc-plugin-framework/issues/198
27
  /**
28
  * Braintree Frontend class
29
  *
30
+ * Modifies the "My Payment Methods" table output from Framework files.
31
  *
32
  * TODO: This class can be removed if / when the SV Plugin Framework implements card icons in their own table cells.
33
  * @see https://github.com/skyverge/wc-plugin-framework/issues/198
includes/class-wc-braintree-lifecycle.php CHANGED
@@ -24,7 +24,7 @@
24
 
25
  namespace WC_Braintree;
26
 
27
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
@@ -35,7 +35,7 @@ defined( 'ABSPATH' ) or exit;
35
  *
36
  * @method \WC_Braintree get_plugin()
37
  */
38
- class Lifecycle extends WC_Braintree_Framework\Plugin\Lifecycle {
39
 
40
 
41
  /**
@@ -194,7 +194,7 @@ class Lifecycle extends WC_Braintree_Framework\Plugin\Lifecycle {
194
 
195
  $settings['connect_manually'] = 'yes';
196
 
197
- update_option( $this->get_plugin()->get_gateway_settings_name( $gateway_id ), $settings );
198
  }
199
  }
200
 
24
 
25
  namespace WC_Braintree;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
35
  *
36
  * @method \WC_Braintree get_plugin()
37
  */
38
+ class Lifecycle extends Framework\Plugin\Lifecycle {
39
 
40
 
41
  /**
194
 
195
  $settings['connect_manually'] = 'yes';
196
 
197
+ update_option( "woocommerce_${gateway_id}_settings", $settings );
198
  }
199
  }
200
 
includes/class-wc-braintree-payment-method-handler.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -34,7 +34,7 @@ defined( 'ABSPATH' ) or exit;
34
  *
35
  * @since 3.2.0
36
  */
37
- class WC_Braintree_Payment_Method_Handler extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Payment_Tokens_Handler {
38
 
39
 
40
  /**
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
34
  *
35
  * @since 3.2.0
36
  */
37
+ class WC_Braintree_Payment_Method_Handler extends Framework\SV_WC_Payment_Gateway_Payment_Tokens_Handler {
38
 
39
 
40
  /**
includes/class-wc-braintree-payment-method.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -34,7 +34,7 @@ defined( 'ABSPATH' ) or exit;
34
  *
35
  * @since 3.0.0
36
  */
37
- class WC_Braintree_Payment_Method extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Payment_Token {
38
 
39
 
40
  /** credit card payment method type */
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
34
  *
35
  * @since 3.0.0
36
  */
37
+ class WC_Braintree_Payment_Method extends Framework\SV_WC_Payment_Gateway_Payment_Token {
38
 
39
 
40
  /** credit card payment method type */
includes/class-wc-gateway-braintree-credit-card.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -176,11 +176,13 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
176
  /**
177
  * Initializes the payment form handler.
178
  *
179
- * @since 2.2.1
 
 
180
  */
181
- public function init_payment_form_handler() {
182
 
183
- $this->payment_form_handler = new \WC_Braintree_Hosted_Fields_Payment_Form( $this );
184
  }
185
 
186
 
@@ -244,14 +246,14 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
244
 
245
  // Braintree declares 3D Secure support for AMEX, Maestro, MasterCard, and Visa
246
  $card_types = $default_card_types = array(
247
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ),
248
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO ),
249
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD ),
250
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA ),
251
  );
252
 
253
  // exclude American Express by default, since that requires additional merchant configuration, but still let people enabled it
254
- unset( $default_card_types[ WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ] );
255
 
256
  $fields = array(
257
  'threed_secure_title' => array(
@@ -417,12 +419,12 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
417
 
418
  // ensure the card type is normalized to FW format
419
  if ( empty( $order->payment->card_type ) ) {
420
- $order->payment->card_type = WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-card-type' ) );
421
  }
422
 
423
  // add information for 3DS transactions, note that server-side verification
424
  // has already been checked in validate_fields() and passed
425
- if ( $this->is_3d_secure_enabled() && WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-3d-secure-enabled' ) && ( ! $order->payment->card_type || $this->card_type_supports_3d_secure( $order->payment->card_type ) ) ) {
426
 
427
  // indicate if 3DS should be required for every transaction -- note
428
  // this will result in a gateway rejection for *every* transaction
@@ -432,7 +434,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
432
  // when using a saved payment method for a transaction that has been
433
  // 3DS verified, indicate the nonce should be used instead, which
434
  // passes the 3DS verification details to Braintree
435
- if ( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-3d-secure-verified' ) && ! empty( $order->payment->token ) && ! empty( $order->payment->nonce ) ) {
436
  $order->payment->use_3ds_nonce = true;
437
  }
438
  }
@@ -452,7 +454,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
452
  * @param WC_Order $order the order object
453
  * @param \WC_Braintree_API_Credit_Card_Transaction_Response $response optional credit card transaction response
454
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response
455
- * @throws WC_Braintree_Framework\SV_WC_Plugin_Exception
456
  */
457
  protected function do_credit_card_transaction( $order, $response = null ) {
458
 
@@ -463,7 +465,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
463
  if ( $response->transaction_approved() ) {
464
  $order->payment->account_number = $response->get_masked_number();
465
  $order->payment->last_four = $response->get_last_four();
466
- $order->payment->card_type = WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $response->get_masked_number() );
467
  $order->payment->exp_month = $response->get_exp_month();
468
  $order->payment->exp_year = $response->get_exp_year();
469
  }
@@ -509,10 +511,10 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
509
  * @since 2.2.0
510
  *
511
  * @param \WC_Order $order order object
512
- * @param WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response $response
513
  * @return \WC_Order
514
  */
515
- public function get_order_for_apple_pay( \WC_Order $order, WC_Braintree_Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response $response ) {
516
 
517
  $order = parent::get_order_for_apple_pay( $order, $response );
518
 
@@ -644,7 +646,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
644
  */
645
  public function adjust_fraud_script_tag( $url ) {
646
 
647
- if ( WC_Braintree_Framework\SV_WC_Helper::str_exists( $url, 'braintree-data.js' ) ) {
648
 
649
  $url = "{$url}' async='true";
650
  }
@@ -745,7 +747,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
745
 
746
  $this->threed_secure_available = $response->is_3d_secure_enabled();
747
 
748
- } catch ( WC_Braintree_Framework\SV_WC_API_Exception $exception ) {
749
 
750
  // there was a problem with the API, so nothing we can do but log the issues
751
  $this->add_debug_message( "Could not determine the merchant's 3D Secure configuration. {$exception->getMessage()}" );
@@ -845,7 +847,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
845
  */
846
  public function card_type_supports_3d_secure( $card_type ) {
847
 
848
- return in_array( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( $card_type ), $this->get_3d_secure_card_types(), true );
849
  }
850
 
851
 
@@ -883,7 +885,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
883
 
884
  $nonce = $result->get_nonce();
885
 
886
- } catch ( WC_Braintree_Framework\SV_WC_Plugin_Exception $e ) {
887
 
888
  $this->add_debug_message( $e->getMessage(), 'error' );
889
  }
@@ -908,20 +910,20 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
908
 
909
  // no additional validation if 3D Secure was disabled
910
  // we check both the gateway method (filtered) and if the client-side JS validated 3D Secure (hidden input)
911
- if ( ! $is_valid || ! $this->is_3d_secure_enabled() || ! WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-3d-secure-enabled' ) ) {
912
  return $is_valid;
913
  }
914
 
915
- $card_type = WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-card-type' );
916
 
917
  // nonce must always be present for validation
918
- if ( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc_braintree_credit_card_payment_nonce' ) && ( ! $card_type || $this->card_type_supports_3d_secure( $card_type ) ) ) {
919
 
920
  $error = false;
921
 
922
  try {
923
 
924
- $payment_method = $this->get_api()->get_payment_method_from_nonce( WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc_braintree_credit_card_payment_nonce' ) );
925
 
926
  if ( $payment_method->has_3d_secure_info() ) {
927
 
@@ -951,7 +953,7 @@ class WC_Gateway_Braintree_Credit_Card extends WC_Gateway_Braintree {
951
  }
952
  }
953
 
954
- } catch ( WC_Braintree_Framework\SV_WC_Plugin_Exception $e ) {
955
 
956
  $this->add_debug_message( $e->getMessage(), 'error' );
957
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
176
  /**
177
  * Initializes the payment form handler.
178
  *
179
+ * @since 2.4.0
180
+ *
181
+ * @return \WC_Braintree_Hosted_Fields_Payment_Form
182
  */
183
+ protected function init_payment_form_instance() {
184
 
185
+ return new \WC_Braintree_Hosted_Fields_Payment_Form( $this );
186
  }
187
 
188
 
246
 
247
  // Braintree declares 3D Secure support for AMEX, Maestro, MasterCard, and Visa
248
  $card_types = $default_card_types = array(
249
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX => Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ),
250
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO => Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO ),
251
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD => Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD ),
252
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA => Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA ),
253
  );
254
 
255
  // exclude American Express by default, since that requires additional merchant configuration, but still let people enabled it
256
+ unset( $default_card_types[ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ] );
257
 
258
  $fields = array(
259
  'threed_secure_title' => array(
419
 
420
  // ensure the card type is normalized to FW format
421
  if ( empty( $order->payment->card_type ) ) {
422
+ $order->payment->card_type = Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-card-type' ) );
423
  }
424
 
425
  // add information for 3DS transactions, note that server-side verification
426
  // has already been checked in validate_fields() and passed
427
+ if ( $this->is_3d_secure_enabled() && Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-3d-secure-enabled' ) && ( ! $order->payment->card_type || $this->card_type_supports_3d_secure( $order->payment->card_type ) ) ) {
428
 
429
  // indicate if 3DS should be required for every transaction -- note
430
  // this will result in a gateway rejection for *every* transaction
434
  // when using a saved payment method for a transaction that has been
435
  // 3DS verified, indicate the nonce should be used instead, which
436
  // passes the 3DS verification details to Braintree
437
+ if ( Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-3d-secure-verified' ) && ! empty( $order->payment->token ) && ! empty( $order->payment->nonce ) ) {
438
  $order->payment->use_3ds_nonce = true;
439
  }
440
  }
454
  * @param WC_Order $order the order object
455
  * @param \WC_Braintree_API_Credit_Card_Transaction_Response $response optional credit card transaction response
456
  * @return \WC_Braintree_API_Credit_Card_Transaction_Response
457
+ * @throws Framework\SV_WC_Plugin_Exception
458
  */
459
  protected function do_credit_card_transaction( $order, $response = null ) {
460
 
465
  if ( $response->transaction_approved() ) {
466
  $order->payment->account_number = $response->get_masked_number();
467
  $order->payment->last_four = $response->get_last_four();
468
+ $order->payment->card_type = Framework\SV_WC_Payment_Gateway_Helper::card_type_from_account_number( $response->get_masked_number() );
469
  $order->payment->exp_month = $response->get_exp_month();
470
  $order->payment->exp_year = $response->get_exp_year();
471
  }
511
  * @since 2.2.0
512
  *
513
  * @param \WC_Order $order order object
514
+ * @param Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response $response
515
  * @return \WC_Order
516
  */
517
+ public function get_order_for_apple_pay( \WC_Order $order, Framework\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response $response ) {
518
 
519
  $order = parent::get_order_for_apple_pay( $order, $response );
520
 
646
  */
647
  public function adjust_fraud_script_tag( $url ) {
648
 
649
+ if ( Framework\SV_WC_Helper::str_exists( $url, 'braintree-data.js' ) ) {
650
 
651
  $url = "{$url}' async='true";
652
  }
747
 
748
  $this->threed_secure_available = $response->is_3d_secure_enabled();
749
 
750
+ } catch ( Framework\SV_WC_API_Exception $exception ) {
751
 
752
  // there was a problem with the API, so nothing we can do but log the issues
753
  $this->add_debug_message( "Could not determine the merchant's 3D Secure configuration. {$exception->getMessage()}" );
847
  */
848
  public function card_type_supports_3d_secure( $card_type ) {
849
 
850
+ return in_array( Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( $card_type ), $this->get_3d_secure_card_types(), true );
851
  }
852
 
853
 
885
 
886
  $nonce = $result->get_nonce();
887
 
888
+ } catch ( Framework\SV_WC_Plugin_Exception $e ) {
889
 
890
  $this->add_debug_message( $e->getMessage(), 'error' );
891
  }
910
 
911
  // no additional validation if 3D Secure was disabled
912
  // we check both the gateway method (filtered) and if the client-side JS validated 3D Secure (hidden input)
913
+ if ( ! $is_valid || ! $this->is_3d_secure_enabled() || ! Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-3d-secure-enabled' ) ) {
914
  return $is_valid;
915
  }
916
 
917
+ $card_type = Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-card-type' );
918
 
919
  // nonce must always be present for validation
920
+ if ( Framework\SV_WC_Helper::get_posted_value( 'wc_braintree_credit_card_payment_nonce' ) && ( ! $card_type || $this->card_type_supports_3d_secure( $card_type ) ) ) {
921
 
922
  $error = false;
923
 
924
  try {
925
 
926
+ $payment_method = $this->get_api()->get_payment_method_from_nonce( Framework\SV_WC_Helper::get_posted_value( 'wc_braintree_credit_card_payment_nonce' ) );
927
 
928
  if ( $payment_method->has_3d_secure_info() ) {
929
 
953
  }
954
  }
955
 
956
+ } catch ( Framework\SV_WC_Plugin_Exception $e ) {
957
 
958
  $this->add_debug_message( $e->getMessage(), 'error' );
959
 
includes/class-wc-gateway-braintree-paypal.php CHANGED
@@ -23,7 +23,7 @@
23
  */
24
 
25
  use WC_Braintree\PayPal\Buttons;
26
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
27
 
28
  defined( 'ABSPATH' ) or exit;
29
 
@@ -127,6 +127,10 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
127
  return;
128
  }
129
 
 
 
 
 
130
  if ( $this->product_page_buy_now_enabled() ) {
131
  $this->button_handlers['product'] = new Buttons\Product( $this );
132
  }
@@ -197,11 +201,13 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
197
  /**
198
  * Initializes the payment form handler.
199
  *
200
- * @since 2.2.1
 
 
201
  */
202
- public function init_payment_form_handler() {
203
 
204
- $this->payment_form_handler = new \WC_Braintree_PayPal_Payment_Form( $this );
205
  }
206
 
207
 
@@ -610,6 +616,21 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
610
  }
611
 
612
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  /** Refund feature ********************************************************/
614
 
615
 
23
  */
24
 
25
  use WC_Braintree\PayPal\Buttons;
26
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
27
 
28
  defined( 'ABSPATH' ) or exit;
29
 
127
  return;
128
  }
129
 
130
+ if ( is_admin() && ! is_ajax() ) {
131
+ return;
132
+ }
133
+
134
  if ( $this->product_page_buy_now_enabled() ) {
135
  $this->button_handlers['product'] = new Buttons\Product( $this );
136
  }
201
  /**
202
  * Initializes the payment form handler.
203
  *
204
+ * @since 2.4.0
205
+ *
206
+ * @return \WC_Braintree_PayPal_Payment_Form
207
  */
208
+ protected function init_payment_form_instance() {
209
 
210
+ return new \WC_Braintree_PayPal_Payment_Form( $this );
211
  }
212
 
213
 
616
  }
617
 
618
 
619
+ /**
620
+ * Builds the Pre-Orders integration class instance.
621
+ *
622
+ * @since 2.4.0
623
+ *
624
+ * @return \WC_Braintree\Integrations\Pre_Orders
625
+ */
626
+ protected function build_pre_orders_integration() {
627
+
628
+ require_once( $this->get_plugin()->get_plugin_path() . '/includes/integrations/Pre_Orders.php' );
629
+
630
+ return new WC_Braintree\Integrations\Pre_Orders( $this );
631
+ }
632
+
633
+
634
  /** Refund feature ********************************************************/
635
 
636
 
includes/class-wc-gateway-braintree.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -33,7 +33,7 @@ defined( 'ABSPATH' ) or exit;
33
  *
34
  * @since 2.0.0
35
  */
36
- class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Direct {
37
 
38
 
39
  /** sandbox environment ID */
@@ -83,7 +83,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
83
  * WC_Gateway_Braintree constructor.
84
  *
85
  * @param string $id the gateway id
86
- * @param WC_Braintree_Framework\SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
87
  * @param array $args gateway arguments
88
  */
89
  public function __construct( $id, $plugin, $args ) {
@@ -94,6 +94,22 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
94
  }
95
 
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  /**
98
  * Enqueues admin scripts.
99
  *
@@ -129,7 +145,6 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
129
  *
130
  * @since 3.0.0
131
  * @see SV_WC_Payment_Gateway::enqueue_scripts()
132
- * @return bool
133
  */
134
  public function enqueue_gateway_assets() {
135
 
@@ -162,7 +177,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
162
 
163
  wp_send_json_success( $result->get_client_token() );
164
 
165
- } catch ( WC_Braintree_Framework\SV_WC_Plugin_Exception $e ) {
166
 
167
  $this->add_debug_message( $e->getMessage(), 'error' );
168
 
@@ -183,7 +198,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
183
  public function validate_payment_nonce( $is_valid ) {
184
 
185
  // nonce is required
186
- if ( ! WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc_' . $this->get_id() . '_payment_nonce' ) ) {
187
 
188
  wc_add_notice( __( 'Oops, there was a temporary payment error. Please try another payment method or contact us to complete your transaction.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 'error' );
189
 
@@ -211,7 +226,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
211
 
212
  // nonce may be previously populated by Apple Pay
213
  if ( empty( $order->payment->nonce ) ) {
214
- $order->payment->nonce = WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc_'. $this->get_id() . '_payment_nonce' );
215
  }
216
 
217
  $order->payment->tokenize = $this->get_payment_tokens_handler()->should_tokenize();
@@ -227,10 +242,10 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
227
  }
228
 
229
  // fraud tool data as a JSON string, unslashed as WP slashes $_POST data which breaks the JSON
230
- $order->payment->device_data = wp_unslash( WC_Braintree_Framework\SV_WC_Helper::get_post( 'device_data' ) );
231
 
232
  // merchant account ID
233
- if ( $merchant_account_id = $this->get_merchant_account_id( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'currency', 'view' ) ) ) {
234
  $order->payment->merchant_account_id = $merchant_account_id;
235
  }
236
 
@@ -248,7 +263,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
248
  }
249
 
250
  // the URL descriptor doesn't have any specific validation, so just truncate it if needed
251
- $order->payment->dynamic_descriptors->url = WC_Braintree_Framework\SV_WC_Helper::str_truncate( $this->get_url_dynamic_descriptor(), 13, '' );
252
 
253
  // add the recurring flag to Subscriptions renewal orders
254
  if ( $this->get_plugin()->is_subscriptions_active() && wcs_order_contains_subscription( $order, 'any' ) ) {
@@ -264,8 +279,8 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
264
  }
265
 
266
  // test amount when in sandbox mode
267
- if ( $this->is_test_environment() && ( $test_amount = WC_Braintree_Framework\SV_WC_Helper::get_post( 'wc-' . $this->get_id_dasherized() . '-test-amount' ) ) ) {
268
- $order->payment_total = WC_Braintree_Framework\SV_WC_Helper::number_format( $test_amount );
269
  }
270
 
271
  return $order;
@@ -291,7 +306,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
291
 
292
  if ( empty( $order->refund->trans_id ) ) {
293
 
294
- $order->refund->trans_id = WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'transaction_id' );
295
  }
296
 
297
  return $order;
@@ -470,17 +485,17 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
470
  $environment_field = $form_fields['environment'];
471
  unset( $form_fields['environment'] );
472
 
473
- $form_fields = WC_Braintree_Framework\SV_WC_Helper::array_insert_after( $form_fields, 'connection_settings', [
474
- 'braintree_auth' => [
475
- /** @see \WC_Gateway_Braintree::generate_braintree_auth_html() */
476
- 'type' => 'braintree_auth'
477
- ],
478
- 'connect_manually' => [
479
- 'type' => 'checkbox',
480
- 'label' => __( 'Enter connection credentials manually', 'woocommerce-gateway-paypal-powered-by-braintree' ),
481
- 'default' => 'no',
482
- ],
483
- 'environment' => $environment_field,
484
  ] );
485
 
486
  } else {
@@ -536,7 +551,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
536
  id="wc-braintree-auth-disconnect"
537
  class="button-primary"
538
  ><?php
539
- echo esc_html__( 'Disconnect from PayPal Powered by Braintree', 'woocommerce-gateway-paypal-powered-by-braintree' );
540
  ?></a>
541
  </td>
542
  </tr>
@@ -546,7 +561,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
546
  <div class="wc-backbone-modal-content">
547
  <section class="wc-backbone-modal-main" role="main">
548
  <header class="wc-backbone-modal-header">
549
- <h1><?php esc_html_e( 'PayPal Powered by Braintree', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></h1>
550
  <button class="modal-close modal-close-link dashicons dashicons-no-alt">
551
  <span class="screen-reader-text"><?php esc_html_e( 'Close modal panel and cancel', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></span>
552
  </button>
@@ -773,6 +788,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
773
  $( '#woocommerce_<?php echo esc_js( $this->get_id() ); ?>_connect_manually' ).change( function() {
774
 
775
  var $environment = $( '#woocommerce_<?php echo esc_js( $this->get_id() ); ?>_environment' ).val();
 
776
  var $environmentFields = $( '.' + $environment + '-field' );
777
 
778
  if ( $( this ).is( ':checked' ) ) {
@@ -940,7 +956,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
940
  // first unset all merchant account IDs from settings so they can be freshly set
941
  foreach ( array_keys( $sanitized_fields ) as $name ) {
942
 
943
- if ( WC_Braintree_Framework\SV_WC_Helper::str_starts_with( $name, 'merchant_account_id_' ) ) {
944
  unset( $sanitized_fields[ $name ] );
945
  unset( $this->settings[ $name ] );
946
  }
@@ -997,7 +1013,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
997
  return false;
998
  }
999
 
1000
- $order_id = WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'id' );
1001
 
1002
  // update a legacy payment token if it exists
1003
  if ( 'payment_token' === $key && metadata_exists( 'post', $order_id, '_wc_paypal_braintree_payment_method_token' ) && ! get_post_meta( $order_id, $this->get_order_meta_prefix() . $key, true ) && $this->get_id() === get_post_meta( $order_id, '_payment_method', true ) ) {
@@ -1130,7 +1146,7 @@ class WC_Gateway_Braintree extends WC_Braintree_Framework\SV_WC_Payment_Gateway_
1130
  * @see SV_WC_Payment_Gateway::is_configured()
1131
  * @return boolean true if the gateway is properly configured
1132
  */
1133
- protected function is_configured() {
1134
 
1135
  $is_configured = parent::is_configured();
1136
 
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
33
  *
34
  * @since 2.0.0
35
  */
36
+ class WC_Gateway_Braintree extends Framework\SV_WC_Payment_Gateway_Direct {
37
 
38
 
39
  /** sandbox environment ID */
83
  * WC_Gateway_Braintree constructor.
84
  *
85
  * @param string $id the gateway id
86
+ * @param Framework\SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
87
  * @param array $args gateway arguments
88
  */
89
  public function __construct( $id, $plugin, $args ) {
94
  }
95
 
96
 
97
+ /**
98
+ * Initializes the payment form handler.
99
+ *
100
+ * TODO: remove this method by version 3.0.0 or by 2021-05-05 {WV 2020-05-05}
101
+ *
102
+ * @since 2.2.1
103
+ * @deprecated 2.4.0
104
+ */
105
+ public function init_payment_form_handler() {
106
+
107
+ wc_deprecated_function( __METHOD__, '2.4.0', __CLASS__ . '::init_payment_form_instance()' );
108
+
109
+ $this->init_payment_form_instance();
110
+ }
111
+
112
+
113
  /**
114
  * Enqueues admin scripts.
115
  *
145
  *
146
  * @since 3.0.0
147
  * @see SV_WC_Payment_Gateway::enqueue_scripts()
 
148
  */
149
  public function enqueue_gateway_assets() {
150
 
177
 
178
  wp_send_json_success( $result->get_client_token() );
179
 
180
+ } catch ( Framework\SV_WC_Plugin_Exception $e ) {
181
 
182
  $this->add_debug_message( $e->getMessage(), 'error' );
183
 
198
  public function validate_payment_nonce( $is_valid ) {
199
 
200
  // nonce is required
201
+ if ( ! Framework\SV_WC_Helper::get_posted_value( 'wc_' . $this->get_id() . '_payment_nonce' ) ) {
202
 
203
  wc_add_notice( __( 'Oops, there was a temporary payment error. Please try another payment method or contact us to complete your transaction.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 'error' );
204
 
226
 
227
  // nonce may be previously populated by Apple Pay
228
  if ( empty( $order->payment->nonce ) ) {
229
+ $order->payment->nonce = Framework\SV_WC_Helper::get_posted_value( 'wc_'. $this->get_id() . '_payment_nonce' );
230
  }
231
 
232
  $order->payment->tokenize = $this->get_payment_tokens_handler()->should_tokenize();
242
  }
243
 
244
  // fraud tool data as a JSON string, unslashed as WP slashes $_POST data which breaks the JSON
245
+ $order->payment->device_data = wp_unslash( Framework\SV_WC_Helper::get_posted_value( 'device_data' ) );
246
 
247
  // merchant account ID
248
+ if ( $merchant_account_id = $this->get_merchant_account_id( $order->get_currency() ) ) {
249
  $order->payment->merchant_account_id = $merchant_account_id;
250
  }
251
 
263
  }
264
 
265
  // the URL descriptor doesn't have any specific validation, so just truncate it if needed
266
+ $order->payment->dynamic_descriptors->url = Framework\SV_WC_Helper::str_truncate( $this->get_url_dynamic_descriptor(), 13, '' );
267
 
268
  // add the recurring flag to Subscriptions renewal orders
269
  if ( $this->get_plugin()->is_subscriptions_active() && wcs_order_contains_subscription( $order, 'any' ) ) {
279
  }
280
 
281
  // test amount when in sandbox mode
282
+ if ( $this->is_test_environment() && ( $test_amount = Framework\SV_WC_Helper::get_posted_value( 'wc-' . $this->get_id_dasherized() . '-test-amount' ) ) ) {
283
+ $order->payment_total = Framework\SV_WC_Helper::number_format( $test_amount );
284
  }
285
 
286
  return $order;
306
 
307
  if ( empty( $order->refund->trans_id ) ) {
308
 
309
+ $order->refund->trans_id = $order->get_transaction_id( 'edit' );
310
  }
311
 
312
  return $order;
485
  $environment_field = $form_fields['environment'];
486
  unset( $form_fields['environment'] );
487
 
488
+ $form_fields = Framework\SV_WC_Helper::array_insert_after( $form_fields, 'connection_settings', [
489
+ 'braintree_auth' => [
490
+ /** @see \WC_Gateway_Braintree::generate_braintree_auth_html() */
491
+ 'type' => 'braintree_auth'
492
+ ],
493
+ 'connect_manually' => [
494
+ 'type' => 'checkbox',
495
+ 'label' => __( 'Enter connection credentials manually', 'woocommerce-gateway-paypal-powered-by-braintree' ),
496
+ 'default' => 'no',
497
+ ],
498
+ 'environment' => $environment_field,
499
  ] );
500
 
501
  } else {
551
  id="wc-braintree-auth-disconnect"
552
  class="button-primary"
553
  ><?php
554
+ echo esc_html__( 'Disconnect from Braintree for WooCommerce', 'woocommerce-gateway-paypal-powered-by-braintree' );
555
  ?></a>
556
  </td>
557
  </tr>
561
  <div class="wc-backbone-modal-content">
562
  <section class="wc-backbone-modal-main" role="main">
563
  <header class="wc-backbone-modal-header">
564
+ <h1><?php esc_html_e( 'Braintree for WooCommerce', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></h1>
565
  <button class="modal-close modal-close-link dashicons dashicons-no-alt">
566
  <span class="screen-reader-text"><?php esc_html_e( 'Close modal panel and cancel', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></span>
567
  </button>
788
  $( '#woocommerce_<?php echo esc_js( $this->get_id() ); ?>_connect_manually' ).change( function() {
789
 
790
  var $environment = $( '#woocommerce_<?php echo esc_js( $this->get_id() ); ?>_environment' ).val();
791
+
792
  var $environmentFields = $( '.' + $environment + '-field' );
793
 
794
  if ( $( this ).is( ':checked' ) ) {
956
  // first unset all merchant account IDs from settings so they can be freshly set
957
  foreach ( array_keys( $sanitized_fields ) as $name ) {
958
 
959
+ if ( Framework\SV_WC_Helper::str_starts_with( $name, 'merchant_account_id_' ) ) {
960
  unset( $sanitized_fields[ $name ] );
961
  unset( $this->settings[ $name ] );
962
  }
1013
  return false;
1014
  }
1015
 
1016
+ $order_id = $order->get_id();
1017
 
1018
  // update a legacy payment token if it exists
1019
  if ( 'payment_token' === $key && metadata_exists( 'post', $order_id, '_wc_paypal_braintree_payment_method_token' ) && ! get_post_meta( $order_id, $this->get_order_meta_prefix() . $key, true ) && $this->get_id() === get_post_meta( $order_id, '_payment_method', true ) ) {
1146
  * @see SV_WC_Payment_Gateway::is_configured()
1147
  * @return boolean true if the gateway is properly configured
1148
  */
1149
+ public function is_configured() {
1150
 
1151
  $is_configured = parent::is_configured();
1152
 
includes/integrations/Pre_Orders.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Braintree Gateway
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@woocommerce.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade WooCommerce Braintree Gateway to newer
16
+ * versions in the future. If you wish to customize WooCommerce Braintree Gateway for your
17
+ * needs please refer to http://docs.woocommerce.com/document/braintree/
18
+ *
19
+ * @package WC-Braintree/Gateway/Payment-Form
20
+ * @author WooCommerce
21
+ * @copyright Copyright: (c) 2016-2019, Automattic, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace WC_Braintree\Integrations;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
+
29
+ defined( 'ABSPATH' ) or exit;
30
+
31
+ /**
32
+ * Pre-Orders Integration
33
+ *
34
+ * @since 2.4.0
35
+ */
36
+ class Pre_Orders extends Framework\SV_WC_Payment_Gateway_Integration_Pre_Orders {
37
+
38
+
39
+ /**
40
+ * Processes a pre-order payment when the pre-order is released.
41
+ *
42
+ * Overridden here to handle PayPal transactions.
43
+ *
44
+ * @since 2.4.0
45
+ *
46
+ * @param \WC_Order $order original order containing the pre-order
47
+ */
48
+ public function process_release_payment( $order ) {
49
+
50
+ try {
51
+
52
+ // set order defaults
53
+ $order = $this->get_gateway()->get_order( $order->get_id() );
54
+
55
+ // order description
56
+ $order->description = sprintf( __( '%s - Pre-Order Release Payment for Order %s', 'woocommerce-gateway-paypal-powered-by-braintree' ), esc_html( Framework\SV_WC_Helper::get_site_name() ), $order->get_order_number() );
57
+
58
+ // token is required
59
+ if ( ! $order->payment->token ) {
60
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Payment token missing/invalid.', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
61
+ }
62
+
63
+ // perform the transaction
64
+ if ( $this->get_gateway()->is_credit_card_gateway() || $this->get_gateway()->is_paypal_gateway() ) {
65
+
66
+ if ( $this->get_gateway()->perform_credit_card_charge( $order ) ) {
67
+ $response = $this->get_gateway()->get_api()->credit_card_charge( $order );
68
+ } else {
69
+ $response = $this->get_gateway()->get_api()->credit_card_authorization( $order );
70
+ }
71
+
72
+ } elseif ( $this->get_gateway()->is_echeck_gateway() ) {
73
+ $response = $this->get_gateway()->get_api()->check_debit( $order );
74
+ }
75
+
76
+ // success! update order record
77
+ if ( $response->transaction_approved() ) {
78
+
79
+ $last_four = substr( $order->payment->account_number, -4 );
80
+
81
+ // order note based on gateway type
82
+ if ( $this->get_gateway()->is_credit_card_gateway() ) {
83
+
84
+ $message = sprintf(
85
+ __( '%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)', 'woocommerce-gateway-paypal-powered-by-braintree' ),
86
+ $this->get_gateway()->get_method_title(),
87
+ $this->get_gateway()->perform_credit_card_authorization( $order ) ? 'Authorization' : 'Charge',
88
+ Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( ( ! empty( $order->payment->card_type ) ? $order->payment->card_type : 'card' ) ),
89
+ $last_four,
90
+ ( ! empty( $order->payment->exp_month) && ! empty( $order->payment->exp_year ) ? $order->payment->exp_month . '/' . substr( $order->payment->exp_year, -2 ) : 'n/a' )
91
+ );
92
+
93
+ } elseif ( $this->get_gateway()->is_echeck_gateway() ) {
94
+
95
+ // account type (checking/savings) may or may not be available, which is fine
96
+ $message = sprintf( __( '%s eCheck Pre-Order Release Payment Approved: %s ending in %s', 'woocommerce-gateway-paypal-powered-by-braintree' ), $this->get_gateway()->get_method_title(), Framework\SV_WC_Payment_Gateway_Helper::payment_type_to_name( ( ! empty( $order->payment->account_type ) ? $order->payment->account_type : 'bank' ) ), $last_four );
97
+
98
+ } else {
99
+
100
+ $message = sprintf(
101
+ /* translators: Placeholders: %s - payment method title, like PayPal */
102
+ __( '%s Pre-Order Release Payment Approved', 'woocommerce-gateway-paypal-powered-by-braintree' ),
103
+ $this->get_gateway()->get_method_title()
104
+ );
105
+ }
106
+
107
+ // adds the transaction id (if any) to the order note
108
+ if ( $response->get_transaction_id() ) {
109
+ $message .= ' ' . sprintf( __( '(Transaction ID %s)', 'woocommerce-gateway-paypal-powered-by-braintree' ), $response->get_transaction_id() );
110
+ }
111
+
112
+ $order->add_order_note( $message );
113
+ }
114
+
115
+ if ( $response->transaction_approved() || $response->transaction_held() ) {
116
+
117
+ // add the standard transaction data
118
+ $this->get_gateway()->add_transaction_data( $order, $response );
119
+
120
+ // allow the concrete class to add any gateway-specific transaction data to the order
121
+ $this->get_gateway()->add_payment_gateway_transaction_data( $order, $response );
122
+
123
+ // if the transaction was held (ie fraud validation failure) mark it as such
124
+ if ( $response->transaction_held() || ( $this->get_gateway()->supports( Framework\SV_WC_Payment_Gateway::FEATURE_CREDIT_CARD_AUTHORIZATION ) && $this->get_gateway()->perform_credit_card_authorization( $order ) ) ) {
125
+
126
+ $this->get_gateway()->mark_order_as_held( $order, $this->get_gateway()->supports( Framework\SV_WC_Payment_Gateway::FEATURE_CREDIT_CARD_AUTHORIZATION ) && $this->get_gateway()->perform_credit_card_authorization( $order ) ? __( 'Authorization only transaction', 'woocommerce-gateway-paypal-powered-by-braintree' ) : $response->get_status_message(), $response );
127
+
128
+ Framework\SV_WC_Order_Compatibility::reduce_stock_levels( $order ); // reduce stock for held orders, but don't complete payment
129
+
130
+ } else {
131
+ // otherwise complete the order
132
+ $order->payment_complete();
133
+ }
134
+
135
+ } else {
136
+
137
+ // failure
138
+ throw new Framework\SV_WC_Payment_Gateway_Exception( sprintf( '%s: %s', $response->get_status_code(), $response->get_status_message() ) );
139
+
140
+ }
141
+
142
+ } catch ( Framework\SV_WC_Plugin_Exception $e ) {
143
+
144
+ // Mark order as failed
145
+ $this->get_gateway()->mark_order_as_failed( $order, sprintf( __( 'Pre-Order Release Payment Failed: %s', 'woocommerce-gateway-paypal-powered-by-braintree' ), $e->getMessage() ) );
146
+
147
+ }
148
+ }
149
+
150
+
151
+ }
includes/payment-forms/abstract-wc-braintree-payment-form.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -31,7 +31,59 @@ defined( 'ABSPATH' ) or exit;
31
  *
32
  * @since 3.0.0
33
  */
34
- abstract class WC_Braintree_Payment_Form extends WC_Braintree_Framework\SV_WC_Payment_Gateway_Payment_Form {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
 
37
  /**
@@ -112,19 +164,7 @@ abstract class WC_Braintree_Payment_Form extends WC_Braintree_Framework\SV_WC_Pa
112
  return;
113
  }
114
 
115
- // defaults for both gateways
116
- $params = array_merge( array(
117
- 'id' => $this->get_gateway()->get_id(),
118
- 'id_dasherized' => $this->get_gateway()->get_id_dasherized(),
119
- 'name' => $this->get_gateway()->get_method_title(),
120
- 'debug' => $this->get_gateway()->debug_log(),
121
- 'type' => str_replace( '-', '_', $this->get_gateway()->get_payment_type() ),
122
- 'client_token_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' ),
123
- ), $this->get_payment_form_handler_js_params() );
124
-
125
- $handler_class = $this->get_gateway()->is_credit_card_gateway() ? 'WC_Braintree_Credit_Card_Payment_Form_Handler' : 'WC_Braintree_PayPal_Payment_Form_Handler';
126
-
127
- wc_enqueue_js( sprintf( 'window.wc_%1$s_handler = new %2$s( %3$s );', esc_js( $this->get_gateway()->get_id() ), $handler_class, json_encode( $params ) ) );
128
  }
129
 
130
 
@@ -148,4 +188,26 @@ abstract class WC_Braintree_Payment_Form extends WC_Braintree_Framework\SV_WC_Pa
148
  }
149
 
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
31
  *
32
  * @since 3.0.0
33
  */
34
+ abstract class WC_Braintree_Payment_Form extends Framework\SV_WC_Payment_Gateway_Payment_Form {
35
+
36
+
37
+ /**
38
+ * Sets up the class.
39
+ *
40
+ * Overridden here to avoid calling get_tokens() on construct.
41
+ *
42
+ * @since 2.4.0
43
+ *
44
+ * @param Framework\SV_WC_Payment_Gateway|Framework\SV_WC_Payment_Gateway_Direct $gateway gateway for form
45
+ */
46
+ public function __construct( $gateway ) {
47
+
48
+ $this->gateway = $gateway;
49
+
50
+ // hook up rendering
51
+ $this->add_hooks();
52
+ }
53
+
54
+
55
+ /**
56
+ * Adds hooks for rendering the payment form.
57
+ *
58
+ * Overridden here to move the location of the payment form JS enqueue
59
+ *
60
+ * @since 2.4.0
61
+ */
62
+ protected function add_hooks() {
63
+
64
+ parent::add_hooks();
65
+
66
+ $gateway_id = $this->get_gateway()->get_id();
67
+
68
+ remove_action( "wc_{$gateway_id}_payment_form_end", [ $this, 'render_js' ], 5 );
69
+ add_action( 'wp_footer', [ $this, 'render_js' ], 5 );
70
+ }
71
+
72
+
73
+ /**
74
+ * Renders the payment form
75
+ *
76
+ * Overridden here to attempt to load tokens before render rather than on form construct.
77
+ *
78
+ * @since 2.4.0
79
+ */
80
+ public function render() {
81
+
82
+ // maybe load tokens
83
+ $this->get_tokens();
84
+
85
+ parent::render();
86
+ }
87
 
88
 
89
  /**
164
  return;
165
  }
166
 
167
+ parent::render_js();
 
 
 
 
 
 
 
 
 
 
 
 
168
  }
169
 
170
 
188
  }
189
 
190
 
191
+ /**
192
+ * Gets the JS handler arguments.
193
+ *
194
+ * @since 2.4.0
195
+ *
196
+ * @return array
197
+ */
198
+ protected function get_js_handler_args() {
199
+
200
+ $args = array_merge( [
201
+ 'id' => $this->get_gateway()->get_id(),
202
+ 'id_dasherized' => $this->get_gateway()->get_id_dasherized(),
203
+ 'name' => $this->get_gateway()->get_method_title(),
204
+ 'debug' => $this->get_gateway()->debug_log(),
205
+ 'type' => str_replace( '-', '_', $this->get_gateway()->get_payment_type() ),
206
+ 'client_token_nonce' => wp_create_nonce( 'wc_' . $this->get_gateway()->get_id() . '_get_client_token' ),
207
+ ], $this->get_payment_form_handler_js_params() );
208
+
209
+ return $args;
210
+ }
211
+
212
+
213
  }
includes/payment-forms/class-wc-braintree-hosted-fields-payment-form.php CHANGED
@@ -22,7 +22,7 @@
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
@@ -36,6 +36,19 @@ defined( 'ABSPATH' ) or exit;
36
  class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form {
37
 
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Override the standard payment method HTML to add a nonce to the associated
41
  * token so it can be used for 3D Secure verification. This is added as a
@@ -49,7 +62,7 @@ class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form
49
 
50
  $html = parent::get_saved_payment_method_html( $token );
51
 
52
- if ( ! WC_Braintree_Framework\SV_WC_Helper::str_exists( $html, 'data-nonce' ) && in_array( WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( $token->get_card_type() ), $this->get_gateway()->get_3d_secure_card_types(), true ) ) {
53
 
54
  if ( $nonce = $this->get_gateway()->get_3d_secure_nonce_for_token( $token ) ) {
55
  $html = str_replace( 'name="wc-braintree-credit-card-payment-token"', 'name="wc-braintree-credit-card-payment-token" data-nonce="' . esc_attr( $nonce ) . '"', $html );
@@ -121,10 +134,10 @@ class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form
121
 
122
  // Braintree JS only returns the full names, so ensure they're correctly formatted from settings
123
  $braintree_card_types = array(
124
- 'American Express' => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ,
125
- 'MasterCard' => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD,
126
- 'Visa' => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA,
127
- 'Maestro' => WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO,
128
  );
129
 
130
  $card_types = array_keys( array_intersect( $braintree_card_types, $this->get_gateway()->get_3d_secure_card_types() ) );
@@ -175,18 +188,18 @@ class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form
175
  */
176
  protected function get_enabled_card_types() {
177
 
178
- $types = array_map( array( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Helper', 'normalize_card_type' ), $this->get_gateway()->get_card_types() );
179
 
180
  // The Braintree SDK has its own strings for a few card types that we need to match
181
- $types = str_replace( array(
182
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX,
183
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_DINERSCLUB,
184
- WC_Braintree_Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD,
185
- ), array(
186
  'american-express',
187
  'diners-club',
188
  'master-card',
189
- ), $types );
190
 
191
  return $types;
192
  }
@@ -243,7 +256,7 @@ class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form
243
 
244
  $order_total = $this->get_order_total_for_3d_secure();
245
 
246
- echo '<input type="hidden" name="wc-' . $this->get_gateway()->get_id_dasherized() . '-3d-secure-order-total" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Helper::number_format( $order_total ) ) . '" />';
247
 
248
  if ( wc_braintree()->is_subscriptions_active() && \WC_Subscriptions_Cart::cart_contains_subscription() ) {
249
  echo '<input type="hidden" name="wc-' . $this->get_gateway()->get_id_dasherized() . '-cart-contains-subscription" value="1" />';
@@ -256,29 +269,29 @@ class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form
256
 
257
  if ( $order ) {
258
 
259
- echo '<input type="hidden" name="billing_first_name" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_first_name' ) ) . '" />';
260
- echo '<input type="hidden" name="billing_last_name" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_last_name' ) ) . '" />';
261
- echo '<input type="hidden" name="billing_phone" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_phone' ) ) . '" />';
262
- echo '<input type="hidden" name="billing_address_1" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_address_1' ) ) . '" />';
263
- echo '<input type="hidden" name="billing_address_2" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_address_2' ) ) . '" />';
264
- echo '<input type="hidden" name="billing_postcode" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_postcode' ) ) . '" />';
265
- echo '<input type="hidden" name="billing_email" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_email' ) ) . '" />';
266
-
267
- echo '<input type="hidden" id="billing_city" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_city' ) ) . '" />';
268
- echo '<input type="hidden" id="billing_state" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_state' ) ) . '" />';
269
- echo '<input type="hidden" id="billing_country" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'billing_country' ) ) . '" />';
270
-
271
- if ( WC_Braintree_Framework\SV_WC_Order_Compatibility::has_shipping_address( $order ) ) {
272
-
273
- echo '<input type="hidden" name="shipping_first_name" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_first_name' ) ) . '" />';
274
- echo '<input type="hidden" name="shipping_last_name" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_last_name' ) ) . '" />';
275
- echo '<input type="hidden" name="shipping_address_1" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_address_1' ) ) . '" />';
276
- echo '<input type="hidden" name="shipping_address_2" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_address_2' ) ) . '" />';
277
- echo '<input type="hidden" name="shipping_city" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_city' ) ) . '" />';
278
- echo '<input type="hidden" name="shipping_postcode" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_postcode' ) ) . '" />';
279
-
280
- echo '<input type="hidden" id="shipping_state" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_state' ) ) . '" />';
281
- echo '<input type="hidden" id="shipping_country" value="' . esc_attr( WC_Braintree_Framework\SV_WC_Order_Compatibility::get_prop( $order, 'shipping_country' ) ) . '" />';
282
  }
283
  }
284
  }
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
36
  class WC_Braintree_Hosted_Fields_Payment_Form extends WC_Braintree_Payment_Form {
37
 
38
 
39
+ /**
40
+ * Gets the JS handler class name.
41
+ *
42
+ * @since 2.4.0
43
+ *
44
+ * @return string
45
+ */
46
+ protected function get_js_handler_class_name() {
47
+
48
+ return 'WC_Braintree_Credit_Card_Payment_Form_Handler';
49
+ }
50
+
51
+
52
  /**
53
  * Override the standard payment method HTML to add a nonce to the associated
54
  * token so it can be used for 3D Secure verification. This is added as a
62
 
63
  $html = parent::get_saved_payment_method_html( $token );
64
 
65
+ if ( ! Framework\SV_WC_Helper::str_exists( $html, 'data-nonce' ) && in_array( Framework\SV_WC_Payment_Gateway_Helper::normalize_card_type( $token->get_card_type() ), $this->get_gateway()->get_3d_secure_card_types(), true ) ) {
66
 
67
  if ( $nonce = $this->get_gateway()->get_3d_secure_nonce_for_token( $token ) ) {
68
  $html = str_replace( 'name="wc-braintree-credit-card-payment-token"', 'name="wc-braintree-credit-card-payment-token" data-nonce="' . esc_attr( $nonce ) . '"', $html );
134
 
135
  // Braintree JS only returns the full names, so ensure they're correctly formatted from settings
136
  $braintree_card_types = array(
137
+ 'American Express' => Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX ,
138
+ 'MasterCard' => Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD,
139
+ 'Visa' => Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_VISA,
140
+ 'Maestro' => Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MAESTRO,
141
  );
142
 
143
  $card_types = array_keys( array_intersect( $braintree_card_types, $this->get_gateway()->get_3d_secure_card_types() ) );
188
  */
189
  protected function get_enabled_card_types() {
190
 
191
+ $types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $this->get_gateway()->get_card_types() );
192
 
193
  // The Braintree SDK has its own strings for a few card types that we need to match
194
+ $types = str_replace( [
195
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX,
196
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_DINERSCLUB,
197
+ Framework\SV_WC_Payment_Gateway_Helper::CARD_TYPE_MASTERCARD,
198
+ ], [
199
  'american-express',
200
  'diners-club',
201
  'master-card',
202
+ ], $types );
203
 
204
  return $types;
205
  }
256
 
257
  $order_total = $this->get_order_total_for_3d_secure();
258
 
259
+ echo '<input type="hidden" name="wc-' . $this->get_gateway()->get_id_dasherized() . '-3d-secure-order-total" value="' . esc_attr( Framework\SV_WC_Helper::number_format( $order_total ) ) . '" />';
260
 
261
  if ( wc_braintree()->is_subscriptions_active() && \WC_Subscriptions_Cart::cart_contains_subscription() ) {
262
  echo '<input type="hidden" name="wc-' . $this->get_gateway()->get_id_dasherized() . '-cart-contains-subscription" value="1" />';
269
 
270
  if ( $order ) {
271
 
272
+ echo '<input type="hidden" name="billing_first_name" value="' . esc_attr( $order->get_billing_first_name( 'edit' ) ) . '" />';
273
+ echo '<input type="hidden" name="billing_last_name" value="' . esc_attr( $order->get_billing_last_name( 'edit' ) ) . '" />';
274
+ echo '<input type="hidden" name="billing_phone" value="' . esc_attr( $order->get_billing_phone( 'edit' ) ) . '" />';
275
+ echo '<input type="hidden" name="billing_address_1" value="' . esc_attr( $order->get_billing_address_1( 'edit' ) ) . '" />';
276
+ echo '<input type="hidden" name="billing_address_2" value="' . esc_attr( $order->get_billing_address_2( 'edit' ) ) . '" />';
277
+ echo '<input type="hidden" name="billing_postcode" value="' . esc_attr( $order->get_billing_postcode( 'edit' ) ) . '" />';
278
+ echo '<input type="hidden" name="billing_email" value="' . esc_attr( $order->get_billing_email( 'edit' ) ) . '" />';
279
+
280
+ echo '<input type="hidden" id="billing_city" value="' . esc_attr( $order->get_billing_city( 'edit' ) ) . '" />';
281
+ echo '<input type="hidden" id="billing_state" value="' . esc_attr( $order->get_billing_state( 'edit' ) ) . '" />';
282
+ echo '<input type="hidden" id="billing_country" value="' . esc_attr( $order->get_billing_country( 'edit' ) ) . '" />';
283
+
284
+ if ( $order->has_shipping_address() ) {
285
+
286
+ echo '<input type="hidden" name="shipping_first_name" value="' . esc_attr( $order->get_shipping_first_name( 'edit' ) ) . '" />';
287
+ echo '<input type="hidden" name="shipping_last_name" value="' . esc_attr( $order->get_shipping_last_name( 'edit' ) ) . '" />';
288
+ echo '<input type="hidden" name="shipping_address_1" value="' . esc_attr( $order->get_shipping_address_1( 'edit' ) ) . '" />';
289
+ echo '<input type="hidden" name="shipping_address_2" value="' . esc_attr( $order->get_shipping_address_2( 'edit' ) ) . '" />';
290
+ echo '<input type="hidden" name="shipping_city" value="' . esc_attr( $order->get_shipping_city( 'edit' ) ) . '" />';
291
+ echo '<input type="hidden" name="shipping_postcode" value="' . esc_attr( $order->get_shipping_postcode( 'edit' ) ) . '" />';
292
+
293
+ echo '<input type="hidden" id="shipping_state" value="' . esc_attr( $order->get_shipping_state( 'edit' ) ) . '" />';
294
+ echo '<input type="hidden" id="shipping_country" value="' . esc_attr( $order->get_shipping_country( 'edit' ) ) . '" />';
295
  }
296
  }
297
  }
includes/payment-forms/class-wc-braintree-paypal-payment-form.php CHANGED
@@ -23,7 +23,7 @@
23
  */
24
 
25
  use WC_Braintree\PayPal\Buttons\Abstract_Button;
26
- use WC_Braintree\Plugin_Framework as WC_Braintree_Framework;
27
 
28
  defined( 'ABSPATH' ) or exit;
29
 
@@ -31,10 +31,25 @@ defined( 'ABSPATH' ) or exit;
31
  * Braintree PayPal Payment Form
32
  *
33
  * @since 3.0.0
 
 
34
  */
35
  class WC_Braintree_PayPal_Payment_Form extends WC_Braintree_Payment_Form {
36
 
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * Return the JS params passed to the the payment form handler script
40
  *
@@ -217,7 +232,7 @@ class WC_Braintree_PayPal_Payment_Form extends WC_Braintree_Payment_Form {
217
  ?>
218
 
219
  <div id="wc_braintree_paypal_container"></div>
220
- <input type="hidden" name="wc_braintree_paypal_amount" value="<?php echo esc_attr( WC_Braintree_Framework\SV_WC_Helper::number_format( $order_total, 2 ) ); ?>" />
221
  <input type="hidden" name="wc_braintree_paypal_currency" value="<?php echo esc_attr( get_woocommerce_currency() ); ?>" />
222
  <input type="hidden" name="wc_braintree_paypal_locale" value="<?php echo esc_attr( $this->get_gateway()->get_safe_locale() ); ?>" />
223
 
23
  */
24
 
25
  use WC_Braintree\PayPal\Buttons\Abstract_Button;
26
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
27
 
28
  defined( 'ABSPATH' ) or exit;
29
 
31
  * Braintree PayPal Payment Form
32
  *
33
  * @since 3.0.0
34
+ *
35
+ * @method \WC_Gateway_Braintree_PayPal get_gateway()
36
  */
37
  class WC_Braintree_PayPal_Payment_Form extends WC_Braintree_Payment_Form {
38
 
39
 
40
+ /**
41
+ * Gets the JS handler class name.
42
+ *
43
+ * @since 2.4.0
44
+ *
45
+ * @return string
46
+ */
47
+ protected function get_js_handler_class_name() {
48
+
49
+ return 'WC_Braintree_PayPal_Payment_Form_Handler';
50
+ }
51
+
52
+
53
  /**
54
  * Return the JS params passed to the the payment form handler script
55
  *
232
  ?>
233
 
234
  <div id="wc_braintree_paypal_container"></div>
235
+ <input type="hidden" name="wc_braintree_paypal_amount" value="<?php echo esc_attr( Framework\SV_WC_Helper::number_format( $order_total, 2 ) ); ?>" />
236
  <input type="hidden" name="wc_braintree_paypal_currency" value="<?php echo esc_attr( get_woocommerce_currency() ); ?>" />
237
  <input type="hidden" name="wc_braintree_paypal_locale" value="<?php echo esc_attr( $this->get_gateway()->get_safe_locale() ); ?>" />
238
 
lib/skyverge/woocommerce/assets/css/admin/sv-wc-plugin-admin-setup-wizard.min.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAAA,4BAA6B,CAE5B,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,IAAI,CAEjB,8BAAE,CAED,KAAK,CAAE,OAAO,CACd,eAAe,CAAE,IAAI,CAErB,oCAAQ,CACP,KAAK,CAAE,OAAO,CACd,eAAe,CAAE,IAAI,CAOvB,wCAAO,CAEN,UAAU,CAAE,OAAO,CACnB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,GAAG,CAEZ,0CAAE,CACD,KAAK,CAAE,IAAI,CACX,eAAe,CAAE,IAAI,CACrB,gDAAQ,CACP,eAAe,CAAE,SAAS,CAK7B,mEAAkC,CAEjC,aAAa,CAAE,IAAI,CAEnB,yEAAM,CACL,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,YAAY,CACrB,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,KAAK,CACjB,aAAa,CAAE,IAAI,CAGpB,qVAGO,CACN,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,YAAY,CACrB,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,6BAA6B,CAGrC,0EAAO,CACN,KAAK,CAAE,IAAI,CAGZ,4EAAS,CACR,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,IAAI,CACf,OAAO,CAAE,IAAI,CAGd,gFAAa,CACZ,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,OAAO,CAGhB,0EAAS,CACR,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,MAAM,CACjB,eAAe,CAAE,aAAa,CAC9B,OAAO,CAAE,CAAC,CACV,aAAa,CAAE,cAAc,CAC7B,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,GAAG,CAEhB,qFAAa,CACZ,aAAa,CAAE,CAAC,CAGjB,gFAAM,CACL,UAAU,CAAE,CAAC,CACb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,MAAM,CAClB,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,OAAO,CACnB,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,QAAQ,CAGtB,mFAAS,CACR,SAAS,CAAE,CAAC,CACZ,OAAO,CAAE,IAAI,CAEb,qFAAE,CACD,aAAa,CAAE,GAAG,CAGnB,gGAAa,CACZ,aAAa,CAAE,CAAC,CAIlB,kFAAQ,CACP,UAAU,CAAE,CAAC,CACb,SAAS,CAAE,IAAI,CACf,UAAU,CAAE,MAAM,CAClB,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,KAAK,CACjB,UAAU,CAAE,UAAU,CAGvB,kFAAQ,CACP,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,iBAAiB,CACzB,gBAAgB,CAAE,OAAO,CACzB,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,OAAO,CACpB,aAAa,CAAE,IAAI,CACnB,QAAQ,CAAE,QAAQ,CAElB,uGAAqB,CACpB,OAAO,CAAE,IAAI,CAGd,yFAAS,CACR,OAAO,CAAE,EAAE,CACX,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,IAAI,CAChB,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,KAAK,CAAE,CAAC,CACR,aAAa,CAAE,IAAI,CAGpB,2FAAW,CACV,YAAY,CAAE,IAAI,CAClB,gBAAgB,CAAE,IAAI,CAEtB,kGAAS,CACR,KAAK,CAAE,IAAI,CACX,IAAI,CAAE,CAAC",
4
- "sources": ["sv-wc-plugin-admin-setup-wizard.scss"],
5
- "names": [],
6
- "file": "sv-wc-plugin-admin-setup-wizard.min.css"
7
- }
 
 
 
 
 
 
 
lib/skyverge/woocommerce/assets/css/mixins.scss DELETED
@@ -1,61 +0,0 @@
1
- // Use this mixin to import font-awesome from their CDN
2
- @mixin import-fontawesome {
3
- @import url("//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css");
4
- }
5
-
6
- // Use this mixin to create a font-awesome icon
7
- // sample usage:
8
- //
9
- // .a-selector a:before {
10
- // @include fa-icon( "\f0f6" );
11
- // }
12
- @mixin fa-icon( $icon ) {
13
- font-family: FontAwesome;
14
- font-weight: normal;
15
- font-style: normal;
16
- font-variant: normal;
17
- text-transform: none;
18
- text-decoration: inherit;
19
- -webkit-font-smoothing: antialiased;
20
- *margin-right: .3em;
21
- line-height: 1;
22
- content: $icon;
23
- }
24
-
25
- // Use this mixin to create dashicon icon
26
- // sample usage:
27
- //
28
- // .a-selector a:before {
29
- // @include dashicon( "\f460" );
30
- // }
31
- @mixin dashicon( $icon ) {
32
- font-family: 'dashicons';
33
- speak: none;
34
- font-weight: normal;
35
- font-variant: normal;
36
- text-transform: none;
37
- -webkit-font-smoothing: antialiased;
38
- margin:0;
39
- text-indent: 0;
40
- position: absolute;
41
- top:0;
42
- left:0;
43
- width:100%;
44
- height: 100%;
45
- text-align: center;
46
- content: $icon;
47
- }
48
-
49
- // Use this mixin when using a dashicon inside of an existing image, like WC order status icons or order action icons
50
- // sample usage
51
- //
52
- // mark {
53
- // @include dashicon-ir;
54
- // }
55
- @mixin dashicon-ir() {
56
- display: block;
57
- text-indent: -9999px;
58
- position: relative;
59
- height:1em;
60
- width:1em;
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js DELETED
@@ -1 +0,0 @@
1
- (function() { "use strict"; /** * WooCommerce Plugin Framework Setup Wizard scripts. * * @since 5.3.0-dev */ jQuery(document).ready(function($) { $('.sv-wc-plugin-admin-setup-control').on('change', '.enable input', function() { if ($(this).is(':checked')) { return $(this).closest('.toggle').removeClass('disabled'); } else { return $(this).closest('.toggle').addClass('disabled'); } }); return $('.sv-wc-plugin-admin-setup-control').on('click', '.enable', function(e) { var $checkbox; if ($(e.target).is('input')) { e.stopPropagation(); return; } $checkbox = $(this).find('input[type="checkbox"]'); return $checkbox.prop('checked', !$checkbox.is(':checked')).change(); }); });}).call(this);
 
lib/skyverge/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js.map DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "sv-wc-plugin-admin-setup-wizard.min.js",
4
- "sourceRoot": "",
5
- "sources": [
6
- "sv-wc-plugin-admin-setup-wizard.coffee"
7
- ],
8
- "names": [],
9
- "mappings": "AAAA;EAAA;;AAEA;;;;;EAKA,MAAA,CAAQ,QAAR,CAAkB,CAAC,KAAnB,CAAyB,SAAE,CAAF;IAIxB,CAAA,CAAG,mCAAH,CAAwC,CAAC,EAAzC,CAA6C,QAA7C,EAAuD,eAAvD,EAAwE,SAAA;MACvE,IAAK,CAAA,CAAG,IAAH,CAAS,CAAC,EAAV,CAAc,UAAd,CAAL;eACC,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,SAAnB,CAA8B,CAAC,WAA/B,CAA4C,UAA5C,EADD;OAAA,MAAA;eAGC,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,SAAnB,CAA8B,CAAC,QAA/B,CAAyC,UAAzC,EAHD;;IADuE,CAAxE;WAQA,CAAA,CAAG,mCAAH,CAAwC,CAAC,EAAzC,CAA6C,OAA7C,EAAsD,SAAtD,EAAiE,SAAE,CAAF;AAEhE,UAAA;MAAA,IAAK,CAAA,CAAG,CAAC,CAAC,MAAL,CAAa,CAAC,EAAd,CAAkB,OAAlB,CAAL;QACC,CAAC,CAAC,eAAF,CAAA;AACA,eAFD;;MAIA,SAAA,GAAY,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,wBAAhB;aAEZ,SAAS,CAAC,IAAV,CAAgB,SAAhB,EAA2B,CAAE,SAAS,CAAC,EAAV,CAAc,UAAd,CAA7B,CAAyD,CAAC,MAA1D,CAAA;IARgE,CAAjE;EAZwB,CAAzB;AAPA"
10
- }
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/assets/js/admin/sv-wp-admin-job-batch-handler.min.js.map DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "sv-wp-admin-job-batch-handler.min.js",
4
- "sourceRoot": "",
5
- "sources": [
6
- "sv-wp-admin-job-batch-handler.coffee"
7
- ],
8
- "names": [],
9
- "mappings": ";AAAA;;;;;;AAAA;AAAA,MAAA;;EAMA,MAAA,CAAQ,QAAR,CAAkB,CAAC,KAAnB,CAAyB,SAAE,CAAF;IACxB;WAMM,MAAM,CAAC;MAUC,iCAAE,IAAF;;QAEZ,IAAC,CAAA,EAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,aAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,YAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,SAAD,GAAiB;MALL;;wCAcb,WAAA,GAAa,SAAE,MAAF;eAAkB,IAAA,OAAA,CAAQ,CAAA,SAAA,KAAA;iBAAA,SAAE,OAAF,EAAW,MAAX;AAGtC,gBAAA;YAAA,IAAoC,KAAC,CAAA,SAAD,KAAc,MAAlD;AAAA,qBAAO,KAAI,CAAC,UAAL,CAAiB,MAAjB,EAAP;;YAEA,IAAA,GACC;cAAA,MAAA,EAAa,KAAC,CAAA,EAAF,GAAK,gBAAjB;cACA,QAAA,EAAU,KAAC,CAAA,aADX;cAEA,MAAA,EAAU,MAFV;;mBAID,CAAC,CAAC,IAAF,CAAQ,OAAR,EAAiB,IAAjB,CAEC,CAAC,IAFF,CAEO,SAAE,QAAF;cAGL,IAAA,CAAA,CAA8B,QAAQ,CAAC,OAAT,IAAqB,uBAAnD,CAAA;AAAA,uBAAO,MAAA,CAAO,QAAP,EAAP;;cAGA,IAA+B,QAAQ,CAAC,IAAI,CAAC,MAAd,KAAwB,YAAvD;AAAA,uBAAO,OAAA,CAAQ,QAAR,EAAP;;cAGA,CAAA,CAAG,QAAH,CAAa,CAAC,OAAd,CAAyB,KAAC,CAAA,EAAF,GAAK,kBAAL,GAAuB,QAAQ,CAAC,IAAI,CAAC,EAA7D,EACC;gBAAA,UAAA,EAAY,QAAQ,CAAC,IAAI,CAAC,UAA1B;gBACA,QAAA,EAAY,QAAQ,CAAC,IAAI,CAAC,QAD1B;gBAEA,KAAA,EAAY,QAAQ,CAAC,IAAI,CAAC,KAF1B;eADD;AAMA,qBAAO,OAAA,CAAQ,KAAI,CAAC,WAAL,CAAkB,QAAQ,CAAC,IAAI,CAAC,EAAhC,CAAR;YAfF,CAFP,CAmBC,CAAC,IAnBF,CAmBO,SAAE,KAAF,EAAS,UAAT,EAAqB,KAArB;qBAEL,MAAA,CAAO,KAAP;YAFK,CAnBP;UAVsC;QAAA,CAAA,CAAA,CAAA,IAAA,CAAR;MAAlB;;wCAwCb,UAAA,GAAY,SAAE,MAAF;eAAkB,IAAA,OAAA,CAAQ,CAAA,SAAA,KAAA;iBAAA,SAAE,OAAF,EAAW,MAAX;AAErC,gBAAA;YAAA,KAAC,CAAA,SAAD,GAAa;YAEb,IAAA,GACC;cAAA,MAAA,EAAa,KAAC,CAAA,EAAF,GAAK,aAAjB;cACA,QAAA,EAAU,KAAC,CAAA,YADX;cAEA,MAAA,EAAU,MAFV;;mBAID,CAAC,CAAC,IAAF,CAAQ,OAAR,EAAiB,IAAjB,CAEC,CAAC,IAFF,CAEO,SAAE,QAAF;cAEL,IAAA,CAA8B,QAAQ,CAAC,OAAvC;AAAA,uBAAO,MAAA,CAAO,QAAP,EAAP;;AAEA,qBAAO,OAAA,CAAQ,QAAR;YAJF,CAFP,CAQC,CAAC,IARF,CAQO,SAAE,KAAF,EAAS,UAAT,EAAqB,KAArB;qBAEL,MAAA,CAAO,KAAP;YAFK,CARP;UATqC;QAAA,CAAA,CAAA,CAAA,IAAA,CAAR;MAAlB;;;;;EAvEW,CAAzB;AANA"
10
- }
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/class-sv-wc-helper.php DELETED
@@ -1,1087 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce Plugin Framework
4
- *
5
- * This source file is subject to the GNU General Public License v3.0
6
- * that is bundled with this package in the file license.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.html
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to license@skyverge.com so we can send you a copy immediately.
12
- *
13
- * DISCLAIMER
14
- *
15
- * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
- * versions in the future. If you wish to customize the plugin for your
17
- * needs please refer to http://www.skyverge.com
18
- *
19
- * @package SkyVerge/WooCommerce/Plugin/Classes
20
- * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
- * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
- */
24
-
25
- namespace WC_Braintree\Plugin_Framework;
26
-
27
- defined( 'ABSPATH' ) or exit;
28
-
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Helper' ) ) :
30
-
31
- /**
32
- * SkyVerge Helper Class
33
- *
34
- * The purpose of this class is to centralize common utility functions that
35
- * are commonly used in SkyVerge plugins
36
- *
37
- * @since 2.2.0
38
- */
39
- class SV_WC_Helper {
40
-
41
-
42
- /** encoding used for mb_*() string functions */
43
- const MB_ENCODING = 'UTF-8';
44
-
45
-
46
- /** String manipulation functions (all multi-byte safe) ***************/
47
-
48
- /**
49
- * Returns true if the haystack string starts with needle
50
- *
51
- * Note: case-sensitive
52
- *
53
- * @since 2.2.0
54
- * @param string $haystack
55
- * @param string $needle
56
- * @return bool
57
- */
58
- public static function str_starts_with( $haystack, $needle ) {
59
-
60
- if ( self::multibyte_loaded() ) {
61
-
62
- if ( '' === $needle ) {
63
- return true;
64
- }
65
-
66
- return 0 === mb_strpos( $haystack, $needle, 0, self::MB_ENCODING );
67
-
68
- } else {
69
-
70
- $needle = self::str_to_ascii( $needle );
71
-
72
- if ( '' === $needle ) {
73
- return true;
74
- }
75
-
76
- return 0 === strpos( self::str_to_ascii( $haystack ), self::str_to_ascii( $needle ) );
77
- }
78
- }
79
-
80
-
81
- /**
82
- * Return true if the haystack string ends with needle
83
- *
84
- * Note: case-sensitive
85
- *
86
- * @since 2.2.0
87
- * @param string $haystack
88
- * @param string $needle
89
- * @return bool
90
- */
91
- public static function str_ends_with( $haystack, $needle ) {
92
-
93
- if ( '' === $needle ) {
94
- return true;
95
- }
96
-
97
- if ( self::multibyte_loaded() ) {
98
-
99
- return mb_substr( $haystack, -mb_strlen( $needle, self::MB_ENCODING ), null, self::MB_ENCODING ) === $needle;
100
-
101
- } else {
102
-
103
- $haystack = self::str_to_ascii( $haystack );
104
- $needle = self::str_to_ascii( $needle );
105
-
106
- return substr( $haystack, -strlen( $needle ) ) === $needle;
107
- }
108
- }
109
-
110
-
111
- /**
112
- * Returns true if the needle exists in haystack
113
- *
114
- * Note: case-sensitive
115
- *
116
- * @since 2.2.0
117
- * @param string $haystack
118
- * @param string $needle
119
- * @return bool
120
- */
121
- public static function str_exists( $haystack, $needle ) {
122
-
123
- if ( self::multibyte_loaded() ) {
124
-
125
- if ( '' === $needle ) {
126
- return false;
127
- }
128
-
129
- return false !== mb_strpos( $haystack, $needle, 0, self::MB_ENCODING );
130
-
131
- } else {
132
-
133
- $needle = self::str_to_ascii( $needle );
134
-
135
- if ( '' === $needle ) {
136
- return false;
137
- }
138
-
139
- return false !== strpos( self::str_to_ascii( $haystack ), self::str_to_ascii( $needle ) );
140
- }
141
- }
142
-
143
-
144
- /**
145
- * Truncates a given $string after a given $length if string is longer than
146
- * $length. The last characters will be replaced with the $omission string
147
- * for a total length not exceeding $length
148
- *
149
- * @since 2.2.0
150
- * @param string $string text to truncate
151
- * @param int $length total desired length of string, including omission
152
- * @param string $omission omission text, defaults to '...'
153
- * @return string
154
- */
155
- public static function str_truncate( $string, $length, $omission = '...' ) {
156
-
157
- if ( self::multibyte_loaded() ) {
158
-
159
- // bail if string doesn't need to be truncated
160
- if ( mb_strlen( $string, self::MB_ENCODING ) <= $length ) {
161
- return $string;
162
- }
163
-
164
- $length -= mb_strlen( $omission, self::MB_ENCODING );
165
-
166
- return mb_substr( $string, 0, $length, self::MB_ENCODING ) . $omission;
167
-
168
- } else {
169
-
170
- $string = self::str_to_ascii( $string );
171
-
172
- // bail if string doesn't need to be truncated
173
- if ( strlen( $string ) <= $length ) {
174
- return $string;
175
- }
176
-
177
- $length -= strlen( $omission );
178
-
179
- return substr( $string, 0, $length ) . $omission;
180
- }
181
- }
182
-
183
-
184
- /**
185
- * Returns a string with all non-ASCII characters removed. This is useful
186
- * for any string functions that expect only ASCII chars and can't
187
- * safely handle UTF-8. Note this only allows ASCII chars in the range
188
- * 33-126 (newlines/carriage returns are stripped)
189
- *
190
- * @since 2.2.0
191
- * @param string $string string to make ASCII
192
- * @return string
193
- */
194
- public static function str_to_ascii( $string ) {
195
-
196
- // strip ASCII chars 32 and under
197
- $string = filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW );
198
-
199
- // strip ASCII chars 127 and higher
200
- return filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH );
201
- }
202
-
203
-
204
- /**
205
- * Return a string with insane UTF-8 characters removed, like invisible
206
- * characters, unused code points, and other weirdness. It should
207
- * accept the common types of characters defined in Unicode.
208
- *
209
- * The following are allowed characters:
210
- *
211
- * p{L} - any kind of letter from any language
212
- * p{Mn} - a character intended to be combined with another character without taking up extra space (e.g. accents, umlauts, etc.)
213
- * p{Mc} - a character intended to be combined with another character that takes up extra space (vowel signs in many Eastern languages)
214
- * p{Nd} - a digit zero through nine in any script except ideographic scripts
215
- * p{Zs} - a whitespace character that is invisible, but does take up space
216
- * p{P} - any kind of punctuation character
217
- * p{Sm} - any mathematical symbol
218
- * p{Sc} - any currency sign
219
- *
220
- * pattern definitions from http://www.regular-expressions.info/unicode.html
221
- *
222
- * @since 4.0.0
223
- * @param string $string
224
- * @return mixed
225
- */
226
- public static function str_to_sane_utf8( $string ) {
227
-
228
- $sane_string = preg_replace( '/[^\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Zs}\p{P}\p{Sm}\p{Sc}]/u', '', $string );
229
-
230
- // preg_replace with the /u modifier can return null or false on failure
231
- return ( is_null( $sane_string ) || false === $sane_string ) ? $string : $sane_string;
232
- }
233
-
234
-
235
- /**
236
- * Helper method to check if the multibyte extension is loaded, which
237
- * indicates it's safe to use the mb_*() string methods
238
- *
239
- * @since 2.2.0
240
- * @return bool
241
- */
242
- protected static function multibyte_loaded() {
243
-
244
- return extension_loaded( 'mbstring' );
245
- }
246
-
247
-
248
- /** Array functions ***************************************************/
249
-
250
-
251
- /**
252
- * Insert the given element after the given key in the array
253
- *
254
- * Sample usage:
255
- *
256
- * given
257
- *
258
- * array( 'item_1' => 'foo', 'item_2' => 'bar' )
259
- *
260
- * array_insert_after( $array, 'item_1', array( 'item_1.5' => 'w00t' ) )
261
- *
262
- * becomes
263
- *
264
- * array( 'item_1' => 'foo', 'item_1.5' => 'w00t', 'item_2' => 'bar' )
265
- *
266
- * @since 2.2.0
267
- * @param array $array array to insert the given element into
268
- * @param string $insert_key key to insert given element after
269
- * @param array $element element to insert into array
270
- * @return array
271
- */
272
- public static function array_insert_after( Array $array, $insert_key, Array $element ) {
273
-
274
- $new_array = array();
275
-
276
- foreach ( $array as $key => $value ) {
277
-
278
- $new_array[ $key ] = $value;
279
-
280
- if ( $insert_key == $key ) {
281
-
282
- foreach ( $element as $k => $v ) {
283
- $new_array[ $k ] = $v;
284
- }
285
- }
286
- }
287
-
288
- return $new_array;
289
- }
290
-
291
-
292
- /**
293
- * Convert array into XML by recursively generating child elements
294
- *
295
- * First instantiate a new XML writer object:
296
- *
297
- * $xml = new XMLWriter();
298
- *
299
- * Open in memory (alternatively you can use a local URI for file output)
300
- *
301
- * $xml->openMemory();
302
- *
303
- * Then start the document
304
- *
305
- * $xml->startDocument( '1.0', 'UTF-8' );
306
- *
307
- * Don't forget to end the document and output the memory
308
- *
309
- * $xml->endDocument();
310
- *
311
- * $your_xml_string = $xml->outputMemory();
312
- *
313
- * @since 2.2.0
314
- * @param \XMLWriter $xml_writer XML writer instance
315
- * @param string|array $element_key name for element, e.g. <per_page>
316
- * @param string|array $element_value value for element, e.g. 100
317
- * @return string generated XML
318
- */
319
- public static function array_to_xml( $xml_writer, $element_key, $element_value = array() ) {
320
-
321
- if ( is_array( $element_value ) ) {
322
-
323
- // handle attributes
324
- if ( '@attributes' === $element_key ) {
325
- foreach ( $element_value as $attribute_key => $attribute_value ) {
326
-
327
- $xml_writer->startAttribute( $attribute_key );
328
- $xml_writer->text( $attribute_value );
329
- $xml_writer->endAttribute();
330
- }
331
- return;
332
- }
333
-
334
- // handle multi-elements (e.g. multiple <Order> elements)
335
- if ( is_numeric( key( $element_value ) ) ) {
336
-
337
- // recursively generate child elements
338
- foreach ( $element_value as $child_element_key => $child_element_value ) {
339
-
340
- $xml_writer->startElement( $element_key );
341
-
342
- foreach ( $child_element_value as $sibling_element_key => $sibling_element_value ) {
343
- self::array_to_xml( $xml_writer, $sibling_element_key, $sibling_element_value );
344
- }
345
-
346
- $xml_writer->endElement();
347
- }
348
-
349
- } else {
350
-
351
- // start root element
352
- $xml_writer->startElement( $element_key );
353
-
354
- // recursively generate child elements
355
- foreach ( $element_value as $child_element_key => $child_element_value ) {
356
- self::array_to_xml( $xml_writer, $child_element_key, $child_element_value );
357
- }
358
-
359
- // end root element
360
- $xml_writer->endElement();
361
- }
362
-
363
- } else {
364
-
365
- // handle single elements
366
- if ( '@value' == $element_key ) {
367
-
368
- $xml_writer->text( $element_value );
369
-
370
- } else {
371
-
372
- // wrap element in CDATA tags if it contains illegal characters
373
- if ( false !== strpos( $element_value, '<' ) || false !== strpos( $element_value, '>' ) ) {
374
-
375
- $xml_writer->startElement( $element_key );
376
- $xml_writer->writeCdata( $element_value );
377
- $xml_writer->endElement();
378
-
379
- } else {
380
-
381
- $xml_writer->writeElement( $element_key, $element_value );
382
- }
383
-
384
- }
385
-
386
- return;
387
- }
388
- }
389
-
390
-
391
- /**
392
- * Lists an array as text.
393
- *
394
- * Takes an array and returns a list like "one, two, three, and four"
395
- * with a (mandatory) oxford comma.
396
- *
397
- * @since 5.2.0
398
- *
399
- * @param array $items items to list
400
- * @param string|null $conjunction coordinating conjunction, like "or" or "and"
401
- * @param string $separator list separator, like a comma
402
- * @return string
403
- */
404
- public static function list_array_items( array $items, $conjunction = null, $separator = '' ) {
405
-
406
- if ( ! is_string( $conjunction ) ) {
407
- $conjunction = _x( 'and', 'coordinating conjunction for a list of items: a, b, and c', 'woocommerce-gateway-paypal-powered-by-braintree' );
408
- }
409
-
410
- // append the conjunction to the last item
411
- if ( count( $items ) > 1 ) {
412
-
413
- $last_item = array_pop( $items );
414
-
415
- array_push( $items, trim( "{$conjunction} {$last_item}" ) );
416
-
417
- // only use a comma if needed and no separator was passed
418
- if ( count( $items ) < 3 ) {
419
- $separator = ' ';
420
- } elseif ( ! is_string( $separator ) || '' === $separator ) {
421
- $separator = ', ';
422
- }
423
- }
424
-
425
- return implode( $separator, $items );
426
- }
427
-
428
-
429
- /** Number helper functions *******************************************/
430
-
431
-
432
- /**
433
- * Format a number with 2 decimal points, using a period for the decimal
434
- * separator and no thousands separator.
435
- *
436
- * Commonly used for payment gateways which require amounts in this format.
437
- *
438
- * @since 3.0.0
439
- * @param float $number
440
- * @return string
441
- */
442
- public static function number_format( $number ) {
443
-
444
- return number_format( (float) $number, 2, '.', '' );
445
- }
446
-
447
-
448
- /** WooCommerce helper functions **************************************/
449
-
450
-
451
- /**
452
- * Get order line items (products) in a neatly-formatted array of objects
453
- * with properties:
454
- *
455
- * + id - item ID
456
- * + name - item name, usually product title, processed through htmlentities()
457
- * + description - formatted item meta (e.g. Size: Medium, Color: blue), processed through htmlentities()
458
- * + quantity - item quantity
459
- * + item_total - item total (line total divided by quantity, excluding tax & rounded)
460
- * + line_total - line item total (excluding tax & rounded)
461
- * + meta - formatted item meta array
462
- * + product - item product or null if getting product from item failed
463
- * + item - raw item array
464
- *
465
- * @since 3.0.0
466
- * @param \WC_Order $order
467
- * @return array
468
- */
469
- public static function get_order_line_items( $order ) {
470
-
471
- $line_items = array();
472
-
473
- foreach ( $order->get_items() as $id => $item ) {
474
-
475
- $line_item = new \stdClass();
476
-
477
- // TODO: remove when WC 3.0 can be required
478
- $name = $item instanceof \WC_Order_Item_Product ? $item->get_name() : $item['name'];
479
- $quantity = $item instanceof \WC_Order_Item_Product ? $item->get_quantity() : $item['qty'];
480
-
481
- $item_desc = array();
482
-
483
- $product = ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_1() ) ? $item->get_product() : $order->get_product_from_item( $item );
484
-
485
- // add SKU to description if available
486
- if ( is_callable( array( $product, 'get_sku' ) ) && $product->get_sku() ) {
487
- $item_desc[] = sprintf( 'SKU: %s', $product->get_sku() );
488
- }
489
-
490
- $item_meta = SV_WC_Order_Compatibility::get_item_formatted_meta_data( $item, '_', true );
491
-
492
- if ( ! empty( $item_meta ) ) {
493
-
494
- foreach ( $item_meta as $meta ) {
495
- $item_desc[] = sprintf( '%s: %s', $meta['label'], $meta['value'] );
496
- }
497
- }
498
-
499
- $item_desc = implode( ', ', $item_desc );
500
-
501
- $line_item->id = $id;
502
- $line_item->name = htmlentities( $name, ENT_QUOTES, 'UTF-8', false );
503
- $line_item->description = htmlentities( $item_desc, ENT_QUOTES, 'UTF-8', false );
504
- $line_item->quantity = $quantity;
505
- $line_item->item_total = isset( $item['recurring_line_total'] ) ? $item['recurring_line_total'] : $order->get_item_total( $item );
506
- $line_item->line_total = $order->get_line_total( $item );
507
- $line_item->meta = $item_meta;
508
- $line_item->product = is_object( $product ) ? $product : null;
509
- $line_item->item = $item;
510
-
511
- $line_items[] = $line_item;
512
- }
513
-
514
- return $line_items;
515
- }
516
-
517
-
518
- /**
519
- * Determines if an order contains only virtual products.
520
- *
521
- * @since 4.5.0
522
- * @param \WC_Order $order the order object
523
- * @return bool
524
- */
525
- public static function is_order_virtual( \WC_Order $order ) {
526
-
527
- $is_virtual = true;
528
-
529
- foreach ( $order->get_items() as $item ) {
530
-
531
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
532
- $product = $item->get_product();
533
- } else {
534
- $product = $order->get_product_from_item( $item );
535
- }
536
-
537
- // once we've found one non-virtual product we know we're done, break out of the loop
538
- if ( $product && ! $product->is_virtual() ) {
539
- $is_virtual = false;
540
- break;
541
- }
542
- }
543
-
544
- return $is_virtual;
545
- }
546
-
547
-
548
- /**
549
- * Safely get and trim data from $_POST
550
- *
551
- * @since 3.0.0
552
- * @param string $key array key to get from $_POST array
553
- * @return string value from $_POST or blank string if $_POST[ $key ] is not set
554
- */
555
- public static function get_post( $key ) {
556
-
557
- if ( isset( $_POST[ $key ] ) ) {
558
- return trim( $_POST[ $key ] );
559
- }
560
-
561
- return '';
562
- }
563
-
564
-
565
- /**
566
- * Safely get and trim data from $_REQUEST
567
- *
568
- * @since 3.0.0
569
- * @param string $key array key to get from $_REQUEST array
570
- * @return string value from $_REQUEST or blank string if $_REQUEST[ $key ] is not set
571
- */
572
- public static function get_request( $key ) {
573
-
574
- if ( isset( $_REQUEST[ $key ] ) ) {
575
- return trim( $_REQUEST[ $key ] );
576
- }
577
-
578
- return '';
579
- }
580
-
581
-
582
- /**
583
- * Get the count of notices added, either for all notices (default) or for one
584
- * particular notice type specified by $notice_type.
585
- *
586
- * WC notice functions are not available in the admin
587
- *
588
- * @since 3.0.2
589
- * @param string $notice_type The name of the notice type - either error, success or notice. [optional]
590
- * @return int
591
- */
592
- public static function wc_notice_count( $notice_type = '' ) {
593
-
594
- if ( function_exists( 'wc_notice_count' ) ) {
595
- return wc_notice_count( $notice_type );
596
- }
597
-
598
- return 0;
599
- }
600
-
601
-
602
- /**
603
- * Add and store a notice.
604
- *
605
- * WC notice functions are not available in the admin
606
- *
607
- * @since 3.0.2
608
- * @param string $message The text to display in the notice.
609
- * @param string $notice_type The singular name of the notice type - either error, success or notice. [optional]
610
- */
611
- public static function wc_add_notice( $message, $notice_type = 'success' ) {
612
-
613
- if ( function_exists( 'wc_add_notice' ) ) {
614
- wc_add_notice( $message, $notice_type );
615
- }
616
- }
617
-
618
-
619
- /**
620
- * Print a single notice immediately
621
- *
622
- * WC notice functions are not available in the admin
623
- *
624
- * @since 3.0.2
625
- * @param string $message The text to display in the notice.
626
- * @param string $notice_type The singular name of the notice type - either error, success or notice. [optional]
627
- */
628
- public static function wc_print_notice( $message, $notice_type = 'success' ) {
629
-
630
- if ( function_exists( 'wc_print_notice' ) ) {
631
- wc_print_notice( $message, $notice_type );
632
- }
633
- }
634
-
635
-
636
- /**
637
- * Gets the full URL to the log file for a given $handle
638
- *
639
- * @since 4.0.0
640
- * @param string $handle log handle
641
- * @return string URL to the WC log file identified by $handle
642
- */
643
- public static function get_wc_log_file_url( $handle ) {
644
- return admin_url( sprintf( 'admin.php?page=wc-status&tab=logs&log_file=%s-%s-log', $handle, sanitize_file_name( wp_hash( $handle ) ) ) );
645
- }
646
-
647
-
648
- /**
649
- * Gets the current WordPress site name.
650
- *
651
- * This is helpful for retrieving the actual site name instead of the
652
- * network name on multisite installations.
653
- *
654
- * @since 4.6.0
655
- * @return string
656
- */
657
- public static function get_site_name() {
658
-
659
- return ( is_multisite() ) ? get_blog_details()->blogname : get_bloginfo( 'name' );
660
- }
661
-
662
-
663
- /** JavaScript helper functions ***************************************/
664
-
665
-
666
- /**
667
- * Enhanced search JavaScript (Select2)
668
- *
669
- * Enqueues JavaScript required for AJAX search with Select2.
670
- *
671
- * Example usage:
672
- * <input type="hidden" class="sv-wc-enhanced-search" name="category_ids" data-multiple="true" style="min-width: 300px;"
673
- * data-action="wc_cart_notices_json_search_product_categories"
674
- * data-nonce="<?php echo wp_create_nonce( 'search-categories' ); ?>"
675
- * data-request_data = "<?php echo esc_attr( json_encode( array( 'field_name' => 'something_exciting', 'default' => 'default_label' ) ) ) ?>"
676
- * data-placeholder="<?php esc_attr_e( 'Search for a category&hellip;', 'wc-cart-notices' ) ?>"
677
- * data-allow_clear="true"
678
- * data-selected="<?php
679
- * $json_ids = array();
680
- * if ( isset( $notice->data['categories'] ) ) {
681
- * foreach ( $notice->data['categories'] as $value => $title ) {
682
- * $json_ids[ esc_attr( $value ) ] = esc_html( $title );
683
- * }
684
- * }
685
- * echo esc_attr( json_encode( $json_ids ) );
686
- * ?>"
687
- * value="<?php echo implode( ',', array_keys( $json_ids ) ); ?>" />
688
- *
689
- * - `data-selected` can be a json encoded associative array like Array( 'key' => 'value' )
690
- * - `value` should be a comma-separated list of selected keys
691
- * - `data-request_data` can be used to pass any additional data to the AJAX request
692
- *
693
- * @codeCoverageIgnore no need to unit test this since it's mostly JS
694
- * @since 3.1.0
695
- */
696
- public static function render_select2_ajax() {
697
-
698
- if ( ! did_action( 'sv_wc_select2_ajax_rendered' ) ) {
699
-
700
- $javascript = "( function(){
701
- if ( ! $().select2 ) return;
702
- ";
703
-
704
- // Ensure localized strings are used.
705
- $javascript .= "
706
-
707
- function getEnhancedSelectFormatString() {
708
-
709
- if ( 'undefined' !== typeof wc_select_params ) {
710
- wc_enhanced_select_params = wc_select_params;
711
- }
712
-
713
- if ( 'undefined' === typeof wc_enhanced_select_params ) {
714
- return {};
715
- }
716
-
717
- var formatString = {
718
- formatMatches: function( matches ) {
719
- if ( 1 === matches ) {
720
- return wc_enhanced_select_params.i18n_matches_1;
721
- }
722
-
723
- return wc_enhanced_select_params.i18n_matches_n.replace( '%qty%', matches );
724
- },
725
- formatNoMatches: function() {
726
- return wc_enhanced_select_params.i18n_no_matches;
727
- },
728
- formatAjaxError: function( jqXHR, textStatus, errorThrown ) {
729
- return wc_enhanced_select_params.i18n_ajax_error;
730
- },
731
- formatInputTooShort: function( input, min ) {
732
- var number = min - input.length;
733
-
734
- if ( 1 === number ) {
735
- return wc_enhanced_select_params.i18n_input_too_short_1
736
- }
737
-
738
- return wc_enhanced_select_params.i18n_input_too_short_n.replace( '%qty%', number );
739
- },
740
- formatInputTooLong: function( input, max ) {
741
- var number = input.length - max;
742
-
743
- if ( 1 === number ) {
744
- return wc_enhanced_select_params.i18n_input_too_long_1
745
- }
746
-
747
- return wc_enhanced_select_params.i18n_input_too_long_n.replace( '%qty%', number );
748
- },
749
- formatSelectionTooBig: function( limit ) {
750
- if ( 1 === limit ) {
751
- return wc_enhanced_select_params.i18n_selection_too_long_1;
752
- }
753
-
754
- return wc_enhanced_select_params.i18n_selection_too_long_n.replace( '%qty%', number );
755
- },
756
- formatLoadMore: function( pageNumber ) {
757
- return wc_enhanced_select_params.i18n_load_more;
758
- },
759
- formatSearching: function() {
760
- return wc_enhanced_select_params.i18n_searching;
761
- }
762
- };
763
-
764
- return formatString;
765
- }
766
- ";
767
-
768
- // Handle Select2 AJAX call according to Select2 version bundled with WC.
769
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
770
-
771
- $javascript .= "
772
-
773
- $( 'select.sv-wc-enhanced-search' ).filter( ':not(.enhanced)' ).each( function() {
774
-
775
- var select2_args = {
776
- allowClear: $( this ).data( 'allow_clear' ) ? true : false,
777
- placeholder: $( this ).data( 'placeholder' ),
778
- minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
779
- escapeMarkup: function( m ) {
780
- return m;
781
- },
782
- ajax: {
783
- url: '" . esc_js( admin_url( 'admin-ajax.php' ) ) . "',
784
- dataType: 'json',
785
- cache: true,
786
- delay: 250,
787
- data: function( params ) {
788
- return {
789
- term: params.term,
790
- request_data: $( this ).data( 'request_data' ) ? $( this ).data( 'request_data' ) : {},
791
- action: $( this ).data( 'action' ) || 'woocommerce_json_search_products_and_variations',
792
- security: $( this ).data( 'nonce' )
793
- };
794
- },
795
- processResults: function( data, params ) {
796
- var terms = [];
797
- if ( data ) {
798
- $.each( data, function( id, text ) {
799
- terms.push( { id: id, text: text } );
800
- });
801
- }
802
- return { results: terms };
803
- }
804
- }
805
- };
806
-
807
- select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
808
-
809
- $( this ).select2( select2_args ).addClass( 'enhanced' );
810
- } );
811
- ";
812
-
813
- } else {
814
-
815
- $javascript .= "
816
-
817
- $( ':input.sv-wc-enhanced-search' ).filter( ':not(.enhanced)' ).each( function() {
818
-
819
- var select2_args = {
820
- allowClear: $( this ).data( 'allow_clear' ) ? true : false,
821
- placeholder: $( this ).data( 'placeholder' ),
822
- minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
823
- escapeMarkup: function( m ) {
824
- return m;
825
- },
826
- ajax: {
827
- url: '" . esc_js( admin_url( 'admin-ajax.php' ) ) . "',
828
- dataType: 'json',
829
- cache: true,
830
- quietMillis: 250,
831
- data: function( term, page ) {
832
- return {
833
- term: term,
834
- request_data: $( this ).data( 'request_data' ) ? $( this ).data( 'request_data' ) : {},
835
- action: $( this ).data( 'action' ) || 'woocommerce_json_search_products_and_variations',
836
- security: $( this ).data( 'nonce' )
837
- };
838
- },
839
- results: function( data, page ) {
840
- var terms = [];
841
- if ( data ) {
842
- $.each( data, function( id, text ) {
843
- terms.push( { id: id, text: text } );
844
- });
845
- }
846
- return { results: terms };
847
- }
848
- }
849
- };
850
-
851
- if ( $( this ).data( 'multiple' ) === true ) {
852
-
853
- select2_args.multiple = true;
854
- select2_args.initSelection = function( element, callback ) {
855
- var data = $.parseJSON( element.attr( 'data-selected' ) );
856
- var selected = [];
857
-
858
- $( element.val().split( ',' ) ).each( function( i, val ) {
859
- selected.push( { id: val, text: data[ val ] } );
860
- } );
861
- return callback( selected );
862
- };
863
- select2_args.formatSelection = function( data ) {
864
- return '<div class=\"selected-option\" data-id=\"' + data.id + '\">' + data.text + '</div>';
865
- };
866
-
867
- } else {
868
-
869
- select2_args.multiple = false;
870
- select2_args.initSelection = function( element, callback ) {
871
- var data = {id: element.val(), text: element.attr( 'data-selected' )};
872
- return callback( data );
873
- };
874
- }
875
-
876
- select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
877
-
878
- $( this ).select2( select2_args ).addClass( 'enhanced' );
879
- } );
880
- ";
881
- }
882
-
883
- $javascript .= "} )();";
884
-
885
- wc_enqueue_js( $javascript );
886
-
887
- /**
888
- * WC Select2 Ajax Rendered Action.
889
- *
890
- * Fired when an Ajax select2 is rendered.
891
- *
892
- * @since 3.1.0
893
- */
894
- do_action( 'sv_wc_select2_ajax_rendered' );
895
- }
896
- }
897
-
898
-
899
- /** Framework translation functions ***********************************/
900
-
901
-
902
- /**
903
- * Gettext `__()` wrapper for framework-translated strings
904
- *
905
- * Warning! This function should only be used if an existing
906
- * translation from the framework is to be used. It should
907
- * never be called for plugin-specific or untranslated strings!
908
- * Untranslated = not registered via string literal.
909
- *
910
- * @since 4.1.0
911
- * @param string $text
912
- * @return string translated text
913
- */
914
- public static function f__( $text ) {
915
-
916
- return __( $text, 'woocommerce-gateway-paypal-powered-by-braintree' );
917
- }
918
-
919
-
920
- /**
921
- * Gettext `_e()` wrapper for framework-translated strings
922
- *
923
- * Warning! This function should only be used if an existing
924
- * translation from the framework is to be used. It should
925
- * never be called for plugin-specific or untranslated strings!
926
- * Untranslated = not registered via string literal.
927
- *
928
- * @since 4.1.0
929
- * @param string $text
930
- */
931
- public static function f_e( $text ) {
932
-
933
- _e( $text, 'woocommerce-gateway-paypal-powered-by-braintree' );
934
- }
935
-
936
-
937
- /**
938
- * Gettext `_x()` wrapper for framework-translated strings
939
- *
940
- * Warning! This function should only be used if an existing
941
- * translation from the framework is to be used. It should
942
- * never be called for plugin-specific or untranslated strings!
943
- * Untranslated = not registered via string literal.
944
- *
945
- * @since 4.1.0
946
- * @param string $text
947
- * @return string translated text
948
- */
949
- public static function f_x( $text, $context ) {
950
-
951
- return _x( $text, $context, 'woocommerce-gateway-paypal-powered-by-braintree' );
952
- }
953
-
954
-
955
- /** Misc functions ****************************************************/
956
-
957
-
958
- /**
959
- * Convert a 2-character country code into its 3-character equivalent, or
960
- * vice-versa, e.g.
961
- *
962
- * 1) given USA, returns US
963
- * 2) given US, returns USA
964
- *
965
- * @since 4.2.0
966
- * @param string $code ISO-3166-alpha-2 or ISO-3166-alpha-3 country code
967
- * @return string country code
968
- */
969
- public static function convert_country_code( $code ) {
970
-
971
- // ISO 3166-alpha-2 => ISO 3166-alpha3
972
- $countries = array(
973
- 'AF' => 'AFG', 'AL' => 'ALB', 'DZ' => 'DZA', 'AD' => 'AND', 'AO' => 'AGO',
974
- 'AG' => 'ATG', 'AR' => 'ARG', 'AM' => 'ARM', 'AU' => 'AUS', 'AT' => 'AUT',
975
- 'AZ' => 'AZE', 'BS' => 'BHS', 'BH' => 'BHR', 'BD' => 'BGD', 'BB' => 'BRB',
976
- 'BY' => 'BLR', 'BE' => 'BEL', 'BZ' => 'BLZ', 'BJ' => 'BEN', 'BT' => 'BTN',
977
- 'BO' => 'BOL', 'BA' => 'BIH', 'BW' => 'BWA', 'BR' => 'BRA', 'BN' => 'BRN',
978
- 'BG' => 'BGR', 'BF' => 'BFA', 'BI' => 'BDI', 'KH' => 'KHM', 'CM' => 'CMR',
979
- 'CA' => 'CAN', 'CV' => 'CPV', 'CF' => 'CAF', 'TD' => 'TCD', 'CL' => 'CHL',
980
- 'CN' => 'CHN', 'CO' => 'COL', 'KM' => 'COM', 'CD' => 'COD', 'CG' => 'COG',
981
- 'CR' => 'CRI', 'CI' => 'CIV', 'HR' => 'HRV', 'CU' => 'CUB', 'CY' => 'CYP',
982
- 'CZ' => 'CZE', 'DK' => 'DNK', 'DJ' => 'DJI', 'DM' => 'DMA', 'DO' => 'DOM',
983
- 'EC' => 'ECU', 'EG' => 'EGY', 'SV' => 'SLV', 'GQ' => 'GNQ', 'ER' => 'ERI',
984
- 'EE' => 'EST', 'ET' => 'ETH', 'FJ' => 'FJI', 'FI' => 'FIN', 'FR' => 'FRA',
985
- 'GA' => 'GAB', 'GM' => 'GMB', 'GE' => 'GEO', 'DE' => 'DEU', 'GH' => 'GHA',
986
- 'GR' => 'GRC', 'GD' => 'GRD', 'GT' => 'GTM', 'GN' => 'GIN', 'GW' => 'GNB',
987
- 'GY' => 'GUY', 'HT' => 'HTI', 'HN' => 'HND', 'HU' => 'HUN', 'IS' => 'ISL',
988
- 'IN' => 'IND', 'ID' => 'IDN', 'IR' => 'IRN', 'IQ' => 'IRQ', 'IE' => 'IRL',
989
- 'IL' => 'ISR', 'IT' => 'ITA', 'JM' => 'JAM', 'JP' => 'JPN', 'JO' => 'JOR',
990
- 'KZ' => 'KAZ', 'KE' => 'KEN', 'KI' => 'KIR', 'KP' => 'PRK', 'KR' => 'KOR',
991
- 'KW' => 'KWT', 'KG' => 'KGZ', 'LA' => 'LAO', 'LV' => 'LVA', 'LB' => 'LBN',
992
- 'LS' => 'LSO', 'LR' => 'LBR', 'LY' => 'LBY', 'LI' => 'LIE', 'LT' => 'LTU',
993
- 'LU' => 'LUX', 'MK' => 'MKD', 'MG' => 'MDG', 'MW' => 'MWI', 'MY' => 'MYS',
994
- 'MV' => 'MDV', 'ML' => 'MLI', 'MT' => 'MLT', 'MH' => 'MHL', 'MR' => 'MRT',
995
- 'MU' => 'MUS', 'MX' => 'MEX', 'FM' => 'FSM', 'MD' => 'MDA', 'MC' => 'MCO',
996
- 'MN' => 'MNG', 'ME' => 'MNE', 'MA' => 'MAR', 'MZ' => 'MOZ', 'MM' => 'MMR',
997
- 'NA' => 'NAM', 'NR' => 'NRU', 'NP' => 'NPL', 'NL' => 'NLD', 'NZ' => 'NZL',
998
- 'NI' => 'NIC', 'NE' => 'NER', 'NG' => 'NGA', 'NO' => 'NOR', 'OM' => 'OMN',
999
- 'PK' => 'PAK', 'PW' => 'PLW', 'PA' => 'PAN', 'PG' => 'PNG', 'PY' => 'PRY',
1000
- 'PE' => 'PER', 'PH' => 'PHL', 'PL' => 'POL', 'PT' => 'PRT', 'QA' => 'QAT',
1001
- 'RO' => 'ROU', 'RU' => 'RUS', 'RW' => 'RWA', 'KN' => 'KNA', 'LC' => 'LCA',
1002
- 'VC' => 'VCT', 'WS' => 'WSM', 'SM' => 'SMR', 'ST' => 'STP', 'SA' => 'SAU',
1003
- 'SN' => 'SEN', 'RS' => 'SRB', 'SC' => 'SYC', 'SL' => 'SLE', 'SG' => 'SGP',
1004
- 'SK' => 'SVK', 'SI' => 'SVN', 'SB' => 'SLB', 'SO' => 'SOM', 'ZA' => 'ZAF',
1005
- 'ES' => 'ESP', 'LK' => 'LKA', 'SD' => 'SDN', 'SR' => 'SUR', 'SZ' => 'SWZ',
1006
- 'SE' => 'SWE', 'CH' => 'CHE', 'SY' => 'SYR', 'TJ' => 'TJK', 'TZ' => 'TZA',
1007
- 'TH' => 'THA', 'TL' => 'TLS', 'TG' => 'TGO', 'TO' => 'TON', 'TT' => 'TTO',
1008
- 'TN' => 'TUN', 'TR' => 'TUR', 'TM' => 'TKM', 'TV' => 'TUV', 'UG' => 'UGA',
1009
- 'UA' => 'UKR', 'AE' => 'ARE', 'GB' => 'GBR', 'US' => 'USA', 'UY' => 'URY',
1010
- 'UZ' => 'UZB', 'VU' => 'VUT', 'VA' => 'VAT', 'VE' => 'VEN', 'VN' => 'VNM',
1011
- 'YE' => 'YEM', 'ZM' => 'ZMB', 'ZW' => 'ZWE', 'TW' => 'TWN', 'CX' => 'CXR',
1012
- 'CC' => 'CCK', 'HM' => 'HMD', 'NF' => 'NFK', 'NC' => 'NCL', 'PF' => 'PYF',
1013
- 'YT' => 'MYT', 'GP' => 'GLP', 'PM' => 'SPM', 'WF' => 'WLF', 'TF' => 'ATF',
1014
- 'BV' => 'BVT', 'CK' => 'COK', 'NU' => 'NIU', 'TK' => 'TKL', 'GG' => 'GGY',
1015
- 'IM' => 'IMN', 'JE' => 'JEY', 'AI' => 'AIA', 'BM' => 'BMU', 'IO' => 'IOT',
1016
- 'VG' => 'VGB', 'KY' => 'CYM', 'FK' => 'FLK', 'GI' => 'GIB', 'MS' => 'MSR',
1017
- 'PN' => 'PCN', 'SH' => 'SHN', 'GS' => 'SGS', 'TC' => 'TCA', 'MP' => 'MNP',
1018
- 'PR' => 'PRI', 'AS' => 'ASM', 'UM' => 'UMI', 'GU' => 'GUM', 'VI' => 'VIR',
1019
- 'HK' => 'HKG', 'MO' => 'MAC', 'FO' => 'FRO', 'GL' => 'GRL', 'GF' => 'GUF',
1020
- 'MQ' => 'MTQ', 'RE' => 'REU', 'AX' => 'ALA', 'AW' => 'ABW', 'AN' => 'ANT',
1021
- 'SJ' => 'SJM', 'AC' => 'ASC', 'TA' => 'TAA', 'AQ' => 'ATA', 'CW' => 'CUW',
1022
- );
1023
-
1024
- if ( 3 === strlen( $code ) ) {
1025
- $countries = array_flip( $countries );
1026
- }
1027
-
1028
- return isset( $countries[ $code ] ) ? $countries[ $code ] : $code;
1029
- }
1030
-
1031
-
1032
- /**
1033
- * Displays a notice if the provided hook has not yet run.
1034
- *
1035
- * @since 5.2.0
1036
- *
1037
- * @param string $hook action hook to check
1038
- * @param string $method method/function name
1039
- * @param string $version version the notice was added
1040
- */
1041
- public static function maybe_doing_it_early( $hook, $method, $version ) {
1042
-
1043
- if ( ! did_action( $hook ) ) {
1044
- SV_WC_Plugin_Compatibility::wc_doing_it_wrong( $method, "This should only be called after '{$hook}'", $version );
1045
- }
1046
- }
1047
-
1048
-
1049
- /**
1050
- * Triggers a PHP error.
1051
- *
1052
- * This wrapper method ensures AJAX isn't broken in the process.
1053
- *
1054
- * @since 4.6.0
1055
- * @param string $message the error message
1056
- * @param int $type Optional. The error type. Defaults to E_USER_NOTICE
1057
- */
1058
- public static function trigger_error( $message, $type = E_USER_NOTICE ) {
1059
-
1060
- if ( is_callable( 'is_ajax' ) && is_ajax() ) {
1061
-
1062
- switch ( $type ) {
1063
-
1064
- case E_USER_NOTICE:
1065
- $prefix = 'Notice: ';
1066
- break;
1067
-
1068
- case E_USER_WARNING:
1069
- $prefix = 'Warning: ';
1070
- break;
1071
-
1072
- default:
1073
- $prefix = '';
1074
- }
1075
-
1076
- error_log( $prefix . $message );
1077
-
1078
- } else {
1079
-
1080
- trigger_error( $message, $type );
1081
- }
1082
- }
1083
-
1084
-
1085
- }
1086
-
1087
- endif; // Class exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/class-sv-wc-plugin-compatibility.php DELETED
@@ -1,316 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce Plugin Framework
4
- *
5
- * This source file is subject to the GNU General Public License v3.0
6
- * that is bundled with this package in the file license.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.html
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to license@skyverge.com so we can send you a copy immediately.
12
- *
13
- * DISCLAIMER
14
- *
15
- * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
- * versions in the future. If you wish to customize the plugin for your
17
- * needs please refer to http://www.skyverge.com
18
- *
19
- * @package SkyVerge/WooCommerce/Plugin/Classes
20
- * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
- * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
- */
24
-
25
- namespace WC_Braintree\Plugin_Framework;
26
-
27
- defined( 'ABSPATH' ) or exit;
28
-
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Plugin_Compatibility' ) ) :
30
-
31
- /**
32
- * WooCommerce Compatibility Utility Class
33
- *
34
- * The unfortunate purpose of this class is to provide a single point of
35
- * compatibility functions for dealing with supporting multiple versions
36
- * of WooCommerce and various extensions.
37
- *
38
- * The expected procedure is to remove methods from this class, using the
39
- * latest ones directly in code, as support for older versions of WooCommerce
40
- * are dropped.
41
- *
42
- * Current Compatibility
43
- * + Core 2.6.14 - 3.3.x
44
- * + Subscriptions 2.2.x
45
- *
46
- * // TODO: move to /compatibility
47
- *
48
- * @since 2.0.0
49
- */
50
- class SV_WC_Plugin_Compatibility {
51
-
52
-
53
- /**
54
- * Gets the statuses that are considered "paid".
55
- *
56
- * @since 5.1.0
57
- *
58
- * @return array
59
- */
60
- public static function wc_get_is_paid_statuses() {
61
-
62
- if ( self::is_wc_version_gte_3_0() ) {
63
- return wc_get_is_paid_statuses();
64
- } else {
65
- return (array) apply_filters( 'woocommerce_order_is_paid_statuses', array( 'processing', 'completed' ) );
66
- }
67
- }
68
-
69
-
70
- /**
71
- * Logs a doing_it_wrong message.
72
- *
73
- * Backports wc_doing_it_wrong() to WC 2.6.
74
- *
75
- * @since 5.0.1
76
- *
77
- * @param string $function function used
78
- * @param string $message message to log
79
- * @param string $version version the message was added in
80
- */
81
- public static function wc_doing_it_wrong( $function, $message, $version ) {
82
-
83
- if ( self::is_wc_version_gte( '3.0' ) ) {
84
-
85
- wc_doing_it_wrong( $function, $message, $version );
86
-
87
- } else {
88
-
89
- $message .= ' Backtrace: ' . wp_debug_backtrace_summary();
90
-
91
- if ( is_ajax() ) {
92
-
93
- do_action( 'doing_it_wrong_run', $function, $message, $version );
94
- error_log( "{$function} was called incorrectly. {$message}. This message was added in version {$version}." );
95
-
96
- } else {
97
-
98
- _doing_it_wrong( $function, $message, $version );
99
- }
100
- }
101
- }
102
-
103
-
104
- /**
105
- * Formats a date for output.
106
- *
107
- * Backports WC 3.0.0's wc_format_datetime() to older versions.
108
- *
109
- * @since 4.6.0
110
- *
111
- * @param \WC_DateTime|\SV_WC_DateTime $date date object
112
- * @param string $format date format
113
- * @return string
114
- */
115
- public static function wc_format_datetime( $date, $format = '' ) {
116
-
117
- if ( self::is_wc_version_gte_3_0() ) {
118
-
119
- return wc_format_datetime( $date, $format );
120
-
121
- } else {
122
-
123
- if ( ! $format ) {
124
- $format = wc_date_format();
125
- }
126
-
127
- if ( ! is_a( $date, '\\WC_Braintree\\Plugin_Framework\\SV_WC_DateTime' ) ) { // TODO: verify this {CW 2017-07-18}
128
- return '';
129
- }
130
-
131
- return $date->date_i18n( $format );
132
- }
133
- }
134
-
135
-
136
- /**
137
- * Logs a deprecated function notice.
138
- *
139
- * @since 5.0.0
140
- *
141
- * @param string $function deprecated function name
142
- * @param string $version deprecated-since version
143
- * @param string $replacement replacement function name
144
- */
145
- public static function wc_deprecated_function( $function, $version, $replacement = null ) {
146
-
147
- if ( self::is_wc_version_gte_3_0() ) {
148
-
149
- wc_deprecated_function( $function, $version, $replacement );
150
-
151
- } else {
152
-
153
- if ( is_ajax() ) {
154
- do_action( 'deprecated_function_run', $function, $replacement, $version );
155
- $log_string = "The {$function} function is deprecated since version {$version}.";
156
- $log_string .= $replacement ? " Replace with {$replacement}." : '';
157
- error_log( $log_string );
158
- } else {
159
- _deprecated_function( $function, $version, $replacement );
160
- }
161
- }
162
- }
163
-
164
-
165
- /**
166
- * Helper method to get the version of the currently installed WooCommerce
167
- *
168
- * @since 3.0.0
169
- * @return string woocommerce version number or null
170
- */
171
- public static function get_wc_version() {
172
-
173
- return defined( 'WC_VERSION' ) && WC_VERSION ? WC_VERSION : null;
174
- }
175
-
176
-
177
- /**
178
- * Determines if the installed version of WooCommerce is 3.0 or greater.
179
- *
180
- * @since 4.6.0
181
- * @return bool
182
- */
183
- public static function is_wc_version_gte_3_0() {
184
- return self::get_wc_version() && version_compare( self::get_wc_version(), '3.0', '>=' );
185
- }
186
-
187
-
188
- /**
189
- * Determines if the installed version of WooCommerce is less than 3.0.
190
- *
191
- * @since 4.6.0
192
- * @return bool
193
- */
194
- public static function is_wc_version_lt_3_0() {
195
- return self::get_wc_version() && version_compare( self::get_wc_version(), '3.0', '<' );
196
- }
197
-
198
-
199
- /**
200
- * Determines if the installed version of WooCommerce is 3.1 or greater.
201
- *
202
- * @since 4.6.5
203
- * @return bool
204
- */
205
- public static function is_wc_version_gte_3_1() {
206
- return self::get_wc_version() && version_compare( self::get_wc_version(), '3.1', '>=' );
207
- }
208
-
209
-
210
- /**
211
- * Determines if the installed version of WooCommerce is less than 3.1.
212
- *
213
- * @since 4.6.5
214
- * @return bool
215
- */
216
- public static function is_wc_version_lt_3_1() {
217
- return self::get_wc_version() && version_compare( self::get_wc_version(), '3.1', '<' );
218
- }
219
-
220
-
221
- /**
222
- * Determines if the installed version of WooCommerce meets or exceeds the
223
- * passed version.
224
- *
225
- * @since 4.7.3
226
- *
227
- * @param string $version version number to compare
228
- * @return bool
229
- */
230
- public static function is_wc_version_gte( $version ) {
231
- return self::get_wc_version() && version_compare( self::get_wc_version(), $version, '>=' );
232
- }
233
-
234
-
235
- /**
236
- * Determines if the installed version of WooCommerce is lower than the
237
- * passed version.
238
- *
239
- * @since 4.7.3
240
- *
241
- * @param string $version version number to compare
242
- * @return bool
243
- */
244
- public static function is_wc_version_lt( $version ) {
245
- return self::get_wc_version() && version_compare( self::get_wc_version(), $version, '<' );
246
- }
247
-
248
-
249
- /**
250
- * Returns true if the installed version of WooCommerce is greater than $version
251
- *
252
- * @since 2.0.0
253
- * @param string $version the version to compare
254
- * @return boolean true if the installed version of WooCommerce is > $version
255
- */
256
- public static function is_wc_version_gt( $version ) {
257
- return self::get_wc_version() && version_compare( self::get_wc_version(), $version, '>' );
258
- }
259
-
260
-
261
- /** WordPress core ******************************************************/
262
-
263
-
264
- /**
265
- * Normalizes a WooCommerce page screen ID.
266
- *
267
- * Needed because WordPress uses a menu title (which is translatable), not slug, to generate screen ID.
268
- * See details in: https://core.trac.wordpress.org/ticket/21454
269
- * TODO: Add WP version check when https://core.trac.wordpress.org/ticket/18857 is addressed {BR 2016-12-12}
270
- *
271
- * @since 4.6.0
272
- * @param string $slug slug for the screen ID to normalize (minus `woocommerce_page_`)
273
- * @return string normalized screen ID
274
- */
275
- public static function normalize_wc_screen_id( $slug = 'wc-settings' ) {
276
-
277
- // The textdomain usage is intentional here, we need to match the menu title.
278
- $prefix = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
279
-
280
- return $prefix . '_page_' . $slug;
281
- }
282
-
283
-
284
- /** Subscriptions *********************************************************/
285
-
286
-
287
- /**
288
- * Returns true if the installed version of WooCommerce Subscriptions is
289
- * 2.0.0 or greater
290
- *
291
- * @since 4.1.0
292
- * @return boolean
293
- */
294
- public static function is_wc_subscriptions_version_gte_2_0() {
295
-
296
- return self::get_wc_subscriptions_version() && version_compare( self::get_wc_subscriptions_version(), '2.0-beta-1', '>=' );
297
- }
298
-
299
-
300
- /**
301
- * Helper method to get the version of the currently installed WooCommerce
302
- * Subscriptions
303
- *
304
- * @since 4.1.0
305
- * @return string WooCommerce Subscriptions version number or null if not found.
306
- */
307
- protected static function get_wc_subscriptions_version() {
308
-
309
- return class_exists( 'WC_Subscriptions' ) && ! empty( \WC_Subscriptions::$version ) ? \WC_Subscriptions::$version : null;
310
- }
311
-
312
-
313
- }
314
-
315
-
316
- endif; // Class exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/compatibility/class-sv-wc-product-compatibility.php DELETED
@@ -1,272 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce Plugin Framework
4
- *
5
- * This source file is subject to the GNU General Public License v3.0
6
- * that is bundled with this package in the file license.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.html
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to license@skyverge.com so we can send you a copy immediately.
12
- *
13
- * DISCLAIMER
14
- *
15
- * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
- * versions in the future. If you wish to customize the plugin for your
17
- * needs please refer to http://www.skyverge.com
18
- *
19
- * @package SkyVerge/WooCommerce/Compatibility
20
- * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
- * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
- */
24
-
25
- namespace WC_Braintree\Plugin_Framework;
26
-
27
- defined( 'ABSPATH' ) or exit;
28
-
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Product_Compatibility' ) ) :
30
-
31
- /**
32
- * WooCommerce product compatibility class.
33
- *
34
- * @since 4.6.0
35
- */
36
- class SV_WC_Product_Compatibility extends SV_WC_Data_Compatibility {
37
-
38
-
39
- /** @var array mapped compatibility properties, as `$new_prop => $old_prop` */
40
- protected static $compat_props = array(
41
- 'catalog_visibility' => 'visibility',
42
- 'date_on_sale_from' => 'sale_price_dates_from',
43
- 'date_on_sale_to' => 'sale_price_dates_to',
44
- 'gallery_image_ids' => 'product_image_gallery',
45
- 'cross_sell_ids' => 'crosssell_ids',
46
- );
47
-
48
-
49
- /**
50
- * Gets a product property.
51
- *
52
- * @since 4.6.0
53
- *
54
- * @param \WC_Product $object the product object
55
- * @param string $prop the property name
56
- * @param string $context if 'view' then the value will be filtered
57
- * @return mixed
58
- */
59
- public static function get_prop( $object, $prop, $context = 'edit', $compat_props = array() ) {
60
-
61
- // backport 'WC_Product::get_parent_id()' to pre-3.0
62
- if ( SV_WC_Plugin_Compatibility::is_wc_version_lt_3_0() && 'parent_id' === $prop ) {
63
- $prop = 'id';
64
- $context = $object->is_type( 'variation' ) ? 'raw' : $context;
65
- }
66
-
67
- return parent::get_prop( $object, $prop, $context, self::$compat_props );
68
- }
69
-
70
-
71
- /**
72
- * Sets an products's properties.
73
- *
74
- * Note that this does not save any data to the database.
75
- *
76
- * @since 4.6.0
77
- *
78
- * @param \WC_Product $object the product object
79
- * @param array $props the new properties as $key => $value
80
- * @return \WC_Product
81
- */
82
- public static function set_props( $object, $props, $compat_props = array() ) {
83
-
84
- return parent::set_props( $object, $props, self::$compat_props );
85
- }
86
-
87
-
88
- /**
89
- * Gets a product's parent product.
90
- *
91
- * @since 4.6.0
92
- *
93
- * @param \WC_Product $product the product object
94
- * @return \WC_Product|bool
95
- */
96
- public static function get_parent( \WC_Product $product ) {
97
-
98
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
99
- $parent = wc_get_product( $product->get_parent_id() );
100
- } else {
101
- $parent = $product->is_type( 'variation' ) ? wc_get_product( $product->id ) : false;
102
- }
103
-
104
- return $parent;
105
- }
106
-
107
-
108
- /**
109
- * Backports wc_update_product_stock() to pre-3.0.
110
- *
111
- * @since 4.6.0
112
- *
113
- * @param \WC_Product $product the product object
114
- * @param int $amount Optional. The new stock quantity
115
- * @param string $mode Optional. Can be set, add, or subtract
116
- * @return int
117
- */
118
- public static function wc_update_product_stock( \WC_Product $product, $amount = null, $mode = 'set' ) {
119
-
120
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
121
- return wc_update_product_stock( $product, $amount, $mode );
122
- } else {
123
- return $product->set_stock( $amount, $mode );
124
- }
125
- }
126
-
127
-
128
- /**
129
- * Backports wc_get_price_html_from_text() to pre-3.0.
130
- *
131
- * @since 4.6.0
132
- *
133
- * @param \WC_Product $product the product object
134
- * @return string
135
- */
136
- public static function wc_get_price_html_from_text( \WC_Product $product ) {
137
-
138
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
139
- return wc_get_price_html_from_text();
140
- } else {
141
- return $product->get_price_html_from_text();
142
- }
143
- }
144
-
145
-
146
- /**
147
- * Backports wc_get_price_including_tax() to pre-3.0.
148
- *
149
- * @since 4.6.0
150
- *
151
- * @param \WC_Product $product the product object
152
- * @param int $qty Optional. The quantity
153
- * @param string $price Optional. The product price
154
- * @return string
155
- */
156
- public static function wc_get_price_including_tax( \WC_Product $product, $qty = 1, $price = '' ) {
157
-
158
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
159
-
160
- return wc_get_price_including_tax( $product, array(
161
- 'qty' => $qty,
162
- 'price' => $price,
163
- ) );
164
-
165
- } else {
166
-
167
- return $product->get_price_including_tax( $qty, $price );
168
- }
169
- }
170
-
171
-
172
- /**
173
- * Backports wc_get_price_excluding_tax() to pre-3.0.
174
- *
175
- * @since 4.6.0
176
- *
177
- * @param \WC_Product $product the product object
178
- * @param int $qty Optional. The quantity
179
- * @param string $price Optional. The product price
180
- * @return string
181
- */
182
- public static function wc_get_price_excluding_tax( \WC_Product $product, $qty = 1, $price = '' ) {
183
-
184
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
185
-
186
- return wc_get_price_excluding_tax( $product, array(
187
- 'qty' => $qty,
188
- 'price' => $price,
189
- ) );
190
-
191
- } else {
192
-
193
- return $product->get_price_excluding_tax( $qty, $price );
194
- }
195
- }
196
-
197
-
198
- /**
199
- * Backports wc_get_price_to_display() to pre-3.0.
200
- *
201
- * @since 4.6.0
202
- *
203
- * @param \WC_Product $product the product object
204
- * @param string $price Optional. The product price
205
- * @param int $qty Optional. The quantity
206
- * @return string
207
- */
208
- public static function wc_get_price_to_display( \WC_Product $product, $price = '', $qty = 1 ) {
209
-
210
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
211
-
212
- return wc_get_price_to_display( $product, array(
213
- 'qty' => $qty,
214
- 'price' => $price,
215
- ) );
216
-
217
- } else {
218
-
219
- return $product->get_display_price( $price, $qty );
220
- }
221
- }
222
-
223
-
224
- /**
225
- * Backports wc_get_product_category_list() to pre-3.0.
226
- *
227
- * @since 4.6.0
228
- *
229
- * @param \WC_Product $product the product object
230
- * @param string $sep Optional. The list separator
231
- * @param string $before Optional. To display before the list
232
- * @param string $after Optional. To display after the list
233
- * @return string
234
- */
235
- public static function wc_get_product_category_list( \WC_Product $product, $sep = ', ', $before = '', $after = '' ) {
236
-
237
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
238
-
239
- $id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
240
-
241
- return wc_get_product_category_list( $id, $sep, $before, $after );
242
-
243
- } else {
244
-
245
- return $product->get_categories( $sep, $before, $after );
246
- }
247
- }
248
-
249
-
250
- /**
251
- * Backports wc_get_rating_html() to pre-3.0.
252
- *
253
- * @since 4.6.0
254
- *
255
- * @param \WC_Product $product the product object
256
- * @param string $rating Optional. The product rating
257
- * @return string
258
- */
259
- public static function wc_get_rating_html( \WC_Product $product, $rating = null ) {
260
-
261
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
262
- return wc_get_rating_html( $rating );
263
- } else {
264
- return $product->get_rating_html( $rating );
265
- }
266
- }
267
-
268
-
269
- }
270
-
271
-
272
- endif; // Class exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/i18n/languages/woocommerce-plugin-framework-et.mo DELETED
Binary file
lib/skyverge/woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce Payment Gateway Framework
4
- *
5
- * This source file is subject to the GNU General Public License v3.0
6
- * that is bundled with this package in the file license.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.html
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to license@skyverge.com so we can send you a copy immediately.
12
- *
13
- * DISCLAIMER
14
- *
15
- * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
- * versions in the future. If you wish to customize the plugin for your
17
- * needs please refer to http://www.skyverge.com
18
- *
19
- * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
- * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
- * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
- */
24
-
25
- namespace WC_Braintree\Plugin_Framework;
26
-
27
- defined( 'ABSPATH' ) or exit;
28
-
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_Orders' ) ) :
30
-
31
- /**
32
- * The Apple Pay order handler.
33
- *
34
- * @since 4.7.0
35
- */
36
- class SV_WC_Payment_Gateway_Apple_Pay_Orders {
37
-
38
-
39
- /**
40
- * Creates an order from a cart.
41
- *
42
- * @since 4.7.0
43
- *
44
- * @param \WC_Cart $cart cart object
45
- *
46
- * @throws \SV_WC_Payment_Gateway_Exception
47
- */
48
- public static function create_order( \WC_Cart $cart ) {
49
-
50
- // ensure totals are fully calculated by simulating checkout in WC 3.1 or lower
51
- // TODO: remove this when WC 3.2+ can be required {CW 2017-11-17}
52
- if ( SV_WC_Plugin_Compatibility::is_wc_version_lt( '3.2' ) && ! defined( 'WOOCOMMERCE_CHECKOUT' ) ) {
53
- define( 'WOOCOMMERCE_CHECKOUT', true );
54
- }
55
-
56
- $cart->calculate_totals();
57
-
58
- try {
59
-
60
- wc_transaction_query( 'start' );
61
-
62
- $order_data = array(
63
- 'status' => apply_filters( 'woocommerce_default_order_status', 'pending' ),
64
- 'customer_id' => get_current_user_id(),
65
- 'cart_hash' => md5( json_encode( wc_clean( $cart->get_cart_for_session() ) ) . $cart->total ),
66
- 'created_via' => 'apple_pay',
67
- );
68
-
69
- $order = self::get_order_object( $order_data );
70
-
71
- foreach ( $cart->get_cart() as $cart_item_key => $item ) {
72
-
73
- $args = array(
74
- 'variation' => $item['variation'],
75
- 'totals' => array(
76
- 'subtotal' => $item['line_subtotal'],
77
- 'subtotal_tax' => $item['line_subtotal_tax'],
78
- 'total' => $item['line_total'],
79
- 'tax' => $item['line_tax'],
80
- 'tax_data' => $item['line_tax_data']
81
- ),
82
- );
83
-
84
- if ( ! $order->add_product( $item['data'], $item['quantity'], $args ) ) {
85
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 525 ) );
86
- }
87
- }
88
-
89
- foreach ( $cart->get_coupons() as $code => $coupon ) {
90
-
91
- if ( ! SV_WC_Order_Compatibility::add_coupon( $order, $code, $cart->get_coupon_discount_amount( $code ), $cart->get_coupon_discount_tax_amount( $code ) ) ) {
92
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 529 ) );
93
- }
94
- }
95
-
96
- $chosen_methods = WC()->session->get( 'chosen_shipping_methods', array() );
97
-
98
- foreach ( WC()->shipping->get_packages() as $key => $package ) {
99
-
100
- if ( isset( $package['rates'][ $chosen_methods[ $key ] ] ) ) {
101
-
102
- $method = $package['rates'][ $chosen_methods[ $key ] ];
103
-
104
- if ( ! SV_WC_Order_Compatibility::add_shipping( $order, $method ) ) {
105
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 527 ) );
106
- }
107
- }
108
- }
109
-
110
- // add fees
111
- foreach ( $cart->get_fees() as $key => $fee ) {
112
-
113
- if ( ! SV_WC_Order_Compatibility::add_fee( $order, $fee ) ) {
114
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 526 ) );
115
- }
116
- }
117
-
118
- $cart_taxes = SV_WC_Plugin_Compatibility::is_wc_version_gte( '3.2' ) ? $cart->get_cart_contents_taxes() : $cart->taxes;
119
- $shipping_taxes = SV_WC_Plugin_Compatibility::is_wc_version_gte( '3.2' ) ? $cart->get_shipping_taxes() : $cart->shipping_taxes;
120
-
121
- foreach ( array_keys( $cart_taxes + $shipping_taxes ) as $rate_id ) {
122
-
123
- if ( $rate_id && apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) !== $rate_id ) {
124
-
125
- if ( ! SV_WC_Order_Compatibility::add_tax( $order, $rate_id, $cart->get_tax_amount( $rate_id ), $cart->get_shipping_tax_amount( $rate_id ) ) ) {
126
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 526 ) );
127
- }
128
- }
129
- }
130
-
131
- wc_transaction_query( 'commit' );
132
-
133
- $order->update_taxes();
134
-
135
- $order->calculate_totals( false ); // false to skip recalculating taxes
136
-
137
- do_action( 'woocommerce_checkout_update_order_meta', SV_WC_Order_Compatibility::get_prop( $order, 'id' ), array() );
138
-
139
- return $order;
140
-
141
- } catch ( SV_WC_Payment_Gateway_Exception $e ) {
142
-
143
- wc_transaction_query( 'rollback' );
144
-
145
- throw $e;
146
- }
147
- }
148
-
149
-
150
- /**
151
- * Gets an order object for payment.
152
- *
153
- * @since 4.7.0
154
- *
155
- * @param array $order_data the order data
156
- * @return \WC_Order
157
- *
158
- * @throws \SV_WC_Payment_Gateway_Exception
159
- */
160
- public static function get_order_object( $order_data ) {
161
-
162
- $order_id = (int) WC()->session->get( 'order_awaiting_payment', 0 );
163
-
164
- if ( $order_id && $order_data['cart_hash'] === get_post_meta( $order_id, '_cart_hash', true ) && ( $order = wc_get_order( $order_id ) ) && $order->has_status( array( 'pending', 'failed' ) ) ) {
165
-
166
- $order_data['order_id'] = $order_id;
167
-
168
- $order = wc_update_order( $order_data );
169
-
170
- if ( is_wp_error( $order ) ) {
171
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 522 ) );
172
- } else {
173
- $order->remove_order_items();
174
- }
175
-
176
- } else {
177
-
178
- $order = wc_create_order( $order_data );
179
-
180
- if ( is_wp_error( $order ) ) {
181
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 520 ) );
182
- } elseif ( false === $order ) {
183
- throw new SV_WC_Payment_Gateway_Exception( sprintf( __( 'Error %d: Unable to create order. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ), 521 ) );
184
- }
185
-
186
- // set the new order ID so it can be resumed in case of failure
187
- WC()->session->set( 'order_awaiting_payment', SV_WC_Order_Compatibility::get_prop( $order, 'id' ) );
188
- }
189
-
190
- return $order;
191
- }
192
-
193
-
194
- }
195
-
196
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-admin-order.min.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAWC,gFAAwD,CACvD,UAAU,CAAE,GAAG,CACf,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,iBAAiB,CAE7B,wFAAQ,CACP,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,GAAG,CAGjB,+FAAe,CACd,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,CAAC",
4
- "sources": ["sv-wc-payment-gateway-admin-order.scss"],
5
- "names": [],
6
- "file": "sv-wc-payment-gateway-admin-order.min.css"
7
- }
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-admin-order.scss DELETED
@@ -1,27 +0,0 @@
1
- /*
2
- WooCommerce SkyVerge Payment Gateway Framework Order Admin SCSS
3
- Version 5.0.0
4
-
5
- Copyright (c) 2016-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- */
9
-
10
- #woocommerce-order-items {
11
-
12
- .sv-wc-payment-gateway-partial-capture .capture-actions {
13
- margin-top: 5px;
14
- padding-top: 12px;
15
- border-top: 1px solid #dfdfdf;
16
-
17
- .button {
18
- float: right;
19
- margin-left: 4px;
20
- }
21
-
22
- .cancel-action {
23
- float: left;
24
- margin-left: 0;
25
- }
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-token-editor.min.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAQA,wCAAyC,CAExC,KAAK,CAAE,IAAI,CAEX,2CAAG,CACF,OAAO,CAAE,kBAAiB,CAC1B,cAAc,CAAE,MAAM,CAGvB,2CAAG,CACF,cAAc,CAAE,MAAM,CACtB,OAAO,CAAE,QAAQ,CACjB,WAAW,CAAE,GAAG,CAGjB,6DAAqB,CACpB,UAAU,CAAE,OAAO,CAGpB,6DAAqB,CACpB,YAAY,CAAE,IAAI,CAInB,uDAAe,CACd,UAAU,CAAE,MAAM,CAInB,uDAAe,CACd,UAAU,CAAE,KAAK,CAGlB,iDAAS,CACR,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,KAAK,CAEjB,wDAAO,CACN,KAAK,CAAE,IAAI,CACX,aAAa,CAAE,IAAI,CACnB,WAAW,CAAE,IAAI",
4
- "sources": ["sv-wc-payment-gateway-token-editor.scss"],
5
- "names": [],
6
- "file": "sv-wc-payment-gateway-token-editor.min.css"
7
- }
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/admin/sv-wc-payment-gateway-token-editor.scss DELETED
@@ -1,52 +0,0 @@
1
- /*
2
- WooCommerce SkyVerge Payment Gateway Framework Token Editor SCSS
3
- Version 4.3.0
4
-
5
- Copyright (c) 2016-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- */
9
- table.sv_wc_payment_gateway_token_editor {
10
-
11
- width: auto;
12
-
13
- th {
14
- padding: 9px 7px!important;
15
- vertical-align: middle;
16
- }
17
-
18
- td {
19
- vertical-align: middle;
20
- padding: 10px 7px;
21
- line-height: 2em;
22
- }
23
-
24
- tr:nth-child(odd) td {
25
- background: #f9f9f9;
26
- }
27
-
28
- tr.token input.error {
29
- border-color: #a00;
30
- }
31
-
32
- // "Default" column
33
- .token-default {
34
- text-align: center;
35
- }
36
-
37
- // "Actions" column
38
- .token-actions {
39
- text-align: right;
40
- }
41
-
42
- .actions {
43
- font-weight: normal;
44
- text-align: right;
45
-
46
- .error {
47
- color: #a00;
48
- padding-right: 10px;
49
- font-weight: bold;
50
- }
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-my-payment-methods.min.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAWA,oDAAqD,CACpD,SAAS,CAAE,MAAM,CAEjB,+GAAO,CACN,cAAc,CAAE,MAAM,CAGvB,4DAAQ,CACP,WAAW,CAAE,MAAM,CAGpB,4UAE0D,CACzD,OAAO,CAAE,IAAI,CAGd,kNACqD,CACpD,UAAU,CAAE,MAAM,CAGnB,yGAAqD,CACpD,UAAU,CAAE,KAAK,CAKjB,uJAAkD,CACjD,KAAK,CAAE,IAAI,CAGZ,mJAA8C,CAC7C,WAAW,CAAE,MAAM,CAEnB,uJAAI,CACH,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,YAAY,CAAE,KAAK,CACnB,cAAc,CAAE,MAAM,CACtB,OAAO,CAAE,iBAAiB,CAI5B,kJAA6C,CAC5C,UAAU,CAAE,MAAM,CAGnB,mJAA8C,CAC7C,UAAU,CAAE,MAAM,CAElB,wJAAK,CACJ,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,KAAK,CACZ,gBAAgB,CAAE,OAAO,CACzB,SAAS,CAAE,MAAM,CACjB,cAAc,CAAE,SAAS,CACzB,OAAO,CAAE,OAAO,CAChB,aAAa,CAAE,GAAG,CAIpB,mJAA8C,CAC7C,UAAU,CAAE,KAAK,CAEjB,2JAAQ,CACP,MAAM,CAAE,qBAAqB,CAE7B,8KAAqB,CACpB,MAAM,CAAE,IAAI,CAKf,iIAA4B,CAC3B,YAAY,CAAE,KAAK,CAMpB,sHAA0D,CACzD,OAAO,CAAE,MAAM,CAGhB,+OACuD,CACtD,OAAO,CAAE,GAAG,CAGb,mHAAuD,CACtD,OAAO,CAAE,CAAC,CAIZ,gHAA4D,CAC3D,WAAW,CAAE,GAAG,CAGjB,8DAAU,CACT,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,MAAM,CAClB,gBAAgB,CAAE,OAAO,CACzB,aAAa,CAAE,WAAW,CAC1B,OAAO,CAAE,GAAG,CAId,cAAe,CACd,OAAO,CAAE,IAAI,CACb,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,OAAO,CAAE,KAAK,CAEd,sBAAU,CACT,cAAc,CAAE,GAAG,CAEnB,0CAAoB,CACnB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,IAAI,CACjB,gBAAgB,CAAE,OAAO,CAI3B,yBAAa,CACZ,WAAW,CAAE,GAAG,CAEhB,6CAAoB,CACnB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,IAAI,CACjB,mBAAmB,CAAE,OAAO,CAI9B,wBAAY,CACX,YAAY,CAAE,GAAG,CAEjB,4CAAoB,CACnB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,IAAI,CACjB,kBAAkB,CAAE,OAAO,CAI7B,uBAAW,CACV,aAAa,CAAE,GAAG,CAElB,2CAAoB,CACnB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,IAAI,CACjB,iBAAiB,CAAE,OAAO,CAK7B,8BACe,CACd,SAAS,CAAC,IAAI,CACd,KAAK,CAAC,IAAI,CACV,OAAO,CAAC,SAAS,CACjB,UAAU,CAAC,OAAO,CAClB,qBAAqB,CAAC,GAAG,CACzB,kBAAkB,CAAC,GAAG,CACtB,aAAa,CAAC,GAAG,CACjB,kBAAkB,CAAC,2BAA2B,CAC9C,eAAe,CAAC,2BAA2B,CAC3C,UAAU,CAAC,2BAA2B,CACtC,UAAU,CAAC,MAAM,CACjB,SAAS,CAAC,KAAK,CAEhB,wCACoB,CACnB,UAAU,CAAC,IAAI,CACf,OAAO,CAAC,GAAG,CAEZ,iCACoB,CACnB,QAAQ,CAAC,QAAQ,CACjB,YAAY,CAAC,WAAW,CACxB,YAAY,CAAC,KAAK,CAClB,YAAY,CAAC,GAAG,CAChB,MAAM,CAAC,CAAC,CACR,KAAK,CAAC,CAAC,CAGR,oCAAqC,CAMlC,sSAC8C,CAC7C,UAAU,CAAE,KAAK,CAGlB,mJAA8C,CAC7C,UAAU,CAAE,KAAK,CAEjB,0JAAS,CACR,OAAO,CAAE,IAAI,CAGd,2JAAQ,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,qBAAqB,CAKhC,qHAAiE,CAChE,OAAO,CAAE,IAAI",
4
- "sources": ["sv-wc-payment-gateway-my-payment-methods.scss"],
5
- "names": [],
6
- "file": "sv-wc-payment-gateway-my-payment-methods.min.css"
7
- }
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-my-payment-methods.scss DELETED
@@ -1,227 +0,0 @@
1
- /*
2
- WooCommerce SkyVerge Payment Gateway Framework My Payment Methods SCSS
3
- Version 4.3.0
4
-
5
- Copyright (c) 2015-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- */
9
-
10
- @import '../../../../assets/css/mixins';
11
-
12
- table.sv-wc-payment-gateway-my-payment-methods-table {
13
- font-size: 0.85em;
14
-
15
- th, td {
16
- vertical-align: middle;
17
- }
18
-
19
- .button {
20
- white-space: nowrap;
21
- }
22
-
23
- .sv-wc-payment-gateway-payment-method-header-details span,
24
- .sv-wc-payment-gateway-payment-method-header-default span,
25
- .sv-wc-payment-gateway-payment-method-header-actions span {
26
- display: none;
27
- }
28
-
29
- .sv-wc-payment-gateway-payment-method-header-expiry,
30
- .sv-wc-payment-gateway-payment-method-header-default {
31
- text-align: center;
32
- }
33
-
34
- .sv-wc-payment-gateway-payment-method-header-actions {
35
- text-align: right;
36
- }
37
-
38
- .sv-wc-payment-gateway-my-payment-methods-method {
39
-
40
- .sv-wc-payment-gateway-payment-method-title input {
41
- width: 100%;
42
- }
43
-
44
- .sv-wc-payment-gateway-payment-method-details {
45
- white-space: nowrap;
46
-
47
- img {
48
- width: 40px;
49
- height: 25px;
50
- margin-right: 0.5em;
51
- vertical-align: middle;
52
- display: inline !important;
53
- }
54
- }
55
-
56
- .sv-wc-payment-gateway-payment-method-expiry {
57
- text-align: center;
58
- }
59
-
60
- .sv-wc-payment-gateway-payment-method-default {
61
- text-align: center;
62
-
63
- mark {
64
- display: inline-block;
65
- color: white;
66
- background-color: #3d9cd2;
67
- font-size: 0.75em;
68
- text-transform: uppercase;
69
- padding: 2px 4px;
70
- border-radius: 2px;
71
- }
72
- }
73
-
74
- .sv-wc-payment-gateway-payment-method-actions {
75
- text-align: right;
76
-
77
- .button {
78
- margin: .125em 0 .125em .25em;
79
-
80
- &.disabled.tip:hover {
81
- cursor: help;
82
- }
83
- }
84
- }
85
-
86
- .cancel-edit-payment-method {
87
- margin-right: 0.5em;
88
- }
89
- }
90
-
91
- &.editing {
92
-
93
- .sv-wc-payment-gateway-payment-method-header-default span {
94
- display: inline;
95
- }
96
-
97
- .sv-wc-payment-gateway-my-payment-methods-method:not(.editing),
98
- .sv-wc-payment-gateway-my-payment-methods-type-divider {
99
- opacity: 0.5;
100
- }
101
-
102
- .sv-wc-payment-gateway-my-payment-methods-method:hover {
103
- opacity: 1;
104
- }
105
- }
106
-
107
- tr.sv-wc-payment-gateway-my-payment-methods-type-divider td {
108
- font-weight: 700;
109
- }
110
-
111
- .error td {
112
- color: white;
113
- text-align: center;
114
- background-color: #e26838;
115
- border-radius: 0 0 3px 3px;
116
- padding: 5px;
117
- }
118
- }
119
-
120
- #tiptip_holder {
121
- display: none;
122
- position: absolute;
123
- top: 0;
124
- left: 0;
125
- z-index: 99999;
126
-
127
- &.tip_top {
128
- padding-bottom: 5px;
129
-
130
- #tiptip_arrow_inner {
131
- margin-top: -7px;
132
- margin-left: -6px;
133
- border-top-color: #464646;
134
- }
135
- }
136
-
137
- &.tip_bottom {
138
- padding-top: 5px;
139
-
140
- #tiptip_arrow_inner {
141
- margin-top: -5px;
142
- margin-left: -6px;
143
- border-bottom-color: #464646;
144
- }
145
- }
146
-
147
- &.tip_right {
148
- padding-left: 5px;
149
-
150
- #tiptip_arrow_inner {
151
- margin-top: -6px;
152
- margin-left: -5px;
153
- border-right-color: #464646;
154
- }
155
- }
156
-
157
- &.tip_left {
158
- padding-right: 5px;
159
-
160
- #tiptip_arrow_inner {
161
- margin-top: -6px;
162
- margin-left: -7px;
163
- border-left-color: #464646;
164
- }
165
- }
166
- }
167
-
168
- #tiptip_content,
169
- .chart-tooltip {
170
- font-size:11px;
171
- color:#fff;
172
- padding:.5em .5em;
173
- background:#464646;
174
- -webkit-border-radius:3px;
175
- -moz-border-radius:3px;
176
- border-radius:3px;
177
- -webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);
178
- -moz-box-shadow:1px 1px 3px rgba(0,0,0,0.1);
179
- box-shadow:1px 1px 3px rgba(0,0,0,0.1);
180
- text-align:center;
181
- max-width:150px;
182
- }
183
- #tiptip_content code,
184
- .chart-tooltip code {
185
- background:#888;
186
- padding:1px;
187
- }
188
- #tiptip_arrow,
189
- #tiptip_arrow_inner {
190
- position:absolute;
191
- border-color:transparent;
192
- border-style:solid;
193
- border-width:6px;
194
- height:0;
195
- width:0;
196
- }
197
-
198
- @media screen and (max-width: 768px) {
199
-
200
- table.sv-wc-payment-gateway-my-payment-methods-table {
201
-
202
- .sv-wc-payment-gateway-my-payment-methods-method {
203
-
204
- .sv-wc-payment-gateway-payment-method-expiry,
205
- .sv-wc-payment-gateway-payment-method-default {
206
- text-align: right;
207
- }
208
-
209
- .sv-wc-payment-gateway-payment-method-actions {
210
- text-align: right;
211
-
212
- &:before {
213
- display: none;
214
- }
215
-
216
- .button {
217
- float: none;
218
- margin: .125em .25em .125em 0;
219
- }
220
- }
221
- }
222
-
223
- .sv-wc-payment-gateway-my-payment-methods-type-divider td:before {
224
- display: none;
225
- }
226
- }
227
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css DELETED
@@ -1 +0,0 @@
1
- .woocommerce-checkout #payment div.payment_box .sv-wc-payment-gateway-payment-form-manage-payment-methods,#add_payment_method .sv-wc-payment-gateway-payment-form-manage-payment-methods{display:block;margin:1em 0;text-align:center}.woocommerce-checkout #payment div.payment_box .sv-wc-payment-gateway-payment-form-saved-payment-method,#add_payment_method .sv-wc-payment-gateway-payment-form-saved-payment-method{display:inline-block;margin-bottom:.5em}.woocommerce-checkout #payment div.payment_box .sv-wc-payment-gateway-payment-form-saved-payment-method .nickname,#add_payment_method .sv-wc-payment-gateway-payment-form-saved-payment-method .nickname{margin-right:.5em}.woocommerce-checkout #payment div.payment_box .sv-wc-payment-gateway-payment-form-saved-payment-method img,#add_payment_method .sv-wc-payment-gateway-payment-form-saved-payment-method img{float:none;width:30px;height:20px;display:inline-block;margin-right:.5em;vertical-align:middle}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"],.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"],.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-echeck-form-input[type="tel"],.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-echeck-form-input[type="text"],.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-form-nickname,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"],#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"],#add_payment_method input.js-sv-wc-payment-gateway-echeck-form-input[type="tel"],#add_payment_method input.js-sv-wc-payment-gateway-echeck-form-input[type="text"],#add_payment_method input.js-sv-wc-payment-gateway-form-nickname{font-size:1.5em;padding:8px}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"]:focus,.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"]:focus,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"]:focus,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"]:focus{box-shadow:0 0 .1875em #3498db}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"].identified,.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"].identified,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"].identified,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"].identified{border-color:#69bf29}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"].identified:focus,.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"].identified:focus,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"].identified:focus,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"].identified:focus{box-shadow:0 0 .1875em #69bf29}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number{background-image:url("../../images/card-cc-plain.svg");background-repeat:no-repeat;background-position:right 10px center;background-size:50px 31px}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.visa,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.visa{background-image:url("../../images/card-visa.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.mastercard,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.mastercard{background-image:url("../../images/card-mastercard.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.dinersclub,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.dinersclub{background-image:url("../../images/card-dinersclub.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.maestro,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.maestro{background-image:url("../../images/card-maestro.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.jcb,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.jcb{background-image:url("../../images/card-jcb.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.amex,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.amex{background-image:url("../../images/card-amex.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.discover,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.discover{background-image:url("../../images/card-discover.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.visaelectron,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.visaelectron{background-image:url("../../images/card-visa-electron.svg")}.woocommerce-checkout #payment div.payment_box input.js-sv-wc-payment-gateway-credit-card-form-account-number.invalid-card-type,#add_payment_method input.js-sv-wc-payment-gateway-credit-card-form-account-number.invalid-card-type{background-image:url("../../images/card-cc-invalid.svg")}.woocommerce-checkout #payment div.payment_box .js-sv-wc-payment-gateway-echeck-form-check-hint,#add_payment_method .js-sv-wc-payment-gateway-echeck-form-check-hint{margin:0 0 3px 2px;cursor:pointer}.woocommerce-checkout #payment div.payment_box .js-sv-wc-payment-gateway-echeck-form-sample-check,#add_payment_method .js-sv-wc-payment-gateway-echeck-form-sample-check{margin:1em}.woocommerce-checkout #payment div.payment_box .js-sv-wc-payment-gateway-echeck-form-sample-check img,#add_payment_method .js-sv-wc-payment-gateway-echeck-form-sample-check img{min-height:135px}#add_payment_method ul.payment_methods li{list-style-type:none}#add_payment_method ul.payment_methods li img{vertical-align:middle;margin:-2px 0 0 .5em;padding:0;position:relative;box-shadow:none}#add_payment_method ul.payment_methods li img+img{margin-left:2px}
 
lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAYC,wLAA2D,CAC1D,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,KAAK,CACb,UAAU,CAAE,MAAM,CAGnB,oLAAyD,CACxD,OAAO,CAAE,YAAY,CACrB,aAAa,CAAE,IAAI,CAEnB,wMAAU,CACT,YAAY,CAAE,IAAI,CAGnB,4LAAI,CACH,KAAK,CAAE,IAAI,CACX,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,YAAY,CACrB,YAAY,CAAE,IAAI,CAClB,cAAc,CAAE,MAAM,CAKxB,w6BAI6C,CAC5C,SAAS,CAAE,KAAK,CAChB,OAAO,CAAE,GAAG,CAOZ,uaAAQ,CACP,UAAU,CAAE,mBAAmB,CAGhC,2bAAa,CACZ,YAAY,CAAE,OAAO,CACrB,mdAAQ,CACP,UAAU,CAAE,mBAAmB,CAMlC,gMAA+D,CAE9D,gBAAgB,CAAE,qCAAqC,CACvD,iBAAiB,CAAE,SAAS,CAC5B,mBAAmB,CAAE,iBAAiB,CACtC,eAAe,CAAE,SAAS,CAE1B,0MAAO,CACN,gBAAgB,CAAE,iCAAiC,CAGpD,sNAAa,CACZ,gBAAgB,CAAE,uCAAuC,CAG1D,sNAAa,CACZ,gBAAgB,CAAE,uCAAuC,CAG1D,gNAAU,CACT,gBAAgB,CAAE,oCAAoC,CAGvD,wMAAM,CACL,gBAAgB,CAAE,gCAAgC,CAGnD,0MAAO,CACN,gBAAgB,CAAE,iCAAiC,CAGpD,kNAAW,CACV,gBAAgB,CAAE,qCAAqC,CAGxD,0NAAe,CACd,gBAAgB,CAAE,0CAA0C,CAG7D,oOAAoB,CACnB,gBAAgB,CAAE,uCAAuC,CAI3D,oKAAiD,CAChD,MAAM,CAAE,WAAW,CACnB,MAAM,CAAE,OAAO,CAGhB,wKAAmD,CAClD,MAAM,CAAE,GAAG,CACX,gLAAI,CACH,UAAU,CAAE,KAAK,CAOnB,yCAAsB,CACrB,eAAe,CAAE,IAAI,CACrB,6CAAI,CACH,cAAc,CAAE,MAAM,CACtB,MAAM,CAAE,aAAa,CACrB,OAAO,CAAE,CAAC,CACV,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,IAAI,CAChB,iDAAQ,CACP,WAAW,CAAE,GAAG",
4
- "sources": ["sv-wc-payment-gateway-payment-form.scss"],
5
- "names": [],
6
- "file": "sv-wc-payment-gateway-payment-form.min.css"
7
- }
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.scss DELETED
@@ -1,136 +0,0 @@
1
- /*
2
- WooCommerce SkyVerge Payment Gateway Framework Payment Form SCSS
3
- Version 4.3.0
4
-
5
- Copyright (c) 2015-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- */
9
-
10
- // checkout, Order > Pay, and Add Payment Method pages
11
- .woocommerce-checkout #payment div.payment_box, #add_payment_method {
12
-
13
- .sv-wc-payment-gateway-payment-form-manage-payment-methods {
14
- display: block;
15
- margin: 1em 0;
16
- text-align: center;
17
- }
18
-
19
- .sv-wc-payment-gateway-payment-form-saved-payment-method {
20
- display: inline-block;
21
- margin-bottom: .5em;
22
-
23
- .nickname {
24
- margin-right: .5em;
25
- }
26
-
27
- img {
28
- float: none;
29
- width: 30px;
30
- height: 20px;
31
- display: inline-block;
32
- margin-right: .5em;
33
- vertical-align: middle;
34
- }
35
- }
36
-
37
- // general input styling
38
- input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"],
39
- input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"],
40
- input.js-sv-wc-payment-gateway-echeck-form-input[type="tel"],
41
- input.js-sv-wc-payment-gateway-echeck-form-input[type="text"],
42
- input.js-sv-wc-payment-gateway-form-nickname {
43
- font-size: 1.5em;
44
- padding: 8px;
45
- }
46
-
47
- // highlight valid credit card inputs
48
- input.js-sv-wc-payment-gateway-credit-card-form-input[type="tel"],
49
- input.js-sv-wc-payment-gateway-credit-card-form-input[type="text"] {
50
-
51
- &:focus {
52
- box-shadow: 0 0 .1875em #3498db;
53
- }
54
-
55
- &.identified {
56
- border-color: #69bf29;
57
- &:focus {
58
- box-shadow: 0 0 .1875em #69bf29;
59
- }
60
- }
61
- }
62
-
63
- // inline credit card input icon
64
- input.js-sv-wc-payment-gateway-credit-card-form-account-number {
65
-
66
- background-image: url('../../images/card-cc-plain.svg');
67
- background-repeat: no-repeat;
68
- background-position: right 10px center;
69
- background-size: 50px 31px;
70
-
71
- &.visa {
72
- background-image: url('../../images/card-visa.svg');
73
- }
74
-
75
- &.mastercard {
76
- background-image: url('../../images/card-mastercard.svg');
77
- }
78
-
79
- &.dinersclub {
80
- background-image: url('../../images/card-dinersclub.svg');
81
- }
82
-
83
- &.maestro {
84
- background-image: url('../../images/card-maestro.svg');
85
- }
86
-
87
- &.jcb {
88
- background-image: url('../../images/card-jcb.svg');
89
- }
90
-
91
- &.amex {
92
- background-image: url('../../images/card-amex.svg');
93
- }
94
-
95
- &.discover {
96
- background-image: url('../../images/card-discover.svg');
97
- }
98
-
99
- &.visaelectron {
100
- background-image: url('../../images/card-visa-electron.svg');
101
- }
102
-
103
- &.invalid-card-type {
104
- background-image: url('../../images/card-cc-invalid.svg');
105
- }
106
- }
107
-
108
- .js-sv-wc-payment-gateway-echeck-form-check-hint {
109
- margin: 0 0 3px 2px;
110
- cursor: pointer;
111
- }
112
-
113
- .js-sv-wc-payment-gateway-echeck-form-sample-check {
114
- margin: 1em;
115
- img {
116
- min-height: 135px;
117
- }
118
- }
119
- }
120
-
121
- // add payment method form card images
122
- #add_payment_method {
123
- ul.payment_methods li {
124
- list-style-type: none;
125
- img {
126
- vertical-align: middle;
127
- margin: -2px 0 0 .5em;
128
- padding: 0;
129
- position: relative;
130
- box-shadow: none;
131
- & + img {
132
- margin-left: 2px;
133
- }
134
- }
135
- }
136
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-invalid.png DELETED
Binary file
lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-invalid.svg DELETED
@@ -1 +0,0 @@
1
- <svg width="128" height="80" viewBox="0 0 128 80" xmlns="http://www.w3.org/2000/svg"><title>Slice 1</title><g fill="none" fill-rule="evenodd"><g opacity=".5" transform="translate(10 7)"><path d="M3.663 68.892c-1.96 0-3.556-1.601-3.556-3.57V3.68C.107 1.711 1.702.108 3.663.108h102.665a3.573 3.573 0 0 1 3.565 3.573v61.64c0 1.97-1.599 3.571-3.565 3.571H3.663z" fill="#FFF"/><path d="M106.328.216a3.464 3.464 0 0 1 3.457 3.465v61.64a3.465 3.465 0 0 1-3.457 3.464H3.663a3.46 3.46 0 0 1-3.448-3.463V3.682C.215 1.77 1.762.215 3.663.215h102.665zm0-.216H3.663A3.67 3.67 0 0 0 0 3.681v61.64A3.67 3.67 0 0 0 3.663 69h102.665A3.676 3.676 0 0 0 110 65.32V3.682A3.677 3.677 0 0 0 106.328 0z" fill="#848484"/><ellipse fill="#F2706C" cx="74.998" cy="49.646" rx="11.5" ry="11.542"/><ellipse fill="#8FD7F1" cx="86.5" cy="49.646" rx="11.501" ry="11.543"/><path fill="#4A4A4A" d="M.002 12.79H110v12.835H.002z"/><path d="M9.69 38.104h38.557V42.3H9.689v-4.196zm0 9.441h38.557v4.2H9.689v-4.2zm0 9.446h38.557v4.197H9.689v-4.197z" fill="#C9C9C9"/></g><path d="M6 74L122 6" stroke="#F2706C" stroke-width="8" stroke-linecap="square"/></g></svg>
 
lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-plain.png DELETED
Binary file
lib/skyverge/woocommerce/payment-gateway/assets/images/card-cc-plain.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 80"><path d="M4.262 79.875c-2.28 0-4.137-1.857-4.137-4.14V4.267C.125 1.984 1.98.125 4.262.125h119.465c2.287 0 4.148 1.858 4.148 4.143v71.467c0 2.283-1.86 4.14-4.148 4.14H4.262z" fill="#FFF"/><path d="M123.727.25c2.22 0 4.023 1.802 4.023 4.018v71.467c0 2.214-1.805 4.016-4.023 4.016H4.262C2.05 79.75.25 77.95.25 75.736V4.268C.25 2.053 2.05.25 4.262.25h119.465m0-.25H4.262C1.906 0 0 1.91 0 4.268v71.467C0 78.09 1.906 80 4.262 80h119.465c2.36 0 4.273-1.91 4.273-4.266V4.268C128 1.91 126.086 0 123.727 0z" fill="#848484"/><circle cx="87.27" cy="57.561" r="13.382" fill="#F2706C"/><circle cx="100.654" cy="57.561" r="13.383" fill="#8FD7F1"/><path fill="#4A4A4A" d="M.002 14.83H128v14.88H.002z"/><path fill="#C9C9C9" d="M11.275 44.178h44.867v4.865H11.275zM11.275 55.125h44.867v4.87H11.275zM11.275 66.076h44.867v4.867H11.275z"/></svg>
 
lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-admin-order.coffee DELETED
@@ -1,103 +0,0 @@
1
- ###
2
- WooCommerce SkyVerge Payment Gateway Framework Order Admin CoffeeScript
3
- Version 5.0.0
4
-
5
- Copyright (c) 2017-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- ###
9
-
10
- jQuery( document ).ready ($) ->
11
- "use strict"
12
-
13
- sv_wc_payment_gateway_admin_order = window.sv_wc_payment_gateway_admin_order ? {}
14
- woocommerce_admin = window.woocommerce_admin ? {}
15
- woocommerce_admin_meta_boxes = window.woocommerce_admin_meta_boxes ? {}
16
- accounting = window.accounting ? {}
17
-
18
- # this is ugly, but there are no actions to output this HTML where it belongs
19
- $( '.sv-wc-payment-gateway-partial-capture' ).appendTo( '#woocommerce-order-items .inside' )
20
-
21
-
22
- $( '#woocommerce-order-items' ).on 'click', '.sv-wc-payment-gateway-capture:not(.disabled)', ( e ) ->
23
-
24
- e.preventDefault()
25
-
26
- if ( $( @ ).hasClass( 'partial-capture' ) )
27
-
28
- $( 'div.sv-wc-payment-gateway-partial-capture' ).slideDown();
29
- $( 'div.wc-order-data-row-toggle' ).not( 'div.sv-wc-payment-gateway-partial-capture' ).slideUp();
30
- $( 'div.wc-order-totals-items' ).slideUp();
31
-
32
- else
33
-
34
- submitCapture()
35
-
36
-
37
- $( '.sv-wc-payment-gateway-partial-capture' ).on 'change keyup', '#capture_amount', ( e ) ->
38
-
39
- total = accounting.unformat( $( @ ).val(), woocommerce_admin.mon_decimal_point );
40
-
41
- if ( total )
42
- $( 'button.capture-action' ).removeAttr( 'disabled' )
43
- else
44
- $( 'button.capture-action' ).attr( 'disabled', 'disabled' )
45
-
46
- $( 'button .capture-amount .amount' ).text( accounting.formatMoney( total, {
47
- symbol: woocommerce_admin_meta_boxes.currency_format_symbol,
48
- decimal: woocommerce_admin_meta_boxes.currency_format_decimal_sep,
49
- thousand: woocommerce_admin_meta_boxes.currency_format_thousand_sep,
50
- precision: woocommerce_admin_meta_boxes.currency_format_num_decimals,
51
- format: woocommerce_admin_meta_boxes.currency_format
52
- } ) )
53
-
54
-
55
- $( '.sv-wc-payment-gateway-partial-capture' ).on 'click', '.capture-action', ( e ) ->
56
-
57
- e.preventDefault()
58
-
59
- amount = $( '.sv-wc-payment-gateway-partial-capture #capture_amount' ).val()
60
- comment = $( '.sv-wc-payment-gateway-partial-capture #capture_comment' ).val()
61
-
62
- submitCapture( amount, comment )
63
-
64
-
65
- submitCapture = ( amount = '', comment = '' ) ->
66
-
67
- if ( confirm( sv_wc_payment_gateway_admin_order.capture_ays ) )
68
-
69
- $( '#woocommerce-order-items' ).block( {
70
- message: null
71
- overlayCSS: {
72
- background: '#fff'
73
- opacity: 0.6
74
- }
75
- } )
76
-
77
- data =
78
- action: sv_wc_payment_gateway_admin_order.capture_action
79
- nonce: sv_wc_payment_gateway_admin_order.capture_nonce
80
- gateway_id: sv_wc_payment_gateway_admin_order.gateway_id
81
- order_id: sv_wc_payment_gateway_admin_order.order_id
82
- amount: amount
83
- comment: comment
84
-
85
- $.ajax(
86
- url: sv_wc_payment_gateway_admin_order.ajax_url
87
- data: data
88
- ).done( ( response ) ->
89
-
90
- alert( response.data.message ) if response.data? and response.data.message?
91
-
92
- location.reload() if response.success
93
-
94
- ).fail( ->
95
-
96
- # connection error
97
- alert( sv_wc_payment_gateway_admin_order.capture_error )
98
-
99
- ).always( ->
100
-
101
- # never leave the UI blocked
102
- $( '#woocommerce-order-items' ).unblock()
103
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-admin-order.min.js.map DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "sv-wc-payment-gateway-admin-order.min.js",
4
- "sourceRoot": "",
5
- "sources": [
6
- "sv-wc-payment-gateway-admin-order.coffee"
7
- ],
8
- "names": [],
9
- "mappings": ";AAAA;;;;;;;;;AAAA;EASA,MAAA,CAAQ,QAAR,CAAkB,CAAC,KAAnB,CAAyB,SAAC,CAAD;IACxB;AAAA,QAAA;IAEA,iCAAA,oEAA+E;IAC/E,iBAAA,sDAA+D;IAC/D,4BAAA,iEAA0E;IAC1E,UAAA,+CAAwD;IAGxD,CAAA,CAAG,wCAAH,CAA6C,CAAC,QAA9C,CAAwD,kCAAxD;IAGA,CAAA,CAAG,0BAAH,CAA+B,CAAC,EAAhC,CAAmC,OAAnC,EAA4C,+CAA5C,EAA6F,SAAE,CAAF;MAE5F,CAAC,CAAC,cAAF,CAAA;MAEA,IAAK,CAAA,CAAG,IAAH,CAAM,CAAC,QAAP,CAAiB,iBAAjB,CAAL;QAEC,CAAA,CAAG,2CAAH,CAAgD,CAAC,SAAjD,CAAA;QACA,CAAA,CAAG,8BAAH,CAAmC,CAAC,GAApC,CAAyC,2CAAzC,CAAsF,CAAC,OAAvF,CAAA;eACA,CAAA,CAAG,2BAAH,CAAgC,CAAC,OAAjC,CAAA,EAJD;OAAA,MAAA;eAQC,aAAA,CAAA,EARD;;IAJ4F,CAA7F;IAeA,CAAA,CAAG,wCAAH,CAA6C,CAAC,EAA9C,CAAiD,cAAjD,EAAiE,iBAAjE,EAAoF,SAAE,CAAF;AAEnF,UAAA;MAAA,KAAA,GAAQ,UAAU,CAAC,QAAX,CAAqB,CAAA,CAAG,IAAH,CAAM,CAAC,GAAP,CAAA,CAArB,EAAmC,iBAAiB,CAAC,iBAArD;MAER,IAAK,KAAL;QACC,CAAA,CAAG,uBAAH,CAA4B,CAAC,UAA7B,CAAyC,UAAzC,EADD;OAAA,MAAA;QAGC,CAAA,CAAG,uBAAH,CAA4B,CAAC,IAA7B,CAAmC,UAAnC,EAA+C,UAA/C,EAHD;;aAKA,CAAA,CAAG,gCAAH,CAAqC,CAAC,IAAtC,CAA4C,UAAU,CAAC,WAAX,CAAwB,KAAxB,EAA+B;QAC1E,MAAA,EAAW,4BAA4B,CAAC,sBADkC;QAE1E,OAAA,EAAW,4BAA4B,CAAC,2BAFkC;QAG1E,QAAA,EAAW,4BAA4B,CAAC,4BAHkC;QAI1E,SAAA,EAAW,4BAA4B,CAAC,4BAJkC;QAK1E,MAAA,EAAW,4BAA4B,CAAC,eALkC;OAA/B,CAA5C;IATmF,CAApF;IAkBA,CAAA,CAAG,wCAAH,CAA6C,CAAC,EAA9C,CAAiD,OAAjD,EAA0D,iBAA1D,EAA6E,SAAE,CAAF;AAE5E,UAAA;MAAA,CAAC,CAAC,cAAF,CAAA;MAEA,MAAA,GAAU,CAAA,CAAG,wDAAH,CAA6D,CAAC,GAA9D,CAAA;MACV,OAAA,GAAU,CAAA,CAAG,yDAAH,CAA8D,CAAC,GAA/D,CAAA;aAEV,aAAA,CAAe,MAAf,EAAuB,OAAvB;IAP4E,CAA7E;WAUA,aAAA,GAAgB,SAAE,MAAF,EAAe,OAAf;AAEf,UAAA;;QAFiB,SAAS;;;QAAI,UAAU;;MAExC,IAAK,OAAA,CAAS,iCAAiC,CAAC,WAA3C,CAAL;QAEC,CAAA,CAAG,0BAAH,CAA+B,CAAC,KAAhC,CAAuC;UACtC,OAAA,EAAS,IAD6B;UAEtC,UAAA,EAAY;YACX,UAAA,EAAY,MADD;YAEX,OAAA,EAAS,GAFE;WAF0B;SAAvC;QAQA,IAAA,GACC;UAAA,MAAA,EAAY,iCAAiC,CAAC,cAA9C;UACA,KAAA,EAAY,iCAAiC,CAAC,aAD9C;UAEA,UAAA,EAAY,iCAAiC,CAAC,UAF9C;UAGA,QAAA,EAAY,iCAAiC,CAAC,QAH9C;UAIA,MAAA,EAAY,MAJZ;UAKA,OAAA,EAAY,OALZ;;eAOD,CAAC,CAAC,IAAF,CACC;UAAA,GAAA,EAAM,iCAAiC,CAAC,QAAxC;UACA,IAAA,EAAM,IADN;SADD,CAGC,CAAC,IAHF,CAGQ,SAAE,QAAF;UAEP,IAAkC,uBAAA,IAAmB,+BAArD;YAAA,KAAA,CAAO,QAAQ,CAAC,IAAI,CAAC,OAArB,EAAA;;UAEA,IAAqB,QAAQ,CAAC,OAA9B;mBAAA,QAAQ,CAAC,MAAT,CAAA,EAAA;;QAJO,CAHR,CASC,CAAC,IATF,CASQ,SAAA;iBAGP,KAAA,CAAO,iCAAiC,CAAC,aAAzC;QAHO,CATR,CAcC,CAAC,MAdF,CAcU,SAAA;iBAGT,CAAA,CAAG,0BAAH,CAA+B,CAAC,OAAhC,CAAA;QAHS,CAdV,EAlBD;;IAFe;EAvDQ,CAAzB;AATA"
10
- }
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-token-editor.coffee DELETED
@@ -1,186 +0,0 @@
1
- ###
2
- WooCommerce SkyVerge Payment Gateway Framework Token Editor CoffeeScript
3
- Version 4.3.0-beta
4
-
5
- Copyright (c) 2016, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- ###
9
- jQuery( document ).ready ($) ->
10
- "use strict"
11
-
12
- wc_payment_gateway_token_editor = window.wc_payment_gateway_token_editor ? {}
13
-
14
-
15
- $( '.sv_wc_payment_gateway_token_editor' ).each () ->
16
-
17
- tokens = $( this ).find( 'tr.token' )
18
-
19
- if ( tokens.length is 0 )
20
- $( this ).find( 'tr.no-tokens' ).show()
21
- else
22
- $( this ).find( 'tr.no-tokens' ).hide()
23
-
24
-
25
- # Remove a token
26
- $( '.sv_wc_payment_gateway_token_editor' ).on 'click', '.button[data-action="remove"]', ( e ) ->
27
-
28
- e.preventDefault()
29
-
30
- return unless confirm( wc_payment_gateway_token_editor.actions.remove_token.ays )
31
-
32
- editor = $( this ).closest( 'table' )
33
-
34
- editor.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )
35
-
36
- editor.find( '.error' ).remove()
37
-
38
- row = $( this ).closest( 'tr' )
39
-
40
- # if this is an unsaved token, just remove the row
41
- return row.remove() if row.hasClass( 'new-token' )
42
-
43
- data =
44
- action: 'wc_payment_gateway_' + editor.data( 'gateway-id' ) + '_admin_remove_payment_token'
45
- user_id: $( this ).data( 'user-id' )
46
- token_id: $( this ).data( 'token-id' )
47
- security: wc_payment_gateway_token_editor.actions.remove_token.nonce
48
-
49
- $.post wc_payment_gateway_token_editor.ajax_url, data
50
-
51
- .done ( response ) =>
52
-
53
- return handleError( editor, response.data ) unless response.success
54
-
55
- $( row ).remove()
56
-
57
- # no more tokens? Display a message
58
- if ( editor.find( 'tr.token' ).length is 0 )
59
- editor.find( 'tr.no-tokens' ).show()
60
-
61
- .fail ( jqXHR, textStatus, error ) =>
62
-
63
- handleError( editor, textStatus + ': ' + error )
64
-
65
- .always =>
66
-
67
- editor.unblock()
68
-
69
-
70
-
71
-
72
- # Add a new (blank) token
73
- $( 'table.sv_wc_payment_gateway_token_editor' ).on 'click', '.button[data-action="add-new"]', ( e ) ->
74
-
75
- e.preventDefault()
76
-
77
- editor = $( this ).closest( 'table' )
78
-
79
- editor.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )
80
-
81
- body = editor.find( 'tbody.tokens' )
82
- count = body.find( 'tr.token' ).length
83
-
84
- data =
85
- action: 'wc_payment_gateway_' + editor.data( 'gateway-id' ) + '_admin_get_blank_payment_token'
86
- index: count + 1
87
- security: wc_payment_gateway_token_editor.actions.add_token.nonce
88
-
89
- $.post wc_payment_gateway_token_editor.ajax_url, data, ( response ) ->
90
-
91
- if response.success is true then body.append( response.data )
92
-
93
- editor.find( 'tr.no-tokens' ).hide()
94
-
95
- editor.unblock()
96
-
97
-
98
- # Refresh the tokens
99
- $( 'table.sv_wc_payment_gateway_token_editor' ).on 'click', '.button[data-action="refresh"]', ( e ) ->
100
-
101
- e.preventDefault()
102
-
103
- editor = $( this ).closest( 'table' )
104
-
105
- editor.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )
106
-
107
- editor.find( '.error' ).remove()
108
-
109
- body = editor.find( 'tbody.tokens' )
110
- count = body.find( 'tr.token' ).length
111
-
112
- data =
113
- action: 'wc_payment_gateway_' + editor.data( 'gateway-id' ) + '_admin_refresh_payment_tokens'
114
- user_id: $( this ).data( 'user-id' )
115
- security: wc_payment_gateway_token_editor.actions.refresh.nonce
116
-
117
- $.post wc_payment_gateway_token_editor.ajax_url, data
118
-
119
- .done ( response ) =>
120
-
121
- return handleError( editor, response.data ) unless response.success
122
-
123
- if response.data?
124
- editor.find( 'tr.no-tokens' ).hide()
125
- body.html( response.data )
126
- else
127
- body.empty()
128
- editor.find( 'tr.no-tokens' ).show()
129
-
130
- .fail ( jqXHR, textStatus, error ) =>
131
-
132
- handleError( editor, textStatus + ': ' + error )
133
-
134
- .always =>
135
-
136
- editor.unblock()
137
-
138
- # Save the tokens
139
- $( 'table.sv_wc_payment_gateway_token_editor' ).on 'click', '.sv-wc-payment-gateway-token-editor-action-button[data-action="save"]', ( e ) ->
140
-
141
- editor = $( this ).closest( 'table' )
142
- actions_row = editor.find( 'tfoot th' )
143
-
144
- editor.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )
145
-
146
- actions_row.find( '.error, .success' ).remove();
147
-
148
- # Validate the input data
149
-
150
- inputs = editor.find( 'tbody.tokens tr.token input[type="text"]' )
151
- focused = false
152
-
153
- inputs.each ( index ) ->
154
-
155
- $( this ).removeClass( 'error' )
156
-
157
- value = $( this ).val()
158
- required = $( this ).prop( 'required' )
159
- pattern = $( this ).attr( 'pattern' )
160
-
161
- return unless required or value
162
-
163
- if ( ! value.match( pattern ) or ( required and ! value ) )
164
-
165
- e.preventDefault()
166
-
167
- $( this ).addClass( 'error' )
168
-
169
- if ( ! focused )
170
- actions_row.prepend( '<span class="error">' + wc_payment_gateway_token_editor.actions.save.error + '</span>' )
171
- $( this ).focus()
172
- focused = true
173
-
174
- editor.unblock()
175
-
176
-
177
- # Handles any AJAX errors.
178
- #
179
- # @since 5.1.0
180
- handleError = ( editor, error, message = '' ) ->
181
-
182
- console.error error
183
-
184
- message = wc_payment_gateway_token_editor.i18n.general_error unless message
185
-
186
- editor.find( 'th.actions' ).prepend( '<span class="error">' + message + '</span>' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/admin/sv-wc-payment-gateway-token-editor.min.js.map DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "sv-wc-payment-gateway-token-editor.min.js",
4
- "sourceRoot": "",
5
- "sources": [
6
- "sv-wc-payment-gateway-token-editor.coffee"
7
- ],
8
- "names": [],
9
- "mappings": ";AAAA;;;;;;;;;AAAA;EAQA,MAAA,CAAQ,QAAR,CAAkB,CAAC,KAAnB,CAAyB,SAAC,CAAD;IACxB;AAAA,QAAA;IAEA,+BAAA,kEAA2E;IAG3E,CAAA,CAAG,qCAAH,CAA0C,CAAC,IAA3C,CAAgD,SAAA;AAE/C,UAAA;MAAA,MAAA,GAAS,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,UAAhB;MAET,IAAK,MAAM,CAAC,MAAP,KAAiB,CAAtB;eACC,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,cAAhB,CAAgC,CAAC,IAAjC,CAAA,EADD;OAAA,MAAA;eAGC,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,cAAhB,CAAgC,CAAC,IAAjC,CAAA,EAHD;;IAJ+C,CAAhD;IAWA,CAAA,CAAG,qCAAH,CAA0C,CAAC,EAA3C,CAA8C,OAA9C,EAAuD,+BAAvD,EAAwF,SAAE,CAAF;AAEvF,UAAA;MAAA,CAAC,CAAC,cAAF,CAAA;MAEA,IAAA,CAAc,OAAA,CAAS,+BAA+B,CAAC,OAAO,CAAC,YAAY,CAAC,GAA9D,CAAd;AAAA,eAAA;;MAEA,MAAA,GAAS,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,OAAnB;MAET,MAAM,CAAC,KAAP,CAAc;QAAA,OAAA,EAAS,IAAT;QAAe,UAAA,EAAY;UAAA,UAAA,EAAY,MAAZ;UAAmB,OAAA,EAAS,GAA5B;SAA3B;OAAd;MAEA,MAAM,CAAC,IAAP,CAAa,QAAb,CAAuB,CAAC,MAAxB,CAAA;MAEA,GAAA,GAAM,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,IAAnB;MAGN,IAAuB,GAAG,CAAC,QAAJ,CAAc,WAAd,CAAvB;AAAA,eAAO,GAAG,CAAC,MAAJ,CAAA,EAAP;;MAEA,IAAA,GACC;QAAA,MAAA,EAAU,qBAAA,GAAwB,MAAM,CAAC,IAAP,CAAa,YAAb,CAAxB,GAAsD,6BAAhE;QACA,OAAA,EAAU,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,SAAhB,CADV;QAEA,QAAA,EAAU,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,UAAhB,CAFV;QAGA,QAAA,EAAU,+BAA+B,CAAC,OAAO,CAAC,YAAY,CAAC,KAH/D;;aAKD,CAAC,CAAC,IAAF,CAAO,+BAA+B,CAAC,QAAvC,EAAiD,IAAjD,CAEC,CAAC,IAFF,CAEO,CAAA,SAAA,KAAA;eAAA,SAAE,QAAF;UAEL,IAAA,CAAmD,QAAQ,CAAC,OAA5D;AAAA,mBAAO,WAAA,CAAa,MAAb,EAAqB,QAAQ,CAAC,IAA9B,EAAP;;UAEA,CAAA,CAAG,GAAH,CAAQ,CAAC,MAAT,CAAA;UAGA,IAAK,MAAM,CAAC,IAAP,CAAa,UAAb,CAAyB,CAAC,MAA1B,KAAoC,CAAzC;mBACC,MAAM,CAAC,IAAP,CAAa,cAAb,CAA6B,CAAC,IAA9B,CAAA,EADD;;QAPK;MAAA,CAAA,CAAA,CAAA,IAAA,CAFP,CAYC,CAAC,IAZF,CAYO,CAAA,SAAA,KAAA;eAAA,SAAE,KAAF,EAAS,UAAT,EAAqB,KAArB;iBAEL,WAAA,CAAa,MAAb,EAAqB,UAAA,GAAa,IAAb,GAAoB,KAAzC;QAFK;MAAA,CAAA,CAAA,CAAA,IAAA,CAZP,CAgBC,CAAC,MAhBF,CAgBS,CAAA,SAAA,KAAA;eAAA,SAAA;iBAEP,MAAM,CAAC,OAAP,CAAA;QAFO;MAAA,CAAA,CAAA,CAAA,IAAA,CAhBT;IAvBuF,CAAxF;IA+CA,CAAA,CAAG,0CAAH,CAA+C,CAAC,EAAhD,CAAmD,OAAnD,EAA4D,gCAA5D,EAA8F,SAAE,CAAF;AAE7F,UAAA;MAAA,CAAC,CAAC,cAAF,CAAA;MAEA,MAAA,GAAS,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,OAAnB;MAET,MAAM,CAAC,KAAP,CAAc;QAAA,OAAA,EAAS,IAAT;QAAe,UAAA,EAAY;UAAA,UAAA,EAAY,MAAZ;UAAmB,OAAA,EAAS,GAA5B;SAA3B;OAAd;MAEA,IAAA,GAAQ,MAAM,CAAC,IAAP,CAAa,cAAb;MACR,KAAA,GAAQ,IAAI,CAAC,IAAL,CAAW,UAAX,CAAuB,CAAC;MAEhC,IAAA,GACC;QAAA,MAAA,EAAU,qBAAA,GAAwB,MAAM,CAAC,IAAP,CAAa,YAAb,CAAxB,GAAsD,gCAAhE;QACA,KAAA,EAAU,KAAA,GAAQ,CADlB;QAEA,QAAA,EAAU,+BAA+B,CAAC,OAAO,CAAC,SAAS,CAAC,KAF5D;;aAID,CAAC,CAAC,IAAF,CAAO,+BAA+B,CAAC,QAAvC,EAAiD,IAAjD,EAAuD,SAAE,QAAF;QAEtD,IAAG,QAAQ,CAAC,OAAT,KAAoB,IAAvB;UAAiC,IAAI,CAAC,MAAL,CAAa,QAAQ,CAAC,IAAtB,EAAjC;;QAEA,MAAM,CAAC,IAAP,CAAa,cAAb,CAA6B,CAAC,IAA9B,CAAA;eAEA,MAAM,CAAC,OAAP,CAAA;MANsD,CAAvD;IAhB6F,CAA9F;IA0BA,CAAA,CAAG,0CAAH,CAA+C,CAAC,EAAhD,CAAmD,OAAnD,EAA4D,gCAA5D,EAA8F,SAAE,CAAF;AAE7F,UAAA;MAAA,CAAC,CAAC,cAAF,CAAA;MAEA,MAAA,GAAS,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,OAAnB;MAET,MAAM,CAAC,KAAP,CAAc;QAAA,OAAA,EAAS,IAAT;QAAe,UAAA,EAAY;UAAA,UAAA,EAAY,MAAZ;UAAmB,OAAA,EAAS,GAA5B;SAA3B;OAAd;MAEA,MAAM,CAAC,IAAP,CAAa,QAAb,CAAuB,CAAC,MAAxB,CAAA;MAEA,IAAA,GAAQ,MAAM,CAAC,IAAP,CAAa,cAAb;MACR,KAAA,GAAQ,IAAI,CAAC,IAAL,CAAW,UAAX,CAAuB,CAAC;MAEhC,IAAA,GACC;QAAA,MAAA,EAAU,qBAAA,GAAwB,MAAM,CAAC,IAAP,CAAa,YAAb,CAAxB,GAAsD,+BAAhE;QACA,OAAA,EAAU,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,SAAhB,CADV;QAEA,QAAA,EAAU,+BAA+B,CAAC,OAAO,CAAC,OAAO,CAAC,KAF1D;;aAID,CAAC,CAAC,IAAF,CAAO,+BAA+B,CAAC,QAAvC,EAAiD,IAAjD,CAEC,CAAC,IAFF,CAEO,CAAA,SAAA,KAAA;eAAA,SAAE,QAAF;UAEL,IAAA,CAAmD,QAAQ,CAAC,OAA5D;AAAA,mBAAO,WAAA,CAAa,MAAb,EAAqB,QAAQ,CAAC,IAA9B,EAAP;;UAEA,IAAG,qBAAH;YACC,MAAM,CAAC,IAAP,CAAa,cAAb,CAA6B,CAAC,IAA9B,CAAA;mBACA,IAAI,CAAC,IAAL,CAAW,QAAQ,CAAC,IAApB,EAFD;WAAA,MAAA;YAIC,IAAI,CAAC,KAAL,CAAA;mBACA,MAAM,CAAC,IAAP,CAAa,cAAb,CAA6B,CAAC,IAA9B,CAAA,EALD;;QAJK;MAAA,CAAA,CAAA,CAAA,IAAA,CAFP,CAaC,CAAC,IAbF,CAaO,CAAA,SAAA,KAAA;eAAA,SAAE,KAAF,EAAS,UAAT,EAAqB,KAArB;iBAEL,WAAA,CAAa,MAAb,EAAqB,UAAA,GAAa,IAAb,GAAoB,KAAzC;QAFK;MAAA,CAAA,CAAA,CAAA,IAAA,CAbP,CAiBC,CAAC,MAjBF,CAiBS,CAAA,SAAA,KAAA;eAAA,SAAA;iBAEP,MAAM,CAAC,OAAP,CAAA;QAFO;MAAA,CAAA,CAAA,CAAA,IAAA,CAjBT;IAlB6F,CAA9F;IAwCA,CAAA,CAAG,0CAAH,CAA+C,CAAC,EAAhD,CAAmD,OAAnD,EAA4D,uEAA5D,EAAqI,SAAE,CAAF;AAEpI,UAAA;MAAA,MAAA,GAAc,CAAA,CAAG,IAAH,CAAS,CAAC,OAAV,CAAmB,OAAnB;MACd,WAAA,GAAc,MAAM,CAAC,IAAP,CAAa,UAAb;MAEd,MAAM,CAAC,KAAP,CAAc;QAAA,OAAA,EAAS,IAAT;QAAe,UAAA,EAAY;UAAA,UAAA,EAAY,MAAZ;UAAmB,OAAA,EAAS,GAA5B;SAA3B;OAAd;MAEA,WAAW,CAAC,IAAZ,CAAkB,kBAAlB,CAAsC,CAAC,MAAvC,CAAA;MAIA,MAAA,GAAU,MAAM,CAAC,IAAP,CAAa,0CAAb;MACV,OAAA,GAAU;aAEV,MAAM,CAAC,IAAP,CAAY,SAAE,KAAF;AAEX,YAAA;QAAA,CAAA,CAAG,IAAH,CAAS,CAAC,WAAV,CAAuB,OAAvB;QAEA,KAAA,GAAW,CAAA,CAAG,IAAH,CAAS,CAAC,GAAV,CAAA;QACX,QAAA,GAAW,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,UAAhB;QACX,OAAA,GAAW,CAAA,CAAG,IAAH,CAAS,CAAC,IAAV,CAAgB,SAAhB;QAEX,IAAA,CAAA,CAAc,QAAA,IAAY,KAA1B,CAAA;AAAA,iBAAA;;QAEA,IAAK,CAAE,KAAK,CAAC,KAAN,CAAa,OAAb,CAAF,IAA4B,CAAE,QAAA,IAAa,CAAE,KAAjB,CAAjC;UAEC,CAAC,CAAC,cAAF,CAAA;UAEA,CAAA,CAAG,IAAH,CAAS,CAAC,QAAV,CAAoB,OAApB;UAEA,IAAK,CAAE,OAAP;YACC,WAAW,CAAC,OAAZ,CAAqB,sBAAA,GAAyB,+BAA+B,CAAC,OAAO,CAAC,IAAI,CAAC,KAAtE,GAA8E,SAAnG;YACA,CAAA,CAAG,IAAH,CAAS,CAAC,KAAV,CAAA;YACA,OAAA,GAAU,KAHX;;iBAKA,MAAM,CAAC,OAAP,CAAA,EAXD;;MAVW,CAAZ;IAdoI,CAArI;WAyCA,WAAA,GAAc,SAAE,MAAF,EAAU,KAAV,EAAiB,OAAjB;;QAAiB,UAAU;;MAExC,OAAO,CAAC,KAAR,CAAc,KAAd;MAEA,IAAA,CAAoE,OAApE;QAAA,OAAA,GAAU,+BAA+B,CAAC,IAAI,CAAC,cAA/C;;aAEA,MAAM,CAAC,IAAP,CAAa,YAAb,CAA2B,CAAC,OAA5B,CAAqC,sBAAA,GAAyB,OAAzB,GAAmC,SAAxE;IANa;EA3KU,CAAzB;AARA"
10
- }
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee DELETED
@@ -1,431 +0,0 @@
1
- ###
2
- WooCommerce Apple Pay Handler
3
- Version 4.7.0
4
-
5
- Copyright (c) 2016, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- ###
9
-
10
- jQuery( document ).ready ($) ->
11
-
12
- "use strict"
13
-
14
- # The WooCommerce Apple Pay handler base class.
15
- #
16
- # @since 4.7.0
17
- class window.SV_WC_Apple_Pay_Handler
18
-
19
-
20
- # Constructs the handler.
21
- #
22
- # @since 4.7.0
23
- constructor: (args) ->
24
-
25
- @gateway_id = args.gateway_id
26
- @gateway_slug = args.gateway_slug
27
- @merchant_id = args.merchant_id
28
- @ajax_url = args.ajax_url
29
- @validate_nonce = args.validate_nonce
30
- @recalculate_totals_nonce = args.recalculate_totals_nonce
31
- @process_nonce = args.process_nonce
32
- @payment_request = args.payment_request
33
- @generic_error = args.generic_error
34
-
35
- @buttons = '.sv-wc-apple-pay-button'
36
-
37
-
38
- # Determines if Apple Pay is available.
39
- #
40
- # @since 4.7.0
41
- # @return bool
42
- is_available: ->
43
-
44
- return false unless window.ApplePaySession
45
-
46
- ApplePaySession.canMakePaymentsWithActiveCard( @merchant_id ).then ( canMakePayments ) =>
47
-
48
- return canMakePayments
49
-
50
-
51
- # Initializes the handler.
52
- #
53
- # @since 4.7.0
54
- init: ->
55
-
56
- return unless this.is_available()
57
-
58
- # initialize for the various pages
59
- if $( 'form.cart' ).length
60
- this.init_product_page()
61
- else if $( 'form.woocommerce-cart-form' ).length
62
- this.init_cart_page()
63
- else if $( 'form.woocommerce-checkout' ).length
64
- this.init_checkout_page()
65
-
66
- # bail if no UI was initialized
67
- return unless @ui_element
68
-
69
- if @payment_request
70
- $( @buttons ).show()
71
-
72
- $( document.body ).on 'click', '.sv-wc-apple-pay-button', ( e ) =>
73
-
74
- e.preventDefault()
75
-
76
- this.block_ui()
77
-
78
- try
79
-
80
- @session = this.get_new_session( @payment_request )
81
-
82
- # set the payment card events
83
- @session.onvalidatemerchant = ( event ) => this.on_validate_merchant( event )
84
- @session.onpaymentmethodselected = ( event ) => this.on_payment_method_selected( event )
85
- @session.onshippingcontactselected = ( event ) => this.on_shipping_contact_selected( event )
86
- @session.onshippingmethodselected = ( event ) => this.on_shipping_method_selected( event )
87
- @session.onpaymentauthorized = ( event ) => this.on_payment_authorized( event )
88
- @session.oncancel = ( event ) => this.on_cancel_payment( event )
89
-
90
- @session.begin()
91
-
92
- catch error
93
-
94
- this.fail_payment( error )
95
-
96
-
97
- # Initializes the product page.
98
- #
99
- # @since 5.3.0
100
- init_product_page: =>
101
-
102
- @ui_element = $( 'form.cart' )
103
-
104
-
105
- # Initializes the cart page.
106
- #
107
- # @since 5.3.0
108
- init_cart_page: =>
109
-
110
- @ui_element = $( 'form.woocommerce-cart-form' ).parents( 'div.woocommerce' )
111
-
112
- # re-init if the cart totals are updated
113
- $( document.body ).on 'updated_cart_totals', =>
114
-
115
- this.reset_payment_request()
116
-
117
-
118
- # Initializes the checkout page.
119
- #
120
- # @since 5.3.0
121
- init_checkout_page: =>
122
-
123
- @ui_element = $( 'form.woocommerce-checkout' )
124
- @buttons = '.sv-wc-apply-pay-checkout'
125
-
126
- $( document.body ).on 'updated_checkout', =>
127
-
128
- # re-init if the checkout is updated
129
- this.reset_payment_request()
130
-
131
-
132
- # Gets a new Apple Pay session.
133
- #
134
- # @since 5.3.0
135
- #
136
- # @param [Object] payment_request payment request object
137
- # @return ApplePaySession
138
- get_new_session: ( payment_request ) ->
139
-
140
- return new ApplePaySession( this.get_sdk_version(), payment_request )
141
-
142
-
143
- # Gets the Apple SDK version to use.
144
- #
145
- # @since 5.3.0
146
- # @return int
147
- get_sdk_version: ->
148
-
149
- return 2
150
-
151
-
152
- # The callback for after the merchant data is validated.
153
- #
154
- # @since 4.7.0
155
- on_validate_merchant: ( event ) =>
156
-
157
- this.validate_merchant( event.validationURL ).then ( merchant_session ) =>
158
-
159
- merchant_session = $.parseJSON( merchant_session )
160
-
161
- @session.completeMerchantValidation( merchant_session )
162
-
163
- , ( response ) =>
164
-
165
- @session.abort()
166
-
167
- this.fail_payment 'Merchant could no be validated. ' + response.message
168
-
169
-
170
- # Validates the merchant data.
171
- #
172
- # @since 4.7.0
173
- # @return object
174
- validate_merchant: ( url ) => new Promise ( resolve, reject ) =>
175
-
176
- data = {
177
- 'action': "wc_#{ @gateway_id }_apple_pay_validate_merchant",
178
- 'nonce': @validate_nonce,
179
- 'merchant_id': @merchant_id,
180
- 'url': url
181
- }
182
-
183
- # retrieve a payment request object
184
- $.post @ajax_url, data, ( response ) =>
185
-
186
- if response.success
187
- resolve response.data
188
- else
189
- reject response.data
190
-
191
-
192
- # Fires after a payment method has been selected.
193
- #
194
- # @since 4.7.0
195
- on_payment_method_selected: ( event ) =>
196
-
197
- new Promise ( resolve, reject ) =>
198
-
199
- data = {
200
- 'action': "wc_#{ @gateway_id }_apple_pay_recalculate_totals",
201
- 'nonce': @recalculate_totals_nonce,
202
- }
203
-
204
- # retrieve a payment request object
205
- $.post @ajax_url, data, ( response ) =>
206
-
207
- if response.success
208
-
209
- data = response.data
210
-
211
- resolve @session.completePaymentMethodSelection( data.total, data.line_items )
212
-
213
- else
214
-
215
- console.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message
216
-
217
- reject @session.completePaymentMethodSelection( @payment_request.total, @payment_request.lineItems )
218
-
219
-
220
- # Fires after a shipping contact has been selected.
221
- #
222
- # @since 4.7.0
223
- on_shipping_contact_selected: ( event ) =>
224
-
225
- new Promise ( resolve, reject ) =>
226
-
227
- data = {
228
- 'action': "wc_#{ @gateway_id }_apple_pay_recalculate_totals",
229
- 'nonce': @recalculate_totals_nonce,
230
- 'contact': event.shippingContact
231
- }
232
-
233
- # retrieve a payment request object
234
- $.post @ajax_url, data, ( response ) =>
235
-
236
- if response.success
237
-
238
- data = response.data
239
-
240
- resolve @session.completeShippingContactSelection( ApplePaySession.STATUS_SUCCESS, data.shipping_methods, data.total, data.line_items )
241
-
242
- else
243
-
244
- console.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message
245
-
246
- reject @session.completeShippingContactSelection( ApplePaySession.STATUS_FAILURE, [], @payment_request.total, @payment_request.lineItems )
247
-
248
-
249
- # Fires after a shipping method has been selected.
250
- #
251
- # @since 4.7.0
252
- on_shipping_method_selected: ( event ) =>
253
-
254
- new Promise ( resolve, reject ) =>
255
-
256
- data = {
257
- 'action': "wc_#{ @gateway_id }_apple_pay_recalculate_totals",
258
- 'nonce': @recalculate_totals_nonce,
259
- 'method': event.shippingMethod.identifier
260
- }
261
-
262
- # retrieve a payment request object
263
- $.post @ajax_url, data, ( response ) =>
264
-
265
- if response.success
266
-
267
- data = response.data
268
-
269
- resolve @session.completeShippingMethodSelection( ApplePaySession.STATUS_SUCCESS, data.total, data.line_items )
270
-
271
- else
272
-
273
- console.error '[Apple Pay] Error selecting a shipping method. ' + response.data.message
274
-
275
- reject @session.completeShippingMethodSelection( ApplePaySession.STATUS_FAILURE, @payment_request.total, @payment_request.lineItems )
276
-
277
-
278
- # The callback for after the payment data is authorized.
279
- #
280
- # @since 4.7.0
281
- on_payment_authorized: ( event ) =>
282
-
283
- this.process_authorization( event.payment ).then ( response ) =>
284
-
285
- this.set_payment_status( true )
286
-
287
- this.complete_purchase( response )
288
-
289
- , ( response ) =>
290
-
291
- this.set_payment_status( false )
292
-
293
- this.fail_payment 'Payment could no be processed. ' + response.message
294
-
295
-
296
- # Processes the transaction data.
297
- #
298
- # @since 4.7.0
299
- process_authorization: ( payment ) => new Promise ( resolve, reject ) =>
300
-
301
- data = {
302
- action: "wc_#{ @gateway_id }_apple_pay_process_payment",
303
- nonce: @process_nonce,
304
- payment: JSON.stringify( payment )
305
- }
306
-
307
- $.post @ajax_url, data, ( response ) =>
308
-
309
- if response.success
310
- resolve response.data
311
- else
312
- reject response.data
313
-
314
-
315
- # The callback for when the payment card is cancelled/dismissed.
316
- #
317
- # @since 4.7.0
318
- on_cancel_payment: ( event ) =>
319
-
320
- this.unblock_ui()
321
-
322
-
323
- # Completes the purchase based on the gateway result.
324
- #
325
- # @since 4.7.0
326
- complete_purchase: ( response ) ->
327
-
328
- window.location = response.redirect
329
-
330
-
331
- # Fails the purchase based on the gateway result.
332
- #
333
- # @since 4.7.0
334
- fail_payment: ( error ) ->
335
-
336
- console.error '[Apple Pay] ' + error
337
-
338
- this.unblock_ui()
339
-
340
- this.render_errors( [ @generic_error ] )
341
-
342
-
343
- # Sets the Apple Pay payment status depending on the gateway result.
344
- #
345
- # @since 4.7.0
346
- set_payment_status: ( success ) ->
347
-
348
- if success
349
- status = ApplePaySession.STATUS_SUCCESS
350
- else
351
- status = ApplePaySession.STATUS_FAILURE
352
-
353
- @session.completePayment( status )
354
-
355
- # Optional, for resetting the request data
356
-
357
-
358
- # Resets the payment request via AJAX.
359
- #
360
- # Extending handlers can call this on change events to refresh the data.
361
- #
362
- # @since 4.7.0
363
- reset_payment_request: ( data = {} ) =>
364
-
365
- this.block_ui()
366
-
367
- this.get_payment_request( data ).then ( response ) =>
368
-
369
- $( @buttons ).show()
370
-
371
- @payment_request = $.parseJSON( response )
372
-
373
- this.unblock_ui()
374
-
375
- , ( response ) =>
376
-
377
- console.error '[Apple Pay] Could not build payment request. ' + response.message
378
-
379
- $( @buttons ).hide()
380
-
381
- this.unblock_ui()
382
-
383
-
384
- # Gets the payment request via AJAX.
385
- #
386
- # @since 4.7.0
387
- get_payment_request: ( data ) => new Promise ( resolve, reject ) =>
388
-
389
- base_data = {
390
- 'action': "wc_#{ @gateway_id }_apple_pay_get_payment_request"
391
- }
392
-
393
- $.extend data, base_data
394
-
395
- # retrieve a payment request object
396
- $.post @ajax_url, data, ( response ) =>
397
-
398
- if response.success
399
- resolve response.data
400
- else
401
- reject response.data
402
-
403
-
404
- # Renders any new errors and bring them into the viewport.
405
- #
406
- # @since 4.7.0
407
- render_errors: ( errors ) ->
408
-
409
- # hide and remove any previous errors
410
- $( '.woocommerce-error, .woocommerce-message' ).remove()
411
-
412
- # add errors
413
- @ui_element.prepend '<ul class="woocommerce-error"><li>' + errors.join( '</li><li>' ) + '</li></ul>'
414
-
415
- # unblock UI
416
- @ui_element.removeClass( 'processing' ).unblock()
417
-
418
- # scroll to top
419
- $( 'html, body' ).animate( { scrollTop: @ui_element.offset().top - 100 }, 1000 )
420
-
421
-
422
- # Blocks the payment form UI.
423
- #
424
- # @since 4.7.0
425
- block_ui: -> @ui_element.block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )
426
-
427
-
428
- # Unblocks the payment form UI.
429
- #
430
- # @since 4.7.0
431
- unblock_ui: -> @ui_element.unblock()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.min.js DELETED
@@ -1 +0,0 @@
1
- /* WooCommerce Apple Pay Handler Version 4.7.0 Copyright (c) 2016, SkyVerge, Inc. Licensed under the GNU General Public License v3.0 http://www.gnu.org/licenses/gpl-3.0.html */(function() { var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; jQuery(document).ready(function($) { "use strict"; return window.SV_WC_Apple_Pay_Handler = (function() { function SV_WC_Apple_Pay_Handler(args) { this.get_payment_request = bind(this.get_payment_request, this); this.reset_payment_request = bind(this.reset_payment_request, this); this.on_cancel_payment = bind(this.on_cancel_payment, this); this.process_authorization = bind(this.process_authorization, this); this.on_payment_authorized = bind(this.on_payment_authorized, this); this.on_shipping_method_selected = bind(this.on_shipping_method_selected, this); this.on_shipping_contact_selected = bind(this.on_shipping_contact_selected, this); this.on_payment_method_selected = bind(this.on_payment_method_selected, this); this.validate_merchant = bind(this.validate_merchant, this); this.on_validate_merchant = bind(this.on_validate_merchant, this); this.init_checkout_page = bind(this.init_checkout_page, this); this.init_cart_page = bind(this.init_cart_page, this); this.init_product_page = bind(this.init_product_page, this); this.gateway_id = args.gateway_id; this.gateway_slug = args.gateway_slug; this.merchant_id = args.merchant_id; this.ajax_url = args.ajax_url; this.validate_nonce = args.validate_nonce; this.recalculate_totals_nonce = args.recalculate_totals_nonce; this.process_nonce = args.process_nonce; this.payment_request = args.payment_request; this.generic_error = args.generic_error; this.buttons = '.sv-wc-apple-pay-button'; } SV_WC_Apple_Pay_Handler.prototype.is_available = function() { if (!window.ApplePaySession) { return false; } return ApplePaySession.canMakePaymentsWithActiveCard(this.merchant_id).then((function(_this) { return function(canMakePayments) { return canMakePayments; }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.init = function() { if (!this.is_available()) { return; } if ($('form.cart').length) { this.init_product_page(); } else if ($('form.woocommerce-cart-form').length) { this.init_cart_page(); } else if ($('form.woocommerce-checkout').length) { this.init_checkout_page(); } if (!this.ui_element) { return; } if (this.payment_request) { $(this.buttons).show(); } return $(document.body).on('click', '.sv-wc-apple-pay-button', (function(_this) { return function(e) { var error; e.preventDefault(); _this.block_ui(); try { _this.session = _this.get_new_session(_this.payment_request); _this.session.onvalidatemerchant = function(event) { return _this.on_validate_merchant(event); }; _this.session.onpaymentmethodselected = function(event) { return _this.on_payment_method_selected(event); }; _this.session.onshippingcontactselected = function(event) { return _this.on_shipping_contact_selected(event); }; _this.session.onshippingmethodselected = function(event) { return _this.on_shipping_method_selected(event); }; _this.session.onpaymentauthorized = function(event) { return _this.on_payment_authorized(event); }; _this.session.oncancel = function(event) { return _this.on_cancel_payment(event); }; return _this.session.begin(); } catch (_error) { error = _error; return _this.fail_payment(error); } }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.init_product_page = function() { return this.ui_element = $('form.cart'); }; SV_WC_Apple_Pay_Handler.prototype.init_cart_page = function() { this.ui_element = $('form.woocommerce-cart-form').parents('div.woocommerce'); return $(document.body).on('updated_cart_totals', (function(_this) { return function() { return _this.reset_payment_request(); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.init_checkout_page = function() { this.ui_element = $('form.woocommerce-checkout'); this.buttons = '.sv-wc-apply-pay-checkout'; return $(document.body).on('updated_checkout', (function(_this) { return function() { return _this.reset_payment_request(); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.get_new_session = function(payment_request) { return new ApplePaySession(this.get_sdk_version(), payment_request); }; SV_WC_Apple_Pay_Handler.prototype.get_sdk_version = function() { return 2; }; SV_WC_Apple_Pay_Handler.prototype.on_validate_merchant = function(event) { return this.validate_merchant(event.validationURL).then((function(_this) { return function(merchant_session) { merchant_session = $.parseJSON(merchant_session); return _this.session.completeMerchantValidation(merchant_session); }; })(this), (function(_this) { return function(response) { _this.session.abort(); return _this.fail_payment('Merchant could no be validated. ' + response.message); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.validate_merchant = function(url) { return new Promise((function(_this) { return function(resolve, reject) { var data; data = { 'action': "wc_" + _this.gateway_id + "_apple_pay_validate_merchant", 'nonce': _this.validate_nonce, 'merchant_id': _this.merchant_id, 'url': url }; return $.post(_this.ajax_url, data, function(response) { if (response.success) { return resolve(response.data); } else { return reject(response.data); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.on_payment_method_selected = function(event) { return new Promise((function(_this) { return function(resolve, reject) { var data; data = { 'action': "wc_" + _this.gateway_id + "_apple_pay_recalculate_totals", 'nonce': _this.recalculate_totals_nonce }; return $.post(_this.ajax_url, data, function(response) { if (response.success) { data = response.data; return resolve(_this.session.completePaymentMethodSelection(data.total, data.line_items)); } else { console.error('[Apple Pay] Error selecting a shipping contact. ' + response.data.message); return reject(_this.session.completePaymentMethodSelection(_this.payment_request.total, _this.payment_request.lineItems)); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.on_shipping_contact_selected = function(event) { return new Promise((function(_this) { return function(resolve, reject) { var data; data = { 'action': "wc_" + _this.gateway_id + "_apple_pay_recalculate_totals", 'nonce': _this.recalculate_totals_nonce, 'contact': event.shippingContact }; return $.post(_this.ajax_url, data, function(response) { if (response.success) { data = response.data; return resolve(_this.session.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS, data.shipping_methods, data.total, data.line_items)); } else { console.error('[Apple Pay] Error selecting a shipping contact. ' + response.data.message); return reject(_this.session.completeShippingContactSelection(ApplePaySession.STATUS_FAILURE, [], _this.payment_request.total, _this.payment_request.lineItems)); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.on_shipping_method_selected = function(event) { return new Promise((function(_this) { return function(resolve, reject) { var data; data = { 'action': "wc_" + _this.gateway_id + "_apple_pay_recalculate_totals", 'nonce': _this.recalculate_totals_nonce, 'method': event.shippingMethod.identifier }; return $.post(_this.ajax_url, data, function(response) { if (response.success) { data = response.data; return resolve(_this.session.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS, data.total, data.line_items)); } else { console.error('[Apple Pay] Error selecting a shipping method. ' + response.data.message); return reject(_this.session.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE, _this.payment_request.total, _this.payment_request.lineItems)); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.on_payment_authorized = function(event) { return this.process_authorization(event.payment).then((function(_this) { return function(response) { _this.set_payment_status(true); return _this.complete_purchase(response); }; })(this), (function(_this) { return function(response) { _this.set_payment_status(false); return _this.fail_payment('Payment could no be processed. ' + response.message); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.process_authorization = function(payment) { return new Promise((function(_this) { return function(resolve, reject) { var data; data = { action: "wc_" + _this.gateway_id + "_apple_pay_process_payment", nonce: _this.process_nonce, payment: JSON.stringify(payment) }; return $.post(_this.ajax_url, data, function(response) { if (response.success) { return resolve(response.data); } else { return reject(response.data); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.on_cancel_payment = function(event) { return this.unblock_ui(); }; SV_WC_Apple_Pay_Handler.prototype.complete_purchase = function(response) { return window.location = response.redirect; }; SV_WC_Apple_Pay_Handler.prototype.fail_payment = function(error) { console.error('[Apple Pay] ' + error); this.unblock_ui(); return this.render_errors([this.generic_error]); }; SV_WC_Apple_Pay_Handler.prototype.set_payment_status = function(success) { var status; if (success) { status = ApplePaySession.STATUS_SUCCESS; } else { status = ApplePaySession.STATUS_FAILURE; } return this.session.completePayment(status); }; SV_WC_Apple_Pay_Handler.prototype.reset_payment_request = function(data) { if (data == null) { data = {}; } this.block_ui(); return this.get_payment_request(data).then((function(_this) { return function(response) { $(_this.buttons).show(); _this.payment_request = $.parseJSON(response); return _this.unblock_ui(); }; })(this), (function(_this) { return function(response) { console.error('[Apple Pay] Could not build payment request. ' + response.message); $(_this.buttons).hide(); return _this.unblock_ui(); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.get_payment_request = function(data) { return new Promise((function(_this) { return function(resolve, reject) { var base_data; base_data = { 'action': "wc_" + _this.gateway_id + "_apple_pay_get_payment_request" }; $.extend(data, base_data); return $.post(_this.ajax_url, data, function(response) { if (response.success) { return resolve(response.data); } else { return reject(response.data); } }); }; })(this)); }; SV_WC_Apple_Pay_Handler.prototype.render_errors = function(errors) { $('.woocommerce-error, .woocommerce-message').remove(); this.ui_element.prepend('<ul class="woocommerce-error"><li>' + errors.join('</li><li>') + '</li></ul>'); this.ui_element.removeClass('processing').unblock(); return $('html, body').animate({ scrollTop: this.ui_element.offset().top - 100 }, 1000); }; SV_WC_Apple_Pay_Handler.prototype.block_ui = function() { return this.ui_element.block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); }; SV_WC_Apple_Pay_Handler.prototype.unblock_ui = function() { return this.ui_element.unblock(); }; return SV_WC_Apple_Pay_Handler; })(); });}).call(this);
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-frontend.min.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["sv-wc-payment-gateway-frontend.coffee"],"names":["jQuery","document","ready","$","window","SV_WC_Payment_Form_Handler","args","this","id","id_dasherized","plugin_id","type","csc_required","length","form","handle_checkout_page","handle_pay_page","console","log","handle_add_payment_method_page","params","on","_this","handle_sample_check_hint","trigger","instance","body","format_credit_card_inputs","set_payment_fields","handle_saved_payment_methods","validate_payment_data","submit","val","payment_fields","tokenized_payment_method_selected","is","find","validate_card_data","validate_account_data","payment","change","do_inline_credit_card_validation","$csc","$expiry","validateCardExpiry","addClass","removeClass","validateCardCVC","account_number","csc","errors","expiry","cardExpiryVal","replace","push","card_number_length_invalid","test","card_number_digits_invalid","validateCardNumber","card_number_invalid","card_number_missing","card_exp_date_invalid","cvv_digits_invalid","cvv_length_invalid","cvv_missing","render_errors","routing_number","routing_number_length_invalid","routing_number_digits_invalid","routing_number_missing","account_number_length_invalid","account_number_invalid","account_number_missing","remove","prepend","join","unblock","blur","animate","scrollTop","offset","top","$csc_field","$new_payment_method_selection","parent","slideUp","after","slideDown","$parent_row","closest","next","show","hide","$sample_check"],"mappings":"CAAA,WAQAA,OAAQC,UAAWC,MAAM,SAACC,GACzB,mBAGMC,QAAOC,2BAAA,WAaC,QAAAA,GAACC,GASb,GAPAC,KAACC,GAAgBF,EAAKE,GACtBD,KAACE,cAAgBH,EAAKG,cACtBF,KAACG,UAAgBJ,EAAKI,UACtBH,KAACI,KAAgBL,EAAKK,KACtBJ,KAACK,aAAgBN,EAAKM,aAGnBT,EAAG,iBAAkBU,OACvBN,KAACO,KAAOX,EAAG,iBACXI,KAAKQ,2BAED,IAAGZ,EAAG,qBAAsBU,OAChCN,KAACO,KAAOX,EAAG,qBACXI,KAAKS,sBAED,CAAA,IAAGb,EAAG,2BAA4BU,OAMtC,WADAI,SAAQC,IAAK,yBAJbX,MAACO,KAAOX,EAAG,2BACXI,KAAKY,iCAONZ,KAACa,OAAShB,OAAYG,KAACG,UAAW,WAG0I,WAATH,KAACI,MAApKJ,KAACO,KAAKO,GAAI,QAAS,uGAAwG,SAAAC,SAAA,kBAAGA,GAAKC,6BAARhB,OAE3HJ,EAAGF,UAAWuB,QAAS,mCAAqChB,GAAID,KAACC,GAAIiB,SAAUlB,0BAMhFQ,qBAAsB,iBAGwE,gBAATR,KAACI,MAArFR,EAAGF,SAASyB,MAAOL,GAAI,mBAAoB,SAAAC,SAAA,kBAAGA,GAAKK,8BAARpB,OAG3CJ,EAAGF,SAASyB,MAAOL,GAAI,mBAAoB,SAAAC,SAAA,kBAAGA,GAAKM,uBAARrB,OAK3CJ,EAAGF,SAASyB,MAAOL,GAAI,mBAAoB,SAAAC,SAAA,kBAAGA,GAAKO,iCAARtB,OAG3CA,KAACO,KAAKO,GAAI,wBAAyBd,KAACC,GAAO,SAAAc,SAAA,kBAAGA,GAAKQ,0BAARvB,oBAM5CS,gBAAiB,iBAEhBT,MAAKqB,qBAGO,gBAATrB,KAACI,MACHJ,KAAKoB,4BAGNpB,KAAKsB,+BAGLtB,KAACO,KAAKiB,OAAO,SAAAT,SAAA,YAGZ,MAAuCnB,GAAG,oDAAqD6B,QAASV,EAACd,GAAlGc,EAAKQ,wBAAZ,SAHYvB,oBASdY,+BAAgC,iBAE/BZ,MAAKqB,qBAGO,gBAATrB,KAACI,MACHJ,KAAKoB,4BAGNpB,KAACO,KAAKiB,OAAO,SAAAT,SAAA,YAGZ,MAAuCnB,GAAG,0DAA2D6B,QAASV,EAACd,GAAxGc,EAAKQ,wBAAZ,SAHYvB,oBAWdqB,mBAAoB,iBACnBrB,MAAC0B,eAAiB9B,EAAG,mBAAoBI,KAACC,iBAM3CsB,sBAAuB,WAGtB,GAAAI,EAAA,OAAgB3B,MAACO,KAAKqB,GAAI,gBAAnB,GAEPD,EAAoC3B,KAAC0B,eAAeG,KAAM,mDAAoDJ,MAG/FE,GAAR,EAGK,gBAAT3B,KAACI,KACIJ,KAAK8B,qBAEL9B,KAAK+B,sCAMdX,0BAA2B,iBAC1BxB,GAAG,6DAA8DoC,QAAS,oBAAqBC,SAC/FrC,EAAG,qDAAsDoC,QAAS,oBAAqBC,SACvFrC,EAAG,kDAAmDoC,QAAS,iBAAkBC,SAGjFrC,EAAG,oDAAqDkB,GAAI,qBAAsB,SAAAC,SAAA,kBAAGA,GAAKmB,qCAARlC,oBAMnFkC,iCAAkC,WAEjC,GAAAC,GAAAC,CAQA,OARAA,GAAUxC,EAAG,qDACbuC,EAAUvC,EAAG,kDAEVA,EAAEoC,QAAQK,mBAAoBD,EAAQJ,QAAS,kBACjDI,EAAQE,SAAU,cAElBF,EAAQG,YAAa,cAEnB3C,EAAEoC,QAAQQ,gBAAiBL,EAAKV,OAClCU,EAAKG,SAAU,cAEfH,EAAKI,YAAa,2BAMpBT,mBAAoB,WACnB,GAAAW,GAAAC,EAAAC,EAAAC,CA6BA,OA7BAD,MAEAF,EAAiBzC,KAAC0B,eAAeG,KAAM,6DAA8DJ,MACrGmB,EAAiBhD,EAAEoC,QAAQa,cAAe7C,KAAC0B,eAAeG,KAAM,qDAAsDJ,OACtHiB,EAAiB1C,KAAC0B,eAAeG,KAAM,kDAAmDJ,MAG1FgB,EAAiBA,EAAeK,QAAS,QAAS,IAG3CL,IAG+CA,EAAenC,OAAS,IAAMmC,EAAenC,OAAS,KAA3GqC,EAAOI,KAAM/C,KAACa,OAAOmC,4BACgC,KAAKC,KAAMR,IAAhEE,EAAOI,KAAM/C,KAACa,OAAOqC,4BAC6BtD,EAAEoC,QAAQmB,mBAAoBV,IAAhFE,EAAOI,KAAM/C,KAACa,OAAOuC,sBAJrBT,EAAOI,KAAM/C,KAACa,OAAOwC,qBAO8BzD,EAAEoC,QAAQK,mBAAoBO,IAAlFD,EAAOI,KAAM/C,KAACa,OAAOyC,uBAGlB,MAAAZ,IAEKA,GAGuC,KAAKO,KAAMP,IAAxDC,EAAOI,KAAM/C,KAACa,OAAO0C,qBACwBb,EAAIpC,OAAS,GAAKoC,EAAIpC,OAAS,IAA5EqC,EAAOI,KAAM/C,KAACa,OAAO2C,qBAHrBb,EAAOI,KAAM/C,KAACa,OAAO4C,cAKpBd,EAAOrC,OAAS,GAClBN,KAAK0D,cAAef,IACb,IAGP3C,KAAC0B,eAAeG,KAAM,6DAA8DJ,IAAKgB,IAClF,gBAMTV,sBAAuB,WACtB,GAAAU,GAAAE,EAAAgB,CAmBA,OAnBAhB,MAEAgB,EAAiB3D,KAAC0B,eAAeG,KAAK,wDAAwDJ,MAC9FgB,EAAiBzC,KAAC0B,eAAeG,KAAK,wDAAwDJ,MAGvFkC,GAGkD,IAAKA,EAAerD,QAA5EqC,EAAOI,KAAM/C,KAACa,OAAO+C,+BACmC,KAAKX,KAAMU,IAAnEhB,EAAOI,KAAM/C,KAACa,OAAOgD,gCAHrBlB,EAAOI,KAAM/C,KAACa,OAAOiD,wBAMfrB,IAGkDA,EAAenC,OAAS,GAAKmC,EAAenC,OAAS,KAA7GqC,EAAOI,KAAM/C,KAACa,OAAOkD,+BAC4B,KAAKd,KAAMR,IAA5DE,EAAOI,KAAM/C,KAACa,OAAOmD,yBAHrBrB,EAAOI,KAAM/C,KAACa,OAAOoD,wBAKnBtB,EAAOrC,OAAS,GAClBN,KAAK0D,cAAef,IACb,IAGP3C,KAAC0B,eAAeG,KAAM,wDAAyDJ,IAAKgB,IAC7E,gBAMTiB,cAAe,SAACf,SAGf/C,GAAG,4CAA6CsE,SAGhDlE,KAACO,KAAK4D,QAAQ,qCAAuCxB,EAAOyB,KAAM,aAAgB,cAGlFpE,KAACO,KAAKgC,YAAa,cAAe8B,UAClCrE,KAACO,KAAKsB,KAAM,uBAAwByC,OAGpC1E,EAAG,cAAe2E,SAAWC,UAAWxE,KAACO,KAAKkE,SAASC,IAAM,KAAO,kBAMrEpD,6BAA8B,WAG7B,GAAAqD,GAAAC,EAAAvE,EAAAH,QAAAA,GAAgBF,KAACE,cACjBG,EAAgBL,KAACK,aACjBuE,EAAgChF,EAAG,aAAcM,EAAe,4BAChEyE,EAAaC,EAA8B/C,KAAM,kDAAmDgD,SAGpGjF,EAAG,eAAgBI,KAACE,cAAe,kBAAkB+B,OAAO,WAC3D,GAAAN,EAEA,IAFAA,EAAoC/B,EAAG,eAAgBM,EAAe,0BAA0BuB,OAQ/F,GAHAmD,EAA8BE,QAAS,KAGpCzE,QACFsE,GAAWpC,YAAa,iBAAkBD,SAAU,kBACpDsC,EAA8BG,MAAOJ,OAOtC,IAHAC,EAA8BI,UAAW,KAGtC3E,QACFsE,GAAWpC,YAAa,kBAAmBD,SAAU,iBACrDsC,EAA8B/C,KAAM,qDAAsDgD,SAASE,MAAOJ,KAC5G1C,SAIDrC,EAAG,uBAAwBqC,OAAO,WACjC,GAAAgD,EAEA,OAFAA,GAAcrF,EAAG,eAAgBM,EAAe,4BAA4BgF,QAAS,cAElFtF,EAAGI,MAAO4B,GAAI,aAChBqD,EAAYD,YACZC,EAAYE,OAAOC,SAEnBH,EAAYI,OACZJ,EAAYE,OAAOE,UACpBpD,sBAMFjB,yBAA0B,WAEzB,GAAAsE,EAEA,OAFAA,GAAgBtF,KAAC0B,eAAeG,KAAM,sDAEnCyD,EAAc1D,GAAI,YAAkB0D,EAAcR,UAAeQ,EAAcN;AAvUrF;;;;;;;;;AAAA;EAQA,MAAA,CAAQ,QAAR,CAAkB,CAAC,KAAnB,CAAyB,SAAC,CAAD;IACxB;WAGM,MAAM,CAAC;MAaC,oCAAC,IAAD;QAEZ,IAAC,CAAA,EAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,aAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,SAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,IAAD,GAAiB,IAAI,CAAC;QACtB,IAAC,CAAA,YAAD,GAAiB,IAAI,CAAC;QAGtB,IAAG,CAAA,CAAG,eAAH,CAAoB,CAAC,MAAxB;UACC,IAAC,CAAA,IAAD,GAAQ,CAAA,CAAG,eAAH;UACR,IAAI,CAAC,oBAAL,CAAA,EAFD;SAAA,MAIK,IAAG,CAAA,CAAG,mBAAH,CAAwB,CAAC,MAA5B;UACJ,IAAC,CAAA,IAAD,GAAQ,CAAA,CAAG,mBAAH;UACR,IAAI,CAAC,eAAL,CAAA,EAFI;SAAA,MAIA,IAAG,CAAA,CAAG,yBAAH,CAA8B,CAAC,MAAlC;UACJ,IAAC,CAAA,IAAD,GAAQ,CAAA,CAAG,yBAAH;UACR,IAAI,CAAC,8BAAL,CAAA,EAFI;SAAA,MAAA;UAKJ,OAAO,CAAC,GAAR,CAAa,wBAAb;AACA,iBANI;;QASL,IAAC,CAAA,MAAD,GAAU,MAAQ,CAAI,IAAC,CAAA,SAAH,GAAc,SAAhB;QAGlB,IAAmK,IAAC,CAAA,IAAD,KAAS,QAA5K;UAAA,IAAC,CAAA,IAAI,CAAC,EAAN,CAAU,OAAV,EAAmB,sGAAnB,EAA2H,CAAA,SAAA,KAAA;mBAAA,SAAA;qBAAG,KAAI,CAAC,wBAAL,CAAA;YAAH;UAAA,CAAA,CAAA,CAAA,IAAA,CAA3H,EAAA;;QAEA,CAAA,CAAG,QAAH,CAAa,CAAC,OAAd,CAAuB,iCAAvB,EAA0D;UAAE,EAAA,EAAI,IAAC,CAAA,EAAP;UAAW,QAAA,EAAU,IAArB;SAA1D;MA/BY;;2CAqCb,oBAAA,GAAsB,SAAA;QAGrB,IAAoF,IAAC,CAAA,IAAD,KAAS,aAA7F;UAAA,CAAA,CAAG,QAAQ,CAAC,IAAZ,CAAkB,CAAC,EAAnB,CAAuB,kBAAvB,EAA2C,CAAA,SAAA,KAAA;mBAAA,SAAA;qBAAG,KAAI,CAAC,yBAAL,CAAA;YAAH;UAAA,CAAA,CAAA,CAAA,IAAA,CAA3C,EAAA;;QAGA,CAAA,CAAG,QAAQ,CAAC,IAAZ,CAAkB,CAAC,EAAnB,CAAuB,kBAAvB,EAA2C,CAAA,SAAA,KAAA;iBAAA,SAAA;mBAAG,KAAI,CAAC,kBAAL,CAAA;UAAH;QAAA,CAAA,CAAA,CAAA,IAAA,CAA3C;QAKA,CAAA,CAAG,QAAQ,CAAC,IAAZ,CAAkB,CAAC,EAAnB,CAAuB,kBAAvB,EAA2C,CAAA,SAAA,KAAA;iBAAA,SAAA;mBAAG,KAAI,CAAC,4BAAL,CAAA;UAAH;QAAA,CAAA,CAAA,CAAA,IAAA,CAA3C;eAGA,IAAC,CAAA,IAAI,CAAC,EAAN,CAAU,uBAAA,GAAyB,IAAC,CAAA,EAApC,EAA2C,CAAA,SAAA,KAAA;iBAAA,SAAA;mBAAG,KAAI,CAAC,qBAAL,CAAA;UAAH;QAAA,CAAA,CAAA,CAAA,IAAA,CAA3C;MAdqB;;2CAoBtB,eAAA,GAAiB,SAAA;QAEhB,IAAI,CAAC,kBAAL,CAAA;QAGA,IAAG,IAAC,CAAA,IAAD,KAAS,aAAZ;UACC,IAAI,CAAC,yBAAL,CAAA,EADD;;QAIA,IAAI,CAAC,4BAAL,CAAA;eAGA,IAAC,CAAA,IAAI,CAAC,MAAN,CAAa,CAAA,SAAA,KAAA;iBAAA,SAAA;YAGZ,IAAuC,CAAA,CAAG,kDAAH,CAAuD,CAAC,GAAxD,CAAA,CAAA,KAAiE,KAAC,CAAA,EAAzG;AAAA,qBAAO,KAAI,CAAC,qBAAL,CAAA,EAAP;;UAHY;QAAA,CAAA,CAAA,CAAA,IAAA,CAAb;MAZgB;;2CAqBjB,8BAAA,GAAgC,SAAA;QAE/B,IAAI,CAAC,kBAAL,CAAA;QAGA,IAAG,IAAC,CAAA,IAAD,KAAS,aAAZ;UACC,IAAI,CAAC,yBAAL,CAAA,EADD;;eAIA,IAAC,CAAA,IAAI,CAAC,MAAN,CAAa,CAAA,SAAA,KAAA;iBAAA,SAAA;YAGZ,IAAuC,CAAA,CAAG,wDAAH,CAA6D,CAAC,GAA9D,CAAA,CAAA,KAAuE,KAAC,CAAA,EAA/G;AAAA,qBAAO,KAAI,CAAC,qBAAL,CAAA,EAAP;;UAHY;QAAA,CAAA,CAAA,CAAA,IAAA,CAAb;MAT+B;;2CAoBhC,kBAAA,GAAoB,SAAA;eACnB,IAAC,CAAA,cAAD,GAAkB,CAAA,CAAG,kBAAA,GAAoB,IAAC,CAAA,EAAxB;MADC;;2CAOpB,qBAAA,GAAuB,SAAA;AAGtB,YAAA;QAAA,IAAgB,IAAC,CAAA,IAAI,CAAC,EAAN,CAAU,aAAV,CAAhB;AAAA,iBAAO,MAAP;;QAEA,iCAAA,GAAoC,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,iDAAtB,CAAyE,CAAC,GAA1E,CAAA;QAGpC,IAAe,iCAAf;AAAA,iBAAO,KAAP;;QAGA,IAAG,IAAC,CAAA,IAAD,KAAS,aAAZ;AACC,iBAAO,IAAI,CAAC,kBAAL,CAAA,EADR;SAAA,MAAA;AAGC,iBAAO,IAAI,CAAC,qBAAL,CAAA,EAHR;;MAXsB;;2CAoBvB,yBAAA,GAA2B,SAAA;QAC1B,CAAA,CAAG,2DAAH,CAAgE,CAAC,OAAjE,CAA0E,kBAA1E,CAA8F,CAAC,MAA/F,CAAA;QACA,CAAA,CAAG,mDAAH,CAAwD,CAAC,OAAzD,CAAkE,kBAAlE,CAAsF,CAAC,MAAvF,CAAA;QACA,CAAA,CAAG,gDAAH,CAAqD,CAAC,OAAtD,CAA+D,eAA/D,CAAgF,CAAC,MAAjF,CAAA;eAGA,CAAA,CAAG,kDAAH,CAAuD,CAAC,EAAxD,CAA4D,oBAA5D,EAAkF,CAAA,SAAA,KAAA;iBAAA,SAAA;mBAAG,KAAI,CAAC,gCAAL,CAAA;UAAH;QAAA,CAAA,CAAA,CAAA,IAAA,CAAlF;MAN0B;;2CAY3B,gCAAA,GAAkC,SAAA;AAEjC,YAAA;QAAA,OAAA,GAAU,CAAA,CAAG,mDAAH;QACV,IAAA,GAAU,CAAA,CAAG,gDAAH;QAEV,IAAG,CAAC,CAAC,OAAO,CAAC,kBAAV,CAA8B,OAAO,CAAC,OAAR,CAAiB,eAAjB,CAA9B,CAAH;UACC,OAAO,CAAC,QAAR,CAAkB,YAAlB,EADD;SAAA,MAAA;UAGC,OAAO,CAAC,WAAR,CAAqB,YAArB,EAHD;;QAKA,IAAG,CAAC,CAAC,OAAO,CAAC,eAAV,CAA2B,IAAI,CAAC,GAAL,CAAA,CAA3B,CAAH;iBACC,IAAI,CAAC,QAAL,CAAe,YAAf,EADD;SAAA,MAAA;iBAGC,IAAI,CAAC,WAAL,CAAkB,YAAlB,EAHD;;MAViC;;2CAmBlC,kBAAA,GAAoB,SAAA;AACnB,YAAA;QAAA,MAAA,GAAS;QAET,cAAA,GAAiB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,2DAAtB,CAAmF,CAAC,GAApF,CAAA;QACjB,MAAA,GAAiB,CAAC,CAAC,OAAO,CAAC,aAAV,CAAyB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,mDAAtB,CAA2E,CAAC,GAA5E,CAAA,CAAzB;QACjB,GAAA,GAAiB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,gDAAtB,CAAwE,CAAC,GAAzE,CAAA;QAGjB,cAAA,GAAiB,cAAc,CAAC,OAAf,CAAwB,OAAxB,EAAiC,EAAjC;QAGjB,IAAG,CAAI,cAAP;UACC,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,mBAArB,EADD;SAAA,MAAA;UAGC,IAAqD,cAAc,CAAC,MAAf,GAAwB,EAAxB,IAA8B,cAAc,CAAC,MAAf,GAAwB,EAA3G;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,0BAArB,EAAA;;UACA,IAAqD,IAAI,CAAC,IAAL,CAAW,cAAX,CAArD;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,0BAArB,EAAA;;UACA,IAAA,CAAkD,CAAC,CAAC,OAAO,CAAC,kBAAV,CAA8B,cAA9B,CAAlD;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,mBAArB,EAAA;WALD;;QAQA,IAAA,CAAoD,CAAC,CAAC,OAAO,CAAC,kBAAV,CAA8B,MAA9B,CAApD;UAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,qBAArB,EAAA;;QAGA,IAAG,WAAH;UAEC,IAAG,CAAI,GAAP;YACC,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,WAArB,EADD;WAAA,MAAA;YAGC,IAA6C,IAAI,CAAC,IAAL,CAAW,GAAX,CAA7C;cAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,kBAArB,EAAA;;YACA,IAA6C,GAAG,CAAC,MAAJ,GAAa,CAAb,IAAkB,GAAG,CAAC,MAAJ,GAAa,CAA5E;cAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,kBAArB,EAAA;aAJD;WAFD;;QAQA,IAAG,MAAM,CAAC,MAAP,GAAgB,CAAnB;UACC,IAAI,CAAC,aAAL,CAAoB,MAApB;AACA,iBAAO,MAFR;SAAA,MAAA;UAKC,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,2DAAtB,CAAmF,CAAC,GAApF,CAAyF,cAAzF;AACA,iBAAO,KANR;;MA9BmB;;2CA0CpB,qBAAA,GAAuB,SAAA;AACtB,YAAA;QAAA,MAAA,GAAS;QAET,cAAA,GAAiB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAqB,sDAArB,CAA4E,CAAC,GAA7E,CAAA;QACjB,cAAA,GAAiB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAqB,sDAArB,CAA4E,CAAC,GAA7E,CAAA;QAGjB,IAAG,CAAI,cAAP;UACC,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,sBAArB,EADD;SAAA,MAAA;UAGC,IAAwD,CAAA,KAAK,cAAc,CAAC,MAA5E;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,6BAArB,EAAA;;UACA,IAAwD,IAAI,CAAC,IAAL,CAAW,cAAX,CAAxD;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,6BAArB,EAAA;WAJD;;QAOA,IAAG,CAAI,cAAP;UACC,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,sBAArB,EADD;SAAA,MAAA;UAGC,IAAwD,cAAc,CAAC,MAAf,GAAwB,CAAxB,IAA6B,cAAc,CAAC,MAAf,GAAwB,EAA7G;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,6BAArB,EAAA;;UACA,IAAiD,IAAI,CAAC,IAAL,CAAW,cAAX,CAAjD;YAAA,MAAM,CAAC,IAAP,CAAa,IAAC,CAAA,MAAM,CAAC,sBAArB,EAAA;WAJD;;QAMA,IAAG,MAAM,CAAC,MAAP,GAAgB,CAAnB;UACC,IAAI,CAAC,aAAL,CAAoB,MAApB;AACA,iBAAO,MAFR;SAAA,MAAA;UAKC,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,sDAAtB,CAA8E,CAAC,GAA/E,CAAoF,cAApF;AACA,iBAAO,KANR;;MApBsB;;2CAgCvB,aAAA,GAAe,SAAC,MAAD;QAGd,CAAA,CAAG,0CAAH,CAA+C,CAAC,MAAhD,CAAA;QAGA,IAAC,CAAA,IAAI,CAAC,OAAN,CAAc,oCAAA,GAAuC,MAAM,CAAC,IAAP,CAAa,WAAb,CAAvC,GAAoE,YAAlF;QAGA,IAAC,CAAA,IAAI,CAAC,WAAN,CAAmB,YAAnB,CAAiC,CAAC,OAAlC,CAAA;QACA,IAAC,CAAA,IAAI,CAAC,IAAN,CAAY,qBAAZ,CAAmC,CAAC,IAApC,CAAA;eAGA,CAAA,CAAG,YAAH,CAAiB,CAAC,OAAlB,CAA2B;UAAE,SAAA,EAAW,IAAC,CAAA,IAAI,CAAC,MAAN,CAAA,CAAc,CAAC,GAAf,GAAqB,GAAlC;SAA3B,EAAoE,IAApE;MAbc;;2CAmBf,4BAAA,GAA8B,SAAA;AAG7B,YAAA;QAAA,aAAA,GAAgB,IAAC,CAAA;QACjB,YAAA,GAAgB,IAAC,CAAA;QACjB,6BAAA,GAAgC,CAAA,CAAG,YAAA,GAAc,aAAd,GAA6B,0BAAhC;QAChC,UAAA,GAAa,6BAA6B,CAAC,IAA9B,CAAoC,gDAApC,CAAsF,CAAC,MAAvF,CAAA;QAGb,CAAA,CAAG,cAAA,GAAgB,IAAC,CAAA,aAAjB,GAAgC,gBAAnC,CAAoD,CAAC,MAArD,CAA4D,SAAA;AAC3D,cAAA;UAAA,iCAAA,GAAoC,CAAA,CAAG,cAAA,GAAgB,aAAhB,GAA+B,wBAAlC,CAA2D,CAAC,GAA5D,CAAA;UAEpC,IAAG,iCAAH;YAGC,6BAA6B,CAAC,OAA9B,CAAuC,GAAvC;YAGA,IAAG,YAAH;cACC,UAAU,CAAC,WAAX,CAAwB,eAAxB,CAAyC,CAAC,QAA1C,CAAoD,gBAApD;qBACA,6BAA6B,CAAC,KAA9B,CAAqC,UAArC,EAFD;aAND;WAAA,MAAA;YAYC,6BAA6B,CAAC,SAA9B,CAAyC,GAAzC;YAGA,IAAG,YAAH;cACC,UAAU,CAAC,WAAX,CAAwB,gBAAxB,CAA0C,CAAC,QAA3C,CAAqD,eAArD;qBACA,6BAA6B,CAAC,IAA9B,CAAoC,mDAApC,CAAyF,CAAC,MAA1F,CAAA,CAAkG,CAAC,KAAnG,CAA0G,UAA1G,EAFD;aAfD;;QAH2D,CAA5D,CAqBA,CAAC,MArBD,CAAA;eAyBA,CAAA,CAAG,qBAAH,CAA0B,CAAC,MAA3B,CAAkC,SAAA;AACjC,cAAA;UAAA,WAAA,GAAc,CAAA,CAAG,cAAA,GAAgB,aAAhB,GAA+B,0BAAlC,CAA6D,CAAC,OAA9D,CAAuE,YAAvE;UAEd,IAAG,CAAA,CAAG,IAAH,CAAS,CAAC,EAAV,CAAc,UAAd,CAAH;YACC,WAAW,CAAC,SAAZ,CAAA;mBACA,WAAW,CAAC,IAAZ,CAAA,CAAkB,CAAC,IAAnB,CAAA,EAFD;WAAA,MAAA;YAIC,WAAW,CAAC,IAAZ,CAAA;mBACA,WAAW,CAAC,IAAZ,CAAA,CAAkB,CAAC,IAAnB,CAAA,EALD;;QAHiC,CAAlC,CASA,CAAC,MATD,CAAA;MAlC6B;;2CAiD9B,wBAAA,GAA0B,SAAA;AAEzB,YAAA;QAAA,aAAA,GAAgB,IAAC,CAAA,cAAc,CAAC,IAAhB,CAAsB,oDAAtB;QAEhB,IAAG,aAAa,CAAC,EAAd,CAAkB,UAAlB,CAAH;iBAAuC,aAAa,CAAC,OAAd,CAAA,EAAvC;SAAA,MAAA;iBAAoE,aAAa,CAAC,SAAd,CAAA,EAApE;;MAJyB;;;;;EA3TH,CAAzB;AARA","file":"sv-wc-payment-gateway-frontend.min.js","sourceRoot":"","sourcesContent":[null]}
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee DELETED
@@ -1,218 +0,0 @@
1
- ###
2
- WooCommerce SkyVerge Payment Gateway My Payment Methods CoffeeScript
3
- Version 5.1.0
4
-
5
- Copyright (c) 2014-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- ###
9
- jQuery( document ).ready ($) ->
10
- "use strict"
11
-
12
- # The My Payment Methods handler.
13
- #
14
- # @since 5.1.0
15
- class window.SV_WC_Payment_Methods_Handler
16
-
17
-
18
- # Constructs the class.
19
- #
20
- # @since 5.1.0
21
- #
22
- # @param [Object] args, with the properties:
23
- # id: [String] plugin ID
24
- # slug: [String] plugin slug or dasherized ID
25
- # i18n: [Object] localized text strings
26
- # ajax_url: [String] URL for AJAX requests
27
- # ajax_nonce: [String] nonce for AJAX requests
28
- constructor: ( args ) ->
29
-
30
- @id = args.id
31
- @slug = args.slug
32
- @i18n = args.i18n
33
- @ajax_url = args.ajax_url
34
- @ajax_nonce = args.ajax_nonce
35
-
36
- # hide the core "No methods" message
37
- $( ".wc-#{@slug}-my-payment-methods" ).prev( ".woocommerce-Message.woocommerce-Message--info" ).hide() unless args.has_core_tokens
38
-
39
- # init tipTip
40
- $( ".wc-#{@slug}-payment-method-actions .button.tip" ).tipTip()
41
-
42
- # handle the edit action
43
- $( ".wc-#{@slug}-my-payment-methods" ).on( 'click', ".wc-#{@slug}-payment-method-actions .edit-payment-method", ( event ) => this.edit_method( event ) )
44
-
45
- # handle the save action
46
- $( ".wc-#{@slug}-my-payment-methods" ).on( 'click', ".wc-#{@slug}-payment-method-actions .save-payment-method", ( event ) => this.save_method( event ) )
47
-
48
- # handle the cancel action
49
- $( ".wc-#{@slug}-my-payment-methods" ).on( 'click', ".wc-#{@slug}-payment-method-actions .cancel-edit-payment-method", ( event ) => this.cancel_edit( event ) )
50
-
51
- # handle the delete action
52
- $( ".wc-#{@slug}-my-payment-methods" ).on( 'click', ".wc-#{@slug}-payment-method-actions .delete-payment-method", ( event ) =>
53
-
54
- if $( event.currentTarget ).hasClass( 'disabled' ) or not confirm( @i18n.delete_ays )
55
- event.preventDefault()
56
-
57
- )
58
-
59
- # don't follow the Add Payment Method button URL if it's disabled
60
- $( '.button[href*="add-payment-method"]' ).click ( event ) ->
61
- event.preventDefault() if $( this ).hasClass( 'disabled' )
62
-
63
-
64
- # Edits a payment method.
65
- #
66
- # @since 5.1.0
67
- #
68
- # @param [Object] event jQuery event object
69
- edit_method: ( event ) =>
70
-
71
- event.preventDefault()
72
-
73
- button = $( event.currentTarget )
74
- row = button.parents( 'tr' )
75
-
76
- row.find( '.view' ).hide()
77
- row.find( '.edit' ).show()
78
- row.addClass( 'editing' )
79
-
80
- # change the Edit button to "Cancel"
81
- button.text( @i18n.cancel_button ).removeClass( 'edit-payment-method' ).addClass( 'cancel-edit-payment-method' ).removeClass( 'button' )
82
-
83
- button.siblings( '.save-payment-method' ).show()
84
- button.siblings( '.delete-payment-method' ).hide()
85
-
86
- this.enable_editing_ui()
87
-
88
-
89
- # Saves a payment method.
90
- #
91
- # @since 5.1.0
92
- #
93
- # @param [Object] event jQuery event object
94
- save_method: ( event ) =>
95
-
96
- event.preventDefault()
97
-
98
- button = $( event.currentTarget )
99
- row = button.parents( 'tr' )
100
-
101
- this.block_ui()
102
-
103
- # remove any previous errors
104
- row.next( '.error' ).remove()
105
-
106
- data =
107
- action: "wc_#{@id}_save_payment_method"
108
- nonce: @ajax_nonce
109
- token_id: row.data( 'token-id' )
110
- data: row.find( 'input[name]' ).serialize()
111
-
112
- $.post( @ajax_url, data )
113
-
114
- .done ( response ) =>
115
-
116
- return this.display_error( row, response.data ) unless response.success
117
-
118
- # remove other methods' "Default" badges if this was set as default
119
- if response.data.is_default
120
- row.siblings().find( ".wc-#{@slug}-payment-method-default .view" ).empty().siblings( '.edit' ).find( 'input' ).prop( 'checked', false )
121
-
122
- if response.data.html?
123
- row.replaceWith( response.data.html )
124
-
125
- if response.data.nonce?
126
- @ajax_nonce = response.data.nonce
127
-
128
- this.disable_editing_ui()
129
-
130
- .fail ( jqXHR, textStatus, error ) =>
131
-
132
- this.display_error( row, error )
133
-
134
- .always =>
135
-
136
- this.unblock_ui()
137
-
138
-
139
- # Cancels editing a payment method.
140
- #
141
- # @since 5.1.0
142
- #
143
- # @param [Object] event jQuery event object
144
- cancel_edit: ( event ) =>
145
-
146
- event.preventDefault()
147
-
148
- button = $( event.currentTarget )
149
- row = button.parents( 'tr' )
150
-
151
- row.find( '.view' ).show()
152
- row.find( '.edit' ).hide()
153
- row.removeClass( 'editing' )
154
-
155
- # change the "Cancel" button back to "Edit"
156
- button.removeClass( 'cancel-edit-payment-method' ).addClass( 'edit-payment-method' ).text( @i18n.edit_button ).addClass( 'button' )
157
-
158
- button.siblings( '.save-payment-method' ).hide()
159
- button.siblings( '.delete-payment-method' ).show()
160
-
161
- this.disable_editing_ui()
162
-
163
-
164
- # Sets the page UI to the "editing" state.
165
- #
166
- # This brings proper focus to the method being edited and prevents
167
- # other available buttons/actions until the editing is finished or cancelled.
168
- #
169
- # @since 5.1.1
170
- enable_editing_ui: ->
171
-
172
- # set the methods table as 'editing'
173
- $( ".wc-#{@slug}-my-payment-methods" ).addClass( 'editing' )
174
-
175
- # disable the Add Payment Method button
176
- $( '.button[href*="add-payment-method"]' ).addClass( 'disabled' )
177
-
178
-
179
- # Sets the page UI back to the default state.
180
- #
181
- # @since 5.1.1
182
- disable_editing_ui: ->
183
-
184
- # removes the methods table's "editing" status
185
- $( ".wc-#{@slug}-my-payment-methods" ).removeClass( 'editing' )
186
-
187
- # re-enable the Add Payment Method button
188
- $( '.button[href*="add-payment-method"]' ).removeClass( 'disabled' )
189
-
190
-
191
- # Blocks the payment methods table UI.
192
- #
193
- # @since 5.1.0
194
- block_ui: -> $( ".wc-#{@slug}-my-payment-methods" ).parent( 'div' ).block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )
195
-
196
-
197
- # Unblocks the payment methods table UI.
198
- #
199
- # @since 5.1.0
200
- unblock_ui: -> $( ".wc-#{@slug}-my-payment-methods" ).parent( 'div' ).unblock()
201
-
202
-
203
- # Displays an error message to the user.
204
- #
205
- # @since 5.1.0
206
- #
207
- # @param [Object] row payment method table row
208
- # @param [String] error raw error message
209
- # @param [String] message user error message
210
- display_error: ( row, error, message = '' ) ->
211
-
212
- console.error( error )
213
-
214
- message = @i18n.save_error unless message
215
-
216
- columns = $( ".wc-#{@slug}-my-payment-methods thead tr th" ).size()
217
-
218
- $( '<tr class="error"><td colspan="' + columns + '">' + message + '</td></tr>' ).insertAfter( row ).find( 'td' ).delay( 8000 ).slideUp( 200 )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.min.js DELETED
@@ -1 +0,0 @@
1
- /* WooCommerce SkyVerge Payment Gateway My Payment Methods CoffeeScript Version 5.1.0 Copyright (c) 2014-2019, SkyVerge, Inc. Licensed under the GNU General Public License v3.0 http://www.gnu.org/licenses/gpl-3.0.html */(function() { var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; jQuery(document).ready(function($) { "use strict"; return window.SV_WC_Payment_Methods_Handler = (function() { function SV_WC_Payment_Methods_Handler(args) { this.cancel_edit = bind(this.cancel_edit, this); this.save_method = bind(this.save_method, this); this.edit_method = bind(this.edit_method, this); this.id = args.id; this.slug = args.slug; this.i18n = args.i18n; this.ajax_url = args.ajax_url; this.ajax_nonce = args.ajax_nonce; if (!args.has_core_tokens) { $(".wc-" + this.slug + "-my-payment-methods").prev(".woocommerce-Message.woocommerce-Message--info").hide(); } $(".wc-" + this.slug + "-payment-method-actions .button.tip").tipTip(); $(".wc-" + this.slug + "-my-payment-methods").on('click', ".wc-" + this.slug + "-payment-method-actions .edit-payment-method", (function(_this) { return function(event) { return _this.edit_method(event); }; })(this)); $(".wc-" + this.slug + "-my-payment-methods").on('click', ".wc-" + this.slug + "-payment-method-actions .save-payment-method", (function(_this) { return function(event) { return _this.save_method(event); }; })(this)); $(".wc-" + this.slug + "-my-payment-methods").on('click', ".wc-" + this.slug + "-payment-method-actions .cancel-edit-payment-method", (function(_this) { return function(event) { return _this.cancel_edit(event); }; })(this)); $(".wc-" + this.slug + "-my-payment-methods").on('click', ".wc-" + this.slug + "-payment-method-actions .delete-payment-method", (function(_this) { return function(event) { if ($(event.currentTarget).hasClass('disabled') || !confirm(_this.i18n.delete_ays)) { return event.preventDefault(); } }; })(this)); $('.button[href*="add-payment-method"]').click(function(event) { if ($(this).hasClass('disabled')) { return event.preventDefault(); } }); } SV_WC_Payment_Methods_Handler.prototype.edit_method = function(event) { var button, row; event.preventDefault(); button = $(event.currentTarget); row = button.parents('tr'); row.find('.view').hide(); row.find('.edit').show(); row.addClass('editing'); button.text(this.i18n.cancel_button).removeClass('edit-payment-method').addClass('cancel-edit-payment-method').removeClass('button'); button.siblings('.save-payment-method').show(); button.siblings('.delete-payment-method').hide(); return this.enable_editing_ui(); }; SV_WC_Payment_Methods_Handler.prototype.save_method = function(event) { var button, data, row; event.preventDefault(); button = $(event.currentTarget); row = button.parents('tr'); this.block_ui(); row.next('.error').remove(); data = { action: "wc_" + this.id + "_save_payment_method", nonce: this.ajax_nonce, token_id: row.data('token-id'), data: row.find('input[name]').serialize() }; return $.post(this.ajax_url, data).done((function(_this) { return function(response) { if (!response.success) { return _this.display_error(row, response.data); } if (response.data.is_default) { row.siblings().find(".wc-" + _this.slug + "-payment-method-default .view").empty().siblings('.edit').find('input').prop('checked', false); } if (response.data.html != null) { row.replaceWith(response.data.html); } if (response.data.nonce != null) { _this.ajax_nonce = response.data.nonce; } return _this.disable_editing_ui(); }; })(this)).fail((function(_this) { return function(jqXHR, textStatus, error) { return _this.display_error(row, error); }; })(this)).always((function(_this) { return function() { return _this.unblock_ui(); }; })(this)); }; SV_WC_Payment_Methods_Handler.prototype.cancel_edit = function(event) { var button, row; event.preventDefault(); button = $(event.currentTarget); row = button.parents('tr'); row.find('.view').show(); row.find('.edit').hide(); row.removeClass('editing'); button.removeClass('cancel-edit-payment-method').addClass('edit-payment-method').text(this.i18n.edit_button).addClass('button'); button.siblings('.save-payment-method').hide(); button.siblings('.delete-payment-method').show(); return this.disable_editing_ui(); }; SV_WC_Payment_Methods_Handler.prototype.enable_editing_ui = function() { $(".wc-" + this.slug + "-my-payment-methods").addClass('editing'); return $('.button[href*="add-payment-method"]').addClass('disabled'); }; SV_WC_Payment_Methods_Handler.prototype.disable_editing_ui = function() { $(".wc-" + this.slug + "-my-payment-methods").removeClass('editing'); return $('.button[href*="add-payment-method"]').removeClass('disabled'); }; SV_WC_Payment_Methods_Handler.prototype.block_ui = function() { return $(".wc-" + this.slug + "-my-payment-methods").parent('div').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); }; SV_WC_Payment_Methods_Handler.prototype.unblock_ui = function() { return $(".wc-" + this.slug + "-my-payment-methods").parent('div').unblock(); }; SV_WC_Payment_Methods_Handler.prototype.display_error = function(row, error, message) { var columns; if (message == null) { message = ''; } console.error(error); if (!message) { message = this.i18n.save_error; } columns = $(".wc-" + this.slug + "-my-payment-methods thead tr th").size(); return $('<tr class="error"><td colspan="' + columns + '">' + message + '</td></tr>').insertAfter(row).find('td').delay(8000).slideUp(200); }; return SV_WC_Payment_Methods_Handler; })(); });}).call(this);
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee DELETED
@@ -1,364 +0,0 @@
1
- ###
2
- WooCommerce SkyVerge Payment Gateway Framework Payment Form CoffeeScript
3
- Version 4.3.0-beta
4
-
5
- Copyright (c) 2014-2019, SkyVerge, Inc.
6
- Licensed under the GNU General Public License v3.0
7
- http://www.gnu.org/licenses/gpl-3.0.html
8
- ###
9
- jQuery( document ).ready ($) ->
10
- "use strict"
11
-
12
-
13
- class window.SV_WC_Payment_Form_Handler
14
-
15
-
16
- # Public: Instantiate Payment Form Handler
17
- #
18
- # args - object with properties:
19
- # id - gateway ID
20
- # id_dasherized - gateway ID dasherized
21
- # plugin_id - plugin ID
22
- # type - gateway type, either `credit-card` or `echeck`
23
- # csc_required - true if the gateway requires the CSC field to be displayed
24
- #
25
- # Returns SV_WC_Payment_Form_Handler instance
26
- constructor: (args) ->
27
-
28
- @id = args.id
29
- @id_dasherized = args.id_dasherized
30
- @plugin_id = args.plugin_id
31
- @type = args.type
32
- @csc_required = args.csc_required
33
- @csc_required_for_tokens = args.csc_required_for_tokens
34
- @enabled_card_types = args.enabled_card_types
35
-
36
- # which payment form?
37
- if $( 'form.checkout' ).length
38
- @form = $( 'form.checkout' )
39
- this.handle_checkout_page()
40
-
41
- else if $( 'form#order_review' ).length
42
- @form = $( 'form#order_review' )
43
- this.handle_pay_page()
44
-
45
- else if $( 'form#add_payment_method' ).length
46
- @form = $( 'form#add_payment_method' )
47
- this.handle_add_payment_method_page()
48
-
49
- else
50
- console.log( 'No payment form found!' )
51
- return
52
-
53
- # localized error messages
54
- @params = window[ "sv_wc_payment_gateway_payment_form_params" ]
55
-
56
- # handle sample check image hint
57
- @form.on( 'click', '.js-sv-wc-payment-gateway-echeck-form-check-hint, .js-sv-wc-payment-gateway-echeck-form-sample-check', => this.handle_sample_check_hint() ) if @type is 'echeck'
58
-
59
- $( document ).trigger( 'sv_wc_payment_form_handler_init', { id: @id, instance: @ } )
60
-
61
-
62
- # Public: Handle required actions on the checkout page
63
- #
64
- # Returns nothing.
65
- handle_checkout_page: ->
66
-
67
- # format/validate credit card inputs using jQuery.payment
68
- $( document.body ).on( 'updated_checkout', => this.format_credit_card_inputs() ) if @type is 'credit-card'
69
-
70
- # updated payment fields jQuery object on each checkout update (prevents stale data)
71
- $( document.body ).on( 'updated_checkout', => this.set_payment_fields() )
72
-
73
- # handle saved payment methods
74
- # note on the checkout page, this is bound to `updated_checkout` so it
75
- # fires even when other parts of the checkout are changed
76
- $( document.body ).on( 'updated_checkout', => this.handle_saved_payment_methods() )
77
-
78
- # validate payment data before order is submitted
79
- @form.on( "checkout_place_order_#{ @id }", => this.validate_payment_data() )
80
-
81
-
82
- # Public: Handle required actions on the Order > Pay page
83
- #
84
- # Returns nothing.
85
- handle_pay_page: ->
86
-
87
- this.set_payment_fields()
88
-
89
- # format/validate credit card inputs using jQuery.payment
90
- if @type is 'credit-card'
91
- this.format_credit_card_inputs()
92
-
93
- # handle saved payment methods
94
- this.handle_saved_payment_methods()
95
-
96
- # validate payment data before order is submitted
97
- @form.submit =>
98
-
99
- # but only when one of our payment gateways is selected
100
- return this.validate_payment_data() if $( '#order_review input[name=payment_method]:checked' ).val() is @id
101
-
102
-
103
- # Public: Handle required actions on the Add Payment Method page
104
- #
105
- # Returns nothing.
106
- handle_add_payment_method_page: ->
107
-
108
- this.set_payment_fields()
109
-
110
- # format/validate credit card inputs using jQuery.payment
111
- if @type is 'credit-card'
112
- this.format_credit_card_inputs()
113
-
114
- # validate payment data before order is submitted
115
- @form.submit =>
116
-
117
- # but only when one of our payment gateways is selected
118
- return this.validate_payment_data() if $( '#add_payment_method input[name=payment_method]:checked' ).val() is @id
119
-
120
-
121
- # Public: Set payment fields class variable, this is done
122
- # during the updated_checkout event as otherwise the reference to
123
- # the checkout fields becomes stale (somehow ¯\_(ツ)_/¯)
124
- #
125
- # Returns nothing.
126
- set_payment_fields: ->
127
- @payment_fields = $( ".payment_method_#{ @id }" )
128
-
129
-
130
- # Public: Validate Payment data when order is placed
131
- #
132
- # Returns boolean, true if payment data is valid, false otherwise
133
- validate_payment_data: ->
134
-
135
- # bail when already processing
136
- return false if @form.is( '.processing' )
137
-
138
- @saved_payment_method_selected = @payment_fields.find( '.js-sv-wc-payment-gateway-payment-token:checked' ).val()
139
-
140
- # perform internal validations (all fields present & valid, etc)
141
- valid = if @type is 'credit-card' then this.validate_card_data() else this.validate_account_data()
142
-
143
- # let gateways perform their own validation prior to form submission
144
- handler = $( document.body ).triggerHandler( 'sv_wc_payment_form_valid_payment_data', { payment_form: this, passed_validation: valid } ) isnt false
145
-
146
- return valid && handler
147
-
148
-
149
- # Public: format card data using jQuery.Payment
150
- #
151
- # Returns nothing.
152
- format_credit_card_inputs: ->
153
- $( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).payment( 'formatCardNumber' ).change()
154
- $( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).payment( 'formatCardExpiry' ).change()
155
- $( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).payment( 'formatCardCVC' ).change()
156
-
157
- # perform inline validation on credit card inputs
158
- $( '.js-sv-wc-payment-gateway-credit-card-form-input' ).on( 'change paste keyup', => this.do_inline_credit_card_validation() )
159
-
160
-
161
- # Public: perform inline validation on credit card fields
162
- #
163
- # Returns nothing.
164
- do_inline_credit_card_validation: ->
165
-
166
- $card_number = $( '.js-sv-wc-payment-gateway-credit-card-form-account-number' )
167
- $expiry = $( '.js-sv-wc-payment-gateway-credit-card-form-expiry' )
168
- $csc = $( '.js-sv-wc-payment-gateway-credit-card-form-csc' )
169
-
170
- $card_type = $.payment.cardType( $card_number.val() )
171
-
172
- if $card_type not in @enabled_card_types
173
- $card_number.addClass( 'invalid-card-type' )
174
- else
175
- $card_number.removeClass( 'invalid-card-type' )
176
-
177
- if $.payment.validateCardExpiry( $expiry.payment( 'cardExpiryVal' ) )
178
- $expiry.addClass( 'identified' )
179
- else
180
- $expiry.removeClass( 'identified' )
181
-
182
- if $.payment.validateCardCVC( $csc.val() )
183
- $csc.addClass( 'identified' )
184
- else
185
- $csc.removeClass( 'identified' )
186
-
187
-
188
- # Public: Perform validation on the credit card info entered
189
- #
190
- # Return boolean, true if credit card info is valid, false otherwise
191
- validate_card_data: ->
192
-
193
- errors = []
194
-
195
- csc = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).val()
196
-
197
- # always validate the CSC if present
198
- if csc?
199
-
200
- if csc
201
- errors.push( @params.cvv_digits_invalid ) if /\D/.test( csc )
202
- errors.push( @params.cvv_length_invalid ) if csc.length < 3 || csc.length > 4
203
- else if @csc_required
204
- if not @saved_payment_method_selected or @csc_required_for_tokens
205
- errors.push( @params.cvv_missing )
206
-
207
- # Only validate the other CC fields if necessary
208
- if not @saved_payment_method_selected
209
-
210
- account_number = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val()
211
- expiry = $.payment.cardExpiryVal( @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).val() )
212
-
213
- # replace any dashes or spaces in the card number
214
- account_number = account_number.replace( /-|\s/g, '' )
215
-
216
- # validate card number
217
- if not account_number
218
- errors.push( @params.card_number_missing )
219
- else
220
- errors.push( @params.card_number_length_invalid ) if account_number.length < 12 || account_number.length > 19
221
- errors.push( @params.card_number_digits_invalid ) if /\D/.test( account_number )
222
- errors.push( @params.card_number_invalid ) unless $.payment.validateCardNumber( account_number ) # performs luhn check
223
-
224
- # validate expiration date
225
- errors.push( @params.card_exp_date_invalid ) unless $.payment.validateCardExpiry( expiry ) # validates future date
226
-
227
- if errors.length > 0
228
- this.render_errors( errors )
229
- return false
230
- else
231
- # get rid of any space/dash characters
232
- @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val( account_number )
233
- return true
234
-
235
-
236
- # Public: Perform validation on the eCheck info entered
237
- #
238
- # Return boolean, true if eCheck info is valid, false otherwise
239
- validate_account_data: ->
240
-
241
- return true if @saved_payment_method_selected
242
-
243
- errors = []
244
-
245
- routing_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-routing-number').val()
246
- account_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-account-number').val()
247
-
248
- # validate routing number
249
- if not routing_number
250
- errors.push( @params.routing_number_missing )
251
- else
252
- errors.push( @params.routing_number_length_invalid ) if 9 != routing_number.length
253
- errors.push( @params.routing_number_digits_invalid ) if /\D/.test( routing_number )
254
-
255
- # validate account number
256
- if not account_number
257
- errors.push( @params.account_number_missing )
258
- else
259
- errors.push( @params.account_number_length_invalid ) if account_number.length < 3 || account_number.length > 17
260
- errors.push( @params.account_number_invalid ) if /\D/.test( account_number )
261
-
262
- if errors.length > 0
263
- this.render_errors( errors )
264
- return false
265
- else
266
- # get rid of any space/dash characters
267
- @payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-account-number' ).val( account_number )
268
- return true
269
-
270
-
271
- # Public: Render any new errors and bring them into the viewport
272
- #
273
- # Returns nothing.
274
- render_errors: (errors) ->
275
-
276
- # hide and remove any previous errors
277
- $( '.woocommerce-error, .woocommerce-message' ).remove()
278
-
279
- # add errors
280
- @form.prepend '<ul class="woocommerce-error"><li>' + errors.join( '</li><li>' ) + '</li></ul>'
281
-
282
- # unblock UI
283
- @form.removeClass( 'processing' ).unblock()
284
- @form.find( '.input-text, select' ).blur()
285
-
286
- # scroll to top
287
- $( 'html, body' ).animate( { scrollTop: @form.offset().top - 100 }, 1000 )
288
-
289
-
290
- # Public: Handle associated actions for saved payment methods
291
- #
292
- # Returns nothing.
293
- handle_saved_payment_methods: ->
294
-
295
- # make available inside change events
296
- id_dasherized = @id_dasherized
297
-
298
- csc_required = @csc_required
299
- csc_required_for_tokens = @csc_required_for_tokens
300
-
301
- $new_payment_method_selection = $( "div.js-wc-#{ id_dasherized }-new-payment-method-form" )
302
- $csc_field = $new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).closest( '.form-row' )
303
-
304
- # show/hide the saved payment methods when a saved payment method is de-selected/selected
305
- $( "input.js-wc-#{ @id_dasherized }-payment-token" ).change ->
306
-
307
- tokenized_payment_method_selected = $( "input.js-wc-#{ id_dasherized }-payment-token:checked" ).val()
308
-
309
- if tokenized_payment_method_selected
310
-
311
- # using an existing tokenized payment method, hide the 'new method' fields
312
- $new_payment_method_selection.slideUp( 200 )
313
-
314
- # move the CSC field out of the 'new method' fields so it can be used with the tokenized transaction
315
- if csc_required_for_tokens
316
- $csc_field.removeClass( 'form-row-last' ).addClass( 'form-row-first' )
317
- $new_payment_method_selection.after( $csc_field )
318
-
319
- else
320
- # use new payment method, display the 'new method' fields
321
- $new_payment_method_selection.slideDown( 200 )
322
-
323
- # move the CSC field back into its regular spot
324
- if csc_required_for_tokens
325
- $csc_field.removeClass( 'form-row-first' ).addClass( 'form-row-last' )
326
- $new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).closest( '.form-row' ).after( $csc_field )
327
- .change()
328
-
329
- # display the 'save payment method' option for guest checkouts if the 'create account' option is checked
330
- # but only hide the input if there is a 'create account' checkbox (some themes just display the password)
331
- $( 'input#createaccount' ).change ->
332
- $parent_row = $( "input.js-wc-#{ id_dasherized }-tokenize-payment-method" ).closest( 'p.form-row' )
333
-
334
- if $( this ).is( ':checked' )
335
- $parent_row.slideDown()
336
- $parent_row.next().show()
337
- else
338
- $parent_row.hide()
339
- $parent_row.next().hide()
340
-
341
- $( 'input#createaccount' ).change() unless $( 'input#createaccount' ).is( ':checked' )
342
-
343
-
344
- # Public: Handle showing/hiding the sample check image
345
- #
346
- # Returns nothing.
347
- handle_sample_check_hint: ->
348
-
349
- $sample_check = @payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-sample-check' )
350
-
351
- if $sample_check.is( ":visible" ) then $sample_check.slideUp() else $sample_check.slideDown()
352
-
353
-
354
-
355
- # Blocks the payment form UI
356
- #
357
- # @since 3.0.0
358
- block_ui: -> @form.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )
359
-
360
-
361
- # Unblocks the payment form UI
362
- #
363
- # @since 3.0.0
364
- unblock_ui: -> @form.unblock()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/skyverge/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.min.js DELETED
@@ -1 +0,0 @@
1
- /* WooCommerce SkyVerge Payment Gateway Framework Payment Form CoffeeScript Version 4.3.0-beta Copyright (c) 2014-2019, SkyVerge, Inc. Licensed under the GNU General Public License v3.0 http://www.gnu.org/licenses/gpl-3.0.html */(function() { var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; jQuery(document).ready(function($) { "use strict"; return window.SV_WC_Payment_Form_Handler = (function() { function SV_WC_Payment_Form_Handler(args) { this.id = args.id; this.id_dasherized = args.id_dasherized; this.plugin_id = args.plugin_id; this.type = args.type; this.csc_required = args.csc_required; this.csc_required_for_tokens = args.csc_required_for_tokens; this.enabled_card_types = args.enabled_card_types; if ($('form.checkout').length) { this.form = $('form.checkout'); this.handle_checkout_page(); } else if ($('form#order_review').length) { this.form = $('form#order_review'); this.handle_pay_page(); } else if ($('form#add_payment_method').length) { this.form = $('form#add_payment_method'); this.handle_add_payment_method_page(); } else { console.log('No payment form found!'); return; } this.params = window["sv_wc_payment_gateway_payment_form_params"]; if (this.type === 'echeck') { this.form.on('click', '.js-sv-wc-payment-gateway-echeck-form-check-hint, .js-sv-wc-payment-gateway-echeck-form-sample-check', (function(_this) { return function() { return _this.handle_sample_check_hint(); }; })(this)); } $(document).trigger('sv_wc_payment_form_handler_init', { id: this.id, instance: this }); } SV_WC_Payment_Form_Handler.prototype.handle_checkout_page = function() { if (this.type === 'credit-card') { $(document.body).on('updated_checkout', (function(_this) { return function() { return _this.format_credit_card_inputs(); }; })(this)); } $(document.body).on('updated_checkout', (function(_this) { return function() { return _this.set_payment_fields(); }; })(this)); $(document.body).on('updated_checkout', (function(_this) { return function() { return _this.handle_saved_payment_methods(); }; })(this)); return this.form.on("checkout_place_order_" + this.id, (function(_this) { return function() { return _this.validate_payment_data(); }; })(this)); }; SV_WC_Payment_Form_Handler.prototype.handle_pay_page = function() { this.set_payment_fields(); if (this.type === 'credit-card') { this.format_credit_card_inputs(); } this.handle_saved_payment_methods(); return this.form.submit((function(_this) { return function() { if ($('#order_review input[name=payment_method]:checked').val() === _this.id) { return _this.validate_payment_data(); } }; })(this)); }; SV_WC_Payment_Form_Handler.prototype.handle_add_payment_method_page = function() { this.set_payment_fields(); if (this.type === 'credit-card') { this.format_credit_card_inputs(); } return this.form.submit((function(_this) { return function() { if ($('#add_payment_method input[name=payment_method]:checked').val() === _this.id) { return _this.validate_payment_data(); } }; })(this)); }; SV_WC_Payment_Form_Handler.prototype.set_payment_fields = function() { return this.payment_fields = $(".payment_method_" + this.id); }; SV_WC_Payment_Form_Handler.prototype.validate_payment_data = function() { var handler, valid; if (this.form.is('.processing')) { return false; } this.saved_payment_method_selected = this.payment_fields.find('.js-sv-wc-payment-gateway-payment-token:checked').val(); valid = this.type === 'credit-card' ? this.validate_card_data() : this.validate_account_data(); handler = $(document.body).triggerHandler('sv_wc_payment_form_valid_payment_data', { payment_form: this, passed_validation: valid }) !== false; return valid && handler; }; SV_WC_Payment_Form_Handler.prototype.format_credit_card_inputs = function() { $('.js-sv-wc-payment-gateway-credit-card-form-account-number').payment('formatCardNumber').change(); $('.js-sv-wc-payment-gateway-credit-card-form-expiry').payment('formatCardExpiry').change(); $('.js-sv-wc-payment-gateway-credit-card-form-csc').payment('formatCardCVC').change(); return $('.js-sv-wc-payment-gateway-credit-card-form-input').on('change paste keyup', (function(_this) { return function() { return _this.do_inline_credit_card_validation(); }; })(this)); }; SV_WC_Payment_Form_Handler.prototype.do_inline_credit_card_validation = function() { var $card_number, $card_type, $csc, $expiry; $card_number = $('.js-sv-wc-payment-gateway-credit-card-form-account-number'); $expiry = $('.js-sv-wc-payment-gateway-credit-card-form-expiry'); $csc = $('.js-sv-wc-payment-gateway-credit-card-form-csc'); $card_type = $.payment.cardType($card_number.val()); if (indexOf.call(this.enabled_card_types, $card_type) < 0) { $card_number.addClass('invalid-card-type'); } else { $card_number.removeClass('invalid-card-type'); } if ($.payment.validateCardExpiry($expiry.payment('cardExpiryVal'))) { $expiry.addClass('identified'); } else { $expiry.removeClass('identified'); } if ($.payment.validateCardCVC($csc.val())) { return $csc.addClass('identified'); } else { return $csc.removeClass('identified'); } }; SV_WC_Payment_Form_Handler.prototype.validate_card_data = function() { var account_number, csc, errors, expiry; errors = []; csc = this.payment_fields.find('.js-sv-wc-payment-gateway-credit-card-form-csc').val(); if (csc != null) { if (csc) { if (/\D/.test(csc)) { errors.push(this.params.cvv_digits_invalid); } if (csc.length < 3 || csc.length > 4) { errors.push(this.params.cvv_length_invalid); } } else if (this.csc_required) { if (!this.saved_payment_method_selected || this.csc_required_for_tokens) { errors.push(this.params.cvv_missing); } } } if (!this.saved_payment_method_selected) { account_number = this.payment_fields.find('.js-sv-wc-payment-gateway-credit-card-form-account-number').val(); expiry = $.payment.cardExpiryVal(this.payment_fields.find('.js-sv-wc-payment-gateway-credit-card-form-expiry').val()); account_number = account_number.replace(/-|\s/g, ''); if (!account_number) { errors.push(this.params.card_number_missing); } else { if (account_number.length < 12 || account_number.length > 19) { errors.push(this.params.card_number_length_invalid); } if (/\D/.test(account_number)) { errors.push(this.params.card_number_digits_invalid); } if (!$.payment.validateCardNumber(account_number)) { errors.push(this.params.card_number_invalid); } } if (!$.payment.validateCardExpiry(expiry)) { errors.push(this.params.card_exp_date_invalid); } } if (errors.length > 0) { this.render_errors(errors); return false; } else { this.payment_fields.find('.js-sv-wc-payment-gateway-credit-card-form-account-number').val(account_number); return true; } }; SV_WC_Payment_Form_Handler.prototype.validate_account_data = function() { var account_number, errors, routing_number; if (this.saved_payment_method_selected) { return true; } errors = []; routing_number = this.payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-routing-number').val(); account_number = this.payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-account-number').val(); if (!routing_number) { errors.push(this.params.routing_number_missing); } else { if (9 !== routing_number.length) { errors.push(this.params.routing_number_length_invalid); } if (/\D/.test(routing_number)) { errors.push(this.params.routing_number_digits_invalid); } } if (!account_number) { errors.push(this.params.account_number_missing); } else { if (account_number.length < 3 || account_number.length > 17) { errors.push(this.params.account_number_length_invalid); } if (/\D/.test(account_number)) { errors.push(this.params.account_number_invalid); } } if (errors.length > 0) { this.render_errors(errors); return false; } else { this.payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-account-number').val(account_number); return true; } }; SV_WC_Payment_Form_Handler.prototype.render_errors = function(errors) { $('.woocommerce-error, .woocommerce-message').remove(); this.form.prepend('<ul class="woocommerce-error"><li>' + errors.join('</li><li>') + '</li></ul>'); this.form.removeClass('processing').unblock(); this.form.find('.input-text, select').blur(); return $('html, body').animate({ scrollTop: this.form.offset().top - 100 }, 1000); }; SV_WC_Payment_Form_Handler.prototype.handle_saved_payment_methods = function() { var $csc_field, $new_payment_method_selection, csc_required, csc_required_for_tokens, id_dasherized; id_dasherized = this.id_dasherized; csc_required = this.csc_required; csc_required_for_tokens = this.csc_required_for_tokens; $new_payment_method_selection = $("div.js-wc-" + id_dasherized + "-new-payment-method-form"); $csc_field = $new_payment_method_selection.find('.js-sv-wc-payment-gateway-credit-card-form-csc').closest('.form-row'); $("input.js-wc-" + this.id_dasherized + "-payment-token").change(function() { var tokenized_payment_method_selected; tokenized_payment_method_selected = $("input.js-wc-" + id_dasherized + "-payment-token:checked").val(); if (tokenized_payment_method_selected) { $new_payment_method_selection.slideUp(200); if (csc_required_for_tokens) { $csc_field.removeClass('form-row-last').addClass('form-row-first'); return $new_payment_method_selection.after($csc_field); } } else { $new_payment_method_selection.slideDown(200); if (csc_required_for_tokens) { $csc_field.removeClass('form-row-first').addClass('form-row-last'); return $new_payment_method_selection.find('.js-sv-wc-payment-gateway-credit-card-form-expiry').closest('.form-row').after($csc_field); } } }).change(); $('input#createaccount').change(function() { var $parent_row; $parent_row = $("input.js-wc-" + id_dasherized + "-tokenize-payment-method").closest('p.form-row'); if ($(this).is(':checked')) { $parent_row.slideDown(); return $parent_row.next().show(); } else { $parent_row.hide(); return $parent_row.next().hide(); } }); if (!$('input#createaccount').is(':checked')) { return $('input#createaccount').change(); } }; SV_WC_Payment_Form_Handler.prototype.handle_sample_check_hint = function() { var $sample_check; $sample_check = this.payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-sample-check'); if ($sample_check.is(":visible")) { return $sample_check.slideUp(); } else { return $sample_check.slideDown(); } }; SV_WC_Payment_Form_Handler.prototype.block_ui = function() { return this.form.block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); }; SV_WC_Payment_Form_Handler.prototype.unblock_ui = function() { return this.form.unblock(); }; return SV_WC_Payment_Form_Handler; })(); });}).call(this);
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WooCommerce PayPal Powered by Braintree Payment Gateway ===
2
  Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb, fullysupportedphil, corsonr, zandyring, skyverge
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal, braintree
4
  Requires at least: 4.4
5
- Tested up to: 5.4.1
6
  Requires PHP: 5.4
7
- Stable tag: 2.3.11
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -12,118 +12,109 @@ Accept PayPal, Credit Cards, and Debit Cards on your WooCommerce store.
12
 
13
  == Description ==
14
 
15
- This is a PayPal Powered by Braintree Payment Gateway for WooCommerce, which will let you accept **credit card, debit card, and PayPal payments** on your WooCommerce store via Braintree.
16
 
17
- PayPal Powered by Braintree allows you to securely sell your products online using Hosted Fields to help you meet security requirements without losing flexibility and an integrated checkout process. Hosted Fields are little iFrames, hosted on PayPal's servers, that fit inside the checkout form elements and provide a secure means for your customers to enter their card information.
18
 
19
- This plugin supports [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) to let you sell products that require recurring billing, and [WooCommerce Pre-Orders](https://woocommerce.com/products/woocommerce-pre-orders/) to let you take payment up-front for products that are coming soon, or to automatically charge customers when pre-orders ship.
20
-
21
- Checkout is seamless either via credit cards or PayPal, and customers can save a payment method to their account for future use or manage saved payment methods with a few clicks.
22
-
23
- For US merchants, connecting to PayPal is as simple as clicking a button - no complicated API keys to cut and paste. For merchants outside the US, you'll be up and running once you enter your existing Braintree account credentials.
24
 
25
  = Powering Advanced Payments =
26
 
27
- PayPal Powered by Braintree provides several advanced features for transaction processing and payment method management.
28
 
29
- - Meets [PCI Compliance SAQ-A standards](https://www.pcisecuritystandards.org/documents/Understanding_SAQs_PCI_DSS_v3.pdf)
30
- - Supports official Subscriptions & Pre-Orders plugins
31
- - Customers can securely save payment methods or link a PayPal account to your site
32
- - Process refunds, void transactions, and capture charges right from within WooCommerce
33
- - Ability to add multiple merchant IDs to support multi-currency when used with a currency switcher
34
- - Supports Braintree Advanced Fraud tools and Kount Direct (if enabled)
35
- - Supports 3D Secure if enabled in your Braintree account
36
- - and more!
 
37
 
38
  == Installation ==
39
 
40
  = Minimum Requirements =
41
 
42
- * WordPress 4.4 or greater
43
- * WooCommerce 2.6 or greater
44
- * PHP version 5.4 or greater
45
- * cURL
46
-
47
- = Automatic installation =
48
 
49
- Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
50
 
51
- In the search field type `WooCommerce PayPal Powered by Braintree` and click "Search Plugins". Once you’ve found our plugin, you can view details about it such as the point release, rating, and description. Most importantly of course, you can install it by simply clicking "Install Now".
52
-
53
- = Manual installation =
54
-
55
- The manual installation method involves downloading our plugin and uploading it to your webserver via your favorite FTP application. The WordPress codex contains [instructions on how to do this here](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
56
 
57
  = Updating =
58
 
59
- Automatic updates should work like a charm; as always though, ensure you backup your site just in case.
60
 
61
- If on the off-chance you do encounter issues with the shop/category pages after an update you simply need to flush the permalinks by going to WordPress > Settings > Permalinks and hitting 'save'. That should return things to normal.
62
 
63
  == Frequently Asked Questions ==
64
 
65
- = Does this plugin work with credit cards or just PayPal? =
66
-
67
- This plugin supports payments using both credit and debit cards as well as PayPal.
68
-
69
- = Does this support recurring payments, like for subscriptions? =
70
 
71
- Yes! To implement recurring billing, you must use [WooCommerce Subscriptions](http://woocommerce.com/products/woocommerce-subscriptions/) with this plugin.
72
 
73
- = What currencies can I use? =
74
 
75
- This plugin supports all countries in which Braintree is available. You can use your native currency, or you can add multiple merchant IDs to process different currencies via different Braintree accounts. To use multi-currency, your site must use a **currency switcher** to adjust the order currency (may require purchase). We've tested this plugin with the [Aelia Currency Switcher](https://aelia.co/shop/currency-switcher-woocommerce/) (requires purchase).
76
 
77
- = Can non-US merchants use this? =
78
 
79
- Yes! Merchants outside the US must manually enter API credentials from Braintree rather than using the Braintree connect workflow, but the plugin functions the same way for US and non-US merchants.
80
 
81
- = Does this support both production mode and sandbox mode for testing? =
82
 
83
- Yes it does - production and sandbox mode is driven by how you connect. You may choose to connect in either mode, and disconnect and reconnect in the other mode whenever you want.
84
 
85
- = Where can I find documentation? =
86
 
87
- For help setting up and configuring, please refer to our [user guide](http://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree/).
88
 
89
- = Why isn't PayPal working? Credit cards work fine. =
90
 
91
- Make sure PayPal is enabled on your Braintree account by following the [Braintree PayPal Setup Guide](https://articles.braintreepayments.com/guides/paypal/setup-guide).
92
 
93
- = What do I need to do if I'm updating from the retired SkyVerge Braintree plugin from WooCommerce.com? =
94
 
95
- The old merchant account settings from the retired plugin will be migrated, and card tokens will migrate as well. As of version 2.0, this plugin is a drop-in replacement for the premium Braintree plugin, so you can safely upgrade to this plugin, which will deactivate the retired Braintree plugin.
96
 
97
- = Can I use this extension just for PayPal and use another gateway for Credit Cards? =
98
 
99
- Yes! Please upgrade to version 2.0 to enable gateways individually. If you want to use the PayPal gateway alone and plan to use Subscriptions, please [view our user guide](https://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree/#paypal-only) for set up tips.
100
 
101
- = Where can I get support or talk to other users? =
102
 
103
- If you get stuck, you can ask for help in the Plugin Forum.
104
 
105
- = Will this plugin work with my theme? =
106
 
107
- Yes, this plugin will work with any theme, but may require some styling to make it match nicely. Please see
108
- our [codex](http://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-codex/) for help. If you're
109
- looking for a theme with built in WooCommerce integration we recommend [Storefront](http://www.woocommerce.com/storefront/).
110
 
111
- = Where can I request new features or report bugs? =
112
-
113
- New feature requests and bugs reports can be made in the plugin forum.
114
 
115
  == Screenshots ==
116
 
117
- 1. US Merchants: Connect to Braintree or enter credentials
118
- 2. Non-US Merchants: Enter Braintree credentials
119
- 3. Credit Card gateway settings
120
  4. PayPal gateway settings
121
- 5. Advanced credit card settings
122
- 6. Checkout with PayPal directly from the cart.
123
- 7. Checkout with PayPal or credit / debit cards.
124
 
125
  == Changelog ==
126
 
 
 
 
 
 
 
 
 
127
  = 2020.06.03 - version 2.3.11 =
128
  * Tweak - New users and users who disconnect should use API keys to connect to Braintree - no changes required for users already connected via Braintree Auth
129
 
1
+ === Braintree for WooCommerce Payment Gateway ===
2
  Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb, fullysupportedphil, corsonr, zandyring, skyverge
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal, braintree
4
  Requires at least: 4.4
5
+ Tested up to: 5.5
6
  Requires PHP: 5.4
7
+ Stable tag: 2.4.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ The Braintree for WooCommerce gateway lets you accept **credit cards and PayPal payments** on your WooCommerce store via Braintree. Customers can save their credit card details or link a PayPal account to their WooCommerce user account for fast and easy checkout.
16
 
17
+ With this gateway, you can **securely sell your products** online using Hosted Fields, which help you meet security requirements without sacrificing flexibility or an integrated checkout process. Hosted Fields, similar to iFrames, are hosted on PayPal's servers but fit inside the checkout form elements on your site, providing a **secure, seamless** means for customers to share their payment information.
18
 
19
+ Braintree for WooCommerce supports tokenization, letting your customers save their credit cards or connect their PayPal account for faster, easier subsequent checkouts. The gateway also supports <a href="https://woocommerce.com/products/woocommerce-subscriptions/" target="_blank">WooCommerce Subscriptions</a> to let you sell products with recurring billing and <a href="https://woocommerce.com/products/woocommerce-pre-orders/" target="_blank">WooCommerce Pre-Orders</a>, which supports accepting payments for upcoming products as they ship or up-front.
 
 
 
 
20
 
21
  = Powering Advanced Payments =
22
 
23
+ Braintree for WooCommerce provides several advanced features for transaction processing and payment method management.
24
 
25
+ - Meets [PCI Compliance SAQ-A](https://www.pcisecuritystandards.org/documents/Understanding_SAQs_PCI_DSS_v3.pdf) standards
26
+ - Supports [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), and [WooCommerce Pre-Orders](https://woocommerce.com/products/woocommerce-pre-orders/)
27
+ - Customers can securely save credit cards or link PayPal accounts to your site
28
+ - Easily process refunds, void transactions, and capture charges right from WooCommerce
29
+ - Route payments in different currencies to different Braintree accounts (requires currency switcher)
30
+ - Supports Braintree's [extensive suite of fraud tools](https://articles.braintreepayments.com/guides/fraud-tools/overview)
31
+ - Supports 3D Secure
32
+ - Includes express checkout options like Buy Now buttons on product pages and PayPal Connect buttons in the Cart
33
+ - ...and much more!
34
 
35
  == Installation ==
36
 
37
  = Minimum Requirements =
38
 
39
+ - PHP 5.4+ (you can see this under <strong>WooCommerce &gt; Status</strong>)</li>
40
+ - WooCommerce 2.6+
41
+ - WordPress 4.4+
42
+ - An SSL certificate
43
+ - cURL support (most hosts have this enabled by default)
 
44
 
45
+ = Installation =
46
 
47
+ [Click here for instructions on installing plugins on your WordPress site.](https://wordpress.org/support/article/managing-plugins/#installing-plugins) We recommend using automatic installation as the simplest method.
 
 
 
 
48
 
49
  = Updating =
50
 
51
+ Automatic updates should work like a charm, though we do recommend creating a backup of your site before updating, just in case.
52
 
53
+ If you do encounter an issue after updating, you may need to flush site permalinks by going to **Settings > Permalinks** and clicking **Save Changes**. That will usually return things to normal!
54
 
55
  == Frequently Asked Questions ==
56
 
57
+ = Where can I find documentation? =
 
 
 
 
58
 
59
+ Great question! [Click here to review Braintree for WooCommerce documentation.](https://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree/) This documentation includes detailed setup instructions and information about using the gateway's features.
60
 
61
+ = Does this plugin work with credit cards, or just PayPal? =
62
 
63
+ This plugin supports payments with credit cards and PayPal.
64
 
65
+ = Does this plugin support recurring payment, like for subscriptions? =
66
 
67
+ Yes! This plugin supports tokenization, which is required for recurring payments such as those created with [WooCommerce Subscriptions](http://woocommerce.com/products/woocommerce-subscriptions/).
68
 
69
+ = What currencies are supported? =
70
 
71
+ This plugin supports all countries in which Braintree is available. You can use your native currency, or you can add multiple merchant IDs to process different currencies via different Braintree accounts. To use multi-currency, your site must use a **currency switcher** to adjust the order currency (may require purchase). We’ve tested this plugin with the [Aelia Currency Switcher](https://aelia.co/shop/currency-switcher-woocommerce/) (requires purchase).
72
 
73
+ = Can non-US merchants use this plugin? =
74
 
75
+ Yes! This plugin supports all countries where Braintree is available.
76
 
77
+ = Does this plugin support testing and production modes? =
78
 
79
+ Yes! This plugin includes a production and sandbox mode so you can test without activating live payments.
80
 
81
+ = Credit cards are working fine, but PayPal's not working. What's going on? =
82
 
83
+ It sounds like you may need to enable PayPal on your Braintree account. [Click here for instructions on enabling PayPal in your Braintree control panel.](https://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree/#section-6)
84
 
85
+ = Can I use this plugin just for PayPal? =
86
 
87
+ Sure thing! [Click here for instructions on setting up this gateway to only accept PayPal payments.](https://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree#section-10)
88
 
89
+ = Will this plugin work with my site's theme? =
90
 
91
+ Braintree for WooCommerce should work nicely with any WooCommerce compatible theme (such as [Storefront](http://www.woocommerce.com/storefront/)), but may require some styling for a perfect fit. For assistance with theme customization, please visit the [WooCommerce Codex](https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-codex/).
92
 
93
+ = Where can I get support, request new features, or report bugs? =
94
 
95
+ First, please [check out our plugin documentation](https://docs.woocommerce.com/document/woocommerce-gateway-paypal-powered-by-braintree) to see if that addresses any of your questions or concerns.
 
 
96
 
97
+ If not, please get in touch with us through the [plugin forums](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/)!
 
 
98
 
99
  == Screenshots ==
100
 
101
+ 1. Enter Braintree credentials
102
+ 2. Credit card gateway settings
103
+ 3. Advanced credit card gateway settings
104
  4. PayPal gateway settings
105
+ 5. Checkout with PayPal directly from the cart
106
+ 6. Checkout with PayPal directly from the product page
 
107
 
108
  == Changelog ==
109
 
110
+ = 2020.08.12 - version 2.4.0 =
111
+ * Fix - Halt plugin loading and display a notice if cURL is not available on the server
112
+ * Misc - The plugin name is updated to Braintree for WooCommerce
113
+ * Misc - Add support for WooCommerce 4.3
114
+ * Misc - Update the SkyVerge plugin framework to v5.7.1
115
+ * Misc - Require PHP 5.6+
116
+ * Dev - Classes in the WC_Braintree\Plugin_Framework namespace are now deprecated, use the namespace for the included version of the SkyVerge plugin framework (SkyVerge\WooCommerce\PluginFramework\v5_7_1)
117
+
118
  = 2020.06.03 - version 2.3.11 =
119
  * Tweak - New users and users who disconnect should use API keys to connect to Braintree - no changes required for users already connected via Braintree Auth
120
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit78ba8a3ab3ee78c6e37de8c092dbb23d::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit925e102bad64dd22618e8624d9f99af4::getLoader();
vendor/composer/LICENSE CHANGED
@@ -1,4 +1,3 @@
1
-
2
  Copyright (c) Nils Adermann, Jordi Boggiano
3
 
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -18,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
  THE SOFTWARE.
21
-
 
1
  Copyright (c) Nils Adermann, Jordi Boggiano
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
17
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
  THE SOFTWARE.
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit78ba8a3ab3ee78c6e37de8c092dbb23d
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit78ba8a3ab3ee78c6e37de8c092dbb23d
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit78ba8a3ab3ee78c6e37de8c092dbb23d', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit78ba8a3ab3ee78c6e37de8c092dbb23d', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit925e102bad64dd22618e8624d9f99af4
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit925e102bad64dd22618e8624d9f99af4', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit925e102bad64dd22618e8624d9f99af4', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit925e102bad64dd22618e8624d9f99af4::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
@@ -33,9 +33,9 @@ class ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d
33
  public static function getInitializer(ClassLoader $loader)
34
  {
35
  return \Closure::bind(function () use ($loader) {
36
- $loader->prefixLengthsPsr4 = ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d::$prefixLengthsPsr4;
37
- $loader->prefixDirsPsr4 = ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d::$prefixDirsPsr4;
38
- $loader->prefixesPsr0 = ComposerStaticInit78ba8a3ab3ee78c6e37de8c092dbb23d::$prefixesPsr0;
39
 
40
  }, null, ClassLoader::class);
41
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit925e102bad64dd22618e8624d9f99af4
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
33
  public static function getInitializer(ClassLoader $loader)
34
  {
35
  return \Closure::bind(function () use ($loader) {
36
+ $loader->prefixLengthsPsr4 = ComposerStaticInit925e102bad64dd22618e8624d9f99af4::$prefixLengthsPsr4;
37
+ $loader->prefixDirsPsr4 = ComposerStaticInit925e102bad64dd22618e8624d9f99af4::$prefixDirsPsr4;
38
+ $loader->prefixesPsr0 = ComposerStaticInit925e102bad64dd22618e8624d9f99af4::$prefixesPsr0;
39
 
40
  }, null, ClassLoader::class);
41
  }
vendor/composer/installed.json CHANGED
@@ -47,5 +47,32 @@
47
  }
48
  ],
49
  "description": "Braintree PHP Client Library"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  ]
47
  }
48
  ],
49
  "description": "Braintree PHP Client Library"
50
+ },
51
+ {
52
+ "name": "skyverge/wc-plugin-framework",
53
+ "version": "5.7.1",
54
+ "version_normalized": "5.7.1.0",
55
+ "source": {
56
+ "type": "git",
57
+ "url": "https://github.com/skyverge/wc-plugin-framework.git",
58
+ "reference": "a9d6777e95377ce47c9d4d0f84f677c1c795d569"
59
+ },
60
+ "dist": {
61
+ "type": "zip",
62
+ "url": "https://api.github.com/repos/skyverge/wc-plugin-framework/zipball/a9d6777e95377ce47c9d4d0f84f677c1c795d569",
63
+ "reference": "a9d6777e95377ce47c9d4d0f84f677c1c795d569",
64
+ "shasum": ""
65
+ },
66
+ "require-dev": {
67
+ "lucatume/wp-browser": "^2.1"
68
+ },
69
+ "time": "2020-05-19T00:09:11+00:00",
70
+ "type": "library",
71
+ "installation-source": "dist",
72
+ "description": "The official SkyVerge WooCommerce plugin framework",
73
+ "support": {
74
+ "source": "https://github.com/skyverge/wc-plugin-framework/tree/5.7.1",
75
+ "issues": "https://github.com/skyverge/wc-plugin-framework/issues"
76
+ }
77
  }
78
  ]
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/license.txt RENAMED
@@ -1,6 +1,6 @@
1
  WooCommerce Plugin Framework
2
 
3
- Copyright 2013-2019, SkyVerge, Inc.
4
 
5
  This program is free software; you can redistribute it and/or modify
6
  it under the terms of the GNU General Public License as published by
1
  WooCommerce Plugin Framework
2
 
3
+ Copyright 2013-2020, SkyVerge, Inc.
4
 
5
  This program is free software; you can redistribute it and/or modify
6
  it under the terms of the GNU General Public License as published by
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Addresses/Address.php RENAMED
@@ -18,23 +18,24 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework\Addresses;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Addresses\\Address' ) ) :
 
30
 
31
  /**
32
  * The base address data class.
33
  *
34
- * This serves as a standard address object to be passed around by plugins whenever dealing with address data, and
35
- * eliminates the need to rely on WooCommerce's address arrays.
36
  *
37
- * @since 5.3.0-dev
38
  */
39
  class Address {
40
 
@@ -67,7 +68,7 @@ class Address {
67
  /**
68
  * Gets line 1 of the street address.
69
  *
70
- * @since 5.3.0-dev
71
  *
72
  * @return string
73
  */
@@ -80,7 +81,7 @@ class Address {
80
  /**
81
  * Gets line 2 of the street address.
82
  *
83
- * @since 5.3.0-dev
84
  *
85
  * @return string
86
  */
@@ -93,7 +94,7 @@ class Address {
93
  /**
94
  * Gets line 3 of the street address.
95
  *
96
- * @since 5.3.0-dev
97
  *
98
  * @return string
99
  */
@@ -106,7 +107,7 @@ class Address {
106
  /**
107
  * Gets the locality or city.
108
  *
109
- * @since 5.3.0-dev
110
  *
111
  * @return string
112
  */
@@ -119,7 +120,7 @@ class Address {
119
  /**
120
  * Gets the region or state.
121
  *
122
- * @since 5.3.0-dev
123
  *
124
  * @return string
125
  */
@@ -132,7 +133,7 @@ class Address {
132
  /**
133
  * Gets the country.
134
  *
135
- * @since 5.3.0-dev
136
  *
137
  * @return string
138
  */
@@ -145,7 +146,7 @@ class Address {
145
  /**
146
  * Gets the postcode.
147
  *
148
- * @since 5.3.0-dev
149
  *
150
  * @return string
151
  */
@@ -160,7 +161,7 @@ class Address {
160
  *
161
  * @see Address::get_hash_data()
162
  *
163
- * @since 5.3.0-dev
164
  *
165
  * @return string
166
  */
@@ -173,13 +174,13 @@ class Address {
173
  /**
174
  * Gets the data used to generate a hash for the address.
175
  *
176
- * @since 5.3.0-dev
177
  *
178
  * @return string[]
179
  */
180
  protected function get_hash_data() {
181
 
182
- return array(
183
  $this->get_line_1(),
184
  $this->get_line_2(),
185
  $this->get_line_3(),
@@ -187,7 +188,7 @@ class Address {
187
  $this->get_region(),
188
  $this->get_country(),
189
  $this->get_postcode(),
190
- );
191
  }
192
 
193
 
@@ -197,7 +198,7 @@ class Address {
197
  /**
198
  * Sets line 1 of the street address.
199
  *
200
- * @since 5.3.0-dev
201
  *
202
  * @param string $value line 1 value
203
  */
@@ -210,7 +211,7 @@ class Address {
210
  /**
211
  * Sets line 2 of the street address.
212
  *
213
- * @since 5.3.0-dev
214
  *
215
  * @param string $value line 2 value
216
  */
@@ -223,7 +224,7 @@ class Address {
223
  /**
224
  * Gets line 3 of the street address.
225
  *
226
- * @since 5.3.0-dev
227
  *
228
  * @param string $value line 3 value
229
  */
@@ -236,7 +237,7 @@ class Address {
236
  /**
237
  * Gets the locality or city.
238
  *
239
- * @since 5.3.0-dev
240
  *
241
  * @param string $value locality value
242
  */
@@ -249,7 +250,7 @@ class Address {
249
  /**
250
  * Gets the region or state.
251
  *
252
- * @since 5.3.0-dev
253
  *
254
  * @param string $value region value
255
  */
@@ -262,7 +263,7 @@ class Address {
262
  /**
263
  * Sets the country.
264
  *
265
- * @since 5.3.0-dev
266
  *
267
  * @param string $value country value
268
  */
@@ -275,7 +276,7 @@ class Address {
275
  /**
276
  * Sets the postcode.
277
  *
278
- * @since 5.3.0-dev
279
  *
280
  * @param string $value postcode value
281
  */
@@ -287,4 +288,5 @@ class Address {
287
 
288
  }
289
 
 
290
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Addresses;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Addresses\\Address' ) ) :
30
+
31
 
32
  /**
33
  * The base address data class.
34
  *
35
+ * This serves as a standard address object to be passed around by plugins whenever dealing with address data.
36
+ * Eliminates the need to rely on WooCommerce's address arrays.
37
  *
38
+ * @since 5.3.0
39
  */
40
  class Address {
41
 
68
  /**
69
  * Gets line 1 of the street address.
70
  *
71
+ * @since 5.3.0
72
  *
73
  * @return string
74
  */
81
  /**
82
  * Gets line 2 of the street address.
83
  *
84
+ * @since 5.3.0
85
  *
86
  * @return string
87
  */
94
  /**
95
  * Gets line 3 of the street address.
96
  *
97
+ * @since 5.3.0
98
  *
99
  * @return string
100
  */
107
  /**
108
  * Gets the locality or city.
109
  *
110
+ * @since 5.3.0
111
  *
112
  * @return string
113
  */
120
  /**
121
  * Gets the region or state.
122
  *
123
+ * @since 5.3.0
124
  *
125
  * @return string
126
  */
133
  /**
134
  * Gets the country.
135
  *
136
+ * @since 5.3.0
137
  *
138
  * @return string
139
  */
146
  /**
147
  * Gets the postcode.
148
  *
149
+ * @since 5.3.0
150
  *
151
  * @return string
152
  */
161
  *
162
  * @see Address::get_hash_data()
163
  *
164
+ * @since 5.3.0
165
  *
166
  * @return string
167
  */
174
  /**
175
  * Gets the data used to generate a hash for the address.
176
  *
177
+ * @since 5.3.0
178
  *
179
  * @return string[]
180
  */
181
  protected function get_hash_data() {
182
 
183
+ return [
184
  $this->get_line_1(),
185
  $this->get_line_2(),
186
  $this->get_line_3(),
188
  $this->get_region(),
189
  $this->get_country(),
190
  $this->get_postcode(),
191
+ ];
192
  }
193
 
194
 
198
  /**
199
  * Sets line 1 of the street address.
200
  *
201
+ * @since 5.3.0
202
  *
203
  * @param string $value line 1 value
204
  */
211
  /**
212
  * Sets line 2 of the street address.
213
  *
214
+ * @since 5.3.0
215
  *
216
  * @param string $value line 2 value
217
  */
224
  /**
225
  * Gets line 3 of the street address.
226
  *
227
+ * @since 5.3.0
228
  *
229
  * @param string $value line 3 value
230
  */
237
  /**
238
  * Gets the locality or city.
239
  *
240
+ * @since 5.3.0
241
  *
242
  * @param string $value locality value
243
  */
250
  /**
251
  * Gets the region or state.
252
  *
253
+ * @since 5.3.0
254
  *
255
  * @param string $value region value
256
  */
263
  /**
264
  * Sets the country.
265
  *
266
+ * @since 5.3.0
267
  *
268
  * @param string $value country value
269
  */
276
  /**
277
  * Sets the postcode.
278
  *
279
+ * @since 5.3.0
280
  *
281
  * @param string $value postcode value
282
  */
288
 
289
  }
290
 
291
+
292
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Addresses/Customer_Address.php RENAMED
@@ -18,26 +18,23 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework\Addresses;
26
- use WC_Braintree\Plugin_Framework as Framework;
27
 
28
  defined( 'ABSPATH' ) or exit;
29
 
30
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Addresses\\Customer_Address' ) ) :
 
31
 
32
  /**
33
  * The customer address data class.
34
  *
35
- * Adds customer-specific data to a base address, as used for a billing or shipping address that can include first
36
- * and last name.
37
- *
38
- * @see Address
39
  *
40
- * @since 5.3.0-dev
41
  */
42
  class Customer_Address extends Address {
43
 
@@ -55,7 +52,7 @@ class Customer_Address extends Address {
55
  /**
56
  * Gets the customer first name.
57
  *
58
- * @since 5.3.0-dev
59
  *
60
  * @return string
61
  */
@@ -68,7 +65,7 @@ class Customer_Address extends Address {
68
  /**
69
  * Gets the customer first name.
70
  *
71
- * @since 5.3.0-dev
72
  *
73
  * @return string
74
  */
@@ -83,19 +80,17 @@ class Customer_Address extends Address {
83
  *
84
  * @see Address::get_hash_data()
85
  *
86
- * @since 5.3.0-dev
87
  *
88
  * @return string[]
89
  */
90
  protected function get_hash_data() {
91
 
92
  // add the first & last name to data used to generate the hash
93
- $data = array_merge( array(
94
  $this->get_first_name(),
95
  $this->get_last_name(),
96
- ), parent::get_hash_data() );
97
-
98
- return $data;
99
  }
100
 
101
 
@@ -105,7 +100,7 @@ class Customer_Address extends Address {
105
  /**
106
  * Sets the customer first name.
107
  *
108
- * @since 5.3.0-dev
109
  *
110
  * @param string $value first name value
111
  */
@@ -118,7 +113,7 @@ class Customer_Address extends Address {
118
  /**
119
  * Sets the customer last name.
120
  *
121
- * @since 5.3.0-dev
122
  *
123
  * @param string $value first name value
124
  */
@@ -131,24 +126,25 @@ class Customer_Address extends Address {
131
  /**
132
  * Sets the full address based on a WooCommerce order.
133
  *
134
- * @since 5.3.0-dev
135
  *
136
  * @param \WC_Order $order WooCommerce order object
137
  * @param string $type address type, like billing or shipping
138
  */
139
  public function set_from_order( \WC_Order $order, $type = 'billing' ) {
140
 
141
- $this->set_first_name( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_first_name" ) );
142
- $this->set_last_name( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_last_name" ) );
143
- $this->set_line_1( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_address_1" ) );
144
- $this->set_line_2( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_address_2" ) );
145
- $this->set_locality( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_city" ) );
146
- $this->set_region( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_state" ) );
147
- $this->set_country( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_country" ) );
148
- $this->set_postcode( Framework\SV_WC_Order_Compatibility::get_prop( $order, "{$type}_postcode" ) );
149
  }
150
 
151
 
152
  }
153
 
 
154
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Addresses;
 
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Addresses\\Customer_Address' ) ) :
30
+
31
 
32
  /**
33
  * The customer address data class.
34
  *
35
+ * Adds customer-specific data to a base address, as used for a billing or shipping address that can include first and last name.
 
 
 
36
  *
37
+ * @since 5.3.0
38
  */
39
  class Customer_Address extends Address {
40
 
52
  /**
53
  * Gets the customer first name.
54
  *
55
+ * @since 5.3.0
56
  *
57
  * @return string
58
  */
65
  /**
66
  * Gets the customer first name.
67
  *
68
+ * @since 5.3.0
69
  *
70
  * @return string
71
  */
80
  *
81
  * @see Address::get_hash_data()
82
  *
83
+ * @since 5.3.0
84
  *
85
  * @return string[]
86
  */
87
  protected function get_hash_data() {
88
 
89
  // add the first & last name to data used to generate the hash
90
+ return array_merge( [
91
  $this->get_first_name(),
92
  $this->get_last_name(),
93
+ ], parent::get_hash_data() );
 
 
94
  }
95
 
96
 
100
  /**
101
  * Sets the customer first name.
102
  *
103
+ * @since 5.3.0
104
  *
105
  * @param string $value first name value
106
  */
113
  /**
114
  * Sets the customer last name.
115
  *
116
+ * @since 5.3.0
117
  *
118
  * @param string $value first name value
119
  */
126
  /**
127
  * Sets the full address based on a WooCommerce order.
128
  *
129
+ * @since 5.3.0
130
  *
131
  * @param \WC_Order $order WooCommerce order object
132
  * @param string $type address type, like billing or shipping
133
  */
134
  public function set_from_order( \WC_Order $order, $type = 'billing' ) {
135
 
136
+ $this->set_first_name( $order->{"get_{$type}_first_name"}() );
137
+ $this->set_last_name( $order->{"get_{$type}_last_name"}() );
138
+ $this->set_line_1( $order->{"get_{$type}_address_1"}() );
139
+ $this->set_line_2( $order->{"get_{$type}_address_2"}() );
140
+ $this->set_locality( $order->{"get_{$type}_city"}() );
141
+ $this->set_region( $order->{"get_{$type}_state"}() );
142
+ $this->set_country( $order->{"get_{$type}_country"}() );
143
+ $this->set_postcode( $order->{"get_{$type}_postcode"}() );
144
  }
145
 
146
 
147
  }
148
 
149
+
150
  endif;
vendor/skyverge/wc-plugin-framework/woocommerce/Country_Helper.php ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
+
27
+ defined( 'ABSPATH' ) or exit;
28
+
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Country_Helper' ) ) :
30
+
31
+
32
+ /**
33
+ * SkyVerge Country Helper Class
34
+ *
35
+ * The purpose of this class is to centralize country-related utility
36
+ * functions that are commonly used in SkyVerge plugins
37
+ *
38
+ * @since 5.4.3
39
+ */
40
+ class Country_Helper {
41
+
42
+
43
+ /** @var array ISO 3166-alpha2 => ISO 3166-alpha3 */
44
+ static public $alpha3 = [
45
+ 'AF' => 'AFG', 'AL' => 'ALB', 'DZ' => 'DZA', 'AD' => 'AND', 'AO' => 'AGO',
46
+ 'AG' => 'ATG', 'AR' => 'ARG', 'AM' => 'ARM', 'AU' => 'AUS', 'AT' => 'AUT',
47
+ 'AZ' => 'AZE', 'BS' => 'BHS', 'BH' => 'BHR', 'BD' => 'BGD', 'BB' => 'BRB',
48
+ 'BY' => 'BLR', 'BE' => 'BEL', 'BZ' => 'BLZ', 'BJ' => 'BEN', 'BT' => 'BTN',
49
+ 'BO' => 'BOL', 'BA' => 'BIH', 'BW' => 'BWA', 'BR' => 'BRA', 'BN' => 'BRN',
50
+ 'BG' => 'BGR', 'BF' => 'BFA', 'BI' => 'BDI', 'KH' => 'KHM', 'CM' => 'CMR',
51
+ 'CA' => 'CAN', 'CV' => 'CPV', 'CF' => 'CAF', 'TD' => 'TCD', 'CL' => 'CHL',
52
+ 'CN' => 'CHN', 'CO' => 'COL', 'KM' => 'COM', 'CD' => 'COD', 'CG' => 'COG',
53
+ 'CR' => 'CRI', 'CI' => 'CIV', 'HR' => 'HRV', 'CU' => 'CUB', 'CY' => 'CYP',
54
+ 'CZ' => 'CZE', 'DK' => 'DNK', 'DJ' => 'DJI', 'DM' => 'DMA', 'DO' => 'DOM',
55
+ 'EC' => 'ECU', 'EG' => 'EGY', 'SV' => 'SLV', 'GQ' => 'GNQ', 'ER' => 'ERI',
56
+ 'EE' => 'EST', 'ET' => 'ETH', 'FJ' => 'FJI', 'FI' => 'FIN', 'FR' => 'FRA',
57
+ 'GA' => 'GAB', 'GM' => 'GMB', 'GE' => 'GEO', 'DE' => 'DEU', 'GH' => 'GHA',
58
+ 'GR' => 'GRC', 'GD' => 'GRD', 'GT' => 'GTM', 'GN' => 'GIN', 'GW' => 'GNB',
59
+ 'GY' => 'GUY', 'HT' => 'HTI', 'HN' => 'HND', 'HU' => 'HUN', 'IS' => 'ISL',
60
+ 'IN' => 'IND', 'ID' => 'IDN', 'IR' => 'IRN', 'IQ' => 'IRQ', 'IE' => 'IRL',
61
+ 'IL' => 'ISR', 'IT' => 'ITA', 'JM' => 'JAM', 'JP' => 'JPN', 'JO' => 'JOR',
62
+ 'KZ' => 'KAZ', 'KE' => 'KEN', 'KI' => 'KIR', 'KP' => 'PRK', 'KR' => 'KOR',
63
+ 'KW' => 'KWT', 'KG' => 'KGZ', 'LA' => 'LAO', 'LV' => 'LVA', 'LB' => 'LBN',
64
+ 'LS' => 'LSO', 'LR' => 'LBR', 'LY' => 'LBY', 'LI' => 'LIE', 'LT' => 'LTU',
65
+ 'LU' => 'LUX', 'MK' => 'MKD', 'MG' => 'MDG', 'MW' => 'MWI', 'MY' => 'MYS',
66
+ 'MV' => 'MDV', 'ML' => 'MLI', 'MT' => 'MLT', 'MH' => 'MHL', 'MR' => 'MRT',
67
+ 'MU' => 'MUS', 'MX' => 'MEX', 'FM' => 'FSM', 'MD' => 'MDA', 'MC' => 'MCO',
68
+ 'MN' => 'MNG', 'ME' => 'MNE', 'MA' => 'MAR', 'MZ' => 'MOZ', 'MM' => 'MMR',
69
+ 'NA' => 'NAM', 'NR' => 'NRU', 'NP' => 'NPL', 'NL' => 'NLD', 'NZ' => 'NZL',
70
+ 'NI' => 'NIC', 'NE' => 'NER', 'NG' => 'NGA', 'NO' => 'NOR', 'OM' => 'OMN',
71
+ 'PK' => 'PAK', 'PW' => 'PLW', 'PA' => 'PAN', 'PG' => 'PNG', 'PY' => 'PRY',
72
+ 'PE' => 'PER', 'PH' => 'PHL', 'PL' => 'POL', 'PT' => 'PRT', 'QA' => 'QAT',
73
+ 'RO' => 'ROU', 'RU' => 'RUS', 'RW' => 'RWA', 'KN' => 'KNA', 'LC' => 'LCA',
74
+ 'VC' => 'VCT', 'WS' => 'WSM', 'SM' => 'SMR', 'ST' => 'STP', 'SA' => 'SAU',
75
+ 'SN' => 'SEN', 'RS' => 'SRB', 'SC' => 'SYC', 'SL' => 'SLE', 'SG' => 'SGP',
76
+ 'SK' => 'SVK', 'SI' => 'SVN', 'SB' => 'SLB', 'SO' => 'SOM', 'ZA' => 'ZAF',
77
+ 'ES' => 'ESP', 'LK' => 'LKA', 'SD' => 'SDN', 'SR' => 'SUR', 'SZ' => 'SWZ',
78
+ 'SE' => 'SWE', 'CH' => 'CHE', 'SY' => 'SYR', 'TJ' => 'TJK', 'TZ' => 'TZA',
79
+ 'TH' => 'THA', 'TL' => 'TLS', 'TG' => 'TGO', 'TO' => 'TON', 'TT' => 'TTO',
80
+ 'TN' => 'TUN', 'TR' => 'TUR', 'TM' => 'TKM', 'TV' => 'TUV', 'UG' => 'UGA',
81
+ 'UA' => 'UKR', 'AE' => 'ARE', 'GB' => 'GBR', 'US' => 'USA', 'UY' => 'URY',
82
+ 'UZ' => 'UZB', 'VU' => 'VUT', 'VA' => 'VAT', 'VE' => 'VEN', 'VN' => 'VNM',
83
+ 'YE' => 'YEM', 'ZM' => 'ZMB', 'ZW' => 'ZWE', 'TW' => 'TWN', 'CX' => 'CXR',
84
+ 'CC' => 'CCK', 'HM' => 'HMD', 'NF' => 'NFK', 'NC' => 'NCL', 'PF' => 'PYF',
85
+ 'YT' => 'MYT', 'GP' => 'GLP', 'PM' => 'SPM', 'WF' => 'WLF', 'TF' => 'ATF',
86
+ 'BV' => 'BVT', 'CK' => 'COK', 'NU' => 'NIU', 'TK' => 'TKL', 'GG' => 'GGY',
87
+ 'IM' => 'IMN', 'JE' => 'JEY', 'AI' => 'AIA', 'BM' => 'BMU', 'IO' => 'IOT',
88
+ 'VG' => 'VGB', 'KY' => 'CYM', 'FK' => 'FLK', 'GI' => 'GIB', 'MS' => 'MSR',
89
+ 'PN' => 'PCN', 'SH' => 'SHN', 'GS' => 'SGS', 'TC' => 'TCA', 'MP' => 'MNP',
90
+ 'PR' => 'PRI', 'AS' => 'ASM', 'UM' => 'UMI', 'GU' => 'GUM', 'VI' => 'VIR',
91
+ 'HK' => 'HKG', 'MO' => 'MAC', 'FO' => 'FRO', 'GL' => 'GRL', 'GF' => 'GUF',
92
+ 'MQ' => 'MTQ', 'RE' => 'REU', 'AX' => 'ALA', 'AW' => 'ABW', 'AN' => 'ANT',
93
+ 'SJ' => 'SJM', 'AC' => 'ASC', 'TA' => 'TAA', 'AQ' => 'ATA', 'CW' => 'CUW',
94
+ ];
95
+
96
+ /** @var array ISO 3166-alpha2 => ISO 3166-numeric */
97
+ static public $numeric = [
98
+ 'AF' => '004', 'AX' => '248', 'AL' => '008', 'DZ' => '012', 'AS' => '016',
99
+ 'AD' => '020', 'AO' => '024', 'AI' => '660', 'AQ' => '010', 'AG' => '028',
100
+ 'AR' => '032', 'AM' => '051', 'AW' => '533', 'AU' => '036', 'AT' => '040',
101
+ 'AZ' => '031', 'BS' => '044', 'BH' => '048', 'BD' => '050', 'BB' => '052',
102
+ 'BY' => '112', 'BE' => '056', 'BZ' => '084', 'BJ' => '204', 'BM' => '060',
103
+ 'BT' => '064', 'BO' => '068', 'BQ' => '535', 'BA' => '070', 'BW' => '072',
104
+ 'BV' => '074', 'BR' => '076', 'IO' => '086', 'BN' => '096', 'BG' => '100',
105
+ 'BF' => '854', 'BI' => '108', 'KH' => '116', 'CM' => '120', 'CA' => '124',
106
+ 'CV' => '132', 'KY' => '136', 'CF' => '140', 'TD' => '148', 'CL' => '152',
107
+ 'CN' => '156', 'CX' => '162', 'CC' => '166', 'CO' => '170', 'KM' => '174',
108
+ 'CG' => '178', 'CD' => '180', 'CK' => '184', 'CR' => '188', 'CI' => '384',
109
+ 'HR' => '191', 'CU' => '192', 'CW' => '531', 'CY' => '196', 'CZ' => '203',
110
+ 'DK' => '208', 'DJ' => '262', 'DM' => '212', 'DO' => '214', 'EC' => '218',
111
+ 'EG' => '818', 'SV' => '222', 'GQ' => '226', 'ER' => '232', 'EE' => '233',
112
+ 'ET' => '231', 'FK' => '238', 'FO' => '234', 'FJ' => '242', 'FI' => '246',
113
+ 'FR' => '250', 'GF' => '254', 'PF' => '258', 'TF' => '260', 'GA' => '266',
114
+ 'GM' => '270', 'GE' => '268', 'DE' => '276', 'GH' => '288', 'GI' => '292',
115
+ 'GR' => '300', 'GL' => '304', 'GD' => '308', 'GP' => '312', 'GU' => '316',
116
+ 'GT' => '320', 'GG' => '831', 'GN' => '324', 'GW' => '624', 'GY' => '328',
117
+ 'HT' => '332', 'HM' => '334', 'VA' => '336', 'HN' => '340', 'HK' => '344',
118
+ 'HU' => '348', 'IS' => '352', 'IN' => '356', 'ID' => '360', 'IR' => '364',
119
+ 'IQ' => '368', 'IE' => '372', 'IM' => '833', 'IL' => '376', 'IT' => '380',
120
+ 'JM' => '388', 'JP' => '392', 'JE' => '832', 'JO' => '400', 'KZ' => '398',
121
+ 'KE' => '404', 'KI' => '296', 'KP' => '408', 'KR' => '410', 'KW' => '414',
122
+ 'KG' => '417', 'LA' => '418', 'LV' => '428', 'LB' => '422', 'LS' => '426',
123
+ 'LR' => '430', 'LY' => '434', 'LI' => '438', 'LT' => '440', 'LU' => '442',
124
+ 'MO' => '446', 'MK' => '807', 'MG' => '450', 'MW' => '454', 'MY' => '458',
125
+ 'MV' => '462', 'ML' => '466', 'MT' => '470', 'MH' => '584', 'MQ' => '474',
126
+ 'MR' => '478', 'MU' => '480', 'YT' => '175', 'MX' => '484', 'FM' => '583',
127
+ 'MD' => '498', 'MC' => '492', 'MN' => '496', 'ME' => '499', 'MS' => '500',
128
+ 'MA' => '504', 'MZ' => '508', 'MM' => '104', 'NA' => '516', 'NR' => '520',
129
+ 'NP' => '524', 'NL' => '528', 'NC' => '540', 'NZ' => '554', 'NI' => '558',
130
+ 'NE' => '562', 'NG' => '566', 'NU' => '570', 'NF' => '574', 'MP' => '580',
131
+ 'NO' => '578', 'OM' => '512', 'PK' => '586', 'PW' => '585', 'PS' => '275',
132
+ 'PA' => '591', 'PG' => '598', 'PY' => '600', 'PE' => '604', 'PH' => '608',
133
+ 'PN' => '612', 'PL' => '616', 'PT' => '620', 'PR' => '630', 'QA' => '634',
134
+ 'RE' => '638', 'RO' => '642', 'RU' => '643', 'RW' => '646', 'BL' => '652',
135
+ 'SH' => '654', 'KN' => '659', 'LC' => '662', 'MF' => '663', 'PM' => '666',
136
+ 'VC' => '670', 'WS' => '882', 'SM' => '674', 'ST' => '678', 'SA' => '682',
137
+ 'SN' => '686', 'RS' => '688', 'SC' => '690', 'SL' => '694', 'SG' => '702',
138
+ 'SX' => '534', 'SK' => '703', 'SI' => '705', 'SB' => '090', 'SO' => '706',
139
+ 'ZA' => '710', 'GS' => '239', 'SS' => '728', 'ES' => '724', 'LK' => '144',
140
+ 'SD' => '729', 'SR' => '740', 'SJ' => '744', 'SZ' => '748', 'SE' => '752',
141
+ 'CH' => '756', 'SY' => '760', 'TW' => '158', 'TJ' => '762', 'TZ' => '834',
142
+ 'TH' => '764', 'TL' => '626', 'TG' => '768', 'TK' => '772', 'TO' => '776',
143
+ 'TT' => '780', 'TN' => '788', 'TR' => '792', 'TM' => '795', 'TC' => '796',
144
+ 'TV' => '798', 'UG' => '800', 'UA' => '804', 'AE' => '784', 'GB' => '826',
145
+ 'US' => '840', 'UM' => '581', 'UY' => '858', 'UZ' => '860', 'VU' => '548',
146
+ 'VE' => '862', 'VN' => '704', 'VG' => '092', 'VI' => '850', 'WF' => '876',
147
+ 'EH' => '732', 'YE' => '887', 'ZM' => '894', 'ZW' => '716',
148
+ ];
149
+
150
+ /** @var array ISO 3166-alpha2 => phone calling code(s) */
151
+ static public $calling_codes = [
152
+ 'BD' => '+880',
153
+ 'BE' => '+32',
154
+ 'BF' => '+226',
155
+ 'BG' => '+359',
156
+ 'BA' => '+387',
157
+ 'BB' => '+1246',
158
+ 'WF' => '+681',
159
+ 'BL' => '+590',
160
+ 'BM' => '+1441',
161
+ 'BN' => '+673',
162
+ 'BO' => '+591',
163
+ 'BH' => '+973',
164
+ 'BI' => '+257',
165
+ 'BJ' => '+229',
166
+ 'BT' => '+975',
167
+ 'JM' => '+1876',
168
+ 'BV' => '',
169
+ 'BW' => '+267',
170
+ 'WS' => '+685',
171
+ 'BQ' => '+599',
172
+ 'BR' => '+55',
173
+ 'BS' => '+1242',
174
+ 'JE' => '+441534',
175
+ 'BY' => '+375',
176
+ 'BZ' => '+501',
177
+ 'RU' => '+7',
178
+ 'RW' => '+250',
179
+ 'RS' => '+381',
180
+ 'TL' => '+670',
181
+ 'RE' => '+262',
182
+ 'TM' => '+993',
183
+ 'TJ' => '+992',
184
+ 'RO' => '+40',
185
+ 'TK' => '+690',
186
+ 'GW' => '+245',
187
+ 'GU' => '+1671',
188
+ 'GT' => '+502',
189
+ 'GS' => '',
190
+ 'GR' => '+30',
191
+ 'GQ' => '+240',
192
+ 'GP' => '+590',
193
+ 'JP' => '+81',
194
+ 'GY' => '+592',
195
+ 'GG' => '+441481',
196
+ 'GF' => '+594',
197
+ 'GE' => '+995',
198
+ 'GD' => '+1473',
199
+ 'GB' => '+44',
200
+ 'GA' => '+241',
201
+ 'SV' => '+503',
202
+ 'GN' => '+224',
203
+ 'GM' => '+220',
204
+ 'GL' => '+299',
205
+ 'GI' => '+350',
206
+ 'GH' => '+233',
207
+ 'OM' => '+968',
208
+ 'TN' => '+216',
209
+ 'JO' => '+962',
210
+ 'HR' => '+385',
211
+ 'HT' => '+509',
212
+ 'HU' => '+36',
213
+ 'HK' => '+852',
214
+ 'HN' => '+504',
215
+ 'HM' => '',
216
+ 'VE' => '+58',
217
+ 'PR' => [
218
+ '+1787',
219
+ '+1939',
220
+ ],
221
+ 'PS' => '+970',
222
+ 'PW' => '+680',
223
+ 'PT' => '+351',
224
+ 'SJ' => '+47',
225
+ 'PY' => '+595',
226
+ 'IQ' => '+964',
227
+ 'PA' => '+507',
228
+ 'PF' => '+689',
229
+ 'PG' => '+675',
230
+ 'PE' => '+51',
231
+ 'PK' => '+92',
232
+ 'PH' => '+63',
233
+ 'PN' => '+870',
234
+ 'PL' => '+48',
235
+ 'PM' => '+508',
236
+ 'ZM' => '+260',
237
+ 'EH' => '+212',
238
+ 'EE' => '+372',
239
+ 'EG' => '+20',
240
+ 'ZA' => '+27',
241
+ 'EC' => '+593',
242
+ 'IT' => '+39',
243
+ 'VN' => '+84',
244
+ 'SB' => '+677',
245
+ 'ET' => '+251',
246
+ 'SO' => '+252',
247
+ 'ZW' => '+263',
248
+ 'SA' => '+966',
249
+ 'ES' => '+34',
250
+ 'ER' => '+291',
251
+ 'ME' => '+382',
252
+ 'MD' => '+373',
253
+ 'MG' => '+261',
254
+ 'MF' => '+590',
255
+ 'MA' => '+212',
256
+ 'MC' => '+377',
257
+ 'UZ' => '+998',
258
+ 'MM' => '+95',
259
+ 'ML' => '+223',
260
+ 'MO' => '+853',
261
+ 'MN' => '+976',
262
+ 'MH' => '+692',
263
+ 'MK' => '+389',
264
+ 'MU' => '+230',
265
+ 'MT' => '+356',
266
+ 'MW' => '+265',
267
+ 'MV' => '+960',
268
+ 'MQ' => '+596',
269
+ 'MP' => '+1670',
270
+ 'MS' => '+1664',
271
+ 'MR' => '+222',
272
+ 'IM' => '+441624',
273
+ 'UG' => '+256',
274
+ 'TZ' => '+255',
275
+ 'MY' => '+60',
276
+ 'MX' => '+52',
277
+ 'IL' => '+972',
278
+ 'FR' => '+33',
279
+ 'IO' => '+246',
280
+ 'SH' => '+290',
281
+ 'FI' => '+358',
282
+ 'FJ' => '+679',
283
+ 'FK' => '+500',
284
+ 'FM' => '+691',
285
+ 'FO' => '+298',
286
+ 'NI' => '+505',
287
+ 'NL' => '+31',
288
+ 'NO' => '+47',
289
+ 'NA' => '+264',
290
+ 'VU' => '+678',
291
+ 'NC' => '+687',
292
+ 'NE' => '+227',
293
+ 'NF' => '+672',
294
+ 'NG' => '+234',
295
+ 'NZ' => '+64',
296
+ 'NP' => '+977',
297
+ 'NR' => '+674',
298
+ 'NU' => '+683',
299
+ 'CK' => '+682',
300
+ 'XK' => '',
301
+ 'CI' => '+225',
302
+ 'CH' => '+41',
303
+ 'CO' => '+57',
304
+ 'CN' => '+86',
305
+ 'CM' => '+237',
306
+ 'CL' => '+56',
307
+ 'CC' => '+61',
308
+ 'CA' => '+1',
309
+ 'CG' => '+242',
310
+ 'CF' => '+236',
311
+ 'CD' => '+243',
312
+ 'CZ' => '+420',
313
+ 'CY' => '+357',
314
+ 'CX' => '+61',
315
+ 'CR' => '+506',
316
+ 'CW' => '+599',
317
+ 'CV' => '+238',
318
+ 'CU' => '+53',
319
+ 'SZ' => '+268',
320
+ 'SY' => '+963',
321
+ 'SX' => '+599',
322
+ 'KG' => '+996',
323
+ 'KE' => '+254',
324
+ 'SS' => '+211',
325
+ 'SR' => '+597',
326
+ 'KI' => '+686',
327
+ 'KH' => '+855',
328
+ 'KN' => '+1869',
329
+ 'KM' => '+269',
330
+ 'ST' => '+239',
331
+ 'SK' => '+421',
332
+ 'KR' => '+82',
333
+ 'SI' => '+386',
334
+ 'KP' => '+850',
335
+ 'KW' => '+965',
336
+ 'SN' => '+221',
337
+ 'SM' => '+378',
338
+ 'SL' => '+232',
339
+ 'SC' => '+248',
340
+ 'KZ' => '+7',
341
+ 'KY' => '+1345',
342
+ 'SG' => '+65',
343
+ 'SE' => '+46',
344
+ 'SD' => '+249',
345
+ 'DO' => [
346
+ '+1809',
347
+ '+1829',
348
+ '+1849',
349
+ ],
350
+ 'DM' => '+1767',
351
+ 'DJ' => '+253',
352
+ 'DK' => '+45',
353
+ 'VG' => '+1284',
354
+ 'DE' => '+49',
355
+ 'YE' => '+967',
356
+ 'DZ' => '+213',
357
+ 'US' => '+1',
358
+ 'UY' => '+598',
359
+ 'YT' => '+262',
360
+ 'UM' => '+1',
361
+ 'LB' => '+961',
362
+ 'LC' => '+1758',
363
+ 'LA' => '+856',
364
+ 'TV' => '+688',
365
+ 'TW' => '+886',
366
+ 'TT' => '+1868',
367
+ 'TR' => '+90',
368
+ 'LK' => '+94',
369
+ 'LI' => '+423',
370
+ 'LV' => '+371',
371
+ 'TO' => '+676',
372
+ 'LT' => '+370',
373
+ 'LU' => '+352',
374
+ 'LR' => '+231',
375
+ 'LS' => '+266',
376
+ 'TH' => '+66',
377
+ 'TF' => '',
378
+ 'TG' => '+228',
379
+ 'TD' => '+235',
380
+ 'TC' => '+1649',
381
+ 'LY' => '+218',
382
+ 'VA' => '+379',
383
+ 'VC' => '+1784',
384
+ 'AE' => '+971',
385
+ 'AD' => '+376',
386
+ 'AG' => '+1268',
387
+ 'AF' => '+93',
388
+ 'AI' => '+1264',
389
+ 'VI' => '+1340',
390
+ 'IS' => '+354',
391
+ 'IR' => '+98',
392
+ 'AM' => '+374',
393
+ 'AL' => '+355',
394
+ 'AO' => '+244',
395
+ 'AQ' => '',
396
+ 'AS' => '+1684',
397
+ 'AR' => '+54',
398
+ 'AU' => '+61',
399
+ 'AT' => '+43',
400
+ 'AW' => '+297',
401
+ 'IN' => '+91',
402
+ 'AX' => '+35818',
403
+ 'AZ' => '+994',
404
+ 'IE' => '+353',
405
+ 'ID' => '+62',
406
+ 'UA' => '+380',
407
+ 'QA' => '+974',
408
+ 'MZ' => '+258',
409
+ ];
410
+
411
+
412
+ /** @var array flipped calling codes */
413
+ protected static $flipped_calling_codes;
414
+
415
+
416
+ /**
417
+ * Convert a 2-character country code into its 3-character equivalent, or
418
+ * vice-versa, e.g.
419
+ *
420
+ * 1) given USA, returns US
421
+ * 2) given US, returns USA
422
+ *
423
+ * @since 5.4.3
424
+ *
425
+ * @param string $code ISO-3166-alpha-2 or ISO-3166-alpha-3 country code
426
+ * @return string country code
427
+ */
428
+ public static function convert_alpha_country_code( $code ) {
429
+
430
+ $countries = 3 === strlen( $code ) ? array_flip( self::$alpha3 ) : self::$alpha3;
431
+
432
+ return isset( $countries[ $code ] ) ? $countries[ $code ] : $code;
433
+ }
434
+
435
+
436
+ /**
437
+ * Converts an ISO 3166-alpha2 country code to an ISO 3166-alpha3 country code.
438
+ *
439
+ * @since 5.4.3
440
+ *
441
+ * @param string $alpha2_code ISO 3166-alpha2 country code
442
+ * @return string ISO 3166-alpha3 country code
443
+ */
444
+ public static function alpha2_to_alpha3( $alpha2_code ) {
445
+
446
+ return isset( self::$alpha3[ $alpha2_code ] ) ? self::$alpha3[ $alpha2_code ] : '';
447
+ }
448
+
449
+
450
+ /**
451
+ * Converts an ISO 3166-alpha2 country code to an ISO 3166-numeric country code.
452
+ *
453
+ * @since 5.4.3
454
+ *
455
+ * @param string $alpha2_code ISO 3166-alpha2 country code
456
+ * @return string ISO 3166-numeric country code
457
+ */
458
+ public static function alpha2_to_numeric( $alpha2_code ) {
459
+
460
+ return isset( self::$numeric[ $alpha2_code ] ) ? self::$numeric[ $alpha2_code ] : '';
461
+ }
462
+
463
+
464
+ /**
465
+ * Converts an ISO 3166-alpha2 country code to a calling code.
466
+ *
467
+ * This conversion is available in WC 3.6+ so we'll call out to that when available.
468
+ *
469
+ * @since 5.4.3
470
+ *
471
+ * @param string $alpha2_code ISO 3166-alpha2 country code
472
+ * @return string calling code
473
+ */
474
+ public static function alpha2_to_calling_code( $alpha2_code ) {
475
+
476
+ // check not only for the right version, but if the helper is loaded & available
477
+ if ( SV_WC_Plugin_Compatibility::is_wc_version_gte( '3.6.0' ) && WC() && isset( WC()->countries ) && is_callable( [ WC()->countries, 'get_country_calling_code' ] ) ) {
478
+
479
+ $calling_code = WC()->countries->get_country_calling_code( $alpha2_code );
480
+
481
+ } else {
482
+
483
+ $calling_code = isset( self::$calling_codes[ $alpha2_code ] ) ? self::$calling_codes[ $alpha2_code ] : '';
484
+
485
+ // we can't really know _which_ code is to be used, so use the first
486
+ $calling_code = is_array( $calling_code ) ? $calling_code[0] : $calling_code;
487
+ }
488
+
489
+ return $calling_code;
490
+ }
491
+
492
+
493
+ /**
494
+ * Converts an ISO 3166-alpha3 country code to an ISO 3166-alpha2 country code.
495
+ *
496
+ * @since 5.4.3
497
+ *
498
+ * @param string $alpha3_code ISO 3166-alpha3 country code
499
+ * @return string ISO 3166-alpha2 country code
500
+ */
501
+ public static function alpha3_to_alpha2( $alpha3_code ) {
502
+
503
+ $countries = array_flip( self::$alpha3 );
504
+
505
+ return isset( $countries[ $alpha3_code ] ) ? $countries[ $alpha3_code ] : '';
506
+ }
507
+
508
+
509
+ /**
510
+ * Converts an ISO 3166-alpha3 country code to an ISO 3166-numeric country code.
511
+ *
512
+ * @since 5.4.3
513
+ *
514
+ * @param string $alpha3_code ISO 3166-alpha3 country code
515
+ * @return string ISO 3166-numeric country code
516
+ */
517
+ public static function alpha3_to_numeric( $alpha3_code ) {
518
+ return self::alpha2_to_numeric( self::alpha3_to_alpha2( $alpha3_code ) );
519
+ }
520
+
521
+
522
+ /**
523
+ * Converts an ISO 3166-alpha3 country code to a calling code.
524
+ *
525
+ * @since 5.4.3
526
+ *
527
+ * @param string $alpha3_code ISO 3166-alpha3 country code
528
+ * @return string calling code
529
+ */
530
+ public static function alpha3_to_calling_code( $alpha3_code ) {
531
+ return self::alpha2_to_calling_code( self::alpha3_to_alpha2( $alpha3_code ) );
532
+ }
533
+
534
+
535
+ /**
536
+ * Converts an ISO 3166-numeric country code to an ISO 3166-alpha2 code.
537
+ *
538
+ * @since 5.4.3
539
+ *
540
+ * @param string $numeric ISO 3166-numeric country code
541
+ * @return string ISO 3166-alpha2 country code
542
+ */
543
+ public static function numeric_to_alpha2( $numeric ) {
544
+
545
+ $codes = array_flip( self::$numeric );
546
+
547
+ return isset( $codes[ $numeric ] ) ? $codes[ $numeric ] : '';
548
+ }
549
+
550
+
551
+ /**
552
+ * Converts an ISO 3166-numeric country code to an ISO 3166-alpha3 code.
553
+ *
554
+ * @since 5.4.3
555
+ *
556
+ * @param string $numeric ISO 3166-numeric country code
557
+ * @return string ISO 3166-alpha3 country code
558
+ */
559
+ public static function numeric_to_alpha3( $numeric ) {
560
+ return self::alpha2_to_alpha3( self::numeric_to_alpha2( $numeric ) );
561
+ }
562
+
563
+
564
+ /**
565
+ * Converts an ISO 3166-numeric country code to a calling code.
566
+ *
567
+ * @since 5.4.3
568
+ *
569
+ * @param string $numeric ISO 3166-numeric country code
570
+ * @return string calling code
571
+ */
572
+ public static function numeric_to_calling_code( $numeric ) {
573
+ return self::alpha2_to_calling_code( self::numeric_to_alpha2( $numeric ) );
574
+ }
575
+
576
+
577
+ /**
578
+ * Converts a country calling code to an ISO 3166-alpha2 code.
579
+ *
580
+ * @since 5.4.3
581
+ *
582
+ * @param string $calling_code country calling code (includes leading '+')
583
+ * @return string ISO 3166-alpha2 code
584
+ */
585
+ public static function calling_code_to_alpha2( $calling_code ) {
586
+
587
+ $flipped_calling_codes = self::get_flipped_calling_codes();
588
+
589
+ return isset( $flipped_calling_codes[ $calling_code ] ) ? $flipped_calling_codes[ $calling_code ] : '';
590
+ }
591
+
592
+
593
+ /**
594
+ * Converts a country calling code to an ISO 3166-alpha3 code.
595
+ *
596
+ * @since 5.4.3
597
+ *
598
+ * @param string $calling_code country calling code (includes leading '+')
599
+ * @return string ISO 3166-alpha3 code
600
+ */
601
+ public static function calling_code_to_alpha3( $calling_code ) {
602
+
603
+ return self::alpha2_to_alpha3( self::calling_code_to_alpha2( $calling_code ) );
604
+ }
605
+
606
+
607
+ /**
608
+ * Converts a country calling code to an ISO 3166-numeric code.
609
+ *
610
+ * @since 5.4.3
611
+ *
612
+ * @param string $calling_code country calling code (includes leading '+')
613
+ * @return string ISO 3166-numeric code
614
+ */
615
+ public static function calling_code_to_numeric( $calling_code ) {
616
+
617
+ return self::alpha2_to_numeric( self::calling_code_to_alpha2( $calling_code ) );
618
+ }
619
+
620
+
621
+ /**
622
+ * Gets the flipped version of the calling codes array.
623
+ *
624
+ * Since array_flip will fail on the calling codes array due to
625
+ * having some arrays as values, this custom function is necessary.
626
+ *
627
+ * @since 5.4.3
628
+ *
629
+ * @return array
630
+ */
631
+ public static function get_flipped_calling_codes() {
632
+
633
+ if ( null === self::$flipped_calling_codes ) {
634
+
635
+ $flipped_calling_codes = [];
636
+
637
+ foreach ( self::$calling_codes as $alpha2 => $calling_code ) {
638
+
639
+ if ( is_array( $calling_code ) ) {
640
+
641
+ foreach ( $calling_code as $sub_code ) {
642
+
643
+ $flipped_calling_codes[ $sub_code ] = $alpha2;
644
+ }
645
+ } else {
646
+
647
+ $flipped_calling_codes[ $calling_code ] = $alpha2;
648
+ }
649
+ }
650
+
651
+ self::$flipped_calling_codes = $flipped_calling_codes;
652
+ }
653
+
654
+ return self::$flipped_calling_codes;
655
+ }
656
+
657
+
658
+ }
659
+
660
+
661
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/Handlers/Script_Handler.php ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Payment Gateway Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Payment-Gateway/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Handlers;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\SV_WC_Helper;
28
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\SV_WC_Plugin_Exception;
29
+
30
+ defined( 'ABSPATH' ) or exit;
31
+
32
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Handlers\\Script_Handler' ) ) :
33
+
34
+
35
+ /**
36
+ * Script Handler Abstract Class
37
+ *
38
+ * Handles initializing the payment registered JavaScripts
39
+ *
40
+ * @since 5.7.0
41
+ */
42
+ abstract class Script_Handler {
43
+
44
+
45
+ /** @var string JS handler base class name, without the FW version */
46
+ protected $js_handler_base_class_name = '';
47
+
48
+
49
+ /**
50
+ * Script_Handler constructor.
51
+ *
52
+ * @since 5.7.0
53
+ */
54
+ public function __construct() {
55
+
56
+ // add the action and filter hooks
57
+ $this->add_hooks();
58
+ }
59
+
60
+
61
+ /**
62
+ * Adds the action and filter hooks.
63
+ *
64
+ * @since 5.7.0
65
+ */
66
+ protected function add_hooks() {
67
+
68
+ add_action( 'wp_ajax_wc_' . $this->get_id() . '_log_script_event', [ $this, 'ajax_log_event' ] );
69
+ add_action( 'wp_ajax_nopriv_wc_' . $this->get_id() . '_log_script_event', [ $this, 'ajax_log_event' ] );
70
+ }
71
+
72
+
73
+ /**
74
+ * Returns the JS handler class name.
75
+ *
76
+ * @since 5.7.0
77
+ *
78
+ * @return string
79
+ */
80
+ protected function get_js_handler_class_name() {
81
+
82
+ return sprintf( '%s_v5_7_1', $this->js_handler_base_class_name );
83
+ }
84
+
85
+
86
+ /**
87
+ * Returns the JS handler object name.
88
+ *
89
+ * @since 5.7.0
90
+ *
91
+ * @return string
92
+ */
93
+ protected function get_js_handler_object_name() {
94
+
95
+ return 'wc_' . $this->get_id() . '_handler';
96
+ }
97
+
98
+
99
+ /**
100
+ * Gets the JS event triggered after the JS handler class is loaded.
101
+ *
102
+ * @since 5.7.0
103
+ *
104
+ * @return string
105
+ */
106
+ protected function get_js_loaded_event() {
107
+
108
+ return sprintf( '%s_loaded', strtolower( $this->get_js_handler_class_name() ) );
109
+ }
110
+
111
+
112
+ /**
113
+ * Gets the handler instantiation JS wrapped in a safe load technique.
114
+ *
115
+ * @since 5.7.0
116
+ *
117
+ * @param array $additional_args additional handler arguments, if any
118
+ * @param string $handler_name handler name, if different from self::get_js_handler_class_name()
119
+ * @param string $object_name object name, if different from self::get_js_handler_object_name()
120
+ * @return string
121
+ */
122
+ protected function get_safe_handler_js( array $additional_args = [], $handler_name = '', $object_name = '' ) {
123
+
124
+ if ( ! $handler_name ) {
125
+ $handler_name = $this->get_js_handler_class_name();
126
+ }
127
+
128
+ $load_function = 'load_' . $this->get_id() . '_handler';
129
+
130
+ ob_start();
131
+
132
+ ?>
133
+ function <?php echo esc_js( $load_function ) ?>() {
134
+ <?php echo $this->get_handler_js( $additional_args, $handler_name, $object_name ); ?>
135
+ }
136
+
137
+ try {
138
+
139
+ if ( 'undefined' !== typeof <?php echo esc_js( $handler_name ); ?> ) {
140
+ <?php echo esc_js( $load_function ); ?>();
141
+ } else {
142
+ window.jQuery( document.body ).on( '<?php echo esc_js( $this->get_js_loaded_event() ); ?>', <?php echo esc_js( $load_function ); ?> );
143
+ }
144
+
145
+ } catch ( err ) {
146
+
147
+ <?php echo $this->get_js_handler_event_debug_log_request(); ?>
148
+ }
149
+ <?php
150
+
151
+ return ob_get_clean();
152
+ }
153
+
154
+
155
+ /**
156
+ * Gets the handler instantiation JS.
157
+ *
158
+ * @since 5.7.0
159
+ *
160
+ * @param array $additional_args additional handler arguments, if any
161
+ * @param string $handler_name handler name, if different from self::get_js_handler_class_name()
162
+ * @param string $object_name object name, if different from self::get_js_handler_object_name()
163
+ * @return string
164
+ */
165
+ protected function get_handler_js( array $additional_args = [], $handler_name = '', $object_name = '' ) {
166
+
167
+ $args = array_merge( $additional_args, $this->get_js_handler_args() );
168
+
169
+ /**
170
+ * Filters the JavaScript handler arguments.
171
+ *
172
+ * @since 5.7.0
173
+ *
174
+ * @param array $args arguments to pass to the JS handler
175
+ * @param Script_Handler $handler script handler instance
176
+ */
177
+ $args = apply_filters( 'wc_' . $this->get_id() . '_js_args', $args, $this );
178
+
179
+ if ( ! $handler_name ) {
180
+ $handler_name = $this->get_js_handler_class_name();
181
+ }
182
+
183
+ if ( ! $object_name ) {
184
+ $object_name = $this->get_js_handler_object_name();
185
+ }
186
+
187
+ return sprintf( 'window.%1$s = new %2$s( %3$s );', esc_js( $object_name ), esc_js( $handler_name ), json_encode( $args ) );
188
+ }
189
+
190
+
191
+ /**
192
+ * Gets the JS handler arguments.
193
+ *
194
+ * @since 5.7.0
195
+ *
196
+ * @return array
197
+ */
198
+ protected function get_js_handler_args() {
199
+
200
+ return [];
201
+ }
202
+
203
+
204
+ /**
205
+ * Gets inline JavaScript code to issue an AJAX request to log a script error event.
206
+ *
207
+ * @since 5.7.0
208
+ *
209
+ * @return string
210
+ */
211
+ protected function get_js_handler_event_debug_log_request() {
212
+
213
+ ob_start();
214
+
215
+ ?>
216
+
217
+ var errorName = '',
218
+ errorMessage = '';
219
+
220
+ if ( 'undefined' === typeof err || 0 === err.length || ! err ) {
221
+ errorName = '<?php echo esc_js( 'A script error has occurred.' ); ?>';
222
+ errorMessage = '<?php echo esc_js( sprintf( 'The script %s could not be loaded.', $this->get_js_handler_class_name() ) ); ?>';
223
+ } else {
224
+ errorName = 'undefined' !== typeof err.name ? err.name : '';
225
+ errorMessage = 'undefined' !== typeof err.message ? err.message : '';
226
+ }
227
+
228
+ <?php if ( $this->is_logging_enabled() ) : ?>
229
+
230
+ console.log( [ errorName, errorMessage ].filter( Boolean ).join( ' ' ) );
231
+
232
+ <?php endif; ?>
233
+
234
+ jQuery.post( '<?php echo esc_js( admin_url( 'admin-ajax.php' ) ) ; ?>', {
235
+ action: '<?php echo esc_js( 'wc_' . $this->get_id() . '_log_script_event' ); ?>',
236
+ security: '<?php echo esc_js( wp_create_nonce( 'wc-' . $this->get_id_dasherized() . '-log-script-event' ) ); ?>',
237
+ name: errorName,
238
+ message: errorMessage,
239
+ } );
240
+
241
+ <?php
242
+
243
+ return ob_get_clean();
244
+ }
245
+
246
+
247
+ /**
248
+ * Logs an event via AJAX.
249
+ *
250
+ * @internal
251
+ *
252
+ * @since 5.7.0
253
+ */
254
+ public function ajax_log_event() {
255
+
256
+ // silently bail if nothing should be logged
257
+ if ( ! $this->is_logging_enabled() ) {
258
+ return;
259
+ }
260
+
261
+ try {
262
+
263
+ if ( ! wp_verify_nonce( SV_WC_Helper::get_posted_value( 'security' ), 'wc-' . $this->get_id_dasherized() . '-log-script-event' ) ) {
264
+ throw new SV_WC_Plugin_Exception( 'Invalid nonce.' );
265
+ }
266
+
267
+ $name = isset( $_POST['name'] ) && is_string( $_POST['name'] ) ? trim( $_POST['name'] ) : '';
268
+ $message = isset( $_POST['message'] ) && is_string( $_POST['message'] ) ? trim( $_POST['message'] ) : '';
269
+
270
+ if ( ! $message ) {
271
+ throw new SV_WC_Plugin_Exception( 'A message is required.' );
272
+ }
273
+
274
+ if ( $name ) {
275
+ $message = "{$name} {$message}";
276
+ }
277
+
278
+ $this->log_event( $message );
279
+
280
+ wp_send_json_success();
281
+
282
+ } catch ( SV_WC_Plugin_Exception $exception ) {
283
+
284
+ wp_send_json_error( $exception->getMessage() );
285
+ }
286
+ }
287
+
288
+
289
+ /**
290
+ * Adds a log entry.
291
+ *
292
+ * @since 5.7.0
293
+ *
294
+ * @param string $message message to log
295
+ */
296
+ abstract protected function log_event( $message );
297
+
298
+
299
+ /** Conditional methods *******************************************************************************************/
300
+
301
+
302
+ /**
303
+ * Determines whether logging is enabled.
304
+ *
305
+ * @since 5.7.0
306
+ *
307
+ * @return bool
308
+ */
309
+ protected function is_logging_enabled() {
310
+
311
+ return false;
312
+ }
313
+
314
+
315
+ /** Getter methods ************************************************************************************************/
316
+
317
+
318
+ /**
319
+ * Gets the ID of this script handler.
320
+ *
321
+ * @since 5.7.0
322
+ *
323
+ * @return string
324
+ */
325
+ abstract public function get_id();
326
+
327
+
328
+ /**
329
+ * Gets the ID, but dasherized.
330
+ *
331
+ * @since 5.7.0
332
+ *
333
+ * @return string
334
+ */
335
+ public function get_id_dasherized() {
336
+
337
+ return str_replace( '_', '-', $this->get_id() );
338
+ }
339
+
340
+
341
+ }
342
+
343
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/Lifecycle.php RENAMED
@@ -18,15 +18,21 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework\Plugin;
 
 
 
 
 
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Plugin\\Lifecycle' ) ) :
 
30
 
31
  /**
32
  * Plugin lifecycle handler.
@@ -39,10 +45,13 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Plugin\\Lifecycle' ) ) :
39
  class Lifecycle {
40
 
41
 
 
 
 
42
  /** @var string minimum milestone version */
43
  private $milestone_version;
44
 
45
- /** @var \WC_Braintree\Plugin_Framework\SV_WC_Plugin plugin instance */
46
  private $plugin;
47
 
48
 
@@ -51,9 +60,9 @@ class Lifecycle {
51
  *
52
  * @since 5.1.0
53
  *
54
- * @param \WC_Braintree\Plugin_Framework\SV_WC_Plugin $plugin plugin instance
55
  */
56
- public function __construct( \WC_Braintree\Plugin_Framework\SV_WC_Plugin $plugin ) {
57
 
58
  $this->plugin = $plugin;
59
 
@@ -108,6 +117,9 @@ class Lifecycle {
108
 
109
  $this->install();
110
 
 
 
 
111
  /**
112
  * Fires after the plugin has been installed.
113
  *
@@ -119,6 +131,9 @@ class Lifecycle {
119
 
120
  $this->upgrade( $installed_version );
121
 
 
 
 
122
  // if the plugin never had any previous milestones, consider them all reached so their notices aren't displayed
123
  if ( ! $this->get_milestone_version() ) {
124
  $this->set_milestone_version( $plugin_version );
@@ -180,6 +195,20 @@ class Lifecycle {
180
  */
181
  public function handle_deactivation() {
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  $this->deactivate();
184
 
185
  /**
@@ -234,8 +263,7 @@ class Lifecycle {
234
 
235
  foreach ( $settings as $setting ) {
236
 
237
- if ( isset( $setting['id'] ) && isset( $setting['default'] ) ) {
238
-
239
  update_option( $setting['id'], $setting['default'] );
240
  }
241
  }
@@ -262,7 +290,19 @@ class Lifecycle {
262
  */
263
  protected function upgrade( $installed_version ) {
264
 
265
- // stub
 
 
 
 
 
 
 
 
 
 
 
 
266
  }
267
 
268
 
@@ -351,18 +391,18 @@ class Lifecycle {
351
 
352
  // to be prepended at random to each milestone notice
353
  $exclamations = array(
354
- __( 'Awesome', 'woocommerce-gateway-paypal-powered-by-braintree' ),
355
- __( 'Fantastic', 'woocommerce-gateway-paypal-powered-by-braintree' ),
356
- __( 'Cowabunga', 'woocommerce-gateway-paypal-powered-by-braintree' ),
357
- __( 'Congratulations', 'woocommerce-gateway-paypal-powered-by-braintree' ),
358
- __( 'Hot dog', 'woocommerce-gateway-paypal-powered-by-braintree' ),
359
  );
360
 
361
  $message = $exclamations[ array_rand( $exclamations ) ] . ', ' . esc_html( $custom_message ) . ' ';
362
 
363
  $message .= sprintf(
364
  /* translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag, %4$s - <a> tag, %5$s - </a> tag */
365
- __( 'Are you having a great experience with %1$s so far? Please consider %2$sleaving a review%3$s! If things aren\'t going quite as expected, we\'re happy to help -- please %4$sreach out to our support team%5$s.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
366
  '<strong>' . esc_html( $this->get_plugin()->get_plugin_name() ) . '</strong>',
367
  '<a href="' . esc_url( $this->get_plugin()->get_reviews_url() ) . '">', '</a>',
368
  '<a href="' . esc_url( $this->get_plugin()->get_support_url() ) . '">', '</a>'
@@ -402,6 +442,138 @@ class Lifecycle {
402
  }
403
 
404
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
405
  /** Utility Methods *******************************************************/
406
 
407
 
@@ -482,7 +654,7 @@ class Lifecycle {
482
  *
483
  * @since 5.1.0
484
  *
485
- * @return \WC_Braintree\Plugin_Framework\SV_WC_Plugin
486
  */
487
  protected function get_plugin() {
488
 
@@ -502,10 +674,11 @@ class Lifecycle {
502
  */
503
  public function do_update() {
504
 
505
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0' );
506
  }
507
 
508
 
509
  }
510
 
 
511
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Plugin;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\Admin\Notes_Helper;
28
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\SV_WC_Payment_Gateway_Plugin;
29
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\SV_WC_Plugin;
30
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1\SV_WC_Plugin_Compatibility;
31
 
32
  defined( 'ABSPATH' ) or exit;
33
 
34
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Plugin\\Lifecycle' ) ) :
35
+
36
 
37
  /**
38
  * Plugin lifecycle handler.
45
  class Lifecycle {
46
 
47
 
48
+ /** @var array the version numbers that have an upgrade routine */
49
+ protected $upgrade_versions = [];
50
+
51
  /** @var string minimum milestone version */
52
  private $milestone_version;
53
 
54
+ /** @var SV_WC_Plugin plugin instance */
55
  private $plugin;
56
 
57
 
60
  *
61
  * @since 5.1.0
62
  *
63
+ * @param SV_WC_Plugin $plugin plugin instance
64
  */
65
+ public function __construct( SV_WC_Plugin $plugin ) {
66
 
67
  $this->plugin = $plugin;
68
 
117
 
118
  $this->install();
119
 
120
+ // store the upgrade event regardless if there was a routine for it
121
+ $this->store_event( 'install' );
122
+
123
  /**
124
  * Fires after the plugin has been installed.
125
  *
131
 
132
  $this->upgrade( $installed_version );
133
 
134
+ // store the upgrade event regardless if there was a routine for it
135
+ $this->add_upgrade_event( $installed_version );
136
+
137
  // if the plugin never had any previous milestones, consider them all reached so their notices aren't displayed
138
  if ( ! $this->get_milestone_version() ) {
139
  $this->set_milestone_version( $plugin_version );
195
  */
196
  public function handle_deactivation() {
197
 
198
+ // if the enhanced admin is available, delete all of this plugin's notes on deactivation
199
+ if ( SV_WC_Plugin_Compatibility::is_enhanced_admin_available() ) {
200
+
201
+ Notes_Helper::delete_notes_with_source( $this->get_plugin()->get_id_dasherized() );
202
+
203
+ // if this is a gateway plugin, also delete the plugin's individual gateway notes
204
+ if ( $this->get_plugin() instanceof SV_WC_Payment_Gateway_Plugin ) {
205
+
206
+ foreach ( $this->get_plugin()->get_gateways() as $gateway ) {
207
+ Notes_Helper::delete_notes_with_source( $gateway->get_id_dasherized() );
208
+ }
209
+ }
210
+ }
211
+
212
  $this->deactivate();
213
 
214
  /**
263
 
264
  foreach ( $settings as $setting ) {
265
 
266
+ if ( isset( $setting['id'], $setting['default'] ) ) {
 
267
  update_option( $setting['id'], $setting['default'] );
268
  }
269
  }
290
  */
291
  protected function upgrade( $installed_version ) {
292
 
293
+ foreach ( $this->upgrade_versions as $upgrade_version ) {
294
+
295
+ $upgrade_method = 'upgrade_to_' . str_replace( array( '.', '-' ), '_', $upgrade_version );
296
+
297
+ if ( version_compare( $installed_version, $upgrade_version, '<' ) && is_callable( array( $this, $upgrade_method ) ) ) {
298
+
299
+ $this->get_plugin()->log( "Starting upgrade to v{$upgrade_version}" );
300
+
301
+ $this->$upgrade_method( $installed_version );
302
+
303
+ $this->get_plugin()->log( "Upgrade to v{$upgrade_version} complete" );
304
+ }
305
+ }
306
  }
307
 
308
 
391
 
392
  // to be prepended at random to each milestone notice
393
  $exclamations = array(
394
+ __( 'Awesome', 'woocommerce-plugin-framework' ),
395
+ __( 'Fantastic', 'woocommerce-plugin-framework' ),
396
+ __( 'Cowabunga', 'woocommerce-plugin-framework' ),
397
+ __( 'Congratulations', 'woocommerce-plugin-framework' ),
398
+ __( 'Hot dog', 'woocommerce-plugin-framework' ),
399
  );
400
 
401
  $message = $exclamations[ array_rand( $exclamations ) ] . ', ' . esc_html( $custom_message ) . ' ';
402
 
403
  $message .= sprintf(
404
  /* translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag, %4$s - <a> tag, %5$s - </a> tag */
405
+ __( 'Are you having a great experience with %1$s so far? Please consider %2$sleaving a review%3$s! If things aren\'t going quite as expected, we\'re happy to help -- please %4$sreach out to our support team%5$s.', 'woocommerce-plugin-framework' ),
406
  '<strong>' . esc_html( $this->get_plugin()->get_plugin_name() ) . '</strong>',
407
  '<a href="' . esc_url( $this->get_plugin()->get_reviews_url() ) . '">', '</a>',
408
  '<a href="' . esc_url( $this->get_plugin()->get_support_url() ) . '">', '</a>'
442
  }
443
 
444
 
445
+ /** Event history methods *****************************************************************************************/
446
+
447
+
448
+ /**
449
+ * Adds an upgrade lifecycle event.
450
+ *
451
+ * @since 5.4.0
452
+ *
453
+ * @param string $from_version version upgrading from
454
+ * @param array $data extra data to add
455
+ * @return false|int
456
+ */
457
+ public function add_upgrade_event( $from_version, array $data = array() ) {
458
+
459
+ $data = array_merge( array(
460
+ 'from_version' => $from_version,
461
+ ), $data );
462
+
463
+ return $this->store_event( 'upgrade', $data );
464
+ }
465
+
466
+
467
+ /**
468
+ * Adds a migration lifecycle event.
469
+ *
470
+ * @since 5.4.0
471
+ *
472
+ * @param string $from_plugin plugin migrating from
473
+ * @param string $from_version version migrating from
474
+ * @param array $data extra data to add
475
+ * @return false|int
476
+ */
477
+ public function add_migrate_event( $from_plugin, $from_version = '', array $data = array() ) {
478
+
479
+ $data = array_merge( array(
480
+ 'from_plugin' => $from_plugin,
481
+ 'from_version' => $from_version,
482
+ ), $data );
483
+
484
+ return $this->store_event( 'migrate', $data );
485
+ }
486
+
487
+
488
+ /**
489
+ * Stores a lifecycle event.
490
+ *
491
+ * This can be used to log installs, upgrades, etc...
492
+ *
493
+ * Uses a direct database query to avoid cache issues.
494
+ *
495
+ * @since 5.4.0
496
+ *
497
+ * @param string $name lifecycle event name
498
+ * @param array $data any extra data to store
499
+ * @return false|int
500
+ */
501
+ public function store_event( $name, array $data = array() ) {
502
+ global $wpdb;
503
+
504
+ $history = $this->get_event_history();
505
+
506
+ $event = array(
507
+ 'name' => wc_clean( $name ),
508
+ 'time' => (int) current_time( 'timestamp' ),
509
+ 'version' => wc_clean( $this->get_plugin()->get_version() ),
510
+ );
511
+
512
+ if ( ! empty( $data ) ) {
513
+ $event['data'] = wc_clean( $data );
514
+ }
515
+
516
+ array_unshift( $history, $event );
517
+
518
+ // limit to the last 30 events
519
+ $history = array_slice( $history, 0, 29 );
520
+
521
+ return $wpdb->replace(
522
+ $wpdb->options,
523
+ array(
524
+ 'option_name' => $this->get_event_history_option_name(),
525
+ 'option_value' => json_encode( $history ),
526
+ 'autoload' => 'no',
527
+ ),
528
+ array(
529
+ '%s',
530
+ '%s',
531
+ )
532
+ );
533
+ }
534
+
535
+
536
+ /**
537
+ * Gets the lifecycle event history.
538
+ *
539
+ * The last 30 events are stored, with the latest first.
540
+ *
541
+ * @since 5.4.0
542
+ *
543
+ * @return array
544
+ */
545
+ public function get_event_history() {
546
+ global $wpdb;
547
+
548
+ $history = array();
549
+
550
+ $results = $wpdb->get_var( $wpdb->prepare( "
551
+ SELECT option_value
552
+ FROM {$wpdb->options}
553
+ WHERE option_name = %s
554
+ ", $this->get_event_history_option_name() ) );
555
+
556
+ if ( $results ) {
557
+ $history = json_decode( $results, true );
558
+ }
559
+
560
+ return is_array( $history ) ? $history : array();
561
+ }
562
+
563
+
564
+ /**
565
+ * Gets the event history option name.
566
+ *
567
+ * @since 5.4.0
568
+ *
569
+ * @return string
570
+ */
571
+ protected function get_event_history_option_name() {
572
+
573
+ return 'wc_' . $this->get_plugin()->get_id() . '_lifecycle_events';
574
+ }
575
+
576
+
577
  /** Utility Methods *******************************************************/
578
 
579
 
654
  *
655
  * @since 5.1.0
656
  *
657
+ * @return SV_WC_Plugin|SV_WC_Payment_Gateway_Plugin
658
  */
659
  protected function get_plugin() {
660
 
674
  */
675
  public function do_update() {
676
 
677
+ wc_deprecated_function( __METHOD__, '5.2.0' );
678
  }
679
 
680
 
681
  }
682
 
683
+
684
  endif;
vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Abstract_Settings.php ADDED
@@ -0,0 +1,536 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Settings_API;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
+
29
+ defined( 'ABSPATH' ) or exit;
30
+
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Settings_API\\Abstract_Settings' ) ) :
32
+
33
+ /**
34
+ * The base settings handler.
35
+ *
36
+ * @since 5.7.0
37
+ */
38
+ abstract class Abstract_Settings {
39
+
40
+
41
+ /** @var string settings ID */
42
+ public $id;
43
+
44
+ /** @var Setting[] registered settings */
45
+ protected $settings = [];
46
+
47
+
48
+ /**
49
+ * Constructs the class.
50
+ *
51
+ * @since 5.7.0
52
+ *
53
+ * @param string $id the ID of plugin or payment gateway that owns these settings
54
+ */
55
+ public function __construct( $id ) {
56
+
57
+ $this->id = $id;
58
+
59
+ $this->register_settings();
60
+ $this->load_settings();
61
+ }
62
+
63
+
64
+ /**
65
+ * Registers the settings.
66
+ *
67
+ * Plugins or payment gateways should overwrite this method to register their settings.
68
+ *
69
+ * @since 5.7.0
70
+ */
71
+ abstract protected function register_settings();
72
+
73
+
74
+ /**
75
+ * Loads the values for all registered settings.
76
+ *
77
+ * @since 5.7.0
78
+ */
79
+ protected function load_settings() {
80
+
81
+ foreach ( $this->settings as $setting_id => $setting ) {
82
+
83
+ $value = get_option( $this->get_option_name_prefix() . '_' . $setting_id, null );
84
+ $value = $this->get_value_from_database( $value, $setting );
85
+
86
+ $this->settings[ $setting_id ]->set_value( $value );
87
+ }
88
+ }
89
+
90
+
91
+ /**
92
+ * Registers a setting.
93
+ *
94
+ * @param string $id unique setting ID
95
+ * @param string $type setting type
96
+ * @param array $args setting arguments
97
+ * @return bool
98
+ */
99
+ public function register_setting( $id, $type, array $args = [] ) {
100
+
101
+ try {
102
+
103
+ if ( ! empty( $this->settings[ $id ] ) ) {
104
+ throw new Framework\SV_WC_Plugin_Exception( "Setting {$id} is already registered" );
105
+ }
106
+
107
+ if ( ! in_array( $type, $this->get_setting_types(), true ) ) {
108
+ throw new Framework\SV_WC_Plugin_Exception( "{$type} is not a valid setting type" );
109
+ }
110
+
111
+ $setting = new Setting();
112
+
113
+ $setting->set_id( $id );
114
+ $setting->set_type( $type );
115
+
116
+ $args = wp_parse_args( $args, [
117
+ 'name' => '',
118
+ 'description' => '',
119
+ 'is_multi' => false,
120
+ 'options' => [],
121
+ 'default' => null,
122
+ ] );
123
+
124
+ $setting->set_name( $args['name'] );
125
+ $setting->set_description( $args['description'] );
126
+ $setting->set_default( $args['default'] );
127
+ $setting->set_is_multi( $args['is_multi'] );
128
+
129
+ if ( is_array( $args['options'] ) ) {
130
+ $setting->set_options( $args['options'] );
131
+ }
132
+
133
+ $this->settings[ $id ] = $setting;
134
+
135
+ return true;
136
+
137
+ } catch ( \Exception $exception ) {
138
+
139
+ wc_doing_it_wrong( __METHOD__, 'Could not register setting: ' . $exception->getMessage(), '5.7.0' );
140
+
141
+ return false;
142
+ }
143
+ }
144
+
145
+
146
+ /**
147
+ * Unregisters a setting.
148
+ *
149
+ * @since 5.7.0
150
+ *
151
+ * @param string $id setting ID to unregister
152
+ */
153
+ public function unregister_setting( $id ) {
154
+
155
+ unset( $this->settings[ $id ] );
156
+ }
157
+
158
+
159
+ /**
160
+ * Registers a control for a setting.
161
+ *
162
+ * @since 5.7.0
163
+ *
164
+ * @param string $setting_id the setting ID
165
+ * @param string $type the control type
166
+ * @param array $args optional args for the control
167
+ * @return bool
168
+ */
169
+ public function register_control( $setting_id, $type, array $args = [] ) {
170
+
171
+ try {
172
+
173
+ if ( ! in_array( $type, $this->get_control_types(), true ) ) {
174
+ throw new \UnexpectedValueException( "{$type} is not a valid control type" );
175
+ }
176
+
177
+ $setting = $this->get_setting( $setting_id );
178
+
179
+ if ( ! $setting ) {
180
+ throw new \InvalidArgumentException( "Setting {$setting_id} does not exist" );
181
+ }
182
+
183
+ $setting_control_types = $this->get_setting_control_types( $setting );
184
+ if ( ! empty( $setting_control_types ) && ! in_array( $type, $setting_control_types, true ) ) {
185
+ throw new \UnexpectedValueException( "{$type} is not a valid control type for setting {$setting->get_id()} of type {$setting->get_type()}" );
186
+ }
187
+
188
+ $args = wp_parse_args( $args, [
189
+ 'name' => $setting->get_name(),
190
+ 'description' => $setting->get_description(),
191
+ 'options' => [],
192
+ ] );
193
+
194
+ $control = new Control();
195
+
196
+ $control->set_setting_id( $setting_id );
197
+ $control->set_type( $type );
198
+ $control->set_name( $args['name'] );
199
+ $control->set_description( $args['description'] );
200
+
201
+ if ( is_array( $args['options'] ) ) {
202
+ $control->set_options( $args['options'], $setting->get_options() );
203
+ }
204
+
205
+ $setting->set_control( $control );
206
+
207
+ return true;
208
+
209
+ } catch ( \Exception $exception ) {
210
+
211
+ wc_doing_it_wrong( __METHOD__, 'Could not register setting control: ' . $exception->getMessage(), '5.7.0' );
212
+
213
+ return false;
214
+ }
215
+ }
216
+
217
+
218
+ /**
219
+ * Gets the settings ID.
220
+ *
221
+ * @since 5.7.0
222
+ *
223
+ * @return string
224
+ */
225
+ public function get_id() {
226
+
227
+ return $this->id;
228
+ }
229
+
230
+
231
+ /**
232
+ * Gets registered settings.
233
+ *
234
+ * It returns all settings by default, but you can pass an array of IDs to filter the results.
235
+ *
236
+ * @param string[] $ids setting IDs to get
237
+ * @return Setting[]
238
+ */
239
+ public function get_settings( array $ids = [] ) {
240
+
241
+ $settings = $this->settings;
242
+
243
+ if ( ! empty( $ids ) ) {
244
+
245
+ foreach ( array_keys( $this->settings ) as $id ) {
246
+
247
+ if ( ! in_array( $id, $ids, true ) ) {
248
+ unset( $settings[ $id ] );
249
+ }
250
+ }
251
+ }
252
+
253
+ return $settings;
254
+ }
255
+
256
+
257
+ /**
258
+ * Gets a setting object.
259
+ *
260
+ * @since 5.7.0
261
+ *
262
+ * @param string $id setting ID to get
263
+ * @return Setting|null
264
+ */
265
+ public function get_setting( $id ) {
266
+
267
+ return ! empty( $this->settings[ $id ] ) ? $this->settings[ $id ] : null;
268
+ }
269
+
270
+
271
+ /**
272
+ * Gets the stored value for a setting.
273
+ *
274
+ * Optionally, will return the setting's default value if nothing is stored.
275
+ *
276
+ * @since 5.7.0
277
+ *
278
+ * @param string $setting_id setting ID
279
+ * @param bool $with_default whether to return the default value if nothing is stored
280
+ * @return array|bool|float|int|string
281
+ * @throws Framework\SV_WC_Plugin_Exception
282
+ */
283
+ public function get_value( $setting_id, $with_default = true ) {
284
+
285
+ $setting = $this->get_setting( $setting_id );
286
+
287
+ if ( ! $setting ) {
288
+ throw new Framework\SV_WC_Plugin_Exception( "Setting {$setting_id} does not exist" );
289
+ }
290
+
291
+ $value = $setting->get_value();
292
+
293
+ if ( $with_default && null === $value ) {
294
+ $value = $setting->get_default();
295
+ }
296
+
297
+ return $value;
298
+ }
299
+
300
+
301
+ /**
302
+ * Updates the stored value for a setting.
303
+ *
304
+ * @since 5.7.0
305
+ *
306
+ * @param string $setting_id setting ID
307
+ * @param array|bool|float|int|string $value
308
+ * @throws Framework\SV_WC_Plugin_Exception
309
+ */
310
+ public function update_value( $setting_id, $value ) {
311
+
312
+ $setting = $this->get_setting( $setting_id );
313
+
314
+ if ( ! $setting ) {
315
+ throw new Framework\SV_WC_Plugin_Exception( "Setting {$setting_id} does not exist", 404 );
316
+ }
317
+
318
+ // performs the validations and updates the value
319
+ $setting->update_value( $value );
320
+
321
+ $this->save( $setting_id );
322
+ }
323
+
324
+
325
+ /**
326
+ * Deletes the stored value for a setting.
327
+ *
328
+ * @since 5.7.0
329
+ *
330
+ * @param string $setting_id setting ID
331
+ * @return bool
332
+ * @throws Framework\SV_WC_Plugin_Exception
333
+ */
334
+ public function delete_value( $setting_id ) {
335
+
336
+ $setting = $this->get_setting( $setting_id );
337
+
338
+ if ( ! $setting ) {
339
+ throw new Framework\SV_WC_Plugin_Exception( "Setting {$setting_id} does not exist" );
340
+ }
341
+
342
+ $setting->set_value( null );
343
+
344
+ return delete_option( "{$this->get_option_name_prefix()}_{$setting->get_id()}" );
345
+ }
346
+
347
+
348
+ /**
349
+ * Saves registered settings in their current state.
350
+ *
351
+ * It saves all settings by default, but you can pass a setting ID to save a specific setting.
352
+ *
353
+ * @since 5.7.0
354
+ *
355
+ * @param string $setting_id setting ID
356
+ */
357
+ public function save( $setting_id = '' ) {
358
+
359
+ if ( ! empty( $setting_id ) ) {
360
+ $settings = [ $this->get_setting( $setting_id ) ];
361
+ } else {
362
+ $settings = $this->settings;
363
+ }
364
+
365
+ $settings = array_filter( $settings );
366
+
367
+ foreach ( $settings as $setting ) {
368
+
369
+ $option_name = "{$this->get_option_name_prefix()}_{$setting->get_id()}";
370
+ $setting_value = $setting->get_value();
371
+
372
+ if ( null === $setting_value ) {
373
+
374
+ delete_option( $option_name );
375
+
376
+ } else {
377
+
378
+ update_option( $option_name, $this->get_value_for_database( $setting ) );
379
+ }
380
+ }
381
+ }
382
+
383
+
384
+ /**
385
+ * Converts the value of a setting to be stored in an option.
386
+ *
387
+ * @since 5.7.0
388
+ *
389
+ * @param Setting $setting
390
+ * @return mixed
391
+ */
392
+ protected function get_value_for_database( Setting $setting ) {
393
+
394
+ $value = $setting->get_value();
395
+
396
+ if ( null !== $value && Setting::TYPE_BOOLEAN === $setting->get_type() ) {
397
+ $value = wc_bool_to_string( $value );
398
+ }
399
+
400
+ return $value;
401
+ }
402
+
403
+
404
+ /**
405
+ * Converts the stored value of a setting to the proper setting type.
406
+ *
407
+ * @since 5.7.0
408
+ *
409
+ * @param mixed $value the value stored in an option
410
+ * @param Setting $setting
411
+ * @return mixed
412
+ */
413
+ protected function get_value_from_database( $value, Setting $setting ) {
414
+
415
+ if ( null !== $value ) {
416
+
417
+ switch ( $setting->get_type() ) {
418
+
419
+ case Setting::TYPE_BOOLEAN:
420
+ $value = wc_string_to_bool( $value );
421
+ break;
422
+
423
+ case Setting::TYPE_INTEGER:
424
+ $value = is_numeric( $value ) ? (int) $value : null;
425
+ break;
426
+
427
+ case Setting::TYPE_FLOAT:
428
+ $value = is_numeric( $value ) ? (float) $value : null;
429
+ break;
430
+ }
431
+ }
432
+
433
+ return $value;
434
+ }
435
+
436
+
437
+ /**
438
+ * Gets the list of valid setting types.
439
+ *
440
+ * @since 5.7.0
441
+ *
442
+ * @return string[]
443
+ */
444
+ public function get_setting_types() {
445
+
446
+ $setting_types = [
447
+ Setting::TYPE_STRING,
448
+ Setting::TYPE_URL,
449
+ Setting::TYPE_EMAIL,
450
+ Setting::TYPE_INTEGER,
451
+ Setting::TYPE_FLOAT,
452
+ Setting::TYPE_BOOLEAN,
453
+ ];
454
+
455
+ /**
456
+ * Filters the list of valid setting types.
457
+ *
458
+ * @param string[] $setting_types valid setting types
459
+ * @param Abstract_Settings $settings the settings handler instance
460
+ */
461
+ return apply_filters( "wc_{$this->get_id()}_settings_api_setting_types", $setting_types, $this );
462
+ }
463
+
464
+
465
+ /**
466
+ * Gets the list of valid control types.
467
+ *
468
+ * @since 5.7.0
469
+ *
470
+ * @return string[]
471
+ */
472
+ public function get_control_types() {
473
+
474
+ $control_types = [
475
+ Control::TYPE_TEXT,
476
+ Control::TYPE_TEXTAREA,
477
+ Control::TYPE_NUMBER,
478
+ Control::TYPE_EMAIL,
479
+ Control::TYPE_PASSWORD,
480
+ Control::TYPE_DATE,
481
+ Control::TYPE_CHECKBOX,
482
+ Control::TYPE_RADIO,
483
+ Control::TYPE_SELECT,
484
+ Control::TYPE_FILE,
485
+ Control::TYPE_COLOR,
486
+ Control::TYPE_RANGE,
487
+ ];
488
+
489
+ /**
490
+ * Filters the list of valid control types.
491
+ *
492
+ * @param string[] $control_types valid control types
493
+ * @param Abstract_Settings $settings the settings handler instance
494
+ */
495
+ return apply_filters( "wc_{$this->get_id()}_settings_api_control_types", $control_types, $this );
496
+ }
497
+
498
+
499
+ /**
500
+ * Returns the valid control types for a setting.
501
+ *
502
+ * @since 5.7.0
503
+ *
504
+ * @param Setting $setting setting object
505
+ * @return string[]
506
+ */
507
+ public function get_setting_control_types( $setting ) {
508
+
509
+ /**
510
+ * Filters the list of valid control types for a setting.
511
+ *
512
+ * @param string[] $control_types valid control types
513
+ * @param string $setting_type setting type
514
+ * @param Setting $setting setting object
515
+ * @param Abstract_Settings $settings the settings handler instance
516
+ */
517
+ return apply_filters( "wc_{$this->get_id()}_settings_api_setting_control_types", [], $setting->get_type(), $setting, $this );
518
+ }
519
+
520
+
521
+ /**
522
+ * Gets the prefix for db option names.
523
+ *
524
+ * @since 5.7.0
525
+ *
526
+ * @return string
527
+ */
528
+ public function get_option_name_prefix() {
529
+
530
+ return "wc_{$this->id}";
531
+ }
532
+
533
+
534
+ }
535
+
536
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Control.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Settings_API;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
+
29
+ defined( 'ABSPATH' ) or exit;
30
+
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Settings_API\\Control' ) ) :
32
+
33
+ /**
34
+ * The base control object.
35
+ *
36
+ * @since 5.7.0
37
+ */
38
+ class Control {
39
+
40
+
41
+ /** @var string the text control type */
42
+ const TYPE_TEXT = 'text';
43
+
44
+ /** @var string the textarea control type */
45
+ const TYPE_TEXTAREA = 'textarea';
46
+
47
+ /** @var string the number control type */
48
+ const TYPE_NUMBER = 'number';
49
+
50
+ /** @var string the email control type */
51
+ const TYPE_EMAIL = 'email';
52
+
53
+ /** @var string the password control type */
54
+ const TYPE_PASSWORD = 'password';
55
+
56
+ /** @var string the date control type */
57
+ const TYPE_DATE = 'date';
58
+
59
+ /** @var string the checkbox control type */
60
+ const TYPE_CHECKBOX = 'checkbox';
61
+
62
+ /** @var string the radio control type */
63
+ const TYPE_RADIO = 'radio';
64
+
65
+ /** @var string the select control type */
66
+ const TYPE_SELECT = 'select';
67
+
68
+ /** @var string the file control type */
69
+ const TYPE_FILE = 'file';
70
+
71
+ /** @var string the color control type */
72
+ const TYPE_COLOR = 'color';
73
+
74
+ /** @var string the range control type */
75
+ const TYPE_RANGE = 'range';
76
+
77
+
78
+ /** @var string|null the setting ID to which this control belongs */
79
+ protected $setting_id;
80
+
81
+ /** @var string|null the control type */
82
+ protected $type;
83
+
84
+ /** @var string the control name */
85
+ protected $name = '';
86
+
87
+ /** @var string the control description */
88
+ protected $description = '';
89
+
90
+ /** @var array the control options, as $option => $label */
91
+ protected $options = [];
92
+
93
+
94
+ /** Getter methods ************************************************************************************************/
95
+
96
+
97
+ /**
98
+ * The setting ID to which this control belongs.
99
+ *
100
+ * @since 5.7.0
101
+ *
102
+ * @return null|string
103
+ */
104
+ public function get_setting_id() {
105
+
106
+ return $this->setting_id;
107
+ }
108
+
109
+
110
+ /**
111
+ * Gets the control type.
112
+ *
113
+ * @since 5.7.0
114
+ *
115
+ * @return null|string
116
+ */
117
+ public function get_type() {
118
+
119
+ return $this->type;
120
+ }
121
+
122
+
123
+ /**
124
+ * Gets the control name.
125
+ *
126
+ * @since 5.7.0
127
+ *
128
+ * @return string
129
+ */
130
+ public function get_name() {
131
+
132
+ return $this->name;
133
+ }
134
+
135
+
136
+ /**
137
+ * Gets the control description.
138
+ *
139
+ * @since 5.7.0
140
+ *
141
+ * @return string
142
+ */
143
+ public function get_description() {
144
+
145
+ return $this->description;
146
+ }
147
+
148
+
149
+ /**
150
+ * Gets the control options.
151
+ *
152
+ * As $option => $label for display.
153
+ *
154
+ * @since 5.7.0
155
+ *
156
+ * @return array
157
+ */
158
+ public function get_options() {
159
+
160
+ return $this->options;
161
+ }
162
+
163
+
164
+ /** Setter methods ************************************************************************************************/
165
+
166
+
167
+ /**
168
+ * Sets the setting ID.
169
+ *
170
+ * @since 5.7.0
171
+ *
172
+ * @param string $value setting ID to set
173
+ * @throws Framework\SV_WC_Plugin_Exception
174
+ */
175
+ public function set_setting_id( $value ) {
176
+
177
+ if ( ! is_string( $value ) ) {
178
+ throw new Framework\SV_WC_Plugin_Exception( 'Setting ID value must be a string' );
179
+ }
180
+
181
+ $this->setting_id = $value;
182
+ }
183
+
184
+
185
+ /**
186
+ * Sets the type.
187
+ *
188
+ * @since 5.7.0
189
+ *
190
+ * @param string $value setting ID to set
191
+ * @param string[] $valid_types allowed control types
192
+ * @throws Framework\SV_WC_Plugin_Exception
193
+ */
194
+ public function set_type( $value, array $valid_types = [] ) {
195
+
196
+ if ( ! empty( $valid_types ) && ! in_array( $value, $valid_types, true ) ) {
197
+
198
+ throw new Framework\SV_WC_Plugin_Exception( sprintf(
199
+ 'Control type must be one of %s',
200
+ Framework\SV_WC_Helper::list_array_items( $valid_types, 'or' )
201
+ ) );
202
+ }
203
+
204
+ $this->type = $value;
205
+ }
206
+
207
+
208
+ /**
209
+ * Sets the name.
210
+ *
211
+ * @since 5.7.0
212
+ *
213
+ * @param string $value control name to set
214
+ * @throws Framework\SV_WC_Plugin_Exception
215
+ */
216
+ public function set_name( $value ) {
217
+
218
+ if ( ! is_string( $value ) ) {
219
+ throw new Framework\SV_WC_Plugin_Exception( 'Control name value must be a string' );
220
+ }
221
+
222
+ $this->name = $value;
223
+ }
224
+
225
+
226
+ /**
227
+ * Sets the description.
228
+ *
229
+ * @since 5.7.0
230
+ *
231
+ * @param string $value control description to set
232
+ * @throws Framework\SV_WC_Plugin_Exception
233
+ */
234
+ public function set_description( $value ) {
235
+
236
+ if ( ! is_string( $value ) ) {
237
+ throw new Framework\SV_WC_Plugin_Exception( 'Control description value must be a string' );
238
+ }
239
+
240
+ $this->description = $value;
241
+ }
242
+
243
+
244
+ /**
245
+ * Sets the options.
246
+ *
247
+ * @since 5.7.0
248
+ *
249
+ * @param array $options options to set
250
+ * @param array $valid_options valid option keys to check against
251
+ */
252
+ public function set_options( array $options, array $valid_options = [] ) {
253
+
254
+ if ( ! empty( $valid_options ) ) {
255
+
256
+ foreach ( array_keys( $options ) as $key ) {
257
+
258
+ if ( ! in_array( $key, $valid_options, true ) ) {
259
+ unset( $options[ $key ] );
260
+ }
261
+ }
262
+ }
263
+
264
+ $this->options = $options;
265
+ }
266
+
267
+
268
+ }
269
+
270
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/Settings_API/Setting.php ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Settings_API;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
+
29
+ defined( 'ABSPATH' ) or exit;
30
+
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Settings_API\\Setting' ) ) :
32
+
33
+ /**
34
+ * The base setting object.
35
+ *
36
+ * @since 5.7.0
37
+ */
38
+ class Setting {
39
+
40
+
41
+ /** @var string the string setting type */
42
+ const TYPE_STRING = 'string';
43
+
44
+ /** @var string the URL setting type */
45
+ const TYPE_URL = 'url';
46
+
47
+ /** @var string the email setting type */
48
+ const TYPE_EMAIL = 'email';
49
+
50
+ /** @var string the integer setting type */
51
+ const TYPE_INTEGER = 'integer';
52
+
53
+ /** @var string the float setting type */
54
+ const TYPE_FLOAT = 'float';
55
+
56
+ /** @var string the boolean setting type */
57
+ const TYPE_BOOLEAN = 'boolean';
58
+
59
+
60
+ /** @var string unique setting ID */
61
+ protected $id;
62
+
63
+ /** @var string setting type */
64
+ protected $type;
65
+
66
+ /** @var string setting name */
67
+ protected $name;
68
+
69
+ /** @var string setting description */
70
+ protected $description;
71
+
72
+ /** @var bool whether the setting holds an array of multiple values */
73
+ protected $is_multi = false;
74
+
75
+ /** @var array valid setting options */
76
+ protected $options = [];
77
+
78
+ /** @var int|float|string|bool|array setting default value */
79
+ protected $default;
80
+
81
+ /** @var int|float|string|bool|array setting current value */
82
+ protected $value;
83
+
84
+ /** @var Control control object */
85
+ protected $control;
86
+
87
+
88
+ /** Getter Methods ************************************************************************************************/
89
+
90
+
91
+ /**
92
+ * Gets the setting ID.
93
+ *
94
+ * @since 5.7.0
95
+ *
96
+ * @return string
97
+ */
98
+ public function get_id() {
99
+
100
+ return $this->id;
101
+ }
102
+
103
+
104
+ /**
105
+ * Gets the setting type.
106
+ *
107
+ * @since 5.7.0
108
+ *
109
+ * @return string
110
+ */
111
+ public function get_type() {
112
+
113
+ return $this->type;
114
+ }
115
+
116
+
117
+ /**
118
+ * Gets the setting name.
119
+ *
120
+ * @since 5.7.0
121
+ *
122
+ * @return string
123
+ */
124
+ public function get_name() {
125
+
126
+ return $this->name;
127
+ }
128
+
129
+
130
+ /**
131
+ * Gets the setting description.
132
+ *
133
+ * @since 5.7.0
134
+ *
135
+ * @return string
136
+ */
137
+ public function get_description() {
138
+
139
+ return $this->description;
140
+ }
141
+
142
+
143
+ /**
144
+ * Returns whether the setting holds an array of multiple values.
145
+ *
146
+ * @since 5.7.0
147
+ *
148
+ * @return bool
149
+ */
150
+ public function is_is_multi() {
151
+
152
+ return $this->is_multi;
153
+ }
154
+
155
+
156
+ /**
157
+ * Gets the setting options.
158
+ *
159
+ * @since 5.7.0
160
+ *
161
+ * @return array
162
+ */
163
+ public function get_options() {
164
+
165
+ return $this->options;
166
+ }
167
+
168
+
169
+ /**
170
+ * Gets the setting default value.
171
+ *
172
+ * @since 5.7.0
173
+ *
174
+ * @return array|bool|float|int|string|null
175
+ */
176
+ public function get_default() {
177
+
178
+ return $this->default;
179
+ }
180
+
181
+
182
+ /**
183
+ * Gets the setting current value.
184
+ *
185
+ * @since 5.7.0
186
+ *
187
+ * @return array|bool|float|int|string
188
+ */
189
+ public function get_value() {
190
+
191
+ return $this->value;
192
+ }
193
+
194
+
195
+ /**
196
+ * Gets the setting control.
197
+ *
198
+ * @since 5.7.0
199
+ *
200
+ * @return Control
201
+ */
202
+ public function get_control() {
203
+
204
+ return $this->control;
205
+ }
206
+
207
+
208
+ /** Setter Methods ************************************************************************************************/
209
+
210
+
211
+ /**
212
+ * Sets the setting ID.
213
+ *
214
+ * @since 5.7.0
215
+ *
216
+ * @param string $id
217
+ */
218
+ public function set_id( $id ) {
219
+
220
+ $this->id = $id;
221
+ }
222
+
223
+
224
+ /**
225
+ * Sets the setting type.
226
+ *
227
+ * @since 5.7.0
228
+ *
229
+ * @param string $type
230
+ */
231
+ public function set_type( $type ) {
232
+
233
+ $this->type = $type;
234
+ }
235
+
236
+
237
+ /**
238
+ * Sets the setting name.
239
+ *
240
+ * @since 5.7.0
241
+ *
242
+ * @param string $name
243
+ */
244
+ public function set_name( $name ) {
245
+
246
+ $this->name = $name;
247
+ }
248
+
249
+
250
+ /**
251
+ * Sets the setting description.
252
+ *
253
+ * @since 5.7.0
254
+ *
255
+ * @param string $description
256
+ */
257
+ public function set_description( $description ) {
258
+
259
+ $this->description = $description;
260
+ }
261
+
262
+
263
+ /**
264
+ * Sets whether the setting holds an array of multiple values.
265
+ *
266
+ * @since 5.7.0
267
+ *
268
+ * @param bool $is_multi
269
+ */
270
+ public function set_is_multi( $is_multi ) {
271
+
272
+ $this->is_multi = $is_multi;
273
+ }
274
+
275
+
276
+ /**
277
+ * Sets the setting options.
278
+ *
279
+ * @since 5.7.0
280
+ *
281
+ * @param array $options
282
+ */
283
+ public function set_options( $options ) {
284
+
285
+ foreach ( $options as $key => $option ) {
286
+
287
+ if ( ! $this->validate_value( $option ) ) {
288
+ unset( $options[ $key ] );
289
+ }
290
+ }
291
+
292
+ $this->options = $options;
293
+ }
294
+
295
+
296
+ /**
297
+ * Sets the setting default value.
298
+ *
299
+ * @since 5.7.0
300
+ *
301
+ * @param array|bool|float|int|string|null $value default value to set
302
+ */
303
+ public function set_default( $value ) {
304
+
305
+ if ( $this->is_is_multi() ) {
306
+
307
+ $_value = array_filter( (array) $value, [ $this, 'validate_value' ] );
308
+
309
+ // clear the default if all values were invalid
310
+ $value = ! empty( $_value ) ? $_value : null;
311
+
312
+ } elseif ( ! $this->validate_value( $value ) ) {
313
+
314
+ $value = null;
315
+ }
316
+
317
+ $this->default = $value;
318
+ }
319
+
320
+
321
+ /**
322
+ * Sets the setting current value.
323
+ *
324
+ * @since 5.7.0
325
+ *
326
+ * @param array|bool|float|int|string $value
327
+ */
328
+ public function set_value( $value ) {
329
+
330
+ $this->value = $value;
331
+ }
332
+
333
+
334
+ /**
335
+ * Sets the setting control.
336
+ *
337
+ * @since 5.7.0
338
+ *
339
+ * @param Control $control
340
+ */
341
+ public function set_control( $control ) {
342
+
343
+ $this->control = $control;
344
+ }
345
+
346
+
347
+ /**
348
+ * Sets the setting current value, after validating it against the type and, if set, options.
349
+ *
350
+ * @since 5.7.0
351
+ *
352
+ * @param array|bool|float|int|string $value
353
+ * @throws Framework\SV_WC_Plugin_Exception
354
+ */
355
+ public function update_value( $value ) {
356
+
357
+ if ( ! $this->validate_value( $value ) ) {
358
+
359
+ throw new Framework\SV_WC_Plugin_Exception( "Setting value for setting {$this->id} is not valid for the setting type {$this->type}", 400 );
360
+
361
+ } elseif ( ! empty( $this->options ) && ! in_array( $value, $this->options ) ) {
362
+
363
+ throw new Framework\SV_WC_Plugin_Exception( sprintf(
364
+ 'Setting value for setting %s must be one of %s',
365
+ $this->id,
366
+ Framework\SV_WC_Helper::list_array_items( $this->options, 'or' )
367
+ ), 400 );
368
+
369
+ } else {
370
+
371
+ $this->set_value( $value );
372
+ }
373
+ }
374
+
375
+
376
+ /**
377
+ * Validates the setting value.
378
+ *
379
+ * @since 5.7.0
380
+ *
381
+ * @param array|bool|float|int|string $value
382
+ * @return bool
383
+ */
384
+ public function validate_value( $value ) {
385
+
386
+ $validate_method = "validate_{$this->get_type()}_value";
387
+
388
+ return is_callable( [ $this, $validate_method ] ) ? $this->$validate_method( $value ) : true;
389
+ }
390
+
391
+
392
+ /**
393
+ * Validates a string value.
394
+ *
395
+ * @since 5.7.0
396
+ *
397
+ * @param array|bool|float|int|string $value value to validate
398
+ * @return bool
399
+ */
400
+ protected function validate_string_value( $value ) {
401
+
402
+ return is_string( $value );
403
+ }
404
+
405
+
406
+ /**
407
+ * Validates a URL value.
408
+ *
409
+ * @since 5.7.0
410
+ *
411
+ * @param array|bool|float|int|string $value value to validate
412
+ * @return bool
413
+ */
414
+ protected function validate_url_value( $value ) {
415
+
416
+ return wc_is_valid_url( $value );
417
+ }
418
+
419
+
420
+ /**
421
+ * Validates an email value.
422
+ *
423
+ * @since 5.7.0
424
+ *
425
+ * @param mixed $value value to validate
426
+ * @return bool
427
+ */
428
+ protected function validate_email_value( $value ) {
429
+
430
+ return (bool) is_email( $value );
431
+ }
432
+
433
+
434
+ /**
435
+ * Validates an integer value.
436
+ *
437
+ * @since 5.7.0
438
+ *
439
+ * @param mixed $value value to validate
440
+ * @return bool
441
+ */
442
+ public function validate_integer_value( $value ) {
443
+
444
+ return is_int( $value );
445
+ }
446
+
447
+
448
+ /**
449
+ * Validates a float value.
450
+ *
451
+ * @since 5.7.0
452
+ *
453
+ * @param mixed $value value to validate
454
+ * @return bool
455
+ */
456
+ protected function validate_float_value( $value ) {
457
+
458
+ return is_int( $value ) || is_float( $value );
459
+ }
460
+
461
+
462
+ /**
463
+ * Validates a boolean value.
464
+ *
465
+ * @since 5.7.0
466
+ *
467
+ * @param mixed $value value to validate
468
+ * @return bool
469
+ */
470
+ protected function validate_boolean_value( $value ) {
471
+
472
+ return is_bool( $value );
473
+ }
474
+
475
+
476
+ }
477
+
478
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/admin/Notes_Helper.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @author SkyVerge
20
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
21
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
+ */
23
+
24
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Admin;
25
+
26
+ use Automattic\WooCommerce\Admin\Notes as WooCommerce_Admin_Notes;
27
+
28
+ defined( 'ABSPATH' ) or exit;
29
+
30
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Admin\\Notes_Helper' ) ) :
31
+
32
+ /**
33
+ * Helper class for WooCommerce enhanced admin notes.
34
+ *
35
+ * @since 5.6.0
36
+ */
37
+ class Notes_Helper {
38
+
39
+
40
+ /** Conditional methods *******************************************************************************************/
41
+
42
+
43
+ /**
44
+ * Determines if any notes with the given name exist.
45
+ *
46
+ * @since 5.6.0
47
+ *
48
+ * @param string $name note name
49
+ * @return bool
50
+ */
51
+ public static function note_with_name_exists( $name ) {
52
+
53
+ return ! empty( self::get_note_ids_with_name( $name ) );
54
+ }
55
+
56
+
57
+ /** Getter methods ************************************************************************************************/
58
+
59
+
60
+ /**
61
+ * Gets a note with the given name.
62
+ *
63
+ * @since 5.6.0
64
+ *
65
+ * @param string $name name of the note to get
66
+ * @return WooCommerce_Admin_Notes\WC_Admin_Note|null
67
+ */
68
+ public static function get_note_with_name( $name ) {
69
+
70
+ $note = null;
71
+ $note_ids = self::get_note_ids_with_name( $name );
72
+
73
+ if ( ! empty( $note_ids ) ) {
74
+
75
+ $note_id = current( $note_ids );
76
+
77
+ $note = WooCommerce_Admin_Notes\WC_Admin_Notes::get_note( $note_id );
78
+ }
79
+
80
+ return $note ?: null;
81
+ }
82
+
83
+
84
+ /**
85
+ * Gets all notes with the given name.
86
+ *
87
+ * @since 5.6.0
88
+ *
89
+ * @param string $name note name
90
+ * @return int[]
91
+ */
92
+ public static function get_note_ids_with_name( $name ) {
93
+
94
+ $note_ids = [];
95
+
96
+ try {
97
+
98
+ /** @var WooCommerce_Admin_Notes\DataStore $data_store */
99
+ $data_store = \WC_Data_Store::load( 'admin-note' );
100
+
101
+ $note_ids = $data_store->get_notes_with_name( $name );
102
+
103
+ } catch ( \Exception $exception ) {}
104
+
105
+ return $note_ids;
106
+ }
107
+
108
+
109
+ /**
110
+ * Gets all note IDs from the given source.
111
+ *
112
+ * @since 5.6.1
113
+ *
114
+ * @param string $source note source
115
+ * @return int[]
116
+ */
117
+ public static function get_note_ids_with_source( $source ) {
118
+ global $wpdb;
119
+
120
+ return $wpdb->get_col(
121
+ $wpdb->prepare(
122
+ "SELECT note_id FROM {$wpdb->prefix}wc_admin_notes WHERE source = %s ORDER BY note_id ASC",
123
+ $source
124
+ )
125
+ );
126
+ }
127
+
128
+
129
+ /**
130
+ * Deletes all notes from the given source.
131
+ *
132
+ * @since 5.6.1
133
+ *
134
+ * @param string $source source name
135
+ */
136
+ public static function delete_notes_with_source( $source ) {
137
+
138
+ foreach ( self::get_note_ids_with_source( $source ) as $note_id ) {
139
+
140
+ if ( $note = WooCommerce_Admin_Notes\WC_Admin_Notes::get_note( $note_id ) ) {
141
+ $note->delete();
142
+ }
143
+ }
144
+ }
145
+
146
+
147
+ }
148
+
149
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php RENAMED
@@ -17,17 +17,18 @@
17
  * needs please refer to http://www.skyverge.com
18
  *
19
  * @author SkyVerge
20
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
21
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
  */
23
 
24
- namespace WC_Braintree\Plugin_Framework\Admin;
25
 
26
  defined( 'ABSPATH' ) or exit;
27
 
28
- use WC_Braintree\Plugin_Framework as Framework;
 
 
29
 
30
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Admin\\Setup_Wizard' ) ) :
31
 
32
  /**
33
  * The plugin Setup Wizard class.
@@ -103,7 +104,7 @@ abstract class Setup_Wizard {
103
  $this->add_hooks();
104
 
105
  // mark the wizard as complete if specifically requested
106
- if ( Framework\SV_WC_Helper::get_request( "wc_{$this->id}_setup_wizard_complete" ) ) {
107
  $this->complete_setup();
108
  }
109
  }
@@ -145,9 +146,7 @@ abstract class Setup_Wizard {
145
  */
146
  public function add_admin_notices() {
147
 
148
- $current_screen = get_current_screen();
149
-
150
- if ( ( $current_screen && 'plugins' === $current_screen->id ) || $this->get_plugin()->is_plugin_settings() ) {
151
 
152
  if ( $this->is_complete() && $this->get_documentation_notice_message() ) {
153
  $notice_id = "wc_{$this->id}_docs";
@@ -180,7 +179,7 @@ abstract class Setup_Wizard {
180
 
181
  $message = sprintf(
182
  /** translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag */
183
- __( 'Thanks for installing %1$s! To get started, take a minute to %2$sread the documentation%3$s :)', 'woocommerce-gateway-paypal-powered-by-braintree' ),
184
  esc_html( $this->get_plugin()->get_plugin_name() ),
185
  '<a href="' . esc_url( $this->get_plugin()->get_documentation_url() ) . '" target="_blank">', '</a>'
186
  );
@@ -208,7 +207,7 @@ abstract class Setup_Wizard {
208
 
209
  return sprintf(
210
  /** translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag */
211
- __( 'Thanks for installing %1$s! To get started, take a minute to complete these %2$squick and easy setup steps%3$s :)', 'woocommerce-gateway-paypal-powered-by-braintree' ),
212
  esc_html( $this->get_plugin()->get_plugin_name() ),
213
  '<a href="' . esc_url( $this->get_setup_url() ) . '">', '</a>'
214
  );
@@ -233,7 +232,7 @@ abstract class Setup_Wizard {
233
  unset( $action_links['configure'] );
234
 
235
  $setup_link = array(
236
- 'setup' => sprintf( '<a href="%s">%s</a>', $this->get_setup_url(), esc_html__( 'Setup', 'woocommerce-gateway-paypal-powered-by-braintree' ) ),
237
  );
238
 
239
  return array_merge( $setup_link, $action_links );
@@ -248,8 +247,8 @@ abstract class Setup_Wizard {
248
  protected function init_setup() {
249
 
250
  // get a step ID from $_GET
251
- $current_step = sanitize_key( Framework\SV_WC_Helper::get_request( 'step' ) );
252
- $current_action = sanitize_key( Framework\SV_WC_Helper::get_request( 'action' ) );
253
 
254
  if ( ! $current_action ) {
255
 
@@ -297,11 +296,11 @@ abstract class Setup_Wizard {
297
  public function render_page() {
298
 
299
  // maybe save and move onto the next step
300
- $error_message = Framework\SV_WC_Helper::get_post( 'save_step' ) ? $this->save_step( $this->current_step ) : '';
301
 
302
  $page_title = sprintf(
303
  /* translators: Placeholders: %s - plugin name */
304
- __( '%s &rsaquo; Setup', 'woocommerce-gateway-paypal-powered-by-braintree' ),
305
  $this->get_plugin()->get_plugin_name()
306
  );
307
 
@@ -349,12 +348,12 @@ abstract class Setup_Wizard {
349
  */
350
  protected function save_step( $step_id ) {
351
 
352
- $error_message = __( 'Oops! An error occurred, please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' );
353
 
354
  try {
355
 
356
  // bail early if the nonce is bad
357
- if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_post( 'nonce' ), "wc_{$this->id}_setup_wizard_save" ) ) {
358
  throw new Framework\SV_WC_Plugin_Exception( $error_message );
359
  }
360
 
@@ -394,32 +393,29 @@ abstract class Setup_Wizard {
394
  'wc-enhanced-select',
395
  'wc_enhanced_select_params',
396
  array(
397
- 'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
398
- 'i18n_ajax_error' => _x( 'Loading failed', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
399
- 'i18n_input_too_short_1' => _x( 'Please enter 1 or more characters', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
400
- 'i18n_input_too_short_n' => _x( 'Please enter %qty% or more characters', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
401
- 'i18n_input_too_long_1' => _x( 'Please delete 1 character', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
402
- 'i18n_input_too_long_n' => _x( 'Please delete %qty% characters', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
403
- 'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
404
- 'i18n_selection_too_long_n' => _x( 'You can only select %qty% items', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
405
- 'i18n_load_more' => _x( 'Loading more results&hellip;', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
406
- 'i18n_searching' => _x( 'Searching&hellip;', 'enhanced select', 'woocommerce-gateway-paypal-powered-by-braintree' ),
407
  'ajax_url' => admin_url( 'admin-ajax.php' ),
408
  'search_products_nonce' => wp_create_nonce( 'search-products' ),
409
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
410
  )
411
  );
412
 
413
- // WooCommerce Setup core scripts
414
- wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui' ), $this->get_plugin()->get_version() );
415
-
416
  // WooCommerce Setup core styles
417
  wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), $this->get_plugin()->get_version() );
418
  wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), $this->get_plugin()->get_version() );
419
 
420
  // framework bundled styles
421
  wp_enqueue_style( 'sv-wc-admin-setup', $this->get_plugin()->get_framework_assets_url() . '/css/admin/sv-wc-plugin-admin-setup-wizard.min.css', array( 'wc-setup' ), $this->get_plugin()->get_version() );
422
- wp_enqueue_script( 'sv-wc-admin-setup', $this->get_plugin()->get_framework_assets_url() . '/js/admin/sv-wc-plugin-admin-setup-wizard.min.js', array( 'wc-setup' ), $this->get_plugin()->get_version() );
423
  }
424
 
425
 
@@ -490,7 +486,7 @@ abstract class Setup_Wizard {
490
 
491
  <?php endforeach; ?>
492
 
493
- <li class="<?php echo $this->is_finished() ? 'done' : ''; ?>"><?php esc_html_e( 'Ready!', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></li>
494
 
495
  </ol>
496
  <?php
@@ -583,7 +579,7 @@ abstract class Setup_Wizard {
583
 
584
  printf(
585
  /* translators: Placeholder: %s - plugin name */
586
- esc_html__( 'Welcome to %s!', 'woocommerce-gateway-paypal-powered-by-braintree' ),
587
  $this->get_plugin()->get_plugin_name()
588
  );
589
  }
@@ -596,7 +592,7 @@ abstract class Setup_Wizard {
596
  */
597
  protected function render_welcome_text() {
598
 
599
- esc_html_e( 'This quick setup wizard will help you configure the basic settings and get you started.', 'woocommerce-gateway-paypal-powered-by-braintree' );
600
  }
601
 
602
 
@@ -610,7 +606,7 @@ abstract class Setup_Wizard {
610
  protected function render_finished() {
611
 
612
  ?>
613
- <h1><?php printf( esc_html__( '%s is ready!', 'woocommerce-gateway-paypal-powered-by-braintree' ), esc_html( $this->get_plugin()->get_plugin_name() ) ); ?></h1>
614
  <?php $this->render_before_next_steps(); ?>
615
  <?php $this->render_next_steps(); ?>
616
  <?php $this->render_after_next_steps(); ?>
@@ -662,7 +658,7 @@ abstract class Setup_Wizard {
662
  <li class="wc-wizard-next-step-item">
663
  <div class="wc-wizard-next-step-description">
664
 
665
- <p class="next-step-heading"><?php esc_html_e( 'Next step', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></p>
666
  <h3 class="next-step-description"><?php echo esc_html( $step['label'] ); ?></h3>
667
 
668
  <?php if ( ! empty( $step['description'] ) ) : ?>
@@ -688,7 +684,7 @@ abstract class Setup_Wizard {
688
 
689
  <li class="wc-wizard-additional-steps">
690
  <div class="wc-wizard-next-step-description">
691
- <p class="next-step-heading"><?php esc_html_e( 'You can also:', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></p>
692
  </div>
693
  <div class="wc-wizard-next-step-action">
694
 
@@ -732,9 +728,9 @@ abstract class Setup_Wizard {
732
  if ( $this->get_plugin()->get_documentation_url() ) {
733
 
734
  $steps['view-docs'] = array(
735
- 'name' => __( 'View the Docs', 'woocommerce-gateway-paypal-powered-by-braintree' ),
736
- 'label' => __( 'See more setup options', 'woocommerce-gateway-paypal-powered-by-braintree' ),
737
- 'description' => __( 'Learn more about customizing the plugin', 'woocommerce-gateway-paypal-powered-by-braintree' ),
738
  'url' => $this->get_plugin()->get_documentation_url(),
739
  );
740
  }
@@ -758,15 +754,15 @@ abstract class Setup_Wizard {
758
  $actions = array();
759
 
760
  if ( $this->get_plugin()->get_settings_url() ) {
761
- $actions[ __( 'Review Your Settings', 'woocommerce-gateway-paypal-powered-by-braintree' ) ] = $this->get_plugin()->get_settings_url();
762
  }
763
 
764
  if ( empty( $next_steps['view-docs'] ) && $this->get_plugin()->get_documentation_url() ) {
765
- $actions[ __( 'View the Docs', 'woocommerce-gateway-paypal-powered-by-braintree' ) ] = $this->get_plugin()->get_documentation_url();
766
  }
767
 
768
  if ( $this->get_plugin()->get_reviews_url() ) {
769
- $actions[ __( 'Leave a Review', 'woocommerce-gateway-paypal-powered-by-braintree' ) ] = $this->get_plugin()->get_reviews_url();
770
  }
771
 
772
  return $actions;
@@ -790,7 +786,7 @@ abstract class Setup_Wizard {
790
  ?>
791
  <p class="wc-setup-actions step">
792
 
793
- <?php $label = __( 'Continue', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>
794
 
795
  <?php if ( is_callable( $this->steps[ $step_id ]['save'] ) ) : ?>
796
 
@@ -950,11 +946,11 @@ abstract class Setup_Wizard {
950
 
951
  ?>
952
  <?php if ( $this->is_finished() ) : ?>
953
- <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_dashboard_url() ); ?>"><?php esc_html_e( 'Return to the WordPress Dashboard', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></a>
954
  <?php elseif ( $this->is_started() ) : ?>
955
- <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_dashboard_url() ); ?>"><?php esc_html_e( 'Not right now', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></a>
956
  <?php else : ?>
957
- <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_next_step_url() ); ?>"><?php esc_html_e( 'Skip this step', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></a>
958
  <?php endif; ?>
959
  <?php
960
 
@@ -1010,7 +1006,7 @@ abstract class Setup_Wizard {
1010
 
1011
  } catch ( Framework\SV_WC_Plugin_Exception $exception ) {
1012
 
1013
- Framework\SV_WC_Plugin_Compatibility::wc_doing_it_wrong( __METHOD__, $exception->getMessage(), '5.2.2' );
1014
 
1015
  return false;
1016
  }
@@ -1042,7 +1038,7 @@ abstract class Setup_Wizard {
1042
  */
1043
  public function is_setup_page() {
1044
 
1045
- return is_admin() && $this->get_slug() === Framework\SV_WC_Helper::get_request( 'page' );
1046
  }
1047
 
1048
 
@@ -1084,7 +1080,7 @@ abstract class Setup_Wizard {
1084
  */
1085
  public function is_finished() {
1086
 
1087
- return self::ACTION_FINISH === Framework\SV_WC_Helper::get_request( 'action' );
1088
  }
1089
 
1090
 
@@ -1290,7 +1286,7 @@ abstract class Setup_Wizard {
1290
  *
1291
  * @since 5.2.2
1292
  *
1293
- * @return Framework\SV_WC_Plugin
1294
  */
1295
  protected function get_plugin() {
1296
 
@@ -1300,4 +1296,5 @@ abstract class Setup_Wizard {
1300
 
1301
  }
1302
 
 
1303
  endif;
17
  * needs please refer to http://www.skyverge.com
18
  *
19
  * @author SkyVerge
20
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
21
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
  */
23
 
24
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Admin;
25
 
26
  defined( 'ABSPATH' ) or exit;
27
 
28
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
29
+
30
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Admin\\Setup_Wizard' ) ) :
31
 
 
32
 
33
  /**
34
  * The plugin Setup Wizard class.
104
  $this->add_hooks();
105
 
106
  // mark the wizard as complete if specifically requested
107
+ if ( Framework\SV_WC_Helper::get_requested_value( "wc_{$this->id}_setup_wizard_complete" ) ) {
108
  $this->complete_setup();
109
  }
110
  }
146
  */
147
  public function add_admin_notices() {
148
 
149
+ if ( Framework\SV_WC_Helper::is_current_screen( 'plugins' ) || $this->get_plugin()->is_plugin_settings() ) {
 
 
150
 
151
  if ( $this->is_complete() && $this->get_documentation_notice_message() ) {
152
  $notice_id = "wc_{$this->id}_docs";
179
 
180
  $message = sprintf(
181
  /** translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag */
182
+ __( 'Thanks for installing %1$s! To get started, take a minute to %2$sread the documentation%3$s :)', 'woocommerce-plugin-framework' ),
183
  esc_html( $this->get_plugin()->get_plugin_name() ),
184
  '<a href="' . esc_url( $this->get_plugin()->get_documentation_url() ) . '" target="_blank">', '</a>'
185
  );
207
 
208
  return sprintf(
209
  /** translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a> tag */
210
+ __( 'Thanks for installing %1$s! To get started, take a minute to complete these %2$squick and easy setup steps%3$s :)', 'woocommerce-plugin-framework' ),
211
  esc_html( $this->get_plugin()->get_plugin_name() ),
212
  '<a href="' . esc_url( $this->get_setup_url() ) . '">', '</a>'
213
  );
232
  unset( $action_links['configure'] );
233
 
234
  $setup_link = array(
235
+ 'setup' => sprintf( '<a href="%s">%s</a>', $this->get_setup_url(), esc_html__( 'Setup', 'woocommerce-plugin-framework' ) ),
236
  );
237
 
238
  return array_merge( $setup_link, $action_links );
247
  protected function init_setup() {
248
 
249
  // get a step ID from $_GET
250
+ $current_step = sanitize_key( Framework\SV_WC_Helper::get_requested_value( 'step' ) );
251
+ $current_action = sanitize_key( Framework\SV_WC_Helper::get_requested_value( 'action' ) );
252
 
253
  if ( ! $current_action ) {
254
 
296
  public function render_page() {
297
 
298
  // maybe save and move onto the next step
299
+ $error_message = Framework\SV_WC_Helper::get_posted_value( 'save_step' ) ? $this->save_step( $this->current_step ) : '';
300
 
301
  $page_title = sprintf(
302
  /* translators: Placeholders: %s - plugin name */
303
+ __( '%s &rsaquo; Setup', 'woocommerce-plugin-framework' ),
304
  $this->get_plugin()->get_plugin_name()
305
  );
306
 
348
  */
349
  protected function save_step( $step_id ) {
350
 
351
+ $error_message = __( 'Oops! An error occurred, please try again.', 'woocommerce-plugin-framework' );
352
 
353
  try {
354
 
355
  // bail early if the nonce is bad
356
+ if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'nonce' ), "wc_{$this->id}_setup_wizard_save" ) ) {
357
  throw new Framework\SV_WC_Plugin_Exception( $error_message );
358
  }
359
 
393
  'wc-enhanced-select',
394
  'wc_enhanced_select_params',
395
  array(
396
+ 'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'woocommerce-plugin-framework' ),
397
+ 'i18n_ajax_error' => _x( 'Loading failed', 'enhanced select', 'woocommerce-plugin-framework' ),
398
+ 'i18n_input_too_short_1' => _x( 'Please enter 1 or more characters', 'enhanced select', 'woocommerce-plugin-framework' ),
399
+ 'i18n_input_too_short_n' => _x( 'Please enter %qty% or more characters', 'enhanced select', 'woocommerce-plugin-framework' ),
400
+ 'i18n_input_too_long_1' => _x( 'Please delete 1 character', 'enhanced select', 'woocommerce-plugin-framework' ),
401
+ 'i18n_input_too_long_n' => _x( 'Please delete %qty% characters', 'enhanced select', 'woocommerce-plugin-framework' ),
402
+ 'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'woocommerce-plugin-framework' ),
403
+ 'i18n_selection_too_long_n' => _x( 'You can only select %qty% items', 'enhanced select', 'woocommerce-plugin-framework' ),
404
+ 'i18n_load_more' => _x( 'Loading more results&hellip;', 'enhanced select', 'woocommerce-plugin-framework' ),
405
+ 'i18n_searching' => _x( 'Searching&hellip;', 'enhanced select', 'woocommerce-plugin-framework' ),
406
  'ajax_url' => admin_url( 'admin-ajax.php' ),
407
  'search_products_nonce' => wp_create_nonce( 'search-products' ),
408
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
409
  )
410
  );
411
 
 
 
 
412
  // WooCommerce Setup core styles
413
  wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), $this->get_plugin()->get_version() );
414
  wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), $this->get_plugin()->get_version() );
415
 
416
  // framework bundled styles
417
  wp_enqueue_style( 'sv-wc-admin-setup', $this->get_plugin()->get_framework_assets_url() . '/css/admin/sv-wc-plugin-admin-setup-wizard.min.css', array( 'wc-setup' ), $this->get_plugin()->get_version() );
418
+ wp_enqueue_script( 'sv-wc-admin-setup', $this->get_plugin()->get_framework_assets_url() . '/js/admin/sv-wc-plugin-admin-setup-wizard.min.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui' ), $this->get_plugin()->get_version() );
419
  }
420
 
421
 
486
 
487
  <?php endforeach; ?>
488
 
489
+ <li class="<?php echo $this->is_finished() ? 'done' : ''; ?>"><?php esc_html_e( 'Ready!', 'woocommerce-plugin-framework' ); ?></li>
490
 
491
  </ol>
492
  <?php
579
 
580
  printf(
581
  /* translators: Placeholder: %s - plugin name */
582
+ esc_html__( 'Welcome to %s!', 'woocommerce-plugin-framework' ),
583
  $this->get_plugin()->get_plugin_name()
584
  );
585
  }
592
  */
593
  protected function render_welcome_text() {
594
 
595
+ esc_html_e( 'This quick setup wizard will help you configure the basic settings and get you started.', 'woocommerce-plugin-framework' );
596
  }
597
 
598
 
606
  protected function render_finished() {
607
 
608
  ?>
609
+ <h1><?php printf( esc_html__( '%s is ready!', 'woocommerce-plugin-framework' ), esc_html( $this->get_plugin()->get_plugin_name() ) ); ?></h1>
610
  <?php $this->render_before_next_steps(); ?>
611
  <?php $this->render_next_steps(); ?>
612
  <?php $this->render_after_next_steps(); ?>
658
  <li class="wc-wizard-next-step-item">
659
  <div class="wc-wizard-next-step-description">
660
 
661
+ <p class="next-step-heading"><?php esc_html_e( 'Next step', 'woocommerce-plugin-framework' ); ?></p>
662
  <h3 class="next-step-description"><?php echo esc_html( $step['label'] ); ?></h3>
663
 
664
  <?php if ( ! empty( $step['description'] ) ) : ?>
684
 
685
  <li class="wc-wizard-additional-steps">
686
  <div class="wc-wizard-next-step-description">
687
+ <p class="next-step-heading"><?php esc_html_e( 'You can also:', 'woocommerce-plugin-framework' ); ?></p>
688
  </div>
689
  <div class="wc-wizard-next-step-action">
690
 
728
  if ( $this->get_plugin()->get_documentation_url() ) {
729
 
730
  $steps['view-docs'] = array(
731
+ 'name' => __( 'View the Docs', 'woocommerce-plugin-framework' ),
732
+ 'label' => __( 'See more setup options', 'woocommerce-plugin-framework' ),
733
+ 'description' => __( 'Learn more about customizing the plugin', 'woocommerce-plugin-framework' ),
734
  'url' => $this->get_plugin()->get_documentation_url(),
735
  );
736
  }
754
  $actions = array();
755
 
756
  if ( $this->get_plugin()->get_settings_url() ) {
757
+ $actions[ __( 'Review Your Settings', 'woocommerce-plugin-framework' ) ] = $this->get_plugin()->get_settings_url();
758
  }
759
 
760
  if ( empty( $next_steps['view-docs'] ) && $this->get_plugin()->get_documentation_url() ) {
761
+ $actions[ __( 'View the Docs', 'woocommerce-plugin-framework' ) ] = $this->get_plugin()->get_documentation_url();
762
  }
763
 
764
  if ( $this->get_plugin()->get_reviews_url() ) {
765
+ $actions[ __( 'Leave a Review', 'woocommerce-plugin-framework' ) ] = $this->get_plugin()->get_reviews_url();
766
  }
767
 
768
  return $actions;
786
  ?>
787
  <p class="wc-setup-actions step">
788
 
789
+ <?php $label = __( 'Continue', 'woocommerce-plugin-framework' ); ?>
790
 
791
  <?php if ( is_callable( $this->steps[ $step_id ]['save'] ) ) : ?>
792
 
946
 
947
  ?>
948
  <?php if ( $this->is_finished() ) : ?>
949
+ <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_dashboard_url() ); ?>"><?php esc_html_e( 'Return to the WordPress Dashboard', 'woocommerce-plugin-framework' ); ?></a>
950
  <?php elseif ( $this->is_started() ) : ?>
951
+ <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_dashboard_url() ); ?>"><?php esc_html_e( 'Not right now', 'woocommerce-plugin-framework' ); ?></a>
952
  <?php else : ?>
953
+ <a class="wc-setup-footer-links" href="<?php echo esc_url( $this->get_next_step_url() ); ?>"><?php esc_html_e( 'Skip this step', 'woocommerce-plugin-framework' ); ?></a>
954
  <?php endif; ?>
955
  <?php
956
 
1006
 
1007
  } catch ( Framework\SV_WC_Plugin_Exception $exception ) {
1008
 
1009
+ wc_doing_it_wrong( __METHOD__, $exception->getMessage(), '5.2.2' );
1010
 
1011
  return false;
1012
  }
1038
  */
1039
  public function is_setup_page() {
1040
 
1041
+ return is_admin() && $this->get_slug() === Framework\SV_WC_Helper::get_requested_value( 'page' );
1042
  }
1043
 
1044
 
1080
  */
1081
  public function is_finished() {
1082
 
1083
+ return self::ACTION_FINISH === Framework\SV_WC_Helper::get_requested_value( 'action' );
1084
  }
1085
 
1086
 
1286
  *
1287
  * @since 5.2.2
1288
  *
1289
+ * @return Framework\SV_WC_Plugin|Framework\SV_WC_Payment_Gateway_Plugin
1290
  */
1291
  protected function get_plugin() {
1292
 
1296
 
1297
  }
1298
 
1299
+
1300
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-json-request.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_JSON_Request' ) ) :
 
30
 
31
  /**
32
  * Base JSON API request class.
@@ -130,4 +131,5 @@ abstract class SV_WC_API_JSON_Request implements SV_WC_API_Request {
130
 
131
  }
132
 
133
- endif; // class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_JSON_Request' ) ) :
30
+
31
 
32
  /**
33
  * Base JSON API request class.
131
 
132
  }
133
 
134
+
135
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-json-response.php RENAMED
@@ -18,15 +18,15 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Response
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_JSON_Response' ) ) :
30
 
31
 
32
  /**
@@ -101,4 +101,5 @@ abstract class SV_WC_API_JSON_Response implements SV_WC_API_Response {
101
 
102
  }
103
 
104
- endif; // class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Response
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_JSON_Response' ) ) :
30
 
31
 
32
  /**
101
 
102
  }
103
 
104
+
105
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-xml-request.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_XML_Request' ) ) :
 
30
 
31
  /**
32
  * Base XML API request class.
@@ -35,6 +36,7 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_XML_Request' )
35
  */
36
  abstract class SV_WC_API_XML_Request implements SV_WC_API_Request {
37
 
 
38
  /** @var string the request method, one of HEAD, GET, PUT, PATCH, POST, DELETE */
39
  protected $method;
40
 
@@ -132,7 +134,7 @@ abstract class SV_WC_API_XML_Request implements SV_WC_API_Request {
132
  */
133
  public function get_request_data() {
134
 
135
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __FUNCTION__, '5.0.0', 'SV_WC_API_XML_Request::get_data' );
136
 
137
  return $this->get_data();
138
  }
@@ -210,4 +212,5 @@ abstract class SV_WC_API_XML_Request implements SV_WC_API_Request {
210
 
211
  }
212
 
213
- endif; // class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_XML_Request' ) ) :
30
+
31
 
32
  /**
33
  * Base XML API request class.
36
  */
37
  abstract class SV_WC_API_XML_Request implements SV_WC_API_Request {
38
 
39
+
40
  /** @var string the request method, one of HEAD, GET, PUT, PATCH, POST, DELETE */
41
  protected $method;
42
 
134
  */
135
  public function get_request_data() {
136
 
137
+ wc_deprecated_function( __METHOD__, '5.0.0', 'SV_WC_API_XML_Request::get_data' );
138
 
139
  return $this->get_data();
140
  }
212
 
213
  }
214
 
215
+
216
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/abstract-sv-wc-api-xml-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Response
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_XML_Response' ) ) :
 
30
 
31
  /**
32
  * Base XML API response class.
@@ -39,7 +40,7 @@ abstract class SV_WC_API_XML_Response implements SV_WC_API_Response {
39
  /** @var string string representation of this response */
40
  protected $raw_response_xml;
41
 
42
- /** @var SimpleXMLElement XML object */
43
  protected $response_xml;
44
 
45
  /** @var array|mixed|object XML data after conversion into an usable object */
@@ -133,4 +134,5 @@ abstract class SV_WC_API_XML_Response implements SV_WC_API_Response {
133
 
134
  }
135
 
136
- endif; // class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Response
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_XML_Response' ) ) :
30
+
31
 
32
  /**
33
  * Base XML API response class.
40
  /** @var string string representation of this response */
41
  protected $raw_response_xml;
42
 
43
+ /** @var \SimpleXMLElement XML object */
44
  protected $response_xml;
45
 
46
  /** @var array|mixed|object XML data after conversion into an usable object */
134
 
135
  }
136
 
137
+
138
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/class-sv-wc-api-base.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_Base' ) ) :
 
30
 
31
  /**
32
  * # WooCommerce Plugin Framework API Base Class
@@ -57,7 +58,7 @@ abstract class SV_WC_API_Base {
57
  /** @var string request duration */
58
  protected $request_duration;
59
 
60
- /** @var object request */
61
  protected $request;
62
 
63
  /** @var string response code */
@@ -75,7 +76,7 @@ abstract class SV_WC_API_Base {
75
  /** @var string response handler class name */
76
  protected $response_handler;
77
 
78
- /** @var object response */
79
  protected $response;
80
 
81
 
@@ -83,10 +84,10 @@ abstract class SV_WC_API_Base {
83
  * Perform the request and return the parsed response
84
  *
85
  * @since 2.2.0
86
- * @param object $request class instance which implements \SV_WC_API_Request
87
- * @throws Exception
88
- * @throws \SV_WC_API_Exception
89
- * @return object class instance which implements \SV_WC_API_Response
90
  */
91
  protected function perform_request( $request ) {
92
 
@@ -99,7 +100,7 @@ abstract class SV_WC_API_Base {
99
  $start_time = microtime( true );
100
 
101
  // if this API requires TLS v1.2, force it
102
- if ( $this->require_tls_1_2() ) {
103
  add_action( 'http_api_curl', array( $this, 'set_tls_1_2_request' ), 10, 3 );
104
  }
105
 
@@ -132,11 +133,13 @@ abstract class SV_WC_API_Base {
132
  * cURL implementation
133
  *
134
  * @since 2.2.0
 
135
  * @param string $request_uri
136
  * @param string $request_args
137
- * @return array|WP_Error
138
  */
139
  protected function do_remote_request( $request_uri, $request_args ) {
 
140
  return wp_safe_remote_request( $request_uri, $request_args );
141
  }
142
 
@@ -145,9 +148,9 @@ abstract class SV_WC_API_Base {
145
  * Handle and parse the response
146
  *
147
  * @since 2.2.0
148
- * @param array|WP_Error $response response data
149
- * @throws \SV_WC_API_Exception network issues, timeouts, API errors, etc
150
- * @return object request class instance that implements SV_WC_API_Request
151
  */
152
  protected function handle_response( $response ) {
153
 
@@ -232,7 +235,7 @@ abstract class SV_WC_API_Base {
232
  *
233
  * @since 2.2.0
234
  * @param string $raw_response_body
235
- * @return object response class instance which implements SV_WC_API_Request
236
  */
237
  protected function get_parsed_response( $raw_response_body ) {
238
 
@@ -287,7 +290,7 @@ abstract class SV_WC_API_Base {
287
  * @type string $headers response HTTP headers
288
  * @type string $body response body
289
  * }
290
- * @param \SV_WC_API_Base $this instance
291
  */
292
  do_action( 'wc_' . $this->get_api_id() . '_api_request_performed', $request_data, $response_data, $this );
293
  }
@@ -345,8 +348,9 @@ abstract class SV_WC_API_Base {
345
  * method.
346
  *
347
  * @since 4.1.0
 
348
  * @param string $uri current request URI
349
- * @param \SV_WC_API_Base class instance
350
  */
351
  return apply_filters( 'wc_' . $this->get_api_id() . '_api_request_uri', $uri, $this );
352
  }
@@ -393,7 +397,8 @@ abstract class SV_WC_API_Base {
393
  * Get the request arguments in the format required by wp_remote_request()
394
  *
395
  * @since 2.2.0
396
- * @return mixed|void
 
397
  */
398
  protected function get_request_args() {
399
 
@@ -419,7 +424,7 @@ abstract class SV_WC_API_Base {
419
  *
420
  * @since 2.2.0
421
  * @param array $args request arguments
422
- * @param \SV_WC_API_Base class instance
423
  */
424
  return apply_filters( 'wc_' . $this->get_api_id() . '_http_request_args', $args, $this );
425
  }
@@ -617,25 +622,27 @@ abstract class SV_WC_API_Base {
617
 
618
 
619
  /**
620
- * Returns the most recent request object
621
  *
622
  * @since 2.2.0
623
- * @see \SV_WC_API_Request
624
- * @return object the most recent request object
625
  */
626
  public function get_request() {
 
627
  return $this->request;
628
  }
629
 
630
 
631
  /**
632
- * Returns the most recent response object
633
  *
634
  * @since 2.2.0
635
- * @see \SV_WC_API_Response
636
- * @return object the most recent response object
637
  */
638
  public function get_response() {
 
639
  return $this->response;
640
  }
641
 
@@ -662,8 +669,9 @@ abstract class SV_WC_API_Base {
662
  * to self::perform_request() by your concrete API methods
663
  *
664
  * @since 2.2.0
 
665
  * @param array $args optional request arguments
666
- * @return \SV_WC_API_Request
667
  */
668
  abstract protected function get_new_request( $args = array() );
669
 
@@ -677,7 +685,8 @@ abstract class SV_WC_API_Base {
677
  * as the plugin name used for the default user agent.
678
  *
679
  * @since 2.2.0
680
- * @return \SV_WC_Plugin
 
681
  */
682
  abstract protected function get_plugin();
683
 
@@ -756,10 +765,11 @@ abstract class SV_WC_API_Base {
756
  * Note the class should implement SV_WC_API
757
  *
758
  * @since 2.2.0
 
759
  * @param string $handler handle class name
760
- * @return array
761
  */
762
  protected function set_response_handler( $handler ) {
 
763
  $this->response_handler = $handler;
764
  }
765
 
@@ -768,6 +778,10 @@ abstract class SV_WC_API_Base {
768
  * Maybe force TLS v1.2 requests.
769
  *
770
  * @since 4.4.0
 
 
 
 
771
  */
772
  public function set_tls_1_2_request( $handle, $r, $url ) {
773
 
@@ -780,15 +794,18 @@ abstract class SV_WC_API_Base {
780
 
781
 
782
  /**
783
- * Determine if TLS v1.2 is required for API requests.
784
- *
785
- * Subclasses should override this to return true if TLS v1.2 is required.
786
  *
787
  * @since 4.4.0
 
 
788
  * @return bool
789
  */
790
  public function require_tls_1_2() {
791
- return false;
 
 
 
792
  }
793
 
794
 
@@ -801,32 +818,19 @@ abstract class SV_WC_API_Base {
801
  */
802
  public function is_tls_1_2_available() {
803
 
804
- // assume availability to avoid notices for unknown SSL types
805
- $is_available = true;
806
-
807
- // check the cURL version if installed
808
- if ( is_callable( 'curl_version' ) ) {
809
-
810
- $versions = curl_version();
811
-
812
- // cURL 7.34.0 is considered the minimum version that supports TLS 1.2
813
- if ( version_compare( $versions['version'], '7.34.0', '<' ) ) {
814
- $is_available = false;
815
- }
816
- }
817
-
818
  /**
819
  * Filters whether TLS 1.2 is available.
820
  *
821
  * @since 4.7.1
822
  *
823
  * @param bool $is_available whether TLS 1.2 is available
824
- * @param \SV_WC_API_Base $api API class instance
825
  */
826
- return apply_filters( 'wc_' . $this->get_plugin()->get_id() . '_api_is_tls_1_2_available', $is_available, $this );
827
  }
828
 
829
 
830
  }
831
 
 
832
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_Base' ) ) :
30
+
31
 
32
  /**
33
  * # WooCommerce Plugin Framework API Base Class
58
  /** @var string request duration */
59
  protected $request_duration;
60
 
61
+ /** @var SV_WC_API_Request|object request */
62
  protected $request;
63
 
64
  /** @var string response code */
76
  /** @var string response handler class name */
77
  protected $response_handler;
78
 
79
+ /** @var SV_WC_API_Response|object response */
80
  protected $response;
81
 
82
 
84
  * Perform the request and return the parsed response
85
  *
86
  * @since 2.2.0
87
+ *
88
+ * @param SV_WC_API_Request|object $request class instance which implements SV_WC_API_Request
89
+ * @return SV_WC_API_Response|object class instance which implements SV_WC_API_Response
90
+ * @throws SV_WC_API_Exception may be thrown in implementations
91
  */
92
  protected function perform_request( $request ) {
93
 
100
  $start_time = microtime( true );
101
 
102
  // if this API requires TLS v1.2, force it
103
+ if ( $this->get_plugin()->require_tls_1_2() ) {
104
  add_action( 'http_api_curl', array( $this, 'set_tls_1_2_request' ), 10, 3 );
105
  }
106
 
133
  * cURL implementation
134
  *
135
  * @since 2.2.0
136
+ *
137
  * @param string $request_uri
138
  * @param string $request_args
139
+ * @return array|\WP_Error
140
  */
141
  protected function do_remote_request( $request_uri, $request_args ) {
142
+
143
  return wp_safe_remote_request( $request_uri, $request_args );
144
  }
145
 
148
  * Handle and parse the response
149
  *
150
  * @since 2.2.0
151
+ * @param array|\WP_Error $response response data
152
+ * @throws SV_WC_API_Exception network issues, timeouts, API errors, etc
153
+ * @return SV_WC_API_Request|object request class instance that implements SV_WC_API_Request
154
  */
155
  protected function handle_response( $response ) {
156
 
235
  *
236
  * @since 2.2.0
237
  * @param string $raw_response_body
238
+ * @return object|SV_WC_API_Request response class instance which implements SV_WC_API_Request
239
  */
240
  protected function get_parsed_response( $raw_response_body ) {
241
 
290
  * @type string $headers response HTTP headers
291
  * @type string $body response body
292
  * }
293
+ * @param SV_WC_API_Base $this instance
294
  */
295
  do_action( 'wc_' . $this->get_api_id() . '_api_request_performed', $request_data, $response_data, $this );
296
  }
348
  * method.
349
  *
350
  * @since 4.1.0
351
+ *
352
  * @param string $uri current request URI
353
+ * @param SV_WC_API_Base class instance
354
  */
355
  return apply_filters( 'wc_' . $this->get_api_id() . '_api_request_uri', $uri, $this );
356
  }
397
  * Get the request arguments in the format required by wp_remote_request()
398
  *
399
  * @since 2.2.0
400
+ *
401
+ * @return array
402
  */
403
  protected function get_request_args() {
404
 
424
  *
425
  * @since 2.2.0
426
  * @param array $args request arguments
427
+ * @param SV_WC_API_Base class instance
428
  */
429
  return apply_filters( 'wc_' . $this->get_api_id() . '_http_request_args', $args, $this );
430
  }
622
 
623
 
624
  /**
625
+ * Returns the most recent request object.
626
  *
627
  * @since 2.2.0
628
+ *
629
+ * @return SV_WC_API_Request|object the most recent request object
630
  */
631
  public function get_request() {
632
+
633
  return $this->request;
634
  }
635
 
636
 
637
  /**
638
+ * Returns the most recent response object.
639
  *
640
  * @since 2.2.0
641
+ *
642
+ * @return SV_WC_API_Response|object the most recent response object
643
  */
644
  public function get_response() {
645
+
646
  return $this->response;
647
  }
648
 
669
  * to self::perform_request() by your concrete API methods
670
  *
671
  * @since 2.2.0
672
+ *
673
  * @param array $args optional request arguments
674
+ * @return SV_WC_API_Request|object
675
  */
676
  abstract protected function get_new_request( $args = array() );
677
 
685
  * as the plugin name used for the default user agent.
686
  *
687
  * @since 2.2.0
688
+ *
689
+ * @return SV_WC_Plugin
690
  */
691
  abstract protected function get_plugin();
692
 
765
  * Note the class should implement SV_WC_API
766
  *
767
  * @since 2.2.0
768
+ *
769
  * @param string $handler handle class name
 
770
  */
771
  protected function set_response_handler( $handler ) {
772
+
773
  $this->response_handler = $handler;
774
  }
775
 
778
  * Maybe force TLS v1.2 requests.
779
  *
780
  * @since 4.4.0
781
+ *
782
+ * @param resource $handle the cURL handle returned by curl_init() (passed by reference)
783
+ * @param array $r the HTTP request arguments
784
+ * @param $url string the request URL
785
  */
786
  public function set_tls_1_2_request( $handle, $r, $url ) {
787
 
794
 
795
 
796
  /**
797
+ * Determines if TLS v1.2 is required for API requests.
 
 
798
  *
799
  * @since 4.4.0
800
+ * @deprecated 5.5.2
801
+ *
802
  * @return bool
803
  */
804
  public function require_tls_1_2() {
805
+
806
+ wc_deprecated_function( __METHOD__, '5.5.2', 'SV_WC_Plugin::require_tls_1_2()' );
807
+
808
+ return $this->get_plugin()->require_tls_1_2();
809
  }
810
 
811
 
818
  */
819
  public function is_tls_1_2_available() {
820
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  /**
822
  * Filters whether TLS 1.2 is available.
823
  *
824
  * @since 4.7.1
825
  *
826
  * @param bool $is_available whether TLS 1.2 is available
827
+ * @param SV_WC_API_Base $api API class instance
828
  */
829
+ return (bool) apply_filters( 'wc_' . $this->get_plugin()->get_id() . '_api_is_tls_1_2_available', $this->get_plugin()->is_tls_1_2_available(), $this );
830
  }
831
 
832
 
833
  }
834
 
835
+
836
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/class-sv-wc-api-exception.php RENAMED
@@ -18,19 +18,21 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Exceptions
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_Exception' ) ) :
30
 
31
- /**
32
- * Plugin Framework API Exception - generic API Exception
33
- */
34
- class SV_WC_API_Exception extends SV_WC_Plugin_Exception { }
35
 
36
- endif; // class exists check
 
 
 
 
 
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Exceptions
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_Exception' ) ) :
30
 
 
 
 
 
31
 
32
+ /**
33
+ * Plugin Framework API Exception - generic API Exception
34
+ */
35
+ class SV_WC_API_Exception extends SV_WC_Plugin_Exception { }
36
+
37
+
38
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/interface-sv-wc-api-request.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_Request' ) ) :
 
30
 
31
  /**
32
  * API Request
@@ -92,4 +93,5 @@ interface SV_WC_API_Request {
92
 
93
  }
94
 
95
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_Request' ) ) :
30
+
31
 
32
  /**
33
  * API Request
93
 
94
  }
95
 
96
+
97
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/api/interface-sv-wc-api-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_Response' ) ) :
 
30
 
31
  /**
32
  * API Response
@@ -54,4 +55,5 @@ interface SV_WC_API_Response {
54
 
55
  }
56
 
57
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/API/Request
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_Response' ) ) :
30
+
31
 
32
  /**
33
  * API Response
55
 
56
  }
57
 
58
+
59
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/css/admin/sv-wc-plugin-admin-setup-wizard.min.css RENAMED
File without changes
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/images/ajax-loader.gif RENAMED
File without changes
vendor/skyverge/wc-plugin-framework/woocommerce/assets/js/admin/sv-wc-plugin-admin-setup-wizard.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function() { "use strict"; /** * WooCommerce Plugin Framework Setup Wizard scripts. * * @since 5.3.0 */ jQuery(document).ready(function($) { var blockWizardUI; blockWizardUI = function() { return $('.wc-setup-content').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); }; $('.sv-wc-plugin-admin-setup-control').on('change', '.enable input', function() { if ($(this).is(':checked')) { return $(this).closest('.toggle').removeClass('disabled'); } else { return $(this).closest('.toggle').addClass('disabled'); } }); return $('.sv-wc-plugin-admin-setup-control').on('click', '.enable', function(e) { var $checkbox; if ($(e.target).is('input')) { e.stopPropagation(); return; } $checkbox = $(this).find('input[type="checkbox"]'); return $checkbox.prop('checked', !$checkbox.is(':checked')).change(); }); });}).call(this);
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/assets/js/admin/sv-wp-admin-job-batch-handler.min.js RENAMED
File without changes
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/changelog.txt RENAMED
@@ -1,5 +1,76 @@
1
  *** SkyVerge WooCommerce Plugin Framework Changelog ***
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  2018.09.25 - version 5.3.0
4
  * Feature - Add support for updating payment methods via API on payment
5
  * Tweak - Refactor capture handling and add a dedicated handling class
@@ -183,7 +254,7 @@
183
 
184
  2016.01.13 - version 4.2.0
185
  * Feature - Greatly improved compatibility with multi-language/translation plugins
186
- * Misc - Switched to using a separate text domain for the framework strings - 'woocommerce-gateway-paypal-powered-by-braintree'
187
  * Misc - Added support for WooCommerce 2.5
188
  * Misc - Removed support for WooCommerce 2.2
189
 
1
  *** SkyVerge WooCommerce Plugin Framework Changelog ***
2
 
3
+ 2020.05.15 - version 5.7.1
4
+ * Fix - Prevent JavaScript error triggered when different versions of the framework are used at the same time
5
+ * Fix - Fix URL for the Configure link in the admin notes shown for payment gateways that are not configured
6
+
7
+ 2020.nn.nn - version 5.7.0
8
+ * Feature - Add a Settings API for easily registering plugin settings for display and REST API handling
9
+ * Feature - Introduce a base script handler for enqueueing and loading JavaScript objects
10
+ * Tweak - Ensure payment gateway scripts can be used when certain script optimization plugins are delaying load
11
+ * Tweak - Improve the payment form display on mobile devices
12
+ * Tweak - Update Apple Pay to allow all currencies by default
13
+
14
+ 2020.03.09 - version 5.6.1
15
+ * Fix - Delete enhanced admin notes on plugin deactivation
16
+ * Fix - Prevent uncaught errors when creating notes when WC Admin is disabled
17
+
18
+ 2020.03.04 - version 5.6.0
19
+ * Feature - Add support for WooCommerce Admin enhanced notes
20
+ * Tweak - Refactor Apple Pay handler classes for greater flexibility
21
+ * Fix - Remove gateway payment field validation on initial page load
22
+
23
+ 2020.01.20 - version 5.5.4
24
+ * Tweak - Add a link to the site's terms and conditions page below Apple Pay buttons when available
25
+ * Tweak - Adjust the place order button label for redirect/hosted gateways
26
+ * Fix - Fix a JavaScript error triggered trying read the 'length' property of an undefined value in format_credit_card_inputs()
27
+
28
+ 2020.01.13 - version 5.5.3
29
+ * Fix - Fix a JavaScript error when instantiating a class that hasn't been loaded
30
+
31
+ 2020.01.09 - version 5.5.2
32
+ * Fix - `SV_WC_Payment_Gateway_Apple_Pay::process_payment()` now throws an exception if the result returned by the processing gateway doesn't indicate whether the transaction was successful or not
33
+ * Fix - Update `SV_WC_Payment_Gateway_Direct::process_payment()` to cover for and edge case in which `SV_WC_Payment_Gateway_Direct::do_transaction()` fails without throwing an exception
34
+ * Fix - On WooCommerce 3.9: prevent empty credit card fields from being marked as invalid before the user has entered any data
35
+ * Dev - TLS 1.2 helper methods moved from `SV_WC_API_Base` to `SV_WC_Plugin`
36
+ * Dev - Deprecated `SV_WC_API_Base::require_tls_1_2()`
37
+
38
+ 2019.11.14 - version 5.5.1
39
+ * Tweak - Refactor Apple Pay order creation to support the same filters and actions that are fired during regular checkout
40
+ * Tweak - Allow multiple old hooks to be mapped to a single new one via the hook deprecator
41
+ * Fix - Harden integration with WooCommerce Pre-Orders to avoid a PHP error in some circumstances
42
+ * Fix - Fix double product stock reduction when an order is held and payment is not completed
43
+
44
+ 2019.10.15 - version 5.5.0
45
+ * Feature - Add a plugin helper method to retrieve a template part while consistently passing the default template path to `wc_get_template()`
46
+ * Misc - Deprecate backwards compatibility methods for unsupported WooCommerce and PHP versions
47
+ * Misc - Replace `SV_WC_Helper::get_post()` and `SV_WC_Helper::get_request()` with `SV_WC_Helper::get_posted_value()` and `SV_WC_Helper::get_requested_value()`
48
+
49
+ 2019.09.05 - version 5.4.3
50
+ * Fix - Do not show the checkbox to save the payment method on the checkout page if not logged in and registration during checkout is disabled
51
+ * Misc - Add a Country_Helper class to assist converting country codes to and from various formats
52
+
53
+ 2019.08.27 - version 5.4.2
54
+ * Tweak - Add a standard set of subscription details to orders payment data set by a gateway
55
+ * Tweak - Add replacement helper methods to get the current screen in WordPress and check the screen ID
56
+ * Misc - Change SV_WC_Payment_Gateway::is_configured() from protected to public
57
+ * Misc - Add admin notice when a gateway is enabled but is not configured and is unable to take payments
58
+
59
+ 2019.08.06 - version 5.4.1
60
+ * Misc - Add a configurable admin notice for plugins running deprecated WooCommerce versions
61
+
62
+ 2019.03.13 - version 5.4.0
63
+ * Feature - Add abstract handlers for hosted payment processing
64
+ * Feature - Revamp the Lifecycle handler for easier upgrade routines and add event logging for important lifecycle events
65
+ * Tweak - Adjust the no-HTTPS notice to point to where the merchant can fix the problem
66
+ * Fix - Prevent the Capture button from showing on failed orders or orders without an original transaction ID
67
+ * Fix - Use the current order total when determining whether a captured order should change status
68
+
69
+ 2019.01.09 - version 5.3.1
70
+ * Fix - Fix a JavaScript error in the welcome wizard for missing parameters
71
+ * Fix - Correctly handle memory_limit shorthand from php.ini
72
+ * Misc - Adjust the Accepted Card Logos setting description to further clarify its purpose
73
+
74
  2018.09.25 - version 5.3.0
75
  * Feature - Add support for updating payment methods via API on payment
76
  * Tweak - Refactor capture handling and add a dedicated handling class
254
 
255
  2016.01.13 - version 4.2.0
256
  * Feature - Greatly improved compatibility with multi-language/translation plugins
257
+ * Misc - Switched to using a separate text domain for the framework strings - 'woocommerce-plugin-framework'
258
  * Misc - Added support for WooCommerce 2.5
259
  * Misc - Removed support for WooCommerce 2.2
260
 
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-admin-notice-handler.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Admin_Notice_Handler' ) ) :
 
30
 
31
  /**
32
  * SkyVerge Admin Notice Handler Class
@@ -309,7 +310,6 @@ class SV_WC_Admin_Notice_Handler {
309
  * @since 3.0.0
310
  * @param string $message_id the message identifier
311
  * @param int $user_id optional user identifier, defaults to current user
312
- * @return boolean true if the message has been dismissed by the admin user
313
  */
314
  public function dismiss_notice( $message_id, $user_id = null ) {
315
 
@@ -426,6 +426,8 @@ class SV_WC_Admin_Notice_Handler {
426
  return $this->plugin;
427
  }
428
 
 
429
  }
430
 
431
- endif; // Class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Admin_Notice_Handler' ) ) :
30
+
31
 
32
  /**
33
  * SkyVerge Admin Notice Handler Class
310
  * @since 3.0.0
311
  * @param string $message_id the message identifier
312
  * @param int $user_id optional user identifier, defaults to current user
 
313
  */
314
  public function dismiss_notice( $message_id, $user_id = null ) {
315
 
426
  return $this->plugin;
427
  }
428
 
429
+
430
  }
431
 
432
+
433
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-framework-bootstrap.php ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ defined( 'ABSPATH' ) or exit;
26
+
27
+ if ( ! class_exists( 'SV_WC_Framework_Bootstrap' ) ) :
28
+
29
+
30
+ /**
31
+ * # SkyVerge WooCommerce Plugin Framework Bootstrap
32
+ *
33
+ * The purpose of this class is to find and load the highest versioned
34
+ * framework of the activated framework plugins, and then initialize any
35
+ * compatible framework plugins.
36
+ *
37
+ * @since 2.0.0
38
+ */
39
+ class SV_WC_Framework_Bootstrap {
40
+
41
+
42
+ /** @var SV_WC_Framework_Bootstrap The single instance of the class */
43
+ protected static $instance = null;
44
+
45
+ /** @var array registered framework plugins */
46
+ protected $registered_plugins = array();
47
+
48
+ /** @var array registered and active framework plugins */
49
+ protected $active_plugins = array();
50
+
51
+ /** @var array of plugins that need to be updated due to an outdated framework */
52
+ protected $incompatible_framework_plugins = array();
53
+
54
+ /** @var array of plugins that require a newer version of WC */
55
+ protected $incompatible_wc_version_plugins = array();
56
+
57
+ /** @var array of plugins that require a newer version of WP */
58
+ protected $incompatible_wp_version_plugins = array();
59
+
60
+
61
+ /**
62
+ * Hidden constructor
63
+ *
64
+ * @since 2.0.0
65
+ */
66
+ private function __construct() {
67
+
68
+ // load framework plugins once all plugins are loaded
69
+ add_action( 'plugins_loaded', array( $this, 'load_framework_plugins' ) );
70
+
71
+ // deactivate backwards-incompatible framework plugins if the admin isn't ready to upgrade old plugins
72
+ add_action( 'admin_init', array( $this, 'maybe_deactivate_framework_plugins' ) );
73
+ }
74
+
75
+
76
+ /**
77
+ * Instantiate the class singleton
78
+ *
79
+ * @since 2.0.0
80
+ * @return SV_WC_Framework_Bootstrap singleton instance
81
+ */
82
+ public static function instance() {
83
+ if ( is_null( self::$instance ) ) {
84
+ self::$instance = new self();
85
+ }
86
+
87
+ return self::$instance;
88
+ }
89
+
90
+
91
+ /**
92
+ * Register a frameworked plugin
93
+ *
94
+ * @since 2.0.0
95
+ * @param string $version the framework version
96
+ * @param string $plugin_name the plugin name
97
+ * @param string $path the plugin path
98
+ * @param callable $callback function to initialize the plugin
99
+ * @param array $args optional plugin arguments. Possible arguments: 'is_payment_gateway', 'backwards_compatible'
100
+ */
101
+ public function register_plugin( $version, $plugin_name, $path, $callback, $args = array() ) {
102
+ $this->registered_plugins[] = array( 'version' => $version, 'plugin_name' => $plugin_name, 'path' => $path, 'callback' => $callback, 'args' => $args );
103
+ }
104
+
105
+
106
+ /**
107
+ * Loads all registered framework plugins, first initializing the plugin
108
+ * framework by loading the highest versioned one.
109
+ *
110
+ * @since 2.0.0
111
+ */
112
+ public function load_framework_plugins() {
113
+
114
+ // first sort the registered plugins by framework version
115
+ usort( $this->registered_plugins, array( $this, 'compare_frameworks' ) );
116
+
117
+ $loaded_framework = null;
118
+
119
+ foreach ( $this->registered_plugins as $plugin ) {
120
+
121
+ // load the first found (highest versioned) plugin framework class
122
+ if ( ! class_exists( 'SV_WC_Plugin' ) ) {
123
+ require_once( $this->get_plugin_path( $plugin['path'] ) . '/lib/skyverge/woocommerce/class-sv-wc-plugin.php' );
124
+ $loaded_framework = $plugin;
125
+
126
+ // the loaded plugin is always considered active (for the
127
+ // purposes of handling conflicts between this and other plugins
128
+ // with incompatible framework versions)
129
+ $this->active_plugins[] = $plugin;
130
+ }
131
+
132
+ // if the loaded version of the framework has a backwards compatibility requirement
133
+ // which is not met by the current plugin add an admin notice and move on without
134
+ // loading the plugin
135
+ if ( ! empty( $loaded_framework['args']['backwards_compatible'] ) && version_compare( $loaded_framework['args']['backwards_compatible'], $plugin['version'], '>' ) ) {
136
+
137
+ $this->incompatible_framework_plugins[] = $plugin;
138
+
139
+ // next plugin
140
+ continue;
141
+ }
142
+
143
+ // if a plugin defines a minimum WC version which is not met, render a notice and skip loading the plugin
144
+ if ( ! empty( $plugin['args']['minimum_wc_version'] ) && version_compare( $this->get_wc_version(), $plugin['args']['minimum_wc_version'], '<' ) ) {
145
+
146
+ $this->incompatible_wc_version_plugins[] = $plugin;
147
+
148
+ // next plugin
149
+ continue;
150
+ }
151
+
152
+ // if a plugin defines a minimum WP version which is not met, render a notice and skip loading the plugin
153
+ if ( ! empty( $plugin['args']['minimum_wp_version'] ) && version_compare( get_bloginfo( 'version' ), $plugin['args']['minimum_wp_version'], '<' ) ) {
154
+
155
+ $this->incompatible_wp_version_plugins[] = $plugin;
156
+
157
+ // next plugin
158
+ continue;
159
+ }
160
+
161
+ // add this plugin to the active list
162
+ if ( ! in_array( $plugin, $this->active_plugins ) ) {
163
+ $this->active_plugins[] = $plugin;
164
+ }
165
+
166
+ // load the first found (highest versioned) payment gateway framework class, as needed
167
+ if ( isset( $plugin['args']['is_payment_gateway'] ) && ! class_exists( 'SV_WC_Payment_Gateway' ) ) {
168
+ require_once( $this->get_plugin_path( $plugin['path'] ) . '/lib/skyverge/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php' );
169
+ }
170
+
171
+ // initialize the plugin
172
+ $plugin['callback']();
173
+ }
174
+
175
+ // render update notices
176
+ if ( ( $this->incompatible_framework_plugins || $this->incompatible_wc_version_plugins || $this->incompatible_wp_version_plugins ) && is_admin() && ! defined( 'DOING_AJAX' ) && ! has_action( 'admin_notices', array( $this, 'render_update_notices' ) ) ) {
177
+
178
+ add_action( 'admin_notices', array( $this, 'render_update_notices' ) );
179
+ }
180
+
181
+ /**
182
+ * WC Plugin Framework Plugins Loaded Action.
183
+ *
184
+ * Fired when all frameworked plugins are loaded. Frameworked plugins can
185
+ * hook into this action rather than `plugins_loaded`/`woocommerce_loaded`
186
+ * as needed.
187
+ *
188
+ * @since 2.0.0
189
+ */
190
+ do_action( 'sv_wc_framework_plugins_loaded' );
191
+ }
192
+
193
+
194
+ /** Admin methods ******************************************************/
195
+
196
+
197
+ /**
198
+ * Deactivate backwards-incompatible framework plugins, which will allow
199
+ * plugins with an older version of the framework to be active. Useful when
200
+ * the admin isn't ready to upgrade older plugins yet needs them to still
201
+ * function (e.g. a payment gateway)
202
+ *
203
+ * @since 4.0.0
204
+ */
205
+ public function maybe_deactivate_framework_plugins() {
206
+
207
+ if ( isset( $_GET['sv_wc_framework_deactivate_newer'] ) ) {
208
+ if ( 'yes' == $_GET['sv_wc_framework_deactivate_newer'] ) {
209
+
210
+ // don't want to just deactivate all active plugins willy-nilly if there's no incompatible plugins
211
+ if ( count( $this->incompatible_framework_plugins ) == 0 ) {
212
+ return;
213
+ }
214
+
215
+ $plugins = array();
216
+
217
+ foreach ( $this->active_plugins as $plugin ) {
218
+ $plugins[] = plugin_basename( $plugin['path'] );
219
+ }
220
+
221
+ // deactivate all "active" frameworked plugins, these will be the newest, backwards-incompatible ones
222
+ deactivate_plugins( $plugins );
223
+
224
+ // redirect to the inactive plugin admin page, with a message indicating the number of plugins deactivated
225
+ wp_redirect( admin_url( 'plugins.php?plugin_status=inactive&sv_wc_framework_deactivate_newer=' . count( $plugins ) ) );
226
+ exit;
227
+ } else {
228
+ // we're on the inactive plugin page and we've deactivated one or more plugins
229
+ add_action( 'admin_notices', array( $this, 'render_deactivation_notice' ) );
230
+ }
231
+ }
232
+ }
233
+
234
+
235
+ /**
236
+ * Render a notice with a count of the backwards incompatible frameworked
237
+ * plugins that were deactivated
238
+ *
239
+ * @since 4.0.0
240
+ */
241
+ public function render_deactivation_notice() {
242
+ echo '<div class="updated"><p>';
243
+ echo $_GET['sv_wc_framework_deactivate_newer'] > 1 ?
244
+ sprintf( 'Deactivated %d plugins', $_GET['sv_wc_framework_deactivate_newer'] ) :
245
+ 'Deactivated one plugin';
246
+ echo '</p></div>';
247
+ }
248
+
249
+
250
+ /**
251
+ * Render a notice to update any plugins with incompatible framework
252
+ * versions, or incompatiblities with the current WooCommerce or WordPress
253
+ * versions
254
+ *
255
+ * @since 2.0.0
256
+ */
257
+ public function render_update_notices() {
258
+
259
+ // must update plugin notice
260
+ if ( ! empty( $this->incompatible_framework_plugins ) ) {
261
+
262
+ $plugin_count = count( $this->incompatible_framework_plugins );
263
+
264
+ echo '<div class="error">';
265
+
266
+ // describe the problem
267
+ echo '<p>';
268
+ echo esc_html( _n( 'The following plugin is disabled because it is out of date and incompatible with newer plugins on your site:', 'The following plugins are disabled because they are out of date and incompatible with newer plugins on your site:', $plugin_count, 'woocommerce-plugin-framework' ) );
269
+ echo '</p>';
270
+
271
+ // add a incompatible plugin list
272
+ echo '<ul>';
273
+ foreach ( $this->incompatible_framework_plugins as $plugin ) {
274
+ printf( '<li>%s</li>', esc_html( $plugin['plugin_name'] ) );
275
+ }
276
+ echo '</ul>';
277
+
278
+ // describe the way to fix it
279
+ echo '<p>';
280
+ printf(
281
+ /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag, %3$s - <em> tag, %4$s - </em> tag, %5$s - <a> tag, %6$s - </a> tag, %7$s - <a> tag, %8$s - </a> tag */
282
+ esc_html( _n( 'To resolve this, please %1$supdate%2$s (recommended) %3$sor%4$s %5$sdeactivate%6$s the above plugin, or %7$sdeactivate the following%8$s:', 'To resolve this, please %1$supdate%2$s (recommended) %3$sor%4$s %5$sdeactivate%6$s the above plugins, or %7$sdeactivate the following%8$s:', $plugin_count, 'woocommerce-plugin-framework' ) ),
283
+ '<a href="' . esc_url( admin_url( 'update-core.php' ) ) . '">', '</a>',
284
+ '<em>', '</em>',
285
+ '<a href="' . esc_url( admin_url( 'update-core.php' ) ) . '">', '</a>',
286
+ '<a href="' . esc_url( admin_url( 'plugins.php?sv_wc_framework_deactivate_newer=yes' ) ) . '">', '</a>'
287
+ );
288
+ echo '</p>';
289
+
290
+ // add the list of active plugins
291
+ echo '<ul>';
292
+ foreach ( $this->active_plugins as $plugin ) {
293
+ printf( '<li>%s</li>', esc_html( $plugin['plugin_name'] ) );
294
+ }
295
+ echo '</ul>';
296
+
297
+ echo '</div>';
298
+ }
299
+
300
+ // must update WC notice
301
+ if ( ! empty( $this->incompatible_wc_version_plugins ) ) {
302
+
303
+ printf( '<div class="error"><p>%s</p><ul>', count( $this->incompatible_wc_version_plugins ) > 1 ? esc_html__( 'The following plugins are inactive because they require a newer version of WooCommerce:', 'woocommerce-plugin-framework' ) : esc_html__( 'The following plugin is inactive because it requires a newer version of WooCommerce:', 'woocommerce-plugin-framework' ) );
304
+
305
+ foreach ( $this->incompatible_wc_version_plugins as $plugin ) {
306
+
307
+ /* translators: Placeholders: %1$s - plugin name, %2$s - WooCommerce version number */
308
+ echo '<li>' . sprintf( esc_html__( '%1$s requires WooCommerce %2$s or newer', 'woocommerce-plugin-framework' ), esc_html( $plugin['plugin_name'] ), esc_html( $plugin['args']['minimum_wc_version'] ) ) . '</li>';
309
+ }
310
+
311
+ /* translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
312
+ echo '</ul><p>' . sprintf( esc_html__( 'Please %1$supdate WooCommerce%2$s', 'woocommerce-plugin-framework' ), '<a href="' . esc_url( admin_url( 'update-core.php' ) ) . '">', '&nbsp;&raquo;</a>' ) . '</p></div>';
313
+ }
314
+
315
+ // must update WP notice
316
+ if ( ! empty( $this->incompatible_wp_version_plugins ) ) {
317
+
318
+ printf( '<div class="error"><p>%s</p><ul>', count( $this->incompatible_wp_version_plugins ) > 1 ? 'The following plugins are inactive because they require a newer version of WordPress:' : 'The following plugin is inactive because it requires a newer version of WordPress:' );
319
+
320
+ foreach ( $this->incompatible_wp_version_plugins as $plugin ) {
321
+ printf( '<li>%s requires WordPress %s or newer</li>', esc_html( $plugin['plugin_name'] ), esc_html( $plugin['args']['minimum_wp_version'] ) );
322
+ }
323
+
324
+ echo '</ul><p>Please <a href="' . esc_url( admin_url( 'update-core.php' ) ) . '">update WordPress&nbsp;&raquo;</a></p></div>';
325
+ }
326
+ }
327
+
328
+
329
+ /** Helper methods ******************************************************/
330
+
331
+
332
+ /**
333
+ * Is the WooCommerce plugin installed and active? This method is handy for
334
+ * frameworked plugins that are listed on wordpress.org and thus don't have
335
+ * access to the Woo Helper functions bundled with WooThemes-listed plugins.
336
+ *
337
+ * Notice: For now you can't rely on this method being available, since the
338
+ * bootstrap class is the only piece of the framework which is loaded
339
+ * simply according to the lexical order of plugin directories. Therefore
340
+ * to use, you should first check that this method exists, or if you really
341
+ * need to check for WooCommerce being active, define your own method.
342
+ *
343
+ * @since 4.0.0
344
+ * @return boolean true if the WooCommerce plugin is installed and active
345
+ */
346
+ public static function is_woocommerce_active() {
347
+
348
+ $active_plugins = (array) get_option( 'active_plugins', array() );
349
+
350
+ if ( is_multisite() ) {
351
+ $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
352
+ }
353
+
354
+ return in_array( 'woocommerce/woocommerce.php', $active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', $active_plugins );
355
+ }
356
+
357
+
358
+ /**
359
+ * Compare the two framework versions. Returns -1 if $a is less than $b, 0 if
360
+ * they're equal, and 1 if $a is greater than $b
361
+ *
362
+ * @since 2.0.0
363
+ * @param array $a first registered plugin to compare
364
+ * @param array $b second registered plugin to compare
365
+ * @return int -1 if $a is less than $b, 0 if they're equal, and 1 if $a is greater than $b
366
+ */
367
+ public function compare_frameworks( $a, $b ) {
368
+ // compare versions without the operator argument, so we get a -1, 0 or 1 result
369
+ return version_compare( $b['version'], $a['version'] );
370
+ }
371
+
372
+
373
+ /**
374
+ * Returns the plugin path for the given $file
375
+ *
376
+ * @since 2.0.0
377
+ * @param string $file the file
378
+ * @return string plugin path
379
+ */
380
+ public function get_plugin_path( $file ) {
381
+ return untrailingslashit( plugin_dir_path( $file ) );
382
+ }
383
+
384
+
385
+ /**
386
+ * Returns the WooCommerce version number, backwards compatible to
387
+ * WC 1.5
388
+ *
389
+ * @since 3.0.0
390
+ * @return null|string
391
+ */
392
+ protected function get_wc_version() {
393
+
394
+ if ( defined( 'WC_VERSION' ) && WC_VERSION ) return WC_VERSION;
395
+ if ( defined( 'WOOCOMMERCE_VERSION' ) && WOOCOMMERCE_VERSION ) return WOOCOMMERCE_VERSION;
396
+
397
+ return null;
398
+ }
399
+
400
+ }
401
+
402
+
403
+ // instantiate the class
404
+ SV_WC_Framework_Bootstrap::instance();
405
+
406
+
407
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-helper.php ADDED
@@ -0,0 +1,1040 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
+
27
+ use Automattic\WooCommerce\Admin\Loader;
28
+
29
+ defined( 'ABSPATH' ) or exit;
30
+
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Helper' ) ) :
32
+
33
+
34
+ /**
35
+ * SkyVerge Helper Class
36
+ *
37
+ * The purpose of this class is to centralize common utility functions that
38
+ * are commonly used in SkyVerge plugins
39
+ *
40
+ * @since 2.2.0
41
+ */
42
+ class SV_WC_Helper {
43
+
44
+
45
+ /** encoding used for mb_*() string functions */
46
+ const MB_ENCODING = 'UTF-8';
47
+
48
+
49
+ /** String manipulation functions (all multi-byte safe) ***************/
50
+
51
+ /**
52
+ * Returns true if the haystack string starts with needle
53
+ *
54
+ * Note: case-sensitive
55
+ *
56
+ * @since 2.2.0
57
+ * @param string $haystack
58
+ * @param string $needle
59
+ * @return bool
60
+ */
61
+ public static function str_starts_with( $haystack, $needle ) {
62
+
63
+ if ( self::multibyte_loaded() ) {
64
+
65
+ if ( '' === $needle ) {
66
+ return true;
67
+ }
68
+
69
+ return 0 === mb_strpos( $haystack, $needle, 0, self::MB_ENCODING );
70
+
71
+ } else {
72
+
73
+ $needle = self::str_to_ascii( $needle );
74
+
75
+ if ( '' === $needle ) {
76
+ return true;
77
+ }
78
+
79
+ return 0 === strpos( self::str_to_ascii( $haystack ), self::str_to_ascii( $needle ) );
80
+ }
81
+ }
82
+
83
+
84
+ /**
85
+ * Return true if the haystack string ends with needle
86
+ *
87
+ * Note: case-sensitive
88
+ *
89
+ * @since 2.2.0
90
+ * @param string $haystack
91
+ * @param string $needle
92
+ * @return bool
93
+ */
94
+ public static function str_ends_with( $haystack, $needle ) {
95
+
96
+ if ( '' === $needle ) {
97
+ return true;
98
+ }
99
+
100
+ if ( self::multibyte_loaded() ) {
101
+
102
+ return mb_substr( $haystack, -mb_strlen( $needle, self::MB_ENCODING ), null, self::MB_ENCODING ) === $needle;
103
+
104
+ } else {
105
+
106
+ $haystack = self::str_to_ascii( $haystack );
107
+ $needle = self::str_to_ascii( $needle );
108
+
109
+ return substr( $haystack, -strlen( $needle ) ) === $needle;
110
+ }
111
+ }
112
+
113
+
114
+ /**
115
+ * Returns true if the needle exists in haystack
116
+ *
117
+ * Note: case-sensitive
118
+ *
119
+ * @since 2.2.0
120
+ * @param string $haystack
121
+ * @param string $needle
122
+ * @return bool
123
+ */
124
+ public static function str_exists( $haystack, $needle ) {
125
+
126
+ if ( self::multibyte_loaded() ) {
127
+
128
+ if ( '' === $needle ) {
129
+ return false;
130
+ }
131
+
132
+ return false !== mb_strpos( $haystack, $needle, 0, self::MB_ENCODING );
133
+
134
+ } else {
135
+
136
+ $needle = self::str_to_ascii( $needle );
137
+
138
+ if ( '' === $needle ) {
139
+ return false;
140
+ }
141
+
142
+ return false !== strpos( self::str_to_ascii( $haystack ), self::str_to_ascii( $needle ) );
143
+ }
144
+ }
145
+
146
+
147
+ /**
148
+ * Truncates a given $string after a given $length if string is longer than
149
+ * $length. The last characters will be replaced with the $omission string
150
+ * for a total length not exceeding $length
151
+ *
152
+ * @since 2.2.0
153
+ * @param string $string text to truncate
154
+ * @param int $length total desired length of string, including omission
155
+ * @param string $omission omission text, defaults to '...'
156
+ * @return string
157
+ */
158
+ public static function str_truncate( $string, $length, $omission = '...' ) {
159
+
160
+ if ( self::multibyte_loaded() ) {
161
+
162
+ // bail if string doesn't need to be truncated
163
+ if ( mb_strlen( $string, self::MB_ENCODING ) <= $length ) {
164
+ return $string;
165
+ }
166
+
167
+ $length -= mb_strlen( $omission, self::MB_ENCODING );
168
+
169
+ return mb_substr( $string, 0, $length, self::MB_ENCODING ) . $omission;
170
+
171
+ } else {
172
+
173
+ $string = self::str_to_ascii( $string );
174
+
175
+ // bail if string doesn't need to be truncated
176
+ if ( strlen( $string ) <= $length ) {
177
+ return $string;
178
+ }
179
+
180
+ $length -= strlen( $omission );
181
+
182
+ return substr( $string, 0, $length ) . $omission;
183
+ }
184
+ }
185
+
186
+
187
+ /**
188
+ * Returns a string with all non-ASCII characters removed. This is useful
189
+ * for any string functions that expect only ASCII chars and can't
190
+ * safely handle UTF-8. Note this only allows ASCII chars in the range
191
+ * 33-126 (newlines/carriage returns are stripped)
192
+ *
193
+ * @since 2.2.0
194
+ * @param string $string string to make ASCII
195
+ * @return string
196
+ */
197
+ public static function str_to_ascii( $string ) {
198
+
199
+ // strip ASCII chars 32 and under
200
+ $string = filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW );
201
+
202
+ // strip ASCII chars 127 and higher
203
+ return filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH );
204
+ }
205
+
206
+
207
+ /**
208
+ * Return a string with insane UTF-8 characters removed, like invisible
209
+ * characters, unused code points, and other weirdness. It should
210
+ * accept the common types of characters defined in Unicode.
211
+ *
212
+ * The following are allowed characters:
213
+ *
214
+ * p{L} - any kind of letter from any language
215
+ * p{Mn} - a character intended to be combined with another character without taking up extra space (e.g. accents, umlauts, etc.)
216
+ * p{Mc} - a character intended to be combined with another character that takes up extra space (vowel signs in many Eastern languages)
217
+ * p{Nd} - a digit zero through nine in any script except ideographic scripts
218
+ * p{Zs} - a whitespace character that is invisible, but does take up space
219
+ * p{P} - any kind of punctuation character
220
+ * p{Sm} - any mathematical symbol
221
+ * p{Sc} - any currency sign
222
+ *
223
+ * pattern definitions from http://www.regular-expressions.info/unicode.html
224
+ *
225
+ * @since 4.0.0
226
+ *
227
+ * @param string $string
228
+ * @return string
229
+ */
230
+ public static function str_to_sane_utf8( $string ) {
231
+
232
+ $sane_string = preg_replace( '/[^\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Zs}\p{P}\p{Sm}\p{Sc}]/u', '', $string );
233
+
234
+ // preg_replace with the /u modifier can return null or false on failure
235
+ return ( is_null( $sane_string ) || false === $sane_string ) ? $string : $sane_string;
236
+ }
237
+
238
+
239
+ /**
240
+ * Helper method to check if the multibyte extension is loaded, which
241
+ * indicates it's safe to use the mb_*() string methods
242
+ *
243
+ * @since 2.2.0
244
+ * @return bool
245
+ */
246
+ protected static function multibyte_loaded() {
247
+
248
+ return extension_loaded( 'mbstring' );
249
+ }
250
+
251
+
252
+ /** Array functions ***************************************************/
253
+
254
+
255
+ /**
256
+ * Insert the given element after the given key in the array
257
+ *
258
+ * Sample usage:
259
+ *
260
+ * given
261
+ *
262
+ * array( 'item_1' => 'foo', 'item_2' => 'bar' )
263
+ *
264
+ * array_insert_after( $array, 'item_1', array( 'item_1.5' => 'w00t' ) )
265
+ *
266
+ * becomes
267
+ *
268
+ * array( 'item_1' => 'foo', 'item_1.5' => 'w00t', 'item_2' => 'bar' )
269
+ *
270
+ * @since 2.2.0
271
+ * @param array $array array to insert the given element into
272
+ * @param string $insert_key key to insert given element after
273
+ * @param array $element element to insert into array
274
+ * @return array
275
+ */
276
+ public static function array_insert_after( Array $array, $insert_key, Array $element ) {
277
+
278
+ $new_array = array();
279
+
280
+ foreach ( $array as $key => $value ) {
281
+
282
+ $new_array[ $key ] = $value;
283
+
284
+ if ( $insert_key == $key ) {
285
+
286
+ foreach ( $element as $k => $v ) {
287
+ $new_array[ $k ] = $v;
288
+ }
289
+ }
290
+ }
291
+
292
+ return $new_array;
293
+ }
294
+
295
+
296
+ /**
297
+ * Convert array into XML by recursively generating child elements
298
+ *
299
+ * First instantiate a new XML writer object:
300
+ *
301
+ * $xml = new XMLWriter();
302
+ *
303
+ * Open in memory (alternatively you can use a local URI for file output)
304
+ *
305
+ * $xml->openMemory();
306
+ *
307
+ * Then start the document
308
+ *
309
+ * $xml->startDocument( '1.0', 'UTF-8' );
310
+ *
311
+ * Don't forget to end the document and output the memory
312
+ *
313
+ * $xml->endDocument();
314
+ *
315
+ * $your_xml_string = $xml->outputMemory();
316
+ *
317
+ * @since 2.2.0
318
+ *
319
+ * @param \XMLWriter $xml_writer XML writer instance
320
+ * @param string|array $element_key name for element, e.g. <per_page>
321
+ * @param string|array $element_value value for element, e.g. 100
322
+ */
323
+ public static function array_to_xml( $xml_writer, $element_key, $element_value = array() ) {
324
+
325
+ if ( is_array( $element_value ) ) {
326
+
327
+ // handle attributes
328
+ if ( '@attributes' === $element_key ) {
329
+
330
+ foreach ( $element_value as $attribute_key => $attribute_value ) {
331
+
332
+ $xml_writer->startAttribute( $attribute_key );
333
+ $xml_writer->text( $attribute_value );
334
+ $xml_writer->endAttribute();
335
+ }
336
+
337
+ return;
338
+ }
339
+
340
+ // handle multi-elements (e.g. multiple <Order> elements)
341
+ if ( is_numeric( key( $element_value ) ) ) {
342
+
343
+ // recursively generate child elements
344
+ foreach ( $element_value as $child_element_key => $child_element_value ) {
345
+
346
+ $xml_writer->startElement( $element_key );
347
+
348
+ foreach ( $child_element_value as $sibling_element_key => $sibling_element_value ) {
349
+ self::array_to_xml( $xml_writer, $sibling_element_key, $sibling_element_value );
350
+ }
351
+
352
+ $xml_writer->endElement();
353
+ }
354
+
355
+ } else {
356
+
357
+ // start root element
358
+ $xml_writer->startElement( $element_key );
359
+
360
+ // recursively generate child elements
361
+ foreach ( $element_value as $child_element_key => $child_element_value ) {
362
+ self::array_to_xml( $xml_writer, $child_element_key, $child_element_value );
363
+ }
364
+
365
+ // end root element
366
+ $xml_writer->endElement();
367
+ }
368
+
369
+ } else {
370
+
371
+ // handle single elements
372
+ if ( '@value' === $element_key ) {
373
+
374
+ $xml_writer->text( $element_value );
375
+
376
+ } else {
377
+
378
+ // wrap element in CDATA tags if it contains illegal characters
379
+ if ( false !== strpos( $element_value, '<' ) || false !== strpos( $element_value, '>' ) ) {
380
+
381
+ $xml_writer->startElement( $element_key );
382
+ $xml_writer->writeCdata( $element_value );
383
+ $xml_writer->endElement();
384
+
385
+ } else {
386
+
387
+ $xml_writer->writeElement( $element_key, $element_value );
388
+ }
389
+ }
390
+ }
391
+ }
392
+
393
+
394
+ /**
395
+ * Lists an array as text.
396
+ *
397
+ * Takes an array and returns a list like "one, two, three, and four"
398
+ * with a (mandatory) oxford comma.
399
+ *
400
+ * @since 5.2.0
401
+ *
402
+ * @param array $items items to list
403
+ * @param string|null $conjunction coordinating conjunction, like "or" or "and"
404
+ * @param string $separator list separator, like a comma
405
+ * @return string
406
+ */
407
+ public static function list_array_items( array $items, $conjunction = null, $separator = '' ) {
408
+
409
+ if ( ! is_string( $conjunction ) ) {
410
+ $conjunction = _x( 'and', 'coordinating conjunction for a list of items: a, b, and c', 'woocommerce-plugin-framework' );
411
+ }
412
+
413
+ // append the conjunction to the last item
414
+ if ( count( $items ) > 1 ) {
415
+
416
+ $last_item = array_pop( $items );
417
+
418
+ array_push( $items, trim( "{$conjunction} {$last_item}" ) );
419
+
420
+ // only use a comma if needed and no separator was passed
421
+ if ( count( $items ) < 3 ) {
422
+ $separator = ' ';
423
+ } elseif ( ! is_string( $separator ) || '' === $separator ) {
424
+ $separator = ', ';
425
+ }
426
+ }
427
+
428
+ return implode( $separator, $items );
429
+ }
430
+
431
+
432
+ /** Number helper functions *******************************************/
433
+
434
+
435
+ /**
436
+ * Format a number with 2 decimal points, using a period for the decimal
437
+ * separator and no thousands separator.
438
+ *
439
+ * Commonly used for payment gateways which require amounts in this format.
440
+ *
441
+ * @since 3.0.0
442
+ * @param float $number
443
+ * @return string
444
+ */
445
+ public static function number_format( $number ) {
446
+
447
+ return number_format( (float) $number, 2, '.', '' );
448
+ }
449
+
450
+
451
+ /** WooCommerce helper functions **************************************/
452
+
453
+
454
+ /**
455
+ * Gets order line items (products) as an array of objects.
456
+ *
457
+ * Object properties:
458
+ *
459
+ * + id - item ID
460
+ * + name - item name, usually product title, processed through htmlentities()
461
+ * + description - formatted item meta (e.g. Size: Medium, Color: blue), processed through htmlentities()
462
+ * + quantity - item quantity
463
+ * + item_total - item total (line total divided by quantity, excluding tax & rounded)
464
+ * + line_total - line item total (excluding tax & rounded)
465
+ * + meta - formatted item meta array
466
+ * + product - item product or null if getting product from item failed
467
+ * + item - raw item array
468
+ *
469
+ * @since 3.0.0
470
+ *
471
+ * @param \WC_Order $order
472
+ * @return \stdClass[] array of line item objects
473
+ */
474
+ public static function get_order_line_items( $order ) {
475
+
476
+ $line_items = [];
477
+
478
+ /** @var \WC_Order_Item_Product $item */
479
+ foreach ( $order->get_items() as $id => $item ) {
480
+
481
+ $line_item = new \stdClass();
482
+ $product = $item->get_product();
483
+ $name = $item->get_name();
484
+ $quantity = $item->get_quantity();
485
+ $sku = $product instanceof \WC_Product ? $product->get_sku() : '';
486
+ $item_desc = [];
487
+
488
+ // add SKU to description if available
489
+ if ( ! empty( $sku ) ) {
490
+ $item_desc[] = sprintf( 'SKU: %s', $sku );
491
+ }
492
+
493
+ $item_meta = SV_WC_Order_Compatibility::get_item_formatted_meta_data( $item, '_', true );
494
+
495
+ if ( ! empty( $item_meta ) ) {
496
+
497
+ foreach ( $item_meta as $meta ) {
498
+
499
+ $item_desc[] = sprintf( '%s: %s', $meta['label'], $meta['value'] );
500
+ }
501
+ }
502
+
503
+ $item_desc = implode( ', ', $item_desc );
504
+
505
+ $line_item->id = $id;
506
+ $line_item->name = htmlentities( $name, ENT_QUOTES, 'UTF-8', false );
507
+ $line_item->description = htmlentities( $item_desc, ENT_QUOTES, 'UTF-8', false );
508
+ $line_item->quantity = $quantity;
509
+ $line_item->item_total = isset( $item['recurring_line_total'] ) ? $item['recurring_line_total'] : $order->get_item_total( $item );
510
+ $line_item->line_total = $order->get_line_total( $item );
511
+ $line_item->meta = $item_meta;
512
+ $line_item->product = is_object( $product ) ? $product : null;
513
+ $line_item->item = $item;
514
+
515
+ $line_items[] = $line_item;
516
+ }
517
+
518
+ return $line_items;
519
+ }
520
+
521
+
522
+ /**
523
+ * Determines if an order contains only virtual products.
524
+ *
525
+ * @since 4.5.0
526
+ *
527
+ * @param \WC_Order $order the order object
528
+ * @return bool
529
+ */
530
+ public static function is_order_virtual( \WC_Order $order ) {
531
+
532
+ $is_virtual = true;
533
+
534
+ /** @var \WC_Order_Item_Product $item */
535
+ foreach ( $order->get_items() as $item ) {
536
+
537
+ $product = $item->get_product();
538
+
539
+ // once we've found one non-virtual product we know we're done, break out of the loop
540
+ if ( $product && ! $product->is_virtual() ) {
541
+
542
+ $is_virtual = false;
543
+ break;
544
+ }
545
+ }
546
+
547
+ return $is_virtual;
548
+ }
549
+
550
+
551
+ /**
552
+ * Safely gets and trims data from $_POST.
553
+ *
554
+ * @since 3.0.0
555
+ * @deprecated 5.5.0
556
+ *
557
+ * @param string $key array key to get from $_POST array
558
+ * @return string value from $_POST or blank string if $_POST[ $key ] is not set
559
+ */
560
+ public static function get_post( $key ) {
561
+
562
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::get_posted_value()' );
563
+
564
+ return self::get_posted_value( $key );
565
+ }
566
+
567
+
568
+ /**
569
+ * Safely gets a value from $_POST.
570
+ *
571
+ * If the expected data is a string also trims it.
572
+ *
573
+ * @since 5.5.0
574
+ *
575
+ * @param string $key posted data key
576
+ * @param int|float|array|bool|null|string $default default data type to return (default empty string)
577
+ * @return int|float|array|bool|null|string posted data value if key found, or default
578
+ */
579
+ public static function get_posted_value( $key, $default = '' ) {
580
+
581
+ $value = $default;
582
+
583
+ if ( isset( $_POST[ $key ] ) ) {
584
+ $value = is_string( $_POST[ $key ] ) ? trim( $_POST[ $key ] ) : $_POST[ $key ];
585
+ }
586
+
587
+ return $value;
588
+ }
589
+
590
+
591
+ /**
592
+ * Safely gets and trims data from $_REQUEST.
593
+ *
594
+ * @since 3.0.0
595
+ * @deprecated 5.5.0
596
+ *
597
+ * @param string $key array key to get from $_REQUEST array
598
+ * @return string value from $_REQUEST or blank string if $_REQUEST[ $key ] is not set
599
+ */
600
+ public static function get_request( $key ) {
601
+
602
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::get_requested_value()' );
603
+
604
+ return self::get_requested_value( $key );
605
+ }
606
+
607
+
608
+ /**
609
+ * Safely gets a value from $_REQUEST.
610
+ *
611
+ * If the expected data is a string also trims it.
612
+ *
613
+ * @since 5.5.0
614
+ *
615
+ * @param string $key posted data key
616
+ * @param int|float|array|bool|null|string $default default data type to return (default empty string)
617
+ * @return int|float|array|bool|null|string posted data value if key found, or default
618
+ */
619
+ public static function get_requested_value( $key, $default = '' ) {
620
+
621
+ $value = $default;
622
+
623
+ if ( isset( $_REQUEST[ $key ] ) ) {
624
+ $value = is_string( $_REQUEST[ $key ] ) ? trim( $_REQUEST[ $key ] ) : $_REQUEST[ $key ];
625
+ }
626
+
627
+ return $value;
628
+ }
629
+
630
+
631
+ /**
632
+ * Get the count of notices added, either for all notices (default) or for one
633
+ * particular notice type specified by $notice_type.
634
+ *
635
+ * WC notice functions are not available in the admin
636
+ *
637
+ * @since 3.0.2
638
+ * @param string $notice_type The name of the notice type - either error, success or notice. [optional]
639
+ * @return int
640
+ */
641
+ public static function wc_notice_count( $notice_type = '' ) {
642
+
643
+ if ( function_exists( 'wc_notice_count' ) ) {
644
+ return wc_notice_count( $notice_type );
645
+ }
646
+
647
+ return 0;
648
+ }
649
+
650
+
651
+ /**
652
+ * Add and store a notice.
653
+ *
654
+ * WC notice functions are not available in the admin
655
+ *
656
+ * @since 3.0.2
657
+ * @param string $message The text to display in the notice.
658
+ * @param string $notice_type The singular name of the notice type - either error, success or notice. [optional]
659
+ */
660
+ public static function wc_add_notice( $message, $notice_type = 'success' ) {
661
+
662
+ if ( function_exists( 'wc_add_notice' ) ) {
663
+ wc_add_notice( $message, $notice_type );
664
+ }
665
+ }
666
+
667
+
668
+ /**
669
+ * Print a single notice immediately
670
+ *
671
+ * WC notice functions are not available in the admin
672
+ *
673
+ * @since 3.0.2
674
+ * @param string $message The text to display in the notice.
675
+ * @param string $notice_type The singular name of the notice type - either error, success or notice. [optional]
676
+ */
677
+ public static function wc_print_notice( $message, $notice_type = 'success' ) {
678
+
679
+ if ( function_exists( 'wc_print_notice' ) ) {
680
+ wc_print_notice( $message, $notice_type );
681
+ }
682
+ }
683
+
684
+
685
+ /**
686
+ * Gets the full URL to the log file for a given $handle
687
+ *
688
+ * @since 4.0.0
689
+ * @param string $handle log handle
690
+ * @return string URL to the WC log file identified by $handle
691
+ */
692
+ public static function get_wc_log_file_url( $handle ) {
693
+ return admin_url( sprintf( 'admin.php?page=wc-status&tab=logs&log_file=%s-%s-log', $handle, sanitize_file_name( wp_hash( $handle ) ) ) );
694
+ }
695
+
696
+
697
+ /**
698
+ * Gets the current WordPress site name.
699
+ *
700
+ * This is helpful for retrieving the actual site name instead of the
701
+ * network name on multisite installations.
702
+ *
703
+ * @since 4.6.0
704
+ * @return string
705
+ */
706
+ public static function get_site_name() {
707
+
708
+ return ( is_multisite() ) ? get_blog_details()->blogname : get_bloginfo( 'name' );
709
+ }
710
+
711
+
712
+ /** JavaScript helper functions ***************************************/
713
+
714
+
715
+ /**
716
+ * Enhanced search JavaScript (Select2)
717
+ *
718
+ * Enqueues JavaScript required for AJAX search with Select2.
719
+ *
720
+ * @codeCoverageIgnore no need to unit test this since it's mostly JavaScript
721
+ *
722
+ * @since 3.1.0
723
+ */
724
+ public static function render_select2_ajax() {
725
+
726
+ if ( ! did_action( 'sv_wc_select2_ajax_rendered' ) ) {
727
+
728
+ $javascript = "( function(){
729
+ if ( ! $().select2 ) return;
730
+ ";
731
+
732
+ // Ensure localized strings are used.
733
+ $javascript .= "
734
+
735
+ function getEnhancedSelectFormatString() {
736
+
737
+ if ( 'undefined' !== typeof wc_select_params ) {
738
+ wc_enhanced_select_params = wc_select_params;
739
+ }
740
+
741
+ if ( 'undefined' === typeof wc_enhanced_select_params ) {
742
+ return {};
743
+ }
744
+
745
+ var formatString = {
746
+ formatMatches: function( matches ) {
747
+ if ( 1 === matches ) {
748
+ return wc_enhanced_select_params.i18n_matches_1;
749
+ }
750
+
751
+ return wc_enhanced_select_params.i18n_matches_n.replace( '%qty%', matches );
752
+ },
753
+ formatNoMatches: function() {
754
+ return wc_enhanced_select_params.i18n_no_matches;
755
+ },
756
+ formatAjaxError: function( jqXHR, textStatus, errorThrown ) {
757
+ return wc_enhanced_select_params.i18n_ajax_error;
758
+ },
759
+ formatInputTooShort: function( input, min ) {
760
+ var number = min - input.length;
761
+
762
+ if ( 1 === number ) {
763
+ return wc_enhanced_select_params.i18n_input_too_short_1
764
+ }
765
+
766
+ return wc_enhanced_select_params.i18n_input_too_short_n.replace( '%qty%', number );
767
+ },
768
+ formatInputTooLong: function( input, max ) {
769
+ var number = input.length - max;
770
+
771
+ if ( 1 === number ) {
772
+ return wc_enhanced_select_params.i18n_input_too_long_1
773
+ }
774
+
775
+ return wc_enhanced_select_params.i18n_input_too_long_n.replace( '%qty%', number );
776
+ },
777
+ formatSelectionTooBig: function( limit ) {
778
+ if ( 1 === limit ) {
779
+ return wc_enhanced_select_params.i18n_selection_too_long_1;
780
+ }
781
+
782
+ return wc_enhanced_select_params.i18n_selection_too_long_n.replace( '%qty%', number );
783
+ },
784
+ formatLoadMore: function( pageNumber ) {
785
+ return wc_enhanced_select_params.i18n_load_more;
786
+ },
787
+ formatSearching: function() {
788
+ return wc_enhanced_select_params.i18n_searching;
789
+ }
790
+ };
791
+
792
+ return formatString;
793
+ }
794
+ ";
795
+
796
+ $javascript .= "
797
+
798
+ $( 'select.sv-wc-enhanced-search' ).filter( ':not(.enhanced)' ).each( function() {
799
+
800
+ var select2_args = {
801
+ allowClear: $( this ).data( 'allow_clear' ) ? true : false,
802
+ placeholder: $( this ).data( 'placeholder' ),
803
+ minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
804
+ escapeMarkup: function( m ) {
805
+ return m;
806
+ },
807
+ ajax: {
808
+ url: '" . esc_js( admin_url( 'admin-ajax.php' ) ) . "',
809
+ dataType: 'json',
810
+ cache: true,
811
+ delay: 250,
812
+ data: function( params ) {
813
+ return {
814
+ term: params.term,
815
+ request_data: $( this ).data( 'request_data' ) ? $( this ).data( 'request_data' ) : {},
816
+ action: $( this ).data( 'action' ) || 'woocommerce_json_search_products_and_variations',
817
+ security: $( this ).data( 'nonce' )
818
+ };
819
+ },
820
+ processResults: function( data, params ) {
821
+ var terms = [];
822
+ if ( data ) {
823
+ $.each( data, function( id, text ) {
824
+ terms.push( { id: id, text: text } );
825
+ });
826
+ }
827
+ return { results: terms };
828
+ }
829
+ }
830
+ };
831
+
832
+ select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
833
+
834
+ $( this ).select2( select2_args ).addClass( 'enhanced' );
835
+ } );
836
+ ";
837
+
838
+ $javascript .= '} )();';
839
+
840
+ wc_enqueue_js( $javascript );
841
+
842
+ /**
843
+ * WC Select2 Ajax Rendered Action.
844
+ *
845
+ * Fired when an Ajax select2 is rendered.
846
+ *
847
+ * @since 3.1.0
848
+ */
849
+ do_action( 'sv_wc_select2_ajax_rendered' );
850
+ }
851
+ }
852
+
853
+
854
+ /** Framework translation functions ***********************************/
855
+
856
+
857
+ /**
858
+ * Gettext `__()` wrapper for framework-translated strings
859
+ *
860
+ * Warning! This function should only be used if an existing
861
+ * translation from the framework is to be used. It should
862
+ * never be called for plugin-specific or untranslated strings!
863
+ * Untranslated = not registered via string literal.
864
+ *
865
+ * @since 4.1.0
866
+ * @param string $text
867
+ * @return string translated text
868
+ */
869
+ public static function f__( $text ) {
870
+
871
+ return __( $text, 'woocommerce-plugin-framework' );
872
+ }
873
+
874
+
875
+ /**
876
+ * Gettext `_e()` wrapper for framework-translated strings
877
+ *
878
+ * Warning! This function should only be used if an existing
879
+ * translation from the framework is to be used. It should
880
+ * never be called for plugin-specific or untranslated strings!
881
+ * Untranslated = not registered via string literal.
882
+ *
883
+ * @since 4.1.0
884
+ * @param string $text
885
+ */
886
+ public static function f_e( $text ) {
887
+
888
+ _e( $text, 'woocommerce-plugin-framework' );
889
+ }
890
+
891
+
892
+ /**
893
+ * Gettext `_x()` wrapper for framework-translated strings
894
+ *
895
+ * Warning! This function should only be used if an existing
896
+ * translation from the framework is to be used. It should
897
+ * never be called for plugin-specific or untranslated strings!
898
+ * Untranslated = not registered via string literal.
899
+ *
900
+ * @since 4.1.0
901
+ *
902
+ * @param string $text
903
+ * @param string $context
904
+ * @return string translated text
905
+ */
906
+ public static function f_x( $text, $context ) {
907
+
908
+ return _x( $text, $context, 'woocommerce-plugin-framework' );
909
+ }
910
+
911
+
912
+ /** Misc functions ****************************************************/
913
+
914
+
915
+ /**
916
+ * Gets the WordPress current screen.
917
+ *
918
+ * @see get_current_screen() replacement which is always available, unlike the WordPress core function
919
+ *
920
+ * @since 5.4.2
921
+ *
922
+ * @return \WP_Screen|null
923
+ */
924
+ public static function get_current_screen() {
925
+ global $current_screen;
926
+
927
+ return $current_screen ?: null;
928
+ }
929
+
930
+
931
+ /**
932
+ * Checks if the current screen matches a specified ID.
933
+ *
934
+ * This helps avoiding using the get_current_screen() function which is not always available,
935
+ * or setting the substitute global $current_screen every time a check needs to be performed.
936
+ *
937
+ * @since 5.4.2
938
+ *
939
+ * @param string $id id (or property) to compare
940
+ * @param string $prop optional property to compare, defaults to screen id
941
+ * @return bool
942
+ */
943
+ public static function is_current_screen( $id, $prop = 'id' ) {
944
+ global $current_screen;
945
+
946
+ return isset( $current_screen->$prop ) && $id === $current_screen->$prop;
947
+ }
948
+
949
+
950
+ /**
951
+ * Determines if viewing an enhanced admin screen.
952
+ *
953
+ * @since 5.6.0
954
+ *
955
+ * @return bool
956
+ */
957
+ public static function is_enhanced_admin_screen() {
958
+
959
+ return is_admin() && SV_WC_Plugin_Compatibility::is_enhanced_admin_available() && ( Loader::is_admin_page() || Loader::is_embed_page() );
960
+ }
961
+
962
+
963
+ /**
964
+ * Convert a 2-character country code into its 3-character equivalent, or
965
+ * vice-versa, e.g.
966
+ *
967
+ * 1) given USA, returns US
968
+ * 2) given US, returns USA
969
+ *
970
+ * @since 4.2.0
971
+ * @deprecated 5.4.3
972
+ *
973
+ * @param string $code ISO-3166-alpha-2 or ISO-3166-alpha-3 country code
974
+ * @return string country code
975
+ */
976
+ public static function convert_country_code( $code ) {
977
+
978
+ wc_deprecated_function( __METHOD__, '5.4.3', Country_Helper::class . '::convert_alpha_country_code()' );
979
+
980
+ return Country_Helper::convert_alpha_country_code( $code );
981
+ }
982
+
983
+
984
+ /**
985
+ * Displays a notice if the provided hook has not yet run.
986
+ *
987
+ * @since 5.2.0
988
+ *
989
+ * @param string $hook action hook to check
990
+ * @param string $method method/function name
991
+ * @param string $version version the notice was added
992
+ */
993
+ public static function maybe_doing_it_early( $hook, $method, $version ) {
994
+
995
+ if ( ! did_action( $hook ) ) {
996
+ wc_doing_it_wrong( $method, "This should only be called after '{$hook}'", $version );
997
+ }
998
+ }
999
+
1000
+
1001
+ /**
1002
+ * Triggers a PHP error.
1003
+ *
1004
+ * This wrapper method ensures AJAX isn't broken in the process.
1005
+ *
1006
+ * @since 4.6.0
1007
+ * @param string $message the error message
1008
+ * @param int $type Optional. The error type. Defaults to E_USER_NOTICE
1009
+ */
1010
+ public static function trigger_error( $message, $type = E_USER_NOTICE ) {
1011
+
1012
+ if ( is_callable( 'is_ajax' ) && is_ajax() ) {
1013
+
1014
+ switch ( $type ) {
1015
+
1016
+ case E_USER_NOTICE:
1017
+ $prefix = 'Notice: ';
1018
+ break;
1019
+
1020
+ case E_USER_WARNING:
1021
+ $prefix = 'Warning: ';
1022
+ break;
1023
+
1024
+ default:
1025
+ $prefix = '';
1026
+ }
1027
+
1028
+ error_log( $prefix . $message );
1029
+
1030
+ } else {
1031
+
1032
+ trigger_error( $message, $type );
1033
+ }
1034
+ }
1035
+
1036
+
1037
+ }
1038
+
1039
+
1040
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-hook-deprecator.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Hook_Deprecator' ) ) :
 
30
 
31
  /**
32
  * SkyVerge Hook Deprecator Class
@@ -115,8 +116,8 @@ class SV_WC_Hook_Deprecator {
115
 
116
  $new_hooks = wp_list_pluck( $this->hooks, 'replacement' );
117
 
118
- // check if there is a matching old hook for the current hook
119
- if ( $old_hook = array_search( $new_hook, $new_hooks ) ) {
120
 
121
  // check if there are any hooks added to the old hook
122
  if ( has_filter( $old_hook ) ) {
@@ -195,4 +196,4 @@ class SV_WC_Hook_Deprecator {
195
  }
196
 
197
 
198
- endif; // class exists check
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Hook_Deprecator' ) ) :
30
+
31
 
32
  /**
33
  * SkyVerge Hook Deprecator Class
116
 
117
  $new_hooks = wp_list_pluck( $this->hooks, 'replacement' );
118
 
119
+ // check if there are matching old hooks for the current hook
120
+ foreach ( array_keys( $new_hooks, $new_hook ) as $old_hook ) {
121
 
122
  // check if there are any hooks added to the old hook
123
  if ( has_filter( $old_hook ) ) {
196
  }
197
 
198
 
199
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin-compatibility.php ADDED
@@ -0,0 +1,496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Plugin/Classes
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
+
27
+ defined( 'ABSPATH' ) or exit;
28
+
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Plugin_Compatibility' ) ) :
30
+
31
+
32
+ /**
33
+ * WooCommerce Compatibility Utility Class
34
+ *
35
+ * The unfortunate purpose of this class is to provide a single point of
36
+ * compatibility functions for dealing with supporting multiple versions
37
+ * of WooCommerce and various extensions.
38
+ *
39
+ * The expected procedure is to remove methods from this class, using the
40
+ * latest ones directly in code, as support for older versions of WooCommerce
41
+ * are dropped.
42
+ *
43
+ * Current Compatibility
44
+ * + Core 3.0.9 - 3.7.x
45
+ * + Subscriptions 2.2.x
46
+ *
47
+ * // TODO: move to /compatibility
48
+ *
49
+ * @since 2.0.0
50
+ */
51
+ class SV_WC_Plugin_Compatibility {
52
+
53
+
54
+ /**
55
+ * Gets the statuses that are considered "paid".
56
+ *
57
+ * @since 5.1.0
58
+ * @deprecated 5.5.0
59
+ *
60
+ * @return string[]
61
+ */
62
+ public static function wc_get_is_paid_statuses() {
63
+
64
+ wc_deprecated_function( __METHOD__, '5.5.0', '(array) wc_get_is_paid_statuses()' );
65
+
66
+ return (array) wc_get_is_paid_statuses();
67
+ }
68
+
69
+
70
+ /**
71
+ * Logs a doing_it_wrong message.
72
+ *
73
+ * @since 5.0.1
74
+ * @deprecated 5.5.0
75
+ *
76
+ * @param string $function function used
77
+ * @param string $message message to log
78
+ * @param string $version version the message was added in
79
+ */
80
+ public static function wc_doing_it_wrong( $function, $message, $version ) {
81
+
82
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_doing_it_wrong()' );
83
+
84
+ wc_doing_it_wrong( $function, $message, $version );
85
+ }
86
+
87
+
88
+ /**
89
+ * Formats a date for output.
90
+ *
91
+ * @since 4.6.0
92
+ * @deprecated 5.5.0
93
+ *
94
+ * @param \WC_DateTime|SV_WC_DateTime $date date object
95
+ * @param string $format date format
96
+ * @return string
97
+ */
98
+ public static function wc_format_datetime( $date, $format = '' ) {
99
+
100
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_format_datetime()' );
101
+
102
+ return wc_format_datetime( $date, $format );
103
+ }
104
+
105
+
106
+ /**
107
+ * Logs a deprecated function notice.
108
+ *
109
+ * @since 5.0.0
110
+ * @deprecated 5.5.0
111
+ *
112
+ * @param string $function deprecated function name
113
+ * @param string $version deprecated-since version
114
+ * @param string $replacement replacement function name
115
+ */
116
+ public static function wc_deprecated_function( $function, $version, $replacement = null ) {
117
+
118
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_deprecated_function()' );
119
+
120
+ wc_deprecated_function( $function, $version, $replacement );
121
+ }
122
+
123
+
124
+ /**
125
+ * Retrieves a list of the latest available WooCommerce versions.
126
+ *
127
+ * Excludes betas, release candidates and development versions.
128
+ * Versions are sorted from most recent to least recent.
129
+ *
130
+ * @since 5.4.1
131
+ *
132
+ * @return string[] array of semver strings
133
+ */
134
+ public static function get_latest_wc_versions() {
135
+
136
+ $latest_wc_versions = get_transient( 'sv_wc_plugin_wc_versions' );
137
+
138
+ if ( ! is_array( $latest_wc_versions ) ) {
139
+
140
+ /** @link https://codex.wordpress.org/WordPress.org_API */
141
+ $wp_org_request = wp_remote_get( 'https://api.wordpress.org/plugins/info/1.0/woocommerce.json', [ 'timeout' => 1 ] );
142
+
143
+ if ( is_array( $wp_org_request ) && isset( $wp_org_request['body'] ) ) {
144
+
145
+ $plugin_info = json_decode( $wp_org_request['body'], true );
146
+
147
+ if ( is_array( $plugin_info ) && ! empty( $plugin_info['versions'] ) && is_array( $plugin_info['versions'] ) ) {
148
+
149
+ $latest_wc_versions = [];
150
+
151
+ // reverse array as WordPress supplies oldest version first, newest last
152
+ foreach ( array_keys( array_reverse( $plugin_info['versions'] ) ) as $wc_version ) {
153
+
154
+ // skip trunk, release candidates, betas and other non-final or irregular versions
155
+ if (
156
+ is_string( $wc_version )
157
+ && '' !== $wc_version
158
+ && is_numeric( $wc_version[0] )
159
+ && false === strpos( $wc_version, '-' )
160
+ ) {
161
+ $latest_wc_versions[] = $wc_version;
162
+ }
163
+ }
164
+
165
+ set_transient( 'sv_wc_plugin_wc_versions', $latest_wc_versions, WEEK_IN_SECONDS );
166
+ }
167
+ }
168
+ }
169
+
170
+ return is_array( $latest_wc_versions ) ? $latest_wc_versions : [];
171
+ }
172
+
173
+
174
+ /**
175
+ * Gets the version of the currently installed WooCommerce.
176
+ *
177
+ * @since 3.0.0
178
+ *
179
+ * @return string|null Woocommerce version number or null if undetermined
180
+ */
181
+ public static function get_wc_version() {
182
+
183
+ return defined( 'WC_VERSION' ) && WC_VERSION ? WC_VERSION : null;
184
+ }
185
+
186
+
187
+ /**
188
+ * Determines if the installed WooCommerce version matches a specific version.
189
+ *
190
+ * @since 5.5.0
191
+ *
192
+ * @param string $version semver
193
+ * @return bool
194
+ */
195
+ public static function is_wc_version( $version ) {
196
+
197
+ $wc_version = self::get_wc_version();
198
+
199
+ // accounts for semver cases like 3.0 being equal to 3.0.0
200
+ return $wc_version === $version || ( $wc_version && version_compare( $wc_version, $version, '=' ) );
201
+ }
202
+
203
+
204
+ /**
205
+ * Determines if the installed version of WooCommerce is 3.0 or greater.
206
+ *
207
+ * @since 4.6.0
208
+ * @deprecated 5.5.0
209
+ *
210
+ * @return bool
211
+ */
212
+ public static function is_wc_version_gte_3_0() {
213
+
214
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::is_wc_version_gte()' );
215
+
216
+ return self::is_wc_version_gte( '3.0' );
217
+ }
218
+
219
+
220
+ /**
221
+ * Determines if the installed version of WooCommerce is less than 3.0.
222
+ *
223
+ * @since 4.6.0
224
+ * @deprecated 5.5.0
225
+ *
226
+ * @return bool
227
+ */
228
+ public static function is_wc_version_lt_3_0() {
229
+
230
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::is_wc_version_lt()' );
231
+
232
+ return self::is_wc_version_lt( '3.0' );
233
+ }
234
+
235
+
236
+ /**
237
+ * Determines if the installed version of WooCommerce is 3.1 or greater.
238
+ *
239
+ * @since 4.6.5
240
+ * @deprecated 5.5.0
241
+ *
242
+ * @return bool
243
+ */
244
+ public static function is_wc_version_gte_3_1() {
245
+
246
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::is_wc_version_gte()' );
247
+
248
+ return self::is_wc_version_gte( '3.1' );
249
+ }
250
+
251
+
252
+ /**
253
+ * Determines if the installed version of WooCommerce is less than 3.1.
254
+ *
255
+ * @since 4.6.5
256
+ * @deprecated 5.5.0
257
+ *
258
+ * @return bool
259
+ */
260
+ public static function is_wc_version_lt_3_1() {
261
+
262
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::is_wc_version_lt()' );
263
+
264
+ return self::is_wc_version_lt( '3.1' );
265
+ }
266
+
267
+
268
+ /**
269
+ * Determines if the installed version of WooCommerce is equal or greater than a given version.
270
+ *
271
+ * @since 4.7.3
272
+ *
273
+ * @param string $version version number to compare
274
+ * @return bool
275
+ */
276
+ public static function is_wc_version_gte( $version ) {
277
+
278
+ $wc_version = self::get_wc_version();
279
+
280
+ return $wc_version && version_compare( $wc_version, $version, '>=' );
281
+ }
282
+
283
+
284
+ /**
285
+ * Determines if the installed version of WooCommerce is lower than a given version.
286
+ *
287
+ * @since 4.7.3
288
+ *
289
+ * @param string $version version number to compare
290
+ * @return bool
291
+ */
292
+ public static function is_wc_version_lt( $version ) {
293
+
294
+ $wc_version = self::get_wc_version();
295
+
296
+ return $wc_version && version_compare( $wc_version, $version, '<' );
297
+ }
298
+
299
+
300
+ /**
301
+ * Determines if the installed version of WooCommerce is greater than a given version.
302
+ *
303
+ * @since 2.0.0
304
+ *
305
+ * @param string $version the version to compare
306
+ * @return bool
307
+ */
308
+ public static function is_wc_version_gt( $version ) {
309
+
310
+ $wc_version = self::get_wc_version();
311
+
312
+ return $wc_version && version_compare( $wc_version, $version, '>' );
313
+ }
314
+
315
+
316
+ /**
317
+ * Determines whether the enhanced admin is available.
318
+ *
319
+ * This checks both for WooCommerce v4.0+ and the underlying package availability.
320
+ *
321
+ * @return bool
322
+ */
323
+ public static function is_enhanced_admin_available() {
324
+
325
+ return self::is_wc_version_gte( '4.0' ) && function_exists( 'wc_admin_url' ) && class_exists( '\\Automattic\\WooCommerce\\Admin\\Composer\\Package' ) && \Automattic\WooCommerce\Admin\Composer\Package::is_package_active();
326
+ }
327
+
328
+
329
+ /** WordPress core ******************************************************/
330
+
331
+
332
+ /**
333
+ * Normalizes a WooCommerce page screen ID.
334
+ *
335
+ * Needed because WordPress uses a menu title (which is translatable), not slug, to generate screen ID.
336
+ * See details in: https://core.trac.wordpress.org/ticket/21454
337
+ * TODO: Add WP version check when https://core.trac.wordpress.org/ticket/18857 is addressed {BR 2016-12-12}
338
+ *
339
+ * @since 4.6.0
340
+ *
341
+ * @param string $slug slug for the screen ID to normalize (minus `woocommerce_page_`)
342
+ * @return string normalized screen ID
343
+ */
344
+ public static function normalize_wc_screen_id( $slug = 'wc-settings' ) {
345
+
346
+ // The textdomain usage is intentional here, we need to match the menu title.
347
+ $prefix = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );
348
+
349
+ return $prefix . '_page_' . $slug;
350
+ }
351
+
352
+
353
+ /**
354
+ * Converts a shorthand byte value to an integer byte value.
355
+ *
356
+ * Wrapper for wp_convert_hr_to_bytes(), moved to load.php in WordPress 4.6 from media.php
357
+ *
358
+ * Based on ActionScheduler's compat wrapper for the same function:
359
+ * ActionScheduler_Compatibility::convert_hr_to_bytes()
360
+ *
361
+ * @link https://secure.php.net/manual/en/function.ini-get.php
362
+ * @link https://secure.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
363
+ *
364
+ * @since 5.3.1
365
+ *
366
+ * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
367
+ * @return int An integer byte value.
368
+ */
369
+ public static function convert_hr_to_bytes( $value ) {
370
+
371
+ if ( function_exists( 'wp_convert_hr_to_bytes' ) ) {
372
+
373
+ return wp_convert_hr_to_bytes( $value );
374
+ }
375
+
376
+ $value = strtolower( trim( $value ) );
377
+ $bytes = (int) $value;
378
+
379
+ if ( false !== strpos( $value, 'g' ) ) {
380
+
381
+ $bytes *= GB_IN_BYTES;
382
+
383
+ } elseif ( false !== strpos( $value, 'm' ) ) {
384
+
385
+ $bytes *= MB_IN_BYTES;
386
+
387
+ } elseif ( false !== strpos( $value, 'k' ) ) {
388
+
389
+ $bytes *= KB_IN_BYTES;
390
+ }
391
+
392
+ // deal with large (float) values which run into the maximum integer size
393
+ return min( $bytes, PHP_INT_MAX );
394
+ }
395
+
396
+
397
+ /** Subscriptions *********************************************************/
398
+
399
+
400
+ /**
401
+ * Determines if the installed version of WooCommerce Subscriptions is 2.0.0 or greater.
402
+ *
403
+ * @since 4.1.0
404
+ * @deprecated 5.5.0
405
+ *
406
+ * @return bool
407
+ */
408
+ public static function is_wc_subscriptions_version_gte_2_0() {
409
+
410
+ wc_deprecated_function( __METHOD__, '5.5.0', __CLASS__ . '::is_wc_subscriptions_version_gte()' );
411
+
412
+ return self::is_wc_subscriptions_version_gte( '2.0' );
413
+ }
414
+
415
+
416
+ /**
417
+ * Determines if the installed version of WooCommerce Subscriptions matches or exceeds a given version.
418
+ *
419
+ * @since 5.5.0
420
+ *
421
+ * @param string $version version number to compare
422
+ * @return bool
423
+ */
424
+ public static function is_wc_subscriptions_version_gte( $version ) {
425
+
426
+ $subscriptions_version = self::get_wc_subscriptions_version();
427
+
428
+ return $subscriptions_version && version_compare( $subscriptions_version, $version, '>=' );
429
+ }
430
+
431
+ /**
432
+ * Determines if the installed version of WooCommerce Subscriptions exceeds a given version.
433
+ *
434
+ * @since 5.5.0
435
+ *
436
+ * @param string $version version number to compare
437
+ * @return bool
438
+ */
439
+ public static function is_wc_subscriptions_version_gt( $version ) {
440
+
441
+ $subscriptions_version = self::get_wc_subscriptions_version();
442
+
443
+ return $subscriptions_version && version_compare( $subscriptions_version, $version, '>' );
444
+ }
445
+
446
+
447
+ /**
448
+ * Determines if the installed version of WooCommerce Subscriptions is lower than a given version.
449
+ *
450
+ * @since 5.5.0
451
+ *
452
+ * @param string $version version number to compare
453
+ * @return bool
454
+ */
455
+ public static function is_wc_subscriptions_version_lt( $version ) {
456
+
457
+ $subscriptions_version = self::get_wc_subscriptions_version();
458
+
459
+ return $subscriptions_version && version_compare( $subscriptions_version, $version, '<' );
460
+ }
461
+
462
+
463
+ /**
464
+ * Gets the version of the currently installed WooCommerce Subscriptions.
465
+ *
466
+ * @since 4.1.0
467
+ *
468
+ * @return string|null WooCommerce Subscriptions version number or null if not found
469
+ */
470
+ protected static function get_wc_subscriptions_version() {
471
+
472
+ return class_exists( 'WC_Subscriptions' ) && ! empty( \WC_Subscriptions::$version ) ? \WC_Subscriptions::$version : null;
473
+ }
474
+
475
+
476
+ /**
477
+ * Determines if the installed WooCommerce Subscriptions version matches a specific version.
478
+ *
479
+ * @since 5.5.0
480
+ *
481
+ * @param string $version semver
482
+ * @return bool
483
+ */
484
+ protected static function is_wc_subscriptions_version( $version ) {
485
+
486
+ $subscriptions_version = self::get_wc_subscriptions_version();
487
+
488
+ // accounts for semver cases like 2.2 being equal to 2.2.0
489
+ return $version === $subscriptions_version || ( $subscriptions_version && version_compare( $version, $subscriptions_version, '=' ) );
490
+ }
491
+
492
+
493
+ }
494
+
495
+
496
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin-dependencies.php RENAMED
@@ -18,16 +18,22 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Plugin_Dependencies' ) ) :
30
 
 
 
 
 
 
 
31
  class SV_WC_Plugin_Dependencies {
32
 
33
 
@@ -47,6 +53,8 @@ class SV_WC_Plugin_Dependencies {
47
  /**
48
  * Constructs the class.
49
  *
 
 
50
  * @param SV_WC_Plugin $plugin plugin instance
51
  * @param array $args {
52
  * PHP extension, function, and settings dependencies
@@ -149,7 +157,7 @@ class SV_WC_Plugin_Dependencies {
149
  '%1$s requires the %2$s PHP extension to function. Contact your host or server administrator to install and configure the missing extension.',
150
  '%1$s requires the following PHP extensions to function: %2$s. Contact your host or server administrator to install and configure the missing extensions.',
151
  count( $missing_extensions ),
152
- 'woocommerce-gateway-paypal-powered-by-braintree'
153
  ),
154
  esc_html( $this->get_plugin()->get_plugin_name() ),
155
  '<strong>' . implode( ', ', $missing_extensions ) . '</strong>'
@@ -177,7 +185,7 @@ class SV_WC_Plugin_Dependencies {
177
  '%1$s requires the %2$s PHP function to exist. Contact your host or server administrator to install and configure the missing function.',
178
  '%1$s requires the following PHP functions to exist: %2$s. Contact your host or server administrator to install and configure the missing functions.',
179
  count( $missing_functions ),
180
- 'woocommerce-gateway-paypal-powered-by-braintree'
181
  ),
182
  esc_html( $this->get_plugin()->get_plugin_name() ),
183
  '<strong>' . implode( ', ', $missing_functions ) . '</strong>'
@@ -217,7 +225,7 @@ class SV_WC_Plugin_Dependencies {
217
 
218
  $setting_message = sprintf(
219
  /** translators: Placeholders: %s - a PHP setting value */
220
- __( '%s or higher', 'woocommerce-gateway-paypal-powered-by-braintree' ),
221
  $setting_message
222
  );
223
  }
@@ -227,7 +235,7 @@ class SV_WC_Plugin_Dependencies {
227
 
228
  $message .= '</ul>';
229
 
230
- $message .= __( 'Please contact your hosting provider or server administrator to configure these settings.', 'woocommerce-gateway-paypal-powered-by-braintree' );
231
 
232
  $this->add_admin_notice( 'wc-' . $this->get_plugin()->get_id_dasherized() . '-incompatibile-php-settings', $message, 'warning' );
233
  }
@@ -252,7 +260,7 @@ class SV_WC_Plugin_Dependencies {
252
  __( 'Hey there! We\'ve noticed that your server is running %1$san outdated version of PHP%2$s, which is the programming language that WooCommerce and its extensions are built on.
253
  The PHP version that is currently used for your site is no longer maintained, nor %1$sreceives security updates%2$s; newer versions are faster and more secure.
254
  As a result, %3$s no longer supports this version and you should upgrade PHP as soon as possible.
255
- Your hosting provider can do this for you. %4$sHere are some resources to help you upgrade%5$s and to explain PHP versions further.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
256
  '<strong>', '</strong>',
257
  esc_html( $this->get_plugin()->get_plugin_name() ),
258
  '<a href="http://skyver.ge/upgradephp">', '</a>'
@@ -262,21 +270,6 @@ class SV_WC_Plugin_Dependencies {
262
 
263
  $this->add_admin_notice( 'sv-wc-deprecated-php-version', $message, 'error' );
264
  }
265
-
266
- // display a notice that WC < 3.0 support will soon be dropped
267
- if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && SV_WC_Plugin_Compatibility::is_wc_version_lt( '3.0' ) ) {
268
-
269
- $message = sprintf(
270
- /* translators: Placeholders: %1$s - WooCommerce version number, %2$s - <strong>, %3$s - </strong>, %4$s - Plugin name, %5$s - <a> tag, %6$s - </a> tag */
271
- __( 'Hey there! We\'ve noticed that your site is running version %1$s of WooCommerce, but %2$sWooCommerce 3.0 or higher will soon be required%3$s by %4$s. We recommend you %5$supdate WooCommerce%6$s to the latest version as soon as possible.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
272
- esc_html( SV_WC_Plugin_Compatibility::get_wc_version() ),
273
- '<strong>', '</strong>',
274
- esc_html( $this->get_plugin()->get_plugin_name() ),
275
- '<a href="' . esc_url( admin_url( 'update-core.php' ) ) . '">', '</a>'
276
- );
277
-
278
- $this->add_admin_notice( 'sv-wc-deprecated-wc-version', $message, 'warning' );
279
- }
280
  }
281
 
282
 
@@ -319,6 +312,61 @@ class SV_WC_Plugin_Dependencies {
319
  }
320
 
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  /** Getter methods ********************************************************/
323
 
324
 
@@ -331,7 +379,7 @@ class SV_WC_Plugin_Dependencies {
331
  */
332
  public function get_missing_php_extensions() {
333
 
334
- $missing_extensions = array();
335
 
336
  foreach ( $this->get_php_extensions() as $extension ) {
337
 
@@ -366,7 +414,7 @@ class SV_WC_Plugin_Dependencies {
366
  */
367
  public function get_missing_php_functions() {
368
 
369
- $missing_functions = array();
370
 
371
  foreach ( $this->get_php_functions() as $function ) {
372
 
@@ -401,9 +449,7 @@ class SV_WC_Plugin_Dependencies {
401
  */
402
  public function get_incompatible_php_settings() {
403
 
404
- $incompatible_settings = array();
405
-
406
- $dependences = $this->get_php_settings();
407
 
408
  if ( function_exists( 'ini_get' ) ) {
409
 
@@ -415,7 +461,7 @@ class SV_WC_Plugin_Dependencies {
415
  continue;
416
  }
417
 
418
- if ( is_integer( $expected ) ) {
419
 
420
  // determine if this is a size string, like "10MB"
421
  $is_size = ! is_numeric( substr( $actual, -1 ) );
@@ -424,19 +470,19 @@ class SV_WC_Plugin_Dependencies {
424
 
425
  if ( $actual_num < $expected ) {
426
 
427
- $incompatible_settings[ $setting ] = array(
428
  'expected' => $is_size ? size_format( $expected ) : $expected,
429
  'actual' => $is_size ? size_format( $actual_num ) : $actual,
430
  'type' => 'min',
431
- );
432
  }
433
 
434
  } elseif ( $actual !== $expected ) {
435
 
436
- $incompatible_settings[ $setting ] = array(
437
  'expected' => $expected,
438
  'actual' => $actual,
439
- );
440
  }
441
  }
442
  }
@@ -473,4 +519,5 @@ class SV_WC_Plugin_Dependencies {
473
 
474
  }
475
 
 
476
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Plugin_Dependencies' ) ) :
30
 
31
+
32
+ /**
33
+ * Plugin dependencies handler.
34
+ *
35
+ * @since 5.2.0
36
+ */
37
  class SV_WC_Plugin_Dependencies {
38
 
39
 
53
  /**
54
  * Constructs the class.
55
  *
56
+ * @since 5.2.0
57
+ *
58
  * @param SV_WC_Plugin $plugin plugin instance
59
  * @param array $args {
60
  * PHP extension, function, and settings dependencies
157
  '%1$s requires the %2$s PHP extension to function. Contact your host or server administrator to install and configure the missing extension.',
158
  '%1$s requires the following PHP extensions to function: %2$s. Contact your host or server administrator to install and configure the missing extensions.',
159
  count( $missing_extensions ),
160
+ 'woocommerce-plugin-framework'
161
  ),
162
  esc_html( $this->get_plugin()->get_plugin_name() ),
163
  '<strong>' . implode( ', ', $missing_extensions ) . '</strong>'
185
  '%1$s requires the %2$s PHP function to exist. Contact your host or server administrator to install and configure the missing function.',
186
  '%1$s requires the following PHP functions to exist: %2$s. Contact your host or server administrator to install and configure the missing functions.',
187
  count( $missing_functions ),
188
+ 'woocommerce-plugin-framework'
189
  ),
190
  esc_html( $this->get_plugin()->get_plugin_name() ),
191
  '<strong>' . implode( ', ', $missing_functions ) . '</strong>'
225
 
226
  $setting_message = sprintf(
227
  /** translators: Placeholders: %s - a PHP setting value */
228
+ __( '%s or higher', 'woocommerce-plugin-framework' ),
229
  $setting_message
230
  );
231
  }
235
 
236
  $message .= '</ul>';
237
 
238
+ $message .= __( 'Please contact your hosting provider or server administrator to configure these settings.', 'woocommerce-plugin-framework' );
239
 
240
  $this->add_admin_notice( 'wc-' . $this->get_plugin()->get_id_dasherized() . '-incompatibile-php-settings', $message, 'warning' );
241
  }
260
  __( 'Hey there! We\'ve noticed that your server is running %1$san outdated version of PHP%2$s, which is the programming language that WooCommerce and its extensions are built on.
261
  The PHP version that is currently used for your site is no longer maintained, nor %1$sreceives security updates%2$s; newer versions are faster and more secure.
262
  As a result, %3$s no longer supports this version and you should upgrade PHP as soon as possible.
263
+ Your hosting provider can do this for you. %4$sHere are some resources to help you upgrade%5$s and to explain PHP versions further.', 'woocommerce-plugin-framework' ),
264
  '<strong>', '</strong>',
265
  esc_html( $this->get_plugin()->get_plugin_name() ),
266
  '<a href="http://skyver.ge/upgradephp">', '</a>'
270
 
271
  $this->add_admin_notice( 'sv-wc-deprecated-php-version', $message, 'error' );
272
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  }
274
 
275
 
312
  }
313
 
314
 
315
+ /**
316
+ * Returns the active scripts optimization plugins.
317
+ *
318
+ * Returns a key-value array where the key contains the plugin file identifier and the value is the name of the plugin.
319
+ *
320
+ * @since 5.7.0
321
+ *
322
+ * @return array
323
+ */
324
+ public function get_active_scripts_optimization_plugins() {
325
+
326
+ /**
327
+ * Filters script optimization plugins to look for.
328
+ *
329
+ * @since 5.7.0
330
+ *
331
+ * @param array $plugins an array of file identifiers (keys) and plugin names (values)
332
+ */
333
+ $plugins = (array) apply_filters( 'wc_' . $this->get_plugin()->get_id() . '_scripts_optimization_plugins', [
334
+ 'async-javascript.php' => 'Async JavaScript',
335
+ 'autoptimize.php' => 'Autoptimize',
336
+ 'wp-hummingbird.php' => 'Hummingbird',
337
+ 'sg-optimizer.php' => 'SG Optimizer',
338
+ 'w3-total-cache.php' => 'W3 Total Cache',
339
+ 'wpFastestCache.php' => 'WP Fastest Cache',
340
+ 'wp-rocket.php' => 'WP Rocket',
341
+ ] );
342
+
343
+ $active_plugins = [];
344
+
345
+ foreach ( $plugins as $filename => $plugin_name ) {
346
+
347
+ if ( $this->get_plugin()->is_plugin_active( $filename ) ) {
348
+
349
+ $active_plugins[ $filename ] = $plugin_name;
350
+ }
351
+ }
352
+
353
+ return $active_plugins;
354
+ }
355
+
356
+
357
+ /**
358
+ * Returns true if any of the known scripts optimization plugins is active.
359
+ *
360
+ * @since 5.7.0
361
+ *
362
+ * @return bool
363
+ */
364
+ public function is_scripts_optimization_plugin_active() {
365
+
366
+ return ! empty( $this->get_active_scripts_optimization_plugins() );
367
+ }
368
+
369
+
370
  /** Getter methods ********************************************************/
371
 
372
 
379
  */
380
  public function get_missing_php_extensions() {
381
 
382
+ $missing_extensions = [];
383
 
384
  foreach ( $this->get_php_extensions() as $extension ) {
385
 
414
  */
415
  public function get_missing_php_functions() {
416
 
417
+ $missing_functions = [];
418
 
419
  foreach ( $this->get_php_functions() as $function ) {
420
 
449
  */
450
  public function get_incompatible_php_settings() {
451
 
452
+ $incompatible_settings = [];
 
 
453
 
454
  if ( function_exists( 'ini_get' ) ) {
455
 
461
  continue;
462
  }
463
 
464
+ if ( is_int( $expected ) ) {
465
 
466
  // determine if this is a size string, like "10MB"
467
  $is_size = ! is_numeric( substr( $actual, -1 ) );
470
 
471
  if ( $actual_num < $expected ) {
472
 
473
+ $incompatible_settings[ $setting ] = [
474
  'expected' => $is_size ? size_format( $expected ) : $expected,
475
  'actual' => $is_size ? size_format( $actual_num ) : $actual,
476
  'type' => 'min',
477
+ ];
478
  }
479
 
480
  } elseif ( $actual !== $expected ) {
481
 
482
+ $incompatible_settings[ $setting ] = [
483
  'expected' => $expected,
484
  'actual' => $actual,
485
+ ];
486
  }
487
  }
488
  }
519
 
520
  }
521
 
522
+
523
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin-exception.php RENAMED
@@ -18,19 +18,21 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Exceptions
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Plugin_Exception' ) ) :
30
 
31
- /**
32
- * Plugin Framework Exception - generic Exception
33
- */
34
- class SV_WC_Plugin_Exception extends \Exception { }
35
 
36
- endif; // class exists check
 
 
 
 
 
 
18
  *
19
  * @package SkyVerge/WooCommerce/Exceptions
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Plugin_Exception' ) ) :
30
 
 
 
 
 
31
 
32
+ /**
33
+ * Plugin Framework Exception - generic Exception
34
+ */
35
+ class SV_WC_Plugin_Exception extends \Exception { }
36
+
37
+
38
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wc-plugin.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Plugin' ) ) :
 
30
 
31
  /**
32
  * # WooCommerce Plugin Framework
@@ -36,13 +37,13 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Plugin' ) ) :
36
  * plugin. This class handles all the "non-feature" support tasks such
37
  * as verifying dependencies are met, loading the text domain, etc.
38
  *
39
- * @version 5.3.0
40
  */
41
  abstract class SV_WC_Plugin {
42
 
43
 
44
  /** Plugin Framework Version */
45
- const VERSION = '5.3.0';
46
 
47
  /** @var object single instance of plugin */
48
  protected static $instance;
@@ -53,12 +54,15 @@ abstract class SV_WC_Plugin {
53
  /** @var string version number */
54
  private $version;
55
 
56
- /** @var string plugin path without trailing slash */
57
  private $plugin_path;
58
 
59
- /** @var string plugin uri */
60
  private $plugin_url;
61
 
 
 
 
62
  /** @var \WC_Logger instance */
63
  private $logger;
64
 
@@ -68,8 +72,11 @@ abstract class SV_WC_Plugin {
68
  /** @var string the plugin text domain */
69
  private $text_domain;
70
 
71
- /** @var string the plugin dependencies */
72
- private $dependencies;
 
 
 
73
 
74
  /** @var SV_WC_Plugin_Dependencies dependency handler instance */
75
  private $dependency_handler;
@@ -102,6 +109,7 @@ abstract class SV_WC_Plugin {
102
  * @param array $args {
103
  * optional plugin arguments
104
  *
 
105
  * @type string $text_domain the plugin textdomain, used to set up translations
106
  * @type array $dependencies {
107
  * PHP extension, function, and settings dependencies
@@ -112,132 +120,26 @@ abstract class SV_WC_Plugin {
112
  * }
113
  * }
114
  */
115
- public function __construct( $id, $version, $args = array() ) {
116
 
117
  // required params
118
  $this->id = $id;
119
  $this->version = $version;
120
 
121
- $args = wp_parse_args( $args, array(
122
- 'text_domain' => '',
123
- 'dependencies' => array(),
124
- ) );
 
125
 
126
- $this->text_domain = $args['text_domain'];
127
- $this->dependencies = $args['dependencies'];
128
 
129
  // includes that are required to be available at all times
130
  $this->includes();
131
 
132
- // add the action & filter hooks
133
- $this->add_hooks();
134
- }
135
-
136
-
137
- /**
138
- * Include any critical files which must be available as early as possible,
139
- *
140
- * @since 2.0.0
141
- */
142
- private function includes() {
143
-
144
- $framework_path = $this->get_framework_path();
145
-
146
- // common exception class
147
- require_once( $framework_path . '/class-sv-wc-plugin-exception.php' );
148
-
149
- // addresses
150
- require_once( $framework_path . '/Addresses/Address.php' );
151
- require_once( $framework_path . '/Addresses/Customer_Address.php' );
152
-
153
- // common utility methods
154
- require_once( $framework_path . '/class-sv-wc-helper.php' );
155
-
156
- // backwards compatibility for older WC versions
157
- require_once( $framework_path . '/class-sv-wc-plugin-compatibility.php' );
158
- require_once( $framework_path . '/compatibility/abstract-sv-wc-data-compatibility.php' );
159
- require_once( $framework_path . '/compatibility/class-sv-wc-order-compatibility.php' );
160
- require_once( $framework_path . '/compatibility/class-sv-wc-product-compatibility.php' );
161
-
162
- // TODO: Remove this when WC 3.x can be required {CW 2017-03-16}
163
- require_once( $framework_path . '/compatibility/class-sv-wc-datetime.php' );
164
-
165
- // generic API base
166
- require_once( $framework_path . '/api/class-sv-wc-api-exception.php' );
167
- require_once( $framework_path . '/api/class-sv-wc-api-base.php' );
168
- require_once( $framework_path . '/api/interface-sv-wc-api-request.php' );
169
- require_once( $framework_path . '/api/interface-sv-wc-api-response.php' );
170
-
171
- // XML API base
172
- require_once( $framework_path . '/api/abstract-sv-wc-api-xml-request.php' );
173
- require_once( $framework_path . '/api/abstract-sv-wc-api-xml-response.php' );
174
-
175
- // JSON API base
176
- require_once( $framework_path . '/api/abstract-sv-wc-api-json-request.php' );
177
- require_once( $framework_path . '/api/abstract-sv-wc-api-json-response.php' );
178
-
179
- // Handlers
180
- require_once( $framework_path . '/class-sv-wc-plugin-dependencies.php' );
181
- require_once( $framework_path . '/class-sv-wc-hook-deprecator.php' );
182
- require_once( $framework_path . '/class-sv-wp-admin-message-handler.php' );
183
- require_once( $framework_path . '/class-sv-wc-admin-notice-handler.php' );
184
- require_once( $framework_path . '/Lifecycle.php' );
185
- require_once( $framework_path . '/rest-api/class-sv-wc-plugin-rest-api.php' );
186
- }
187
-
188
-
189
- /**
190
- * Adds the action & filter hooks.
191
- *
192
- * @since 5.2.0
193
- */
194
- private function add_hooks() {
195
-
196
- // initialize the handlers
197
- add_action( 'plugins_loaded', array( $this, 'init_handlers' ), 11 );
198
-
199
- // initialize the plugin
200
- add_action( 'plugins_loaded', array( $this, 'init_plugin' ), 15 );
201
-
202
- // initialize the plugin admin
203
- add_action( 'admin_init', array( $this, 'init_admin' ), 0 );
204
-
205
- // hook for translations seperately to ensure they're loaded
206
- add_action( 'init', array( $this, 'load_translations' ) );
207
-
208
- // add the admin notices
209
- add_action( 'admin_notices', array( $this, 'add_admin_notices' ) );
210
- add_action( 'admin_footer', array( $this, 'add_delayed_admin_notices' ) );
211
-
212
- // add a 'Configure' link to the plugin action links
213
- add_filter( 'plugin_action_links_' . plugin_basename( $this->get_plugin_file() ), array( $this, 'plugin_action_links' ) );
214
-
215
- // automatically log HTTP requests from SV_WC_API_Base
216
- $this->add_api_request_logging();
217
-
218
- // add any PHP incompatibilities to the system status report
219
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
220
- add_filter( 'woocommerce_system_status_environment_rows', array( $this, 'add_system_status_php_information' ) );
221
- } else {
222
- add_filter( 'woocommerce_debug_posting', array( $this, 'add_system_status_php_information' ) );
223
- }
224
- }
225
-
226
-
227
- /** Init methods **********************************************************/
228
-
229
-
230
- /**
231
- * Initializes the various handlers.
232
- *
233
- * @internal
234
- *
235
- * @since 5.3.0
236
- */
237
- public function init_handlers() {
238
-
239
  // initialize the dependencies manager
240
- $this->init_dependencies( $this->dependencies );
241
 
242
  // build the admin message handler instance
243
  $this->init_admin_message_handler();
@@ -256,9 +158,15 @@ abstract class SV_WC_Plugin {
256
 
257
  // build the setup handler instance
258
  $this->init_setup_wizard_handler();
 
 
 
259
  }
260
 
261
 
 
 
 
262
  /**
263
  * Initializes the plugin dependency handler.
264
  *
@@ -349,7 +257,7 @@ abstract class SV_WC_Plugin {
349
  *
350
  * Plugins can override and extend this method to add their own setup wizard.
351
  *
352
- * @since 5.3.0-dev
353
  */
354
  protected function init_setup_wizard_handler() {
355
 
@@ -358,29 +266,55 @@ abstract class SV_WC_Plugin {
358
 
359
 
360
  /**
361
- * Initializes the plugin.
362
- *
363
- * Plugins can override this to set up any handlers after WordPress is ready.
364
  *
365
  * @since 5.2.0
366
  */
367
- public function init_plugin() {
368
 
369
- // stub
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  }
371
 
372
 
373
  /**
374
- * Initializes the plugin admin.
375
- *
376
- * Plugins can override this to set up any handlers after the WordPress
377
- * admin is ready.
378
  *
379
- * @since 5.2.0
380
  */
381
- public function init_admin() {
 
 
 
382
 
383
- // stub
 
 
 
 
 
 
 
 
384
  }
385
 
386
 
@@ -408,7 +342,7 @@ abstract class SV_WC_Plugin {
408
  * @since 4.5.0
409
  */
410
  protected function load_framework_textdomain() {
411
- $this->load_textdomain( 'woocommerce-gateway-paypal-powered-by-braintree', dirname( plugin_basename( $this->get_framework_file() ) ) );
412
  }
413
 
414
 
@@ -443,24 +377,91 @@ abstract class SV_WC_Plugin {
443
 
444
 
445
  /**
446
- * Cloning instances is forbidden due to singleton pattern.
447
  *
448
- * @since 3.1.0
 
 
449
  */
450
- public function __clone() {
451
- /* translators: Placeholders: %s - plugin name */
452
- _doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot clone instances of %s.', 'woocommerce-gateway-paypal-powered-by-braintree' ), esc_html( $this->get_plugin_name() ) ), '3.1.0' );
453
  }
454
 
455
 
456
  /**
457
- * Unserializing instances is forbidden due to singleton pattern.
458
  *
459
- * @since 3.1.0
 
 
460
  */
461
- public function __wakeup() {
462
- /* translators: Placeholders: %s - plugin name */
463
- _doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot unserialize instances of %s.', 'woocommerce-gateway-paypal-powered-by-braintree' ), esc_html( $this->get_plugin_name() ) ), '3.1.0' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
464
  }
465
 
466
 
@@ -501,15 +502,83 @@ abstract class SV_WC_Plugin {
501
 
502
 
503
  /**
504
- * Checks if required PHP extensions are loaded and adds an admin notice
505
- * for any missing extensions. Also plugin settings can be checked
506
- * as well.
507
  *
508
  * @since 3.0.0
509
  */
510
  public function add_admin_notices() {
511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  }
514
 
515
 
@@ -544,17 +613,17 @@ abstract class SV_WC_Plugin {
544
  // documentation url if any
545
  if ( $this->get_documentation_url() ) {
546
  /* translators: Docs as in Documentation */
547
- $custom_actions['docs'] = sprintf( '<a href="%s" target="_blank">%s</a>', $this->get_documentation_url(), esc_html__( 'Docs', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
548
  }
549
 
550
  // support url if any
551
  if ( $this->get_support_url() ) {
552
- $custom_actions['support'] = sprintf( '<a href="%s">%s</a>', $this->get_support_url(), esc_html_x( 'Support', 'noun', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
553
  }
554
 
555
  // review url if any
556
  if ( $this->get_reviews_url() ) {
557
- $custom_actions['review'] = sprintf( '<a href="%s">%s</a>', $this->get_reviews_url(), esc_html_x( 'Review', 'verb', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
558
  }
559
 
560
  // add the links to the front of the actions list
@@ -637,7 +706,7 @@ abstract class SV_WC_Plugin {
637
  continue;
638
  }
639
 
640
- $note = __( '%1$s - A minimum of %2$s is required.', 'woocommerce-gateway-paypal-powered-by-braintree' );
641
 
642
  } else {
643
 
@@ -646,7 +715,7 @@ abstract class SV_WC_Plugin {
646
  continue;
647
  }
648
 
649
- $note = __( 'Set as %1$s - %2$s is required.', 'woocommerce-gateway-paypal-powered-by-braintree' );
650
  }
651
 
652
  $note = sprintf( $note, $values['actual'], $values['expected'] );
@@ -700,6 +769,48 @@ abstract class SV_WC_Plugin {
700
  }
701
 
702
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
703
  /** Getter methods ******************************************************/
704
 
705
 
@@ -794,7 +905,7 @@ abstract class SV_WC_Plugin {
794
  /**
795
  * Gets the Setup Wizard handler instance.
796
  *
797
- * @since 5.3.0-dev
798
  *
799
  * @return null|Admin\Setup_Wizard
800
  */
@@ -830,6 +941,21 @@ abstract class SV_WC_Plugin {
830
  }
831
 
832
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833
  /**
834
  * Returns the plugin version name. Defaults to wc_{plugin id}_version
835
  *
@@ -869,7 +995,7 @@ abstract class SV_WC_Plugin {
869
  $settings_url = $this->get_settings_url( $plugin_id );
870
 
871
  if ( $settings_url ) {
872
- return sprintf( '<a href="%s">%s</a>', $settings_url, esc_html__( 'Configure', 'woocommerce-gateway-paypal-powered-by-braintree' ) );
873
  }
874
 
875
  // no settings
@@ -971,48 +1097,56 @@ abstract class SV_WC_Plugin {
971
 
972
 
973
  /**
974
- * Returns the plugin's path without a trailing slash, i.e.
975
- * /path/to/wp-content/plugins/plugin-directory
 
976
  *
977
  * @since 2.0.0
978
- * @return string the plugin path
 
979
  */
980
  public function get_plugin_path() {
981
 
982
- if ( $this->plugin_path ) {
983
- return $this->plugin_path;
984
  }
985
 
986
- return $this->plugin_path = untrailingslashit( plugin_dir_path( $this->get_file() ) );
987
  }
988
 
989
 
990
  /**
991
- * Returns the plugin's url without a trailing slash, i.e.
992
- * http://skyverge.com/wp-content/plugins/plugin-directory
 
993
  *
994
  * @since 2.0.0
995
- * @return string the plugin URL
 
996
  */
997
  public function get_plugin_url() {
998
 
999
- if ( $this->plugin_url ) {
1000
- return $this->plugin_url;
1001
  }
1002
 
1003
- return $this->plugin_url = untrailingslashit( plugins_url( '/', $this->get_file() ) );
1004
  }
1005
 
1006
 
1007
  /**
1008
- * Returns the woocommerce uploads path, without trailing slash. Oddly WooCommerce
1009
- * core does not provide a way to get this
 
1010
  *
1011
  * @since 2.0.0
1012
- * @return string upload path for woocommerce
 
1013
  */
1014
  public static function get_woocommerce_uploads_path() {
 
1015
  $upload_dir = wp_upload_dir();
 
1016
  return $upload_dir['basedir'] . '/woocommerce_uploads';
1017
  }
1018
 
@@ -1030,8 +1164,9 @@ abstract class SV_WC_Plugin {
1030
 
1031
 
1032
  /**
1033
- * Returns the loaded framework path, without trailing slash. Ths is the highest
1034
- * version framework that was loaded by the bootstrap.
 
1035
  *
1036
  * @since 4.0.0
1037
  * @return string
@@ -1043,10 +1178,10 @@ abstract class SV_WC_Plugin {
1043
 
1044
 
1045
  /**
1046
- * Returns the absolute path to the loaded framework image directory, without a
1047
- * trailing slash
1048
  *
1049
  * @since 4.0.0
 
1050
  * @return string
1051
  */
1052
  public function get_framework_assets_path() {
@@ -1056,9 +1191,10 @@ abstract class SV_WC_Plugin {
1056
 
1057
 
1058
  /**
1059
- * Returns the loaded framework assets URL without a trailing slash
1060
  *
1061
  * @since 4.0.0
 
1062
  * @return string
1063
  */
1064
  public function get_framework_assets_url() {
@@ -1068,39 +1204,91 @@ abstract class SV_WC_Plugin {
1068
 
1069
 
1070
  /**
1071
- * Helper function to determine whether a plugin is active
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1072
  *
1073
  * @since 2.0.0
 
1074
  * @param string $plugin_name plugin name, as the plugin-filename.php
1075
  * @return boolean true if the named plugin is installed and active
1076
  */
1077
  public function is_plugin_active( $plugin_name ) {
1078
 
1079
- $active_plugins = (array) get_option( 'active_plugins', array() );
1080
 
1081
- if ( is_multisite() ) {
1082
- $active_plugins = array_merge( $active_plugins, array_keys( get_site_option( 'active_sitewide_plugins', array() ) ) );
1083
- }
1084
 
1085
- $plugin_filenames = array();
1086
 
1087
- foreach ( $active_plugins as $plugin ) {
1088
 
1089
- if ( SV_WC_Helper::str_exists( $plugin, '/' ) ) {
 
 
1090
 
1091
- // normal plugin name (plugin-dir/plugin-filename.php)
1092
- list( , $filename ) = explode( '/', $plugin );
1093
 
1094
- } else {
 
 
 
 
 
1095
 
1096
- // no directory, just plugin file
1097
- $filename = $plugin;
 
 
 
 
 
 
 
 
1098
  }
1099
 
1100
- $plugin_filenames[] = $filename;
1101
  }
1102
 
1103
- return in_array( $plugin_name, $plugin_filenames );
1104
  }
1105
 
1106
 
@@ -1115,7 +1303,7 @@ abstract class SV_WC_Plugin {
1115
  */
1116
  public function do_install() {
1117
 
1118
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_lifecycle_handler() ) . '::init()' );
1119
 
1120
  $this->get_lifecycle_handler()->init();
1121
  }
@@ -1131,7 +1319,7 @@ abstract class SV_WC_Plugin {
1131
  */
1132
  public function install_default_settings( array $settings ) {
1133
 
1134
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_lifecycle_handler() ) . '::install_default_settings()' );
1135
 
1136
  $this->get_lifecycle_handler()->install_default_settings( $settings );
1137
  }
@@ -1146,7 +1334,7 @@ abstract class SV_WC_Plugin {
1146
  */
1147
  public function activate() {
1148
 
1149
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0' );
1150
  }
1151
 
1152
 
@@ -1158,7 +1346,7 @@ abstract class SV_WC_Plugin {
1158
  */
1159
  public function deactivate() {
1160
 
1161
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0' );
1162
  }
1163
 
1164
 
@@ -1172,7 +1360,7 @@ abstract class SV_WC_Plugin {
1172
  */
1173
  public function get_missing_extension_dependencies() {
1174
 
1175
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_missing_php_extensions()' );
1176
 
1177
  return $this->get_dependency_handler()->get_missing_php_extensions();
1178
  }
@@ -1188,7 +1376,7 @@ abstract class SV_WC_Plugin {
1188
  */
1189
  public function get_missing_function_dependencies() {
1190
 
1191
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_missing_php_functions()' );
1192
 
1193
  return $this->get_dependency_handler()->get_missing_php_functions();
1194
  }
@@ -1204,7 +1392,7 @@ abstract class SV_WC_Plugin {
1204
  */
1205
  public function get_incompatible_php_settings() {
1206
 
1207
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_incompatible_php_settings()' );
1208
 
1209
  return $this->get_dependency_handler()->get_incompatible_php_settings();
1210
  }
@@ -1220,7 +1408,7 @@ abstract class SV_WC_Plugin {
1220
  */
1221
  protected function get_dependencies() {
1222
 
1223
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0' );
1224
 
1225
  return array();
1226
  }
@@ -1236,7 +1424,7 @@ abstract class SV_WC_Plugin {
1236
  */
1237
  protected function get_extension_dependencies() {
1238
 
1239
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_extensions()' );
1240
 
1241
  return $this->get_dependency_handler()->get_php_extensions();
1242
  }
@@ -1252,7 +1440,7 @@ abstract class SV_WC_Plugin {
1252
  */
1253
  protected function get_function_dependencies() {
1254
 
1255
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_functions()' );
1256
 
1257
  return $this->get_dependency_handler()->get_php_functions();
1258
  }
@@ -1268,7 +1456,7 @@ abstract class SV_WC_Plugin {
1268
  */
1269
  protected function get_php_settings_dependencies() {
1270
 
1271
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_settings()' );
1272
 
1273
  return $this->get_dependency_handler()->get_php_settings();
1274
  }
@@ -1282,12 +1470,13 @@ abstract class SV_WC_Plugin {
1282
  *
1283
  * @param array $dependencies the environment dependencies
1284
  */
1285
- protected function set_dependencies( $dependencies = array() ) {
1286
 
1287
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0' );
1288
  }
1289
 
1290
 
1291
  }
1292
 
1293
- endif; // Class exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Classes
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Plugin' ) ) :
30
+
31
 
32
  /**
33
  * # WooCommerce Plugin Framework
37
  * plugin. This class handles all the "non-feature" support tasks such
38
  * as verifying dependencies are met, loading the text domain, etc.
39
  *
40
+ * @version 5.7.1
41
  */
42
  abstract class SV_WC_Plugin {
43
 
44
 
45
  /** Plugin Framework Version */
46
+ const VERSION = '5.7.1';
47
 
48
  /** @var object single instance of plugin */
49
  protected static $instance;
54
  /** @var string version number */
55
  private $version;
56
 
57
+ /** @var string plugin path, without trailing slash */
58
  private $plugin_path;
59
 
60
+ /** @var string plugin URL */
61
  private $plugin_url;
62
 
63
+ /** @var string template path, without trailing slash */
64
+ private $template_path;
65
+
66
  /** @var \WC_Logger instance */
67
  private $logger;
68
 
72
  /** @var string the plugin text domain */
73
  private $text_domain;
74
 
75
+ /** @var array memoized list of active plugins */
76
+ private $active_plugins = [];
77
+
78
+ /** @var int|float minimum supported WooCommerce versions before the latest (units for major releases, decimals for minor) */
79
+ private $min_wc_semver;
80
 
81
  /** @var SV_WC_Plugin_Dependencies dependency handler instance */
82
  private $dependency_handler;
109
  * @param array $args {
110
  * optional plugin arguments
111
  *
112
+ * @type int|float $latest_wc_versions the last supported versions of WooCommerce, as a major.minor float relative to the latest available version
113
  * @type string $text_domain the plugin textdomain, used to set up translations
114
  * @type array $dependencies {
115
  * PHP extension, function, and settings dependencies
120
  * }
121
  * }
122
  */
123
+ public function __construct( $id, $version, $args = [] ) {
124
 
125
  // required params
126
  $this->id = $id;
127
  $this->version = $version;
128
 
129
+ $args = wp_parse_args( $args, [
130
+ 'min_wc_semver' => 0.2, // by default, 2 minor versions behind the latest published are supported
131
+ 'text_domain' => '',
132
+ 'dependencies' => [],
133
+ ] );
134
 
135
+ $this->min_wc_semver = is_numeric( $args['min_wc_semver'] ) ? abs( $args['min_wc_semver'] ) : null;
136
+ $this->text_domain = $args['text_domain'];
137
 
138
  // includes that are required to be available at all times
139
  $this->includes();
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  // initialize the dependencies manager
142
+ $this->init_dependencies( $args['dependencies'] );
143
 
144
  // build the admin message handler instance
145
  $this->init_admin_message_handler();
158
 
159
  // build the setup handler instance
160
  $this->init_setup_wizard_handler();
161
+
162
+ // add the action & filter hooks
163
+ $this->add_hooks();
164
  }
165
 
166
 
167
+ /** Init methods **********************************************************/
168
+
169
+
170
  /**
171
  * Initializes the plugin dependency handler.
172
  *
257
  *
258
  * Plugins can override and extend this method to add their own setup wizard.
259
  *
260
+ * @since 5.3.0
261
  */
262
  protected function init_setup_wizard_handler() {
263
 
266
 
267
 
268
  /**
269
+ * Adds the action & filter hooks.
 
 
270
  *
271
  * @since 5.2.0
272
  */
273
+ private function add_hooks() {
274
 
275
+ // initialize the plugin
276
+ add_action( 'plugins_loaded', array( $this, 'init_plugin' ), 15 );
277
+
278
+ // initialize the plugin admin
279
+ add_action( 'admin_init', array( $this, 'init_admin' ), 0 );
280
+
281
+ // hook for translations separately to ensure they're loaded
282
+ add_action( 'init', array( $this, 'load_translations' ) );
283
+
284
+ // add the admin notices
285
+ add_action( 'admin_notices', array( $this, 'add_admin_notices' ) );
286
+ add_action( 'admin_footer', array( $this, 'add_delayed_admin_notices' ) );
287
+
288
+ // add a 'Configure' link to the plugin action links
289
+ add_filter( 'plugin_action_links_' . plugin_basename( $this->get_plugin_file() ), array( $this, 'plugin_action_links' ) );
290
+
291
+ // automatically log HTTP requests from SV_WC_API_Base
292
+ $this->add_api_request_logging();
293
+
294
+ // add any PHP incompatibilities to the system status report
295
+ add_filter( 'woocommerce_system_status_environment_rows', array( $this, 'add_system_status_php_information' ) );
296
  }
297
 
298
 
299
  /**
300
+ * Cloning instances is forbidden due to singleton pattern.
 
 
 
301
  *
302
+ * @since 3.1.0
303
  */
304
+ public function __clone() {
305
+ /* translators: Placeholders: %s - plugin name */
306
+ _doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot clone instances of %s.', 'woocommerce-plugin-framework' ), esc_html( $this->get_plugin_name() ) ), '3.1.0' );
307
+ }
308
 
309
+
310
+ /**
311
+ * Unserializing instances is forbidden due to singleton pattern.
312
+ *
313
+ * @since 3.1.0
314
+ */
315
+ public function __wakeup() {
316
+ /* translators: Placeholders: %s - plugin name */
317
+ _doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot unserialize instances of %s.', 'woocommerce-plugin-framework' ), esc_html( $this->get_plugin_name() ) ), '3.1.0' );
318
  }
319
 
320
 
342
  * @since 4.5.0
343
  */
344
  protected function load_framework_textdomain() {
345
+ $this->load_textdomain( 'woocommerce-plugin-framework', dirname( plugin_basename( $this->get_framework_file() ) ) );
346
  }
347
 
348
 
377
 
378
 
379
  /**
380
+ * Initializes the plugin.
381
  *
382
+ * Plugins can override this to set up any handlers after WordPress is ready.
383
+ *
384
+ * @since 5.2.0
385
  */
386
+ public function init_plugin() {
387
+
388
+ // stub
389
  }
390
 
391
 
392
  /**
393
+ * Initializes the plugin admin.
394
  *
395
+ * Plugins can override this to set up any handlers after the WordPress admin is ready.
396
+ *
397
+ * @since 5.2.0
398
  */
399
+ public function init_admin() {
400
+
401
+ // stub
402
+ }
403
+
404
+
405
+ /**
406
+ * Include any critical files which must be available as early as possible,
407
+ *
408
+ * @since 2.0.0
409
+ */
410
+ private function includes() {
411
+
412
+ $framework_path = $this->get_framework_path();
413
+
414
+ // common exception class
415
+ require_once( $framework_path . '/class-sv-wc-plugin-exception.php' );
416
+
417
+ // addresses
418
+ require_once( $framework_path . '/Addresses/Address.php' );
419
+ require_once( $framework_path . '/Addresses/Customer_Address.php' );
420
+
421
+ // Settings API
422
+ require_once( $framework_path . '/Settings_API/Abstract_Settings.php' );
423
+ require_once( $framework_path . '/Settings_API/Setting.php' );
424
+ require_once( $framework_path . '/Settings_API/Control.php' );
425
+
426
+ // common utility methods
427
+ require_once( $framework_path . '/class-sv-wc-helper.php' );
428
+ require_once( $framework_path . '/Country_Helper.php' );
429
+ require_once( $framework_path . '/admin/Notes_Helper.php' );
430
+
431
+ // backwards compatibility for older WC versions
432
+ require_once( $framework_path . '/class-sv-wc-plugin-compatibility.php' );
433
+ require_once( $framework_path . '/compatibility/abstract-sv-wc-data-compatibility.php' );
434
+ require_once( $framework_path . '/compatibility/class-sv-wc-order-compatibility.php' );
435
+ require_once( $framework_path . '/compatibility/class-sv-wc-product-compatibility.php' );
436
+
437
+ // TODO: Remove this when WC 3.x can be required {CW 2017-03-16}
438
+ require_once( $framework_path . '/compatibility/class-sv-wc-datetime.php' );
439
+
440
+ // generic API base
441
+ require_once( $framework_path . '/api/class-sv-wc-api-exception.php' );
442
+ require_once( $framework_path . '/api/class-sv-wc-api-base.php' );
443
+ require_once( $framework_path . '/api/interface-sv-wc-api-request.php' );
444
+ require_once( $framework_path . '/api/interface-sv-wc-api-response.php' );
445
+
446
+ // XML API base
447
+ require_once( $framework_path . '/api/abstract-sv-wc-api-xml-request.php' );
448
+ require_once( $framework_path . '/api/abstract-sv-wc-api-xml-response.php' );
449
+
450
+ // JSON API base
451
+ require_once( $framework_path . '/api/abstract-sv-wc-api-json-request.php' );
452
+ require_once( $framework_path . '/api/abstract-sv-wc-api-json-response.php' );
453
+
454
+ // REST API Controllers
455
+ require_once( $framework_path . '/rest-api/Controllers/Settings.php' );
456
+
457
+ // Handlers
458
+ require_once( $framework_path . '/Handlers/Script_Handler.php' );
459
+ require_once( $framework_path . '/class-sv-wc-plugin-dependencies.php' );
460
+ require_once( $framework_path . '/class-sv-wc-hook-deprecator.php' );
461
+ require_once( $framework_path . '/class-sv-wp-admin-message-handler.php' );
462
+ require_once( $framework_path . '/class-sv-wc-admin-notice-handler.php' );
463
+ require_once( $framework_path . '/Lifecycle.php' );
464
+ require_once( $framework_path . '/rest-api/class-sv-wc-plugin-rest-api.php' );
465
  }
466
 
467
 
502
 
503
 
504
  /**
505
+ * Adds admin notices upon initialization.
506
+ *
507
+ * This may also produce notices if running an unsupported version of WooCommerce.
508
  *
509
  * @since 3.0.0
510
  */
511
  public function add_admin_notices() {
512
 
513
+ // bail if there's no defined versions to compare
514
+ if ( empty( $this->min_wc_semver ) || ! is_numeric( $this->min_wc_semver ) ) {
515
+ return;
516
+ }
517
+
518
+ $latest_wc_versions = SV_WC_Plugin_Compatibility::get_latest_wc_versions();
519
+ $current_wc_version = SV_WC_Plugin_Compatibility::get_wc_version();
520
+
521
+ // bail if the latest WooCommerce version or the current WooCommerce versions can't be determined
522
+ if ( empty( $latest_wc_versions ) || empty( $current_wc_version ) ) {
523
+ return;
524
+ }
525
+
526
+ // grab latest published version
527
+ $supported_wc_version = $latest_wc_version = current( $latest_wc_versions );
528
+
529
+ // grab semver parts
530
+ $latest_semver = explode( '.', $latest_wc_version );
531
+ $supported_semver = explode( '.', (string) $this->min_wc_semver );
532
+ $supported_major = max( 0, (int) $latest_semver[0] - (int) $supported_semver[0] );
533
+ $supported_minor = isset( $supported_semver[1] ) ? (int) $supported_semver[1] : 0;
534
+ $previous_minor = null;
535
+
536
+ // loop known WooCommerce versions from the most recent until we get the oldest supported one
537
+ foreach ( $latest_wc_versions as $older_wc_version ) {
538
+
539
+ // as we loop through versions, the latest one before we break the loop will be the minimum supported one
540
+ $supported_wc_version = $older_wc_version;
541
 
542
+ $older_semver = explode( '.', $older_wc_version );
543
+ $older_major = (int) $older_semver[0];
544
+ $older_minor = isset( $older_semver[1] ) ? (int) $older_semver[1] : 0;
545
+
546
+ // if major is ignored, skip; if the minor hasn't changed (patch must be), skip
547
+ if ( $older_major > $supported_major || $older_minor === $previous_minor ) {
548
+ continue;
549
+ }
550
+
551
+ // we reached the maximum number of supported minor versions
552
+ if ( $supported_minor <= 0 ) {
553
+ break;
554
+ }
555
+
556
+ // store the previous minor while we loop patch versions, which we ignore
557
+ $previous_minor = $older_minor;
558
+
559
+ $supported_minor--;
560
+ }
561
+
562
+ // for strict comparison, we strip the patch version from the determined versions and compare only major, minor versions, ignoring patches (i.e. 1.2.3 becomes 1.2)
563
+ $current_wc_version = substr( $current_wc_version, 0, strpos( $current_wc_version, '.', strpos( $current_wc_version, '.' ) + 1 ) );
564
+ $supported_wc_version = substr( $supported_wc_version, 0, strpos( $supported_wc_version, '.', strpos( $supported_wc_version, '.' ) + 1 ) );
565
+ $compared_wc_version = $current_wc_version && $supported_wc_version ? version_compare( $current_wc_version, $supported_wc_version ) : null;
566
+
567
+ // installed version is at more than 2 minor versions ($min_wc_semver value) behind the last published version
568
+ if ( -1 === $compared_wc_version ) {
569
+
570
+ $this->get_admin_notice_handler()->add_admin_notice(
571
+ sprintf(
572
+ /* translators: Placeholders: %1$s - plugin name, %2$s - WooCommerce version number, %3$s - opening <a> HTML link tag, %4$s - closing </a> HTML link tag */
573
+ __( 'Heads up! %1$s will soon discontinue support for WooCommerce %2$s. Please %3$supdate WooCommerce%4$s to take advantage of the latest updates and features.', 'woocommerce-plugin-framework' ),
574
+ $this->get_plugin_name(),
575
+ $current_wc_version,
576
+ '<a href="' . esc_url( admin_url( 'update-core.php' ) ) .'">', '</a>'
577
+ ),
578
+ $this->get_id_dasherized() . '-deprecated-wc-version-as-of-' . str_replace( '.', '-', $supported_wc_version ),
579
+ [ 'notice_class' => 'notice-info' ]
580
+ );
581
+ }
582
  }
583
 
584
 
613
  // documentation url if any
614
  if ( $this->get_documentation_url() ) {
615
  /* translators: Docs as in Documentation */
616
+ $custom_actions['docs'] = sprintf( '<a href="%s" target="_blank">%s</a>', $this->get_documentation_url(), esc_html__( 'Docs', 'woocommerce-plugin-framework' ) );
617
  }
618
 
619
  // support url if any
620
  if ( $this->get_support_url() ) {
621
+ $custom_actions['support'] = sprintf( '<a href="%s">%s</a>', $this->get_support_url(), esc_html_x( 'Support', 'noun', 'woocommerce-plugin-framework' ) );
622
  }
623
 
624
  // review url if any
625
  if ( $this->get_reviews_url() ) {
626
+ $custom_actions['review'] = sprintf( '<a href="%s">%s</a>', $this->get_reviews_url(), esc_html_x( 'Review', 'verb', 'woocommerce-plugin-framework' ) );
627
  }
628
 
629
  // add the links to the front of the actions list
706
  continue;
707
  }
708
 
709
+ $note = __( '%1$s - A minimum of %2$s is required.', 'woocommerce-plugin-framework' );
710
 
711
  } else {
712
 
715
  continue;
716
  }
717
 
718
+ $note = __( 'Set as %1$s - %2$s is required.', 'woocommerce-plugin-framework' );
719
  }
720
 
721
  $note = sprintf( $note, $values['actual'], $values['expected'] );
769
  }
770
 
771
 
772
+ /**
773
+ * Determines if TLS v1.2 is required for API requests.
774
+ *
775
+ * Subclasses should override this to return true if TLS v1.2 is required.
776
+ *
777
+ * @since 5.5.2
778
+ *
779
+ * @return bool
780
+ */
781
+ public function require_tls_1_2() {
782
+
783
+ return false;
784
+ }
785
+
786
+
787
+ /**
788
+ * Determines if TLS 1.2 is available.
789
+ *
790
+ * @since 5.5.2
791
+ *
792
+ * @return bool
793
+ */
794
+ public function is_tls_1_2_available() {
795
+
796
+ // assume availability to avoid notices for unknown SSL types
797
+ $is_available = true;
798
+
799
+ // check the cURL version if installed
800
+ if ( is_callable( 'curl_version' ) ) {
801
+
802
+ $versions = curl_version();
803
+
804
+ // cURL 7.34.0 is considered the minimum version that supports TLS 1.2
805
+ if ( version_compare( $versions['version'], '7.34.0', '<' ) ) {
806
+ $is_available = false;
807
+ }
808
+ }
809
+
810
+ return $is_available;
811
+ }
812
+
813
+
814
  /** Getter methods ******************************************************/
815
 
816
 
905
  /**
906
  * Gets the Setup Wizard handler instance.
907
  *
908
+ * @since 5.3.0
909
  *
910
  * @return null|Admin\Setup_Wizard
911
  */
941
  }
942
 
943
 
944
+ /**
945
+ * Gets the settings API handler instance.
946
+ *
947
+ * Plugins can use this to init the settings API handler.
948
+ *
949
+ * @since 5.7.0
950
+ *
951
+ * @return void|Settings_API\Abstract_Settings
952
+ */
953
+ public function get_settings_handler() {
954
+
955
+ return;
956
+ }
957
+
958
+
959
  /**
960
  * Returns the plugin version name. Defaults to wc_{plugin id}_version
961
  *
995
  $settings_url = $this->get_settings_url( $plugin_id );
996
 
997
  if ( $settings_url ) {
998
+ return sprintf( '<a href="%s">%s</a>', $settings_url, esc_html__( 'Configure', 'woocommerce-plugin-framework' ) );
999
  }
1000
 
1001
  // no settings
1097
 
1098
 
1099
  /**
1100
+ * Gets the plugin's path without a trailing slash.
1101
+ *
1102
+ * e.g. /path/to/wp-content/plugins/plugin-directory
1103
  *
1104
  * @since 2.0.0
1105
+ *
1106
+ * @return string
1107
  */
1108
  public function get_plugin_path() {
1109
 
1110
+ if ( null === $this->plugin_path ) {
1111
+ $this->plugin_path = untrailingslashit( plugin_dir_path( $this->get_file() ) );
1112
  }
1113
 
1114
+ return $this->plugin_path;
1115
  }
1116
 
1117
 
1118
  /**
1119
+ * Gets the plugin's URL without a trailing slash.
1120
+ *
1121
+ * E.g. http://skyverge.com/wp-content/plugins/plugin-directory
1122
  *
1123
  * @since 2.0.0
1124
+ *
1125
+ * @return string
1126
  */
1127
  public function get_plugin_url() {
1128
 
1129
+ if ( null === $this->plugin_url ) {
1130
+ $this->plugin_url = untrailingslashit( plugins_url( '/', $this->get_file() ) );
1131
  }
1132
 
1133
+ return $this->plugin_url;
1134
  }
1135
 
1136
 
1137
  /**
1138
+ * Gets the woocommerce uploads path, without trailing slash.
1139
+ *
1140
+ * Oddly WooCommerce core does not provide a way to get this.
1141
  *
1142
  * @since 2.0.0
1143
+ *
1144
+ * @return string
1145
  */
1146
  public static function get_woocommerce_uploads_path() {
1147
+
1148
  $upload_dir = wp_upload_dir();
1149
+
1150
  return $upload_dir['basedir'] . '/woocommerce_uploads';
1151
  }
1152
 
1164
 
1165
 
1166
  /**
1167
+ * Gets the loaded framework path, without trailing slash.
1168
+ *
1169
+ * This matches the path to the highest version of the framework currently loaded.
1170
  *
1171
  * @since 4.0.0
1172
  * @return string
1178
 
1179
 
1180
  /**
1181
+ * Gets the absolute path to the loaded framework image directory, without a trailing slash.
 
1182
  *
1183
  * @since 4.0.0
1184
+ *
1185
  * @return string
1186
  */
1187
  public function get_framework_assets_path() {
1191
 
1192
 
1193
  /**
1194
+ * Gets the loaded framework assets URL without a trailing slash.
1195
  *
1196
  * @since 4.0.0
1197
+ *
1198
  * @return string
1199
  */
1200
  public function get_framework_assets_url() {
1204
 
1205
 
1206
  /**
1207
+ * Gets the plugin default template path, without a trailing slash.
1208
+ *
1209
+ * @since 5.5.0
1210
+ *
1211
+ * @return string
1212
+ */
1213
+ public function get_template_path() {
1214
+
1215
+ if ( null === $this->template_path ) {
1216
+ $this->template_path = $this->get_plugin_path() . '/templates';
1217
+ }
1218
+
1219
+ return $this->template_path;
1220
+ }
1221
+
1222
+
1223
+ /**
1224
+ * Loads and outputs a template file HTML.
1225
+ *
1226
+ * @see \wc_get_template() except we define automatically the default path
1227
+ *
1228
+ * @since 5.5.0
1229
+ *
1230
+ * @param string $template template name/part
1231
+ * @param array $args associative array of optional template arguments
1232
+ * @param string $path optional template path, can be empty, as themes can override this
1233
+ * @param string $default_path optional default template path, will normally use the plugin's own template path unless overridden
1234
+ */
1235
+ public function load_template( $template, array $args = [], $path = '', $default_path = '' ) {
1236
+
1237
+ if ( '' === $default_path || ! is_string( $default_path ) ) {
1238
+ $default_path = trailingslashit( $this->get_template_path() );
1239
+ }
1240
+
1241
+ wc_get_template( $template, $args, $path, $default_path );
1242
+ }
1243
+
1244
+
1245
+ /**
1246
+ * Determines whether a plugin is active.
1247
  *
1248
  * @since 2.0.0
1249
+ *
1250
  * @param string $plugin_name plugin name, as the plugin-filename.php
1251
  * @return boolean true if the named plugin is installed and active
1252
  */
1253
  public function is_plugin_active( $plugin_name ) {
1254
 
1255
+ $is_active = false;
1256
 
1257
+ if ( is_string( $plugin_name ) ) {
 
 
1258
 
1259
+ if ( ! array_key_exists( $plugin_name, $this->active_plugins ) ) {
1260
 
1261
+ $active_plugins = (array) get_option( 'active_plugins', array() );
1262
 
1263
+ if ( is_multisite() ) {
1264
+ $active_plugins = array_merge( $active_plugins, array_keys( get_site_option( 'active_sitewide_plugins', array() ) ) );
1265
+ }
1266
 
1267
+ $plugin_filenames = array();
 
1268
 
1269
+ foreach ( $active_plugins as $plugin ) {
1270
+
1271
+ if ( SV_WC_Helper::str_exists( $plugin, '/' ) ) {
1272
+
1273
+ // normal plugin name (plugin-dir/plugin-filename.php)
1274
+ list( , $filename ) = explode( '/', $plugin );
1275
 
1276
+ } else {
1277
+
1278
+ // no directory, just plugin file
1279
+ $filename = $plugin;
1280
+ }
1281
+
1282
+ $plugin_filenames[] = $filename;
1283
+ }
1284
+
1285
+ $this->active_plugins[ $plugin_name ] = in_array( $plugin_name, $plugin_filenames, true );
1286
  }
1287
 
1288
+ $is_active = (bool) $this->active_plugins[ $plugin_name ];
1289
  }
1290
 
1291
+ return $is_active;
1292
  }
1293
 
1294
 
1303
  */
1304
  public function do_install() {
1305
 
1306
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_lifecycle_handler() ) . '::init()' );
1307
 
1308
  $this->get_lifecycle_handler()->init();
1309
  }
1319
  */
1320
  public function install_default_settings( array $settings ) {
1321
 
1322
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_lifecycle_handler() ) . '::install_default_settings()' );
1323
 
1324
  $this->get_lifecycle_handler()->install_default_settings( $settings );
1325
  }
1334
  */
1335
  public function activate() {
1336
 
1337
+ wc_deprecated_function( __METHOD__, '5.2.0' );
1338
  }
1339
 
1340
 
1346
  */
1347
  public function deactivate() {
1348
 
1349
+ wc_deprecated_function( __METHOD__, '5.2.0' );
1350
  }
1351
 
1352
 
1360
  */
1361
  public function get_missing_extension_dependencies() {
1362
 
1363
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_missing_php_extensions()' );
1364
 
1365
  return $this->get_dependency_handler()->get_missing_php_extensions();
1366
  }
1376
  */
1377
  public function get_missing_function_dependencies() {
1378
 
1379
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_missing_php_functions()' );
1380
 
1381
  return $this->get_dependency_handler()->get_missing_php_functions();
1382
  }
1392
  */
1393
  public function get_incompatible_php_settings() {
1394
 
1395
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_incompatible_php_settings()' );
1396
 
1397
  return $this->get_dependency_handler()->get_incompatible_php_settings();
1398
  }
1408
  */
1409
  protected function get_dependencies() {
1410
 
1411
+ wc_deprecated_function( __METHOD__, '5.2.0' );
1412
 
1413
  return array();
1414
  }
1424
  */
1425
  protected function get_extension_dependencies() {
1426
 
1427
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_extensions()' );
1428
 
1429
  return $this->get_dependency_handler()->get_php_extensions();
1430
  }
1440
  */
1441
  protected function get_function_dependencies() {
1442
 
1443
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_functions()' );
1444
 
1445
  return $this->get_dependency_handler()->get_php_functions();
1446
  }
1456
  */
1457
  protected function get_php_settings_dependencies() {
1458
 
1459
+ wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_settings()' );
1460
 
1461
  return $this->get_dependency_handler()->get_php_settings();
1462
  }
1470
  *
1471
  * @param array $dependencies the environment dependencies
1472
  */
1473
+ protected function set_dependencies( $dependencies = [] ) {
1474
 
1475
+ wc_deprecated_function( __METHOD__, '5.2.0' );
1476
  }
1477
 
1478
 
1479
  }
1480
 
1481
+
1482
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/class-sv-wp-admin-message-handler.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WordPress/WP-Admin-Message-Handler
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WP_Admin_Message_Handler' ) ) :
 
30
 
31
  /**
32
  * # WordPress Admin Message Handler Class
@@ -433,4 +434,5 @@ class SV_WP_Admin_Message_Handler {
433
 
434
  }
435
 
436
- endif; // class exists check
 
18
  *
19
  * @package SkyVerge/WordPress/WP-Admin-Message-Handler
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WP_Admin_Message_Handler' ) ) :
30
+
31
 
32
  /**
33
  * # WordPress Admin Message Handler Class
434
 
435
  }
436
 
437
+
438
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php RENAMED
@@ -18,60 +18,49 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Data_Compatibility' ) ) :
 
30
 
31
  /**
32
  * WooCommerce data compatibility class.
33
  *
34
  * @since 4.6.0
 
35
  */
36
  abstract class SV_WC_Data_Compatibility {
37
 
38
 
 
 
 
 
39
  /**
40
  * Gets an object property.
41
  *
 
 
42
  * @since 4.6.0
 
 
43
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
44
  * @param string $prop the property name
45
  * @param string $context if 'view' then the value will be filtered
46
- * @param array $compat_props Compatibility properties.
47
- * @return mixed
48
  */
49
- public static function get_prop( $object, $prop, $context = 'edit', $compat_props = array() ) {
50
-
51
- $value = '';
52
-
53
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
54
-
55
- if ( is_callable( array( $object, "get_{$prop}" ) ) ) {
56
- $value = $object->{"get_{$prop}"}( $context );
57
- }
58
-
59
- } else {
60
 
61
- // backport the property name
62
- if ( isset( $compat_props[ $prop ] ) ) {
63
- $prop = $compat_props[ $prop ];
64
- }
65
 
66
- // if this is the 'view' context and there is an accessor method, use it
67
- if ( is_callable( array( $object, "get_{$prop}" ) ) && 'view' === $context ) {
68
- $value = $object->{"get_{$prop}"}();
69
- } else {
70
- $value = $object->$prop;
71
- }
72
- }
73
-
74
- return $value;
75
  }
76
 
77
 
@@ -81,30 +70,18 @@ abstract class SV_WC_Data_Compatibility {
81
  * Note that this does not save any data to the database.
82
  *
83
  * @since 4.6.0
 
 
84
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
85
  * @param array $props the new properties as $key => $value
86
- * @param array $compat_props Compatibility properties.
87
- * @return \WC_Data
88
  */
89
- public static function set_props( $object, $props, $compat_props = array() ) {
90
-
91
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
92
-
93
- $object->set_props( $props );
94
-
95
- } else {
96
 
97
- foreach ( $props as $prop => $value ) {
98
 
99
- if ( isset( $compat_props[ $prop ] ) ) {
100
- $prop = $compat_props[ $prop ];
101
- }
102
-
103
- $object->$prop = $value;
104
- }
105
- }
106
-
107
- return $object;
108
  }
109
 
110
 
@@ -112,6 +89,8 @@ abstract class SV_WC_Data_Compatibility {
112
  * Gets an object's stored meta value.
113
  *
114
  * @since 4.6.0
 
 
115
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
116
  * @param string $key the meta key
117
  * @param bool $single whether to get the meta as a single item. Defaults to `true`
@@ -120,18 +99,9 @@ abstract class SV_WC_Data_Compatibility {
120
  */
121
  public static function get_meta( $object, $key = '', $single = true, $context = 'edit' ) {
122
 
123
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
124
-
125
- $value = $object->get_meta( $key, $single, $context );
126
 
127
- } else {
128
-
129
- $object_id = is_callable( array( $object, 'get_id' ) ) ? $object->get_id() : $object->id;
130
-
131
- $value = get_post_meta( $object_id, $key, $single );
132
- }
133
-
134
- return $value;
135
  }
136
 
137
 
@@ -139,25 +109,19 @@ abstract class SV_WC_Data_Compatibility {
139
  * Stores an object meta value.
140
  *
141
  * @since 4.6.0
 
 
142
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
143
  * @param string $key the meta key
144
  * @param string $value the meta value
145
- * @param bool $unique Optional. Whether the meta should be unique.
146
  */
147
  public static function add_meta_data( $object, $key, $value, $unique = false ) {
148
 
149
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
150
-
151
- $object->add_meta_data( $key, $value, $unique );
152
 
153
- $object->save_meta_data();
154
-
155
- } else {
156
-
157
- $object_id = is_callable( array( $object, 'get_id' ) ) ? $object->get_id() : $object->id;
158
-
159
- add_post_meta( $object_id, $key, $value, $unique );
160
- }
161
  }
162
 
163
 
@@ -165,25 +129,19 @@ abstract class SV_WC_Data_Compatibility {
165
  * Updates an object's stored meta value.
166
  *
167
  * @since 4.6.0
 
 
168
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
169
  * @param string $key the meta key
170
  * @param string $value the meta value
171
- * @param int|string $meta_id Optional. The specific meta ID to update
172
  */
173
  public static function update_meta_data( $object, $key, $value, $meta_id = '' ) {
174
 
175
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
176
 
177
- $object->update_meta_data( $key, $value, $meta_id );
178
-
179
- $object->save_meta_data();
180
-
181
- } else {
182
-
183
- $object_id = is_callable( array( $object, 'get_id' ) ) ? $object->get_id() : $object->id;
184
-
185
- update_post_meta( $object_id, $key, $value );
186
- }
187
  }
188
 
189
 
@@ -191,27 +149,21 @@ abstract class SV_WC_Data_Compatibility {
191
  * Deletes an object's stored meta value.
192
  *
193
  * @since 4.6.0
 
 
194
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
195
  * @param string $key the meta key
196
  */
197
  public static function delete_meta_data( $object, $key ) {
198
 
199
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
200
-
201
- $object->delete_meta_data( $key );
202
-
203
- $object->save_meta_data();
204
-
205
- } else {
206
-
207
- $object_id = is_callable( array( $object, 'get_id' ) ) ? $object->get_id() : $object->id;
208
 
209
- delete_post_meta( $object_id, $key );
210
- }
211
  }
212
 
213
 
214
  }
215
 
216
 
217
- endif; // Class exists check
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Data_Compatibility' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce data compatibility class.
34
  *
35
  * @since 4.6.0
36
+ * @deprecated 5.5.0
37
  */
38
  abstract class SV_WC_Data_Compatibility {
39
 
40
 
41
+ /** @deprecated 5.5.0 backwards compatibility property map */
42
+ protected static $compat_props = [];
43
+
44
+
45
  /**
46
  * Gets an object property.
47
  *
48
+ * @see \WC_Data::get_prop()
49
+ *
50
  * @since 4.6.0
51
+ * @deprecated 5.5.0
52
+ *
53
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
54
  * @param string $prop the property name
55
  * @param string $context if 'view' then the value will be filtered
56
+ * @param array $compat_props compatibility properties unused since 5.5.0
57
+ * @return null|mixed
58
  */
59
+ public static function get_prop( $object, $prop, $context = 'edit', $compat_props = [] ) {
 
 
 
 
 
 
 
 
 
 
60
 
61
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::get_prop()' );
 
 
 
62
 
63
+ return is_callable( [ $object, "get_{$prop}" ] ) ? $object->{"get_{$prop}"}( $context ) : null;
 
 
 
 
 
 
 
 
64
  }
65
 
66
 
70
  * Note that this does not save any data to the database.
71
  *
72
  * @since 4.6.0
73
+ * @deprecated 5.5.0
74
+ *
75
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
76
  * @param array $props the new properties as $key => $value
77
+ * @param array $compat_props compatibility properties, unused since 5.5.0
78
+ * @return bool|\WP_Error
79
  */
80
+ public static function set_props( $object, $props, $compat_props = [] ) {
 
 
 
 
 
 
81
 
82
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::set_props()' );
83
 
84
+ return $object->set_props( $props );
 
 
 
 
 
 
 
 
85
  }
86
 
87
 
89
  * Gets an object's stored meta value.
90
  *
91
  * @since 4.6.0
92
+ * @deprecated 5.5.0
93
+ *
94
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
95
  * @param string $key the meta key
96
  * @param bool $single whether to get the meta as a single item. Defaults to `true`
99
  */
100
  public static function get_meta( $object, $key = '', $single = true, $context = 'edit' ) {
101
 
102
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::get_meta()' );
 
 
103
 
104
+ return $object->get_meta( $key, $single, $context );
 
 
 
 
 
 
 
105
  }
106
 
107
 
109
  * Stores an object meta value.
110
  *
111
  * @since 4.6.0
112
+ * @deprecated 5.5.0
113
+ *
114
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
115
  * @param string $key the meta key
116
  * @param string $value the meta value
117
+ * @param bool $unique optional: whether the meta should be unique
118
  */
119
  public static function add_meta_data( $object, $key, $value, $unique = false ) {
120
 
121
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::add_meta_data()' );
 
 
122
 
123
+ $object->add_meta_data( $key, $value, $unique );
124
+ $object->save_meta_data();
 
 
 
 
 
 
125
  }
126
 
127
 
129
  * Updates an object's stored meta value.
130
  *
131
  * @since 4.6.0
132
+ * @deprecated 5.5.0
133
+ *
134
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
135
  * @param string $key the meta key
136
  * @param string $value the meta value
137
+ * @param int|string $meta_id optional: the specific meta ID to update
138
  */
139
  public static function update_meta_data( $object, $key, $value, $meta_id = '' ) {
140
 
141
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::update_meta_data()' );
142
 
143
+ $object->update_meta_data( $key, $value, $meta_id );
144
+ $object->save_meta_data();
 
 
 
 
 
 
 
 
145
  }
146
 
147
 
149
  * Deletes an object's stored meta value.
150
  *
151
  * @since 4.6.0
152
+ * @deprecated 5.5.0
153
+ *
154
  * @param \WC_Data $object the data object, likely \WC_Order or \WC_Product
155
  * @param string $key the meta key
156
  */
157
  public static function delete_meta_data( $object, $key ) {
158
 
159
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Data::delete_meta_data()' );
 
 
 
 
 
 
 
 
160
 
161
+ $object->delete_meta_data( $key );
162
+ $object->save_meta_data();
163
  }
164
 
165
 
166
  }
167
 
168
 
169
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/class-sv-wc-datetime.php RENAMED
@@ -18,34 +18,58 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
 
 
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_DateTime' ) ) :
 
30
 
31
  /**
32
- * Backports the \WC_DateTime class to WooCommerce pre-3.0.0
33
- *
34
- * TODO: Remove this when WC 3.x can be required {CW 2017-03-16}
35
  *
36
  * @since 4.6.0
 
37
  */
38
  class SV_WC_DateTime extends \DateTime {
39
 
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  /**
42
  * Outputs an ISO 8601 date string in local timezone.
43
  *
44
  * @since 4.6.0
 
 
45
  * @return string
46
  */
47
  public function __toString() {
48
 
 
 
49
  return $this->format( DATE_ATOM );
50
  }
51
 
@@ -53,14 +77,16 @@ class SV_WC_DateTime extends \DateTime {
53
  /**
54
  * Gets the UTC timestamp.
55
  *
56
- * Missing in PHP 5.2.
57
- *
58
  * @since 4.6.0
 
 
59
  * @return int
60
  */
61
  public function getTimestamp() {
62
 
63
- return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' );
 
 
64
  }
65
 
66
 
@@ -68,10 +94,14 @@ class SV_WC_DateTime extends \DateTime {
68
  * Gets the timestamp with the WordPress timezone offset added or subtracted.
69
  *
70
  * @since 4.6.0
 
 
71
  * @return int
72
  */
73
  public function getOffsetTimestamp() {
74
 
 
 
75
  return $this->getTimestamp() + $this->getOffset();
76
  }
77
 
@@ -80,11 +110,15 @@ class SV_WC_DateTime extends \DateTime {
80
  * Gets a date based on the offset timestamp.
81
  *
82
  * @since 4.6.0
83
- * @param string $format date format
 
 
84
  * @return string
85
  */
86
  public function date( $format ) {
87
 
 
 
88
  return gmdate( $format, $this->getOffsetTimestamp() );
89
  }
90
 
@@ -93,15 +127,20 @@ class SV_WC_DateTime extends \DateTime {
93
  * Gets a localised date based on offset timestamp.
94
  *
95
  * @since 4.6.0
96
- * @param string $format date format
 
 
97
  * @return string
98
  */
99
  public function date_i18n( $format = 'Y-m-d' ) {
100
 
 
 
101
  return date_i18n( $format, $this->getOffsetTimestamp() );
102
  }
103
 
104
 
105
  }
106
 
 
107
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
+
27
+ use DateTimeZone;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_DateTime' ) ) :
32
+
33
 
34
  /**
35
+ * Extends the DateTime object for backwards compatibility.
 
 
36
  *
37
  * @since 4.6.0
38
+ * @deprecated 5.5.0
39
  */
40
  class SV_WC_DateTime extends \DateTime {
41
 
42
 
43
+ /**
44
+ * SV_WC_DateTime constructor.
45
+ *
46
+ * @since 5.5.0
47
+ * @deprecated 5.5.0
48
+ *
49
+ * @param string $time
50
+ * @param \DateTimeZone|null $timezone
51
+ * @throws \Exception
52
+ */
53
+ public function __construct( $time = 'now', \DateTimeZone $timezone = null ) {
54
+
55
+ wc_deprecated_function( 'SV_WC_DateTime', '5.5.0', \DateTime::class );
56
+
57
+ parent::__construct( $time, $timezone );
58
+ }
59
+
60
+
61
  /**
62
  * Outputs an ISO 8601 date string in local timezone.
63
  *
64
  * @since 4.6.0
65
+ * @deprecated 5.5.0
66
+ *
67
  * @return string
68
  */
69
  public function __toString() {
70
 
71
+ wc_deprecated_function( __METHOD__, '5.5.0', 'DateTime::format( DATE_ATOM )' );
72
+
73
  return $this->format( DATE_ATOM );
74
  }
75
 
77
  /**
78
  * Gets the UTC timestamp.
79
  *
 
 
80
  * @since 4.6.0
81
+ * @deprecated 5.5.0
82
+ *
83
  * @return int
84
  */
85
  public function getTimestamp() {
86
 
87
+ wc_deprecated_function( __METHOD__, '5.5.0', 'DateTime::getTimestamp()' );
88
+
89
+ return parent::getTimestamp();
90
  }
91
 
92
 
94
  * Gets the timestamp with the WordPress timezone offset added or subtracted.
95
  *
96
  * @since 4.6.0
97
+ * @deprecated 5.5.0
98
+ *
99
  * @return int
100
  */
101
  public function getOffsetTimestamp() {
102
 
103
+ wc_deprecated_function( __METHOD__, '5.5.0', 'DateTime::getOffset()' );
104
+
105
  return $this->getTimestamp() + $this->getOffset();
106
  }
107
 
110
  * Gets a date based on the offset timestamp.
111
  *
112
  * @since 4.6.0
113
+ * @deprecated 5.5.0
114
+ *
115
+ * @param string $format date format
116
  * @return string
117
  */
118
  public function date( $format ) {
119
 
120
+ wc_deprecated_function( __METHOD__, '5.5.0', 'gmdate()' );
121
+
122
  return gmdate( $format, $this->getOffsetTimestamp() );
123
  }
124
 
127
  * Gets a localised date based on offset timestamp.
128
  *
129
  * @since 4.6.0
130
+ * @deprecated 5.5.0
131
+ *
132
+ * @param string $format date format
133
  * @return string
134
  */
135
  public function date_i18n( $format = 'Y-m-d' ) {
136
 
137
+ wc_deprecated_function( __METHOD__, '5.5.0', 'date_i18n()' );
138
+
139
  return date_i18n( $format, $this->getOffsetTimestamp() );
140
  }
141
 
142
 
143
  }
144
 
145
+
146
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/compatibility/class-sv-wc-order-compatibility.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Order_Compatibility' ) ) :
 
30
 
31
  /**
32
  * WooCommerce order compatibility class.
@@ -36,26 +37,11 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Order_Compatibilit
36
  class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
37
 
38
 
39
- /** @var array mapped compatibility properties, as `$new_prop => $old_prop` */
40
- protected static $compat_props = array(
41
- 'date_completed' => 'completed_date',
42
- 'date_paid' => 'paid_date',
43
- 'date_modified' => 'modified_date',
44
- 'date_created' => 'order_date',
45
- 'customer_id' => 'customer_user',
46
- 'discount' => 'cart_discount',
47
- 'discount_tax' => 'cart_discount_tax',
48
- 'shipping_total' => 'total_shipping',
49
- 'type' => 'order_type',
50
- 'currency' => 'order_currency',
51
- 'version' => 'order_version',
52
- );
53
-
54
-
55
  /**
56
  * Gets an order's created date.
57
  *
58
  * @since 4.6.0
 
59
  *
60
  * @param \WC_Order $order order object
61
  * @param string $context if 'view' then the value will be filtered
@@ -64,6 +50,8 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
64
  */
65
  public static function get_date_created( \WC_Order $order, $context = 'edit' ) {
66
 
 
 
67
  return self::get_date_prop( $order, 'created', $context );
68
  }
69
 
@@ -72,6 +60,7 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
72
  * Gets an order's last modified date.
73
  *
74
  * @since 4.6.0
 
75
  *
76
  * @param \WC_Order $order order object
77
  * @param string $context if 'view' then the value will be filtered
@@ -80,6 +69,8 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
80
  */
81
  public static function get_date_modified( \WC_Order $order, $context = 'edit' ) {
82
 
 
 
83
  return self::get_date_prop( $order, 'modified', $context );
84
  }
85
 
@@ -88,6 +79,7 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
88
  * Gets an order's paid date.
89
  *
90
  * @since 4.6.0
 
91
  *
92
  * @param \WC_Order $order order object
93
  * @param string $context if 'view' then the value will be filtered
@@ -96,6 +88,8 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
96
  */
97
  public static function get_date_paid( \WC_Order $order, $context = 'edit' ) {
98
 
 
 
99
  return self::get_date_prop( $order, 'paid', $context );
100
  }
101
 
@@ -104,6 +98,7 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
104
  * Gets an order's completed date.
105
  *
106
  * @since 4.6.0
 
107
  *
108
  * @param \WC_Order $order order object
109
  * @param string $context if 'view' then the value will be filtered
@@ -112,6 +107,8 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
112
  */
113
  public static function get_date_completed( \WC_Order $order, $context = 'edit' ) {
114
 
 
 
115
  return self::get_date_prop( $order, 'completed', $context );
116
  }
117
 
@@ -122,6 +119,7 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
122
  * This should only be used to retrieve WC core date properties.
123
  *
124
  * @since 4.6.0
 
125
  *
126
  * @param \WC_Order $order order object
127
  * @param string $type type of date to get
@@ -131,33 +129,10 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
131
  */
132
  public static function get_date_prop( \WC_Order $order, $type, $context = 'edit' ) {
133
 
134
- $date = null;
135
- $prop = "date_{$type}";
136
-
137
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
138
-
139
- $date = is_callable( array( $order, "get_{$prop}" ) ) ? $order->{"get_{$prop}"}( $context ) : null;
140
-
141
- } else {
142
-
143
- // backport the property name for WC < 3.0
144
- if ( isset( self::$compat_props[ $prop ] ) ) {
145
- $prop = self::$compat_props[ $prop ];
146
- }
147
-
148
- if ( $date = $order->$prop ) {
149
-
150
- try {
151
-
152
- $date = new SV_WC_DateTime( $date, new \DateTimeZone( wc_timezone_string() ) );
153
- $date->setTimezone( new \DateTimeZone( wc_timezone_string() ) );
154
-
155
- } catch ( \Exception $e ) {
156
 
157
- $date = null;
158
- }
159
- }
160
- }
161
 
162
  return $date;
163
  }
@@ -167,27 +142,17 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
167
  * Gets an order property.
168
  *
169
  * @since 4.6.0
 
 
170
  * @param \WC_Order $object the order object
171
  * @param string $prop the property name
172
  * @param string $context if 'view' then the value will be filtered
 
173
  * @return mixed
174
  */
175
- public static function get_prop( $object, $prop, $context = 'edit', $compat_props = array() ) {
176
-
177
- // backport a few specific properties to pre-3.0
178
- if ( SV_WC_Plugin_Compatibility::is_wc_version_lt_3_0() ) {
179
-
180
- // convert the shipping_total prop for the edit context
181
- if ( 'shipping_total' === $prop && 'view' !== $context ) {
182
 
183
- $prop = 'order_shipping';
184
-
185
- // get the post_parent and bail early
186
- } elseif ( 'parent_id' === $prop ) {
187
-
188
- return $object->post->post_parent;
189
- }
190
- }
191
 
192
  return parent::get_prop( $object, $prop, $context, self::$compat_props );
193
  }
@@ -199,94 +164,98 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
199
  * Note that this does not save any data to the database.
200
  *
201
  * @since 4.6.0
 
 
202
  * @param \WC_Order $object the order object
203
  * @param array $props the new properties as $key => $value
204
- * @return \WC_Order
 
205
  */
206
- public static function set_props( $object, $props, $compat_props = array() ) {
207
 
208
  return parent::set_props( $object, $props, self::$compat_props );
209
  }
210
 
211
 
212
  /**
 
 
213
  * Order item CRUD compatibility method to add a coupon to an order.
214
  *
215
  * @since 4.6.0
 
 
216
  * @param \WC_Order $order the order object
217
  * @param array $code the coupon code
218
  * @param int $discount the discount amount.
219
  * @param int $discount_tax the discount tax amount.
220
  * @return int the order item ID
221
  */
222
- public static function add_coupon( \WC_Order $order, $code = array(), $discount = 0, $discount_tax = 0 ) {
223
-
224
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
225
-
226
- $item = new \WC_Order_Item_Coupon();
227
 
228
- $item->set_props( array(
229
- 'code' => $code,
230
- 'discount' => $discount,
231
- 'discount_tax' => $discount_tax,
232
- 'order_id' => $order->get_id(),
233
- ) );
234
 
235
- $item->save();
236
 
237
- $order->add_item( $item );
 
 
 
 
 
238
 
239
- return $item->get_id();
240
 
241
- } else {
242
 
243
- return $order->add_coupon( $code, $discount, $discount_tax );
244
- }
245
  }
246
 
247
 
248
  /**
 
 
249
  * Order item CRUD compatibility method to add a fee to an order.
250
  *
251
  * @since 4.6.0
 
 
252
  * @param \WC_Order $order the order object
253
  * @param object $fee the fee to add
254
  * @return int the order item ID
255
  */
256
  public static function add_fee( \WC_Order $order, $fee ) {
257
 
258
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
259
-
260
- $item = new \WC_Order_Item_Fee();
261
-
262
- $item->set_props( array(
263
- 'name' => $fee->name,
264
- 'tax_class' => $fee->taxable ? $fee->tax_class : 0,
265
- 'total' => $fee->amount,
266
- 'total_tax' => $fee->tax,
267
- 'taxes' => array(
268
- 'total' => $fee->tax_data,
269
- ),
270
- 'order_id' => $order->get_id(),
271
- ) );
272
 
273
- $item->save();
274
 
275
- $order->add_item( $item );
 
 
 
 
 
 
 
 
 
276
 
277
- return $item->get_id();
278
 
279
- } else {
280
 
281
- return $order->add_fee( $fee );
282
- }
283
  }
284
 
285
 
286
  /**
 
 
287
  * Order item CRUD compatibility method to add a shipping line to an order.
288
  *
289
  * @since 4.7.0
 
290
  *
291
  * @param \WC_Order $order order object
292
  * @param \WC_Shipping_Rate $shipping_rate shipping rate to add
@@ -294,77 +263,77 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
294
  */
295
  public static function add_shipping( \WC_Order $order, $shipping_rate ) {
296
 
297
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
298
 
299
- $item = new \WC_Order_Item_Shipping();
300
 
301
- $item->set_props( array(
302
- 'method_title' => $shipping_rate->label,
303
- 'method_id' => $shipping_rate->id,
304
- 'total' => wc_format_decimal( $shipping_rate->cost ),
305
- 'taxes' => $shipping_rate->taxes,
306
- 'order_id' => $order->get_id(),
307
- ) );
308
 
309
- foreach ( $shipping_rate->get_meta_data() as $key => $value ) {
310
- $item->add_meta_data( $key, $value, true );
311
- }
312
-
313
- $item->save();
314
-
315
- $order->add_item( $item );
316
 
317
- return $item->get_id();
318
 
319
- } else {
320
 
321
- return $order->add_shipping( $shipping_rate );
322
- }
323
  }
324
 
325
 
326
  /**
 
 
327
  * Order item CRUD compatibility method to add a tax line to an order.
328
  *
329
  * @since 4.7.0
 
330
  *
331
  * @param \WC_Order $order order object
332
  * @param int $tax_rate_id tax rate ID
333
- * @param float $tax_amount cart tax amount
334
- * @param float $shipping_tax_amount shipping tax amount
335
  * @return int order item ID
 
 
336
  */
337
  public static function add_tax( \WC_Order $order, $tax_rate_id, $tax_amount = 0, $shipping_tax_amount = 0 ) {
338
 
339
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
340
 
341
- $item = new \WC_Order_Item_Tax();
342
 
343
- $item->set_props( array(
344
- 'rate_id' => $tax_rate_id,
345
- 'tax_total' => $tax_amount,
346
- 'shipping_tax_total' => $shipping_tax_amount,
347
- ) );
348
 
349
- $item->set_rate( $tax_rate_id );
350
- $item->set_order_id( $order->get_id() );
351
- $item->save();
352
 
353
- $order->add_item( $item );
354
-
355
- return $item->get_id();
356
-
357
- } else {
358
 
359
- return $order->add_tax( $tax_rate_id, $tax_amount, $shipping_tax_amount );
360
- }
361
  }
362
 
363
 
364
  /**
 
 
365
  * Order item CRUD compatibility method to update an order coupon.
366
  *
367
  * @since 4.6.0
 
 
368
  * @param \WC_Order $order the order object
369
  * @param int|\WC_Order_Item $item the order item ID
370
  * @param array $args {
@@ -375,48 +344,40 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
375
  * @type float $discount_tax the coupon discount tax amount
376
  * }
377
  * @return int|bool the order item ID or false on failure
 
378
  */
379
  public static function update_coupon( \WC_Order $order, $item, $args ) {
380
 
381
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
382
-
383
- if ( is_numeric( $item ) ) {
384
- $item = $order->get_item( $item );
385
- }
386
-
387
- if ( ! is_object( $item ) || ! $item->is_type( 'coupon' ) ) {
388
- return false;
389
- }
390
-
391
- if ( ! $order->get_id() ) {
392
- $order->save();
393
- }
394
 
395
- $item->set_order_id( $order->get_id() );
396
- $item->set_props( $args );
397
- $item->save();
398
 
399
- return $item->get_id();
 
 
400
 
401
- } else {
 
 
402
 
403
- // convert WC 3.0+ args for backwards compatibility
404
- if ( isset( $args['discount'] ) ) {
405
- $args['discount_amount'] = $args['discount'];
406
- }
407
- if ( isset( $args['discount_tax'] ) ) {
408
- $args['discount_amount_tax'] = $args['discount_tax'];
409
- }
410
 
411
- return $order->update_coupon( $item, $args );
412
- }
413
  }
414
 
415
 
416
  /**
 
 
417
  * Order item CRUD compatibility method to update an order fee.
418
  *
419
  * @since 4.6.0
 
 
420
  * @param \WC_Order $order the order object
421
  * @param int|\WC_Order_Item $item the order item ID
422
  * @param array $args {
@@ -428,87 +389,78 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
428
  * @type float $line_tax the fee tax amount
429
  * }
430
  * @return int|bool the order item ID or false on failure
 
431
  */
432
  public static function update_fee( \WC_Order $order, $item, $args ) {
433
 
434
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
435
 
436
- if ( is_numeric( $item ) ) {
437
- $item = $order->get_item( $item );
438
- }
439
-
440
- if ( ! is_object( $item ) || ! $item->is_type( 'fee' ) ) {
441
- return false;
442
- }
443
-
444
- if ( ! $order->get_id() ) {
445
- $order->save();
446
- }
447
 
448
- $item->set_order_id( $order->get_id() );
449
- $item->set_props( $args );
450
- $item->save();
451
 
452
- return $item->get_id();
 
 
453
 
454
- } else {
 
 
455
 
456
- return $order->update_fee( $item, $args );
457
- }
458
  }
459
 
460
 
461
  /**
462
- * Backports wc_reduce_stock_levels() to pre-3.0.
463
  *
464
  * @since 4.6.0
 
 
465
  * @param \WC_Order $order the order object
466
  */
467
  public static function reduce_stock_levels( \WC_Order $order ) {
468
 
469
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
470
- wc_reduce_stock_levels( $order->get_id() );
471
- } else {
472
- $order->reduce_order_stock();
473
- }
474
  }
475
 
476
 
477
  /**
478
- * Backports wc_update_total_sales_counts() to pre-3.0.
479
  *
480
  * @since 4.6.0
 
 
481
  * @param \WC_Order $order the order object
482
  */
483
  public static function update_total_sales_counts( \WC_Order $order ) {
484
 
485
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ) {
486
- wc_update_total_sales_counts( $order->get_id() );
487
- } else {
488
- $order->record_product_sales();
489
- }
490
  }
491
 
492
 
493
  /**
494
  * Determines if an order has an available shipping address.
495
  *
496
- * WooCommerce 3.0+ no longer fills the shipping address with the billing if
497
- * a shipping address was never set by the customer at checkout, as is the
498
- * case with virtual orders. This method is helpful for gateways that may
499
- * reject such transactions with blank shipping information.
500
- *
501
- * TODO: Remove when WC 3.0.4 can be required {CW 2017-04-17}
502
- *
503
  * @since 4.6.1
 
504
  *
505
  * @param \WC_Order $order order object
506
- *
507
  * @return bool
508
  */
509
  public static function has_shipping_address( \WC_Order $order ) {
510
 
511
- return self::get_prop( $order, 'shipping_address_1' ) || self::get_prop( $order, 'shipping_address_2' );
 
 
512
  }
513
 
514
 
@@ -517,20 +469,20 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
517
  *
518
  * @since 4.6.5
519
  *
520
- * @param \WC_Order_Item|array $item order item object or array
521
- * @param string $hideprefix prefix for meta that is considered hidden
522
  * @param bool $include_all whether to include all meta (attributes, etc...), or just custom fields
523
  * @return array $item_meta {
524
  * @type string $label meta field label
525
- * @type mixed $value meta value
526
  * }
527
  */
528
- public static function get_item_formatted_meta_data( $item, $hideprefix = '_', $include_all = false ) {
529
 
530
- if ( SV_WC_Plugin_Compatibility::is_wc_version_gte_3_1() && $item instanceof \WC_Order_Item ) {
531
 
532
- $meta_data = $item->get_formatted_meta_data( $hideprefix, $include_all );
533
- $item_meta = array();
534
 
535
  foreach ( $meta_data as $meta ) {
536
 
@@ -543,7 +495,7 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
543
  } else {
544
 
545
  $item_meta = new \WC_Order_Item_Meta( $item );
546
- $item_meta = $item_meta->get_formatted( $hideprefix );
547
  }
548
 
549
  return $item_meta;
@@ -560,15 +512,17 @@ class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
560
  */
561
  public static function get_edit_order_url( \WC_Order $order ) {
562
 
563
- if ( self::is_wc_version_gte( '3.3' ) ) {
564
- return $order->get_edit_order_url();
565
  } else {
566
- return apply_filters( 'woocommerce_get_edit_order_url', get_admin_url( null, 'post.php?post=' . self::get_prop( $order, 'id' ) . '&action=edit' ), $order );
567
  }
 
 
568
  }
569
 
570
 
571
  }
572
 
573
 
574
- endif; // Class exists check
18
  *
19
  * @package SkyVerge/WooCommerce/Compatibility
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Order_Compatibility' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce order compatibility class.
37
  class SV_WC_Order_Compatibility extends SV_WC_Data_Compatibility {
38
 
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  /**
41
  * Gets an order's created date.
42
  *
43
  * @since 4.6.0
44
+ * @deprecated 5.5.0
45
  *
46
  * @param \WC_Order $order order object
47
  * @param string $context if 'view' then the value will be filtered
50
  */
51
  public static function get_date_created( \WC_Order $order, $context = 'edit' ) {
52
 
53
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::get_date_created()' );
54
+
55
  return self::get_date_prop( $order, 'created', $context );
56
  }
57
 
60
  * Gets an order's last modified date.
61
  *
62
  * @since 4.6.0
63
+ * @deprecated 5.5.0
64
  *
65
  * @param \WC_Order $order order object
66
  * @param string $context if 'view' then the value will be filtered
69
  */
70
  public static function get_date_modified( \WC_Order $order, $context = 'edit' ) {
71
 
72
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::get_date_modified()' );
73
+
74
  return self::get_date_prop( $order, 'modified', $context );
75
  }
76
 
79
  * Gets an order's paid date.
80
  *
81
  * @since 4.6.0
82
+ * @deprecated 5.5.0
83
  *
84
  * @param \WC_Order $order order object
85
  * @param string $context if 'view' then the value will be filtered
88
  */
89
  public static function get_date_paid( \WC_Order $order, $context = 'edit' ) {
90
 
91
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::get_date_paid()' );
92
+
93
  return self::get_date_prop( $order, 'paid', $context );
94
  }
95
 
98
  * Gets an order's completed date.
99
  *
100
  * @since 4.6.0
101
+ * @deprecated 5.5.0
102
  *
103
  * @param \WC_Order $order order object
104
  * @param string $context if 'view' then the value will be filtered
107
  */
108
  public static function get_date_completed( \WC_Order $order, $context = 'edit' ) {
109
 
110
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::get_date_completed()' );
111
+
112
  return self::get_date_prop( $order, 'completed', $context );
113
  }
114
 
119
  * This should only be used to retrieve WC core date properties.
120
  *
121
  * @since 4.6.0
122
+ * @deprecated 5.5.0
123
  *
124
  * @param \WC_Order $order order object
125
  * @param string $type type of date to get
129
  */
130
  public static function get_date_prop( \WC_Order $order, $type, $context = 'edit' ) {
131
 
132
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ $prop = "date_{$type}";
135
+ $date = is_callable( [ $order, "get_{$prop}" ] ) ? $order->{"get_{$prop}"}( $context ) : null;
 
 
136
 
137
  return $date;
138
  }
142
  * Gets an order property.
143
  *
144
  * @since 4.6.0
145
+ * @deprecated 5.5.0
146
+ *
147
  * @param \WC_Order $object the order object
148
  * @param string $prop the property name
149
  * @param string $context if 'view' then the value will be filtered
150
+ * @param array $compat_props compatibility arguments, unused since 5.5.0
151
  * @return mixed
152
  */
153
+ public static function get_prop( $object, $prop, $context = 'edit', $compat_props = [] ) {
 
 
 
 
 
 
154
 
155
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::get_prop()' );
 
 
 
 
 
 
 
156
 
157
  return parent::get_prop( $object, $prop, $context, self::$compat_props );
158
  }
164
  * Note that this does not save any data to the database.
165
  *
166
  * @since 4.6.0
167
+ * @deprecated 5.5.0
168
+ *
169
  * @param \WC_Order $object the order object
170
  * @param array $props the new properties as $key => $value
171
+ * @param array $compat_props compatibility arguments, unused since 5.5.0
172
+ * @return bool|\WP_Error
173
  */
174
+ public static function set_props( $object, $props, $compat_props = [] ) {
175
 
176
  return parent::set_props( $object, $props, self::$compat_props );
177
  }
178
 
179
 
180
  /**
181
+ * Adds a coupon to an order item.
182
+ *
183
  * Order item CRUD compatibility method to add a coupon to an order.
184
  *
185
  * @since 4.6.0
186
+ * @deprecated 5.5.0
187
+ *
188
  * @param \WC_Order $order the order object
189
  * @param array $code the coupon code
190
  * @param int $discount the discount amount.
191
  * @param int $discount_tax the discount tax amount.
192
  * @return int the order item ID
193
  */
194
+ public static function add_coupon( \WC_Order $order, $code = [], $discount = 0, $discount_tax = 0 ) {
 
 
 
 
195
 
196
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::add_item()' );
 
 
 
 
 
197
 
198
+ $item = new \WC_Order_Item_Coupon();
199
 
200
+ $item->set_props( [
201
+ 'code' => $code,
202
+ 'discount' => $discount,
203
+ 'discount_tax' => $discount_tax,
204
+ 'order_id' => $order->get_id(),
205
+ ] );
206
 
207
+ $item->save();
208
 
209
+ $order->add_item( $item );
210
 
211
+ return $item->get_id();
 
212
  }
213
 
214
 
215
  /**
216
+ * Adds a fee to an order.
217
+ *
218
  * Order item CRUD compatibility method to add a fee to an order.
219
  *
220
  * @since 4.6.0
221
+ * @deprecated 5.5.0
222
+ *
223
  * @param \WC_Order $order the order object
224
  * @param object $fee the fee to add
225
  * @return int the order item ID
226
  */
227
  public static function add_fee( \WC_Order $order, $fee ) {
228
 
229
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::add_item()' );
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
+ $item = new \WC_Order_Item_Fee();
232
 
233
+ $item->set_props( [
234
+ 'name' => $fee->name,
235
+ 'tax_class' => $fee->taxable ? $fee->tax_class : 0,
236
+ 'total' => $fee->amount,
237
+ 'total_tax' => $fee->tax,
238
+ 'taxes' => [
239
+ 'total' => $fee->tax_data,
240
+ ],
241
+ 'order_id' => $order->get_id(),
242
+ ] );
243
 
244
+ $item->save();
245
 
246
+ $order->add_item( $item );
247
 
248
+ return $item->get_id();
 
249
  }
250
 
251
 
252
  /**
253
+ * Adds shipping line to order.
254
+ *
255
  * Order item CRUD compatibility method to add a shipping line to an order.
256
  *
257
  * @since 4.7.0
258
+ * @deprecated 5.5.0
259
  *
260
  * @param \WC_Order $order order object
261
  * @param \WC_Shipping_Rate $shipping_rate shipping rate to add
263
  */
264
  public static function add_shipping( \WC_Order $order, $shipping_rate ) {
265
 
266
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::add_item()' );
267
 
268
+ $item = new \WC_Order_Item_Shipping();
269
 
270
+ $item->set_props( [
271
+ 'method_title' => $shipping_rate->label,
272
+ 'method_id' => $shipping_rate->id,
273
+ 'total' => wc_format_decimal( $shipping_rate->cost ),
274
+ 'taxes' => $shipping_rate->taxes,
275
+ 'order_id' => $order->get_id(),
276
+ ] );
277
 
278
+ foreach ( $shipping_rate->get_meta_data() as $key => $value ) {
279
+ $item->add_meta_data( $key, $value, true );
280
+ $item->save_meta_data();
281
+ }
 
 
 
282
 
283
+ $item->save();
284
 
285
+ $order->add_item( $item );
286
 
287
+ return $item->get_id();
 
288
  }
289
 
290
 
291
  /**
292
+ * Adds tax line to an order.
293
+ *
294
  * Order item CRUD compatibility method to add a tax line to an order.
295
  *
296
  * @since 4.7.0
297
+ * @deprecated 5.5.0
298
  *
299
  * @param \WC_Order $order order object
300
  * @param int $tax_rate_id tax rate ID
301
+ * @param int|float $tax_amount cart tax amount
302
+ * @param int|float $shipping_tax_amount shipping tax amount
303
  * @return int order item ID
304
+ * @throws \WC_Data_Exception
305
+ *
306
  */
307
  public static function add_tax( \WC_Order $order, $tax_rate_id, $tax_amount = 0, $shipping_tax_amount = 0 ) {
308
 
309
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::add_item()' );
310
 
311
+ $item = new \WC_Order_Item_Tax();
312
 
313
+ $item->set_props( [
314
+ 'rate_id' => $tax_rate_id,
315
+ 'tax_total' => $tax_amount,
316
+ 'shipping_tax_total' => $shipping_tax_amount,
317
+ ] );
318
 
319
+ $item->set_rate( $tax_rate_id );
320
+ $item->set_order_id( $order->get_id() );
321
+ $item->save();
322
 
323
+ $order->add_item( $item );
 
 
 
 
324
 
325
+ return $item->get_id();
 
326
  }
327
 
328
 
329
  /**
330
+ * Updates an order coupon.
331
+ *
332
  * Order item CRUD compatibility method to update an order coupon.
333
  *
334
  * @since 4.6.0
335
+ * @deprecated 5.5.0
336
+ *
337
  * @param \WC_Order $order the order object
338
  * @param int|\WC_Order_Item $item the order item ID
339
  * @param array $args {
344
  * @type float $discount_tax the coupon discount tax amount
345
  * }
346
  * @return int|bool the order item ID or false on failure
347
+ * @throws \WC_Data_Exception
348
  */
349
  public static function update_coupon( \WC_Order $order, $item, $args ) {
350
 
351
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order_Item_Coupon' );
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
+ if ( is_numeric( $item ) ) {
354
+ $item = $order->get_item( $item );
355
+ }
356
 
357
+ if ( ! is_object( $item ) || ! $item->is_type( 'coupon' ) ) {
358
+ return false;
359
+ }
360
 
361
+ if ( ! $order->get_id() ) {
362
+ $order->save();
363
+ }
364
 
365
+ $item->set_order_id( $order->get_id() );
366
+ $item->set_props( $args );
367
+ $item->save();
 
 
 
 
368
 
369
+ return $item->get_id();
 
370
  }
371
 
372
 
373
  /**
374
+ * Updates an order fee.
375
+ *
376
  * Order item CRUD compatibility method to update an order fee.
377
  *
378
  * @since 4.6.0
379
+ * @deprecated 5.5.0
380
+ *
381
  * @param \WC_Order $order the order object
382
  * @param int|\WC_Order_Item $item the order item ID
383
  * @param array $args {
389
  * @type float $line_tax the fee tax amount
390
  * }
391
  * @return int|bool the order item ID or false on failure
392
+ * @throws \WC_Data_Exception
393
  */
394
  public static function update_fee( \WC_Order $order, $item, $args ) {
395
 
396
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order_Item_Fee' );
397
 
398
+ if ( is_numeric( $item ) ) {
399
+ $item = $order->get_item( $item );
400
+ }
 
 
 
 
 
 
 
 
401
 
402
+ if ( ! is_object( $item ) || ! $item->is_type( 'fee' ) ) {
403
+ return false;
404
+ }
405
 
406
+ if ( ! $order->get_id() ) {
407
+ $order->save();
408
+ }
409
 
410
+ $item->set_order_id( $order->get_id() );
411
+ $item->set_props( $args );
412
+ $item->save();
413
 
414
+ return $item->get_id();
 
415
  }
416
 
417
 
418
  /**
419
+ * Reduces stock levels for products in order.
420
  *
421
  * @since 4.6.0
422
+ * @deprecated 5.5.0
423
+ *
424
  * @param \WC_Order $order the order object
425
  */
426
  public static function reduce_stock_levels( \WC_Order $order ) {
427
 
428
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_reduce_stock_levels()' );
429
+
430
+ wc_reduce_stock_levels( $order->get_id() );
 
 
431
  }
432
 
433
 
434
  /**
435
+ * Updates total product sales count for a given order.
436
  *
437
  * @since 4.6.0
438
+ * @deprecated 5.5.0
439
+ *
440
  * @param \WC_Order $order the order object
441
  */
442
  public static function update_total_sales_counts( \WC_Order $order ) {
443
 
444
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_update_total_sales_counts()' );
445
+
446
+ wc_update_total_sales_counts( $order->get_id() );
 
 
447
  }
448
 
449
 
450
  /**
451
  * Determines if an order has an available shipping address.
452
  *
 
 
 
 
 
 
 
453
  * @since 4.6.1
454
+ * @deprecated 5.5.0
455
  *
456
  * @param \WC_Order $order order object
 
457
  * @return bool
458
  */
459
  public static function has_shipping_address( \WC_Order $order ) {
460
 
461
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Order::has_shipping_address()' );
462
+
463
+ return $order->has_shipping_address();
464
  }
465
 
466
 
469
  *
470
  * @since 4.6.5
471
  *
472
+ * @param \WC_Order_Item $item order item object
473
+ * @param string $hide_prefix prefix for meta that is considered hidden
474
  * @param bool $include_all whether to include all meta (attributes, etc...), or just custom fields
475
  * @return array $item_meta {
476
  * @type string $label meta field label
477
+ * @type mixed $value meta value
478
  * }
479
  */
480
+ public static function get_item_formatted_meta_data( $item, $hide_prefix = '_', $include_all = false ) {
481
 
482
+ if ( $item instanceof \WC_Order_Item && SV_WC_Plugin_Compatibility::is_wc_version_gte( '3.1' ) ) {
483
 
484
+ $meta_data = $item->get_formatted_meta_data( $hide_prefix, $include_all );
485
+ $item_meta = [];
486
 
487
  foreach ( $meta_data as $meta ) {
488
 
495
  } else {
496
 
497
  $item_meta = new \WC_Order_Item_Meta( $item );
498
+ $item_meta = $item_meta->get_formatted( $hide_prefix );
499
  }
500
 
501
  return $item_meta;
512
  */
513
  public static function get_edit_order_url( \WC_Order $order ) {
514
 
515
+ if ( SV_WC_Plugin_Compatibility::is_wc_version_gte( '3.3' ) ) {
516
+ $order_url = $order->get_edit_order_url();
517
  } else {
518
+ $order_url = apply_filters( 'woocommerce_get_edit_order_url', get_admin_url( null, 'post.php?post=' . self::get_prop( $order, 'id' ) . '&action=edit' ), $order );
519
  }
520
+
521
+ return $order_url;
522
  }
523
 
524
 
525
  }
526
 
527
 
528
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/compatibility/class-sv-wc-product-compatibility.php ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Plugin Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Compatibility
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
+
27
+ defined( 'ABSPATH' ) or exit;
28
+
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Product_Compatibility' ) ) :
30
+
31
+
32
+ /**
33
+ * WooCommerce product compatibility class.
34
+ *
35
+ * @since 4.6.0
36
+ */
37
+ class SV_WC_Product_Compatibility extends SV_WC_Data_Compatibility {
38
+
39
+
40
+ /**
41
+ * Gets a product property.
42
+ *
43
+ * @since 4.6.0
44
+ * @deprecated 5.5.0
45
+ *
46
+ * @param \WC_Product $object the product object
47
+ * @param string $prop the property name
48
+ * @param string $context if 'view' then the value will be filtered
49
+ * @param array $compat_props compatibility arguments, unused since 5.5.0
50
+ * @return mixed
51
+ */
52
+ public static function get_prop( $object, $prop, $context = 'edit', $compat_props = [] ) {
53
+
54
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Product::get_prop()' );
55
+
56
+ return parent::get_prop( $object, $prop, $context, self::$compat_props );
57
+ }
58
+
59
+
60
+ /**
61
+ * Sets an products's properties.
62
+ *
63
+ * Note that this does not save any data to the database.
64
+ *
65
+ * @since 4.6.0
66
+ * @deprecated 5.5.0
67
+ *
68
+ * @param \WC_Product $object the product object
69
+ * @param array $props the new properties as $key => $value
70
+ * @param array $compat_props compatibility arguments, unused since 5.5.0
71
+ * @return bool|\WP_Error
72
+ */
73
+ public static function set_props( $object, $props, $compat_props = [] ) {
74
+
75
+ wc_deprecated_function( __METHOD__, '5.5.0', 'WC_Product::set_props()' );
76
+
77
+ return parent::set_props( $object, $props, self::$compat_props );
78
+ }
79
+
80
+
81
+ /**
82
+ * Gets a product's parent product.
83
+ *
84
+ * @since 4.6.0
85
+ * @deprecated 5.5.0
86
+ *
87
+ * @param \WC_Product $product the product object
88
+ * @return \WC_Product|bool
89
+ */
90
+ public static function get_parent( \WC_Product $product ) {
91
+
92
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_product( \WC_Product::get_parent_id() )' );
93
+
94
+ return wc_get_product( $product->get_parent_id() );
95
+ }
96
+
97
+
98
+ /**
99
+ * Updates product stock.
100
+ *
101
+ * @since 4.6.0
102
+ * @deprecated 5.5.0
103
+ *
104
+ * @param \WC_Product $product the product object
105
+ * @param null|int $amount optional: the new stock quantity
106
+ * @param string $mode optional: can be set (default), add, or subtract
107
+ * @return int
108
+ */
109
+ public static function wc_update_product_stock( \WC_Product $product, $amount = null, $mode = 'set' ) {
110
+
111
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_update_product_stock()' );
112
+
113
+ return wc_update_product_stock( $product, $amount, $mode );
114
+ }
115
+
116
+
117
+ /**
118
+ * Gets the product price HTML from text.
119
+ *
120
+ * @since 4.6.0
121
+ * @deprecated 5.5.0
122
+ *
123
+ * @param \WC_Product $product the product object
124
+ * @return string
125
+ */
126
+ public static function wc_get_price_html_from_text( \WC_Product $product ) {
127
+
128
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_price_html_from_text()' );
129
+
130
+ return wc_get_price_html_from_text();
131
+ }
132
+
133
+
134
+ /**
135
+ * Gets the product price including tax.
136
+ *
137
+ * @since 4.6.0
138
+ * @deprecated 5.5.0
139
+ *
140
+ * @param \WC_Product $product the product object
141
+ * @param int $qty optional: the quantity
142
+ * @param string $price optional: the product price
143
+ * @return string
144
+ */
145
+ public static function wc_get_price_including_tax( \WC_Product $product, $qty = 1, $price = '' ) {
146
+
147
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_price_including_tax()' );
148
+
149
+ return wc_get_price_including_tax( $product, [
150
+ 'qty' => $qty,
151
+ 'price' => $price,
152
+ ] );
153
+ }
154
+
155
+
156
+ /**
157
+ * Gets the product price excluding tax.
158
+ *
159
+ * @since 4.6.0
160
+ * @deprecated 5.5.0
161
+ *
162
+ * @param \WC_Product $product the product object
163
+ * @param int $qty optional: The quantity
164
+ * @param string $price optional: the product price
165
+ * @return string
166
+ */
167
+ public static function wc_get_price_excluding_tax( \WC_Product $product, $qty = 1, $price = '' ) {
168
+
169
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_price_excluding_tax()' );
170
+
171
+ return wc_get_price_excluding_tax( $product, [
172
+ 'qty' => $qty,
173
+ 'price' => $price,
174
+ ] );
175
+ }
176
+
177
+
178
+ /**
179
+ * Gets the product price to display.
180
+ *
181
+ * @since 4.6.0
182
+ *
183
+ * @param \WC_Product $product the product object
184
+ * @param string $price optional: the product price
185
+ * @param int $qty optional: the quantity
186
+ * @return string
187
+ */
188
+ public static function wc_get_price_to_display( \WC_Product $product, $price = '', $qty = 1 ) {
189
+
190
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_price_to_display()' );
191
+
192
+ return wc_get_price_to_display( $product, [
193
+ 'qty' => $qty,
194
+ 'price' => $price,
195
+ ] );
196
+ }
197
+
198
+
199
+ /**
200
+ * Gets the product category list.
201
+ *
202
+ * @since 4.6.0
203
+ * @deprecated 5.5.0
204
+ *
205
+ * @param \WC_Product $product the product object
206
+ * @param string $sep optional: the list separator
207
+ * @param string $before optional: to display before the list
208
+ * @param string $after optional: to display after the list
209
+ * @return string
210
+ */
211
+ public static function wc_get_product_category_list( \WC_Product $product, $sep = ', ', $before = '', $after = '' ) {
212
+
213
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_product_category_list()' );
214
+
215
+ $id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
216
+
217
+ return wc_get_product_category_list( $id, $sep, $before, $after );
218
+ }
219
+
220
+
221
+ /**
222
+ * Formats the product rating HTML.
223
+ *
224
+ * @since 4.6.0
225
+ * @deprecated 5.5.0
226
+ *
227
+ * @param \WC_Product $product the product object, unused since 5.5.0
228
+ * @param null|string $rating optional: the product rating
229
+ * @return string
230
+ */
231
+ public static function wc_get_rating_html( \WC_Product $product, $rating = null ) {
232
+
233
+ wc_deprecated_function( __METHOD__, '5.5.0', 'wc_get_rating_html()' );
234
+
235
+ return wc_get_rating_html( $rating );
236
+ }
237
+
238
+
239
+ }
240
+
241
+
242
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/i18n/languages/woocommerce-plugin-framework-et.mo ADDED
Binary file
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/i18n/languages/woocommerce-plugin-framework-et.po RENAMED
@@ -18,123 +18,122 @@ msgstr ""
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Generator: Poedit 1.8.11\n"
20
 
21
- #: Lifecycle.php:354
22
  msgid "Awesome"
23
  msgstr ""
24
 
25
- #: Lifecycle.php:355
26
  msgid "Fantastic"
27
  msgstr ""
28
 
29
- #: Lifecycle.php:356
30
  msgid "Cowabunga"
31
  msgstr ""
32
 
33
- #: Lifecycle.php:357
34
  msgid "Congratulations"
35
  msgstr ""
36
 
37
- #: Lifecycle.php:358
38
  msgid "Hot dog"
39
  msgstr ""
40
 
41
  #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
42
  #. tag, %4$s - <a> tag, %5$s - </a> tag
43
- #: Lifecycle.php:365
44
  msgid ""
45
  "Are you having a great experience with %1$s so far? Please consider "
46
  "%2$sleaving a review%3$s! If things aren't going quite as expected, we're "
47
  "happy to help -- please %4$sreach out to our support team%5$s."
48
  msgstr ""
49
 
50
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:183
51
  msgid ""
52
  "Thanks for installing %1$s! To get started, take a minute to %2$sread the "
53
  "documentation%3$s :)"
54
  msgstr ""
55
 
56
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:211
57
  msgid ""
58
  "Thanks for installing %1$s! To get started, take a minute to complete these "
59
  "%2$squick and easy setup steps%3$s :)"
60
  msgstr ""
61
 
62
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:236
63
  msgid "Setup"
64
  msgstr ""
65
 
66
  #. translators: Placeholders: %s - plugin name
67
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:304
68
  msgid "%s &rsaquo; Setup"
69
  msgstr ""
70
 
71
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:352
72
  #, fuzzy
73
  msgid "Oops! An error occurred, please try again."
74
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
75
 
76
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:493
77
- msgid "Done!"
78
  msgstr ""
79
 
80
  #. translators: Placeholder: %s - plugin name
81
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:586
82
  msgid "Welcome to %s!"
83
  msgstr ""
84
 
85
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:599
86
  msgid ""
87
  "This quick setup wizard will help you configure the basic settings and get "
88
  "you started."
89
  msgstr ""
90
 
91
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:616
92
  msgid "%s is ready!"
93
  msgstr ""
94
 
95
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:644
96
  msgid "Next step"
97
  msgstr ""
98
 
99
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:668
100
  msgid "You can also:"
101
  msgstr ""
102
 
103
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:712
104
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:742
105
  msgid "View the Docs"
106
  msgstr ""
107
 
108
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:713
109
  msgid "See more setup options"
110
  msgstr ""
111
 
112
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:714
113
  msgid "Learn more about customizing the plugin"
114
  msgstr ""
115
 
116
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:738
117
  msgid "Review Your Settings"
118
  msgstr ""
119
 
120
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:746
121
  msgid "Leave a Review"
122
  msgstr ""
123
 
124
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:770
125
- #: payment-gateway/class-sv-wc-payment-gateway.php:651
126
  msgid "Continue"
127
  msgstr "Jätka"
128
 
129
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:930
130
  msgid "Return to the WordPress Dashboard"
131
  msgstr ""
132
 
133
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:932
134
  msgid "Not right now"
135
  msgstr ""
136
 
137
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:934
138
  msgid "Skip this step"
139
  msgstr ""
140
 
@@ -185,13 +184,13 @@ msgstr "%1$s vajab WooCommerce'i versiooni %2$s või uuemat"
185
  msgid "Please %1$supdate WooCommerce%2$s"
186
  msgstr "Palun %1$suuenda WooCommerce'i%2$s"
187
 
188
- #: class-sv-wc-plugin-compatibility.php:278
189
  msgid "WooCommerce"
190
  msgstr ""
191
 
192
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
193
  #. extension/comma-separated list of PHP extensions
194
- #: class-sv-wc-plugin-dependencies.php:148
195
  msgid ""
196
  "%1$s requires the %2$s PHP extension to function. Contact your host or "
197
  "server administrator to install and configure the missing extension."
@@ -203,7 +202,7 @@ msgstr[1] ""
203
 
204
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
205
  #. function/comma-separated list of PHP functions
206
- #: class-sv-wc-plugin-dependencies.php:176
207
  msgid ""
208
  "%1$s requires the %2$s PHP function to exist. Contact your host or server "
209
  "administrator to install and configure the missing function."
@@ -214,24 +213,24 @@ msgstr[0] ""
214
  msgstr[1] ""
215
 
216
  #. translators: Placeholders: %s - plugin name
217
- #: class-sv-wc-plugin-dependencies.php:206
218
  msgid ""
219
  "%s may behave unexpectedly because the following PHP configuration settings "
220
  "are required:"
221
  msgstr ""
222
 
223
- #: class-sv-wc-plugin-dependencies.php:220
224
  msgid "%s or higher"
225
  msgstr ""
226
 
227
- #: class-sv-wc-plugin-dependencies.php:230
228
  msgid ""
229
  "Please contact your hosting provider or server administrator to configure "
230
  "these settings."
231
  msgstr ""
232
 
233
  #. translators: Placeholders: %1$s - <strong>, %2$s - </strong>
234
- #: class-sv-wc-plugin-dependencies.php:252
235
  msgid ""
236
  "Hey there! We've noticed that your server is running %1$san outdated version "
237
  "of PHP%2$s, which is the programming language that WooCommerce and its "
@@ -245,45 +244,187 @@ msgid ""
245
  "resources to help you upgrade%5$s and to explain PHP versions further."
246
  msgstr ""
247
 
248
- #. translators: Placeholders: %1$s - WooCommerce version number, %2$s -
249
- #. <strong>, %3$s - </strong>, %4$s - Plugin name, %5$s - <a> tag, %6$s - </a>
250
- #. tag
251
- #: class-sv-wc-plugin-dependencies.php:271
252
- msgid ""
253
- "Hey there! We've noticed that your site is running version %1$s of "
254
- "WooCommerce, but %2$sWooCommerce 3.0 or higher will soon be required%3$s by "
255
- "%4$s. We recommend you %5$supdate WooCommerce%6$s to the latest version as "
256
- "soon as possible."
257
- msgstr ""
258
-
259
  #. translators: Placeholders: %s - plugin name
260
- #: class-sv-wc-plugin.php:297
261
  msgid "You cannot clone instances of %s."
262
  msgstr "%s eksemplari ei saa kloonida."
263
 
264
  #. translators: Placeholders: %s - plugin name
265
- #: class-sv-wc-plugin.php:308
266
  msgid "You cannot unserialize instances of %s."
267
  msgstr "%s eksemplari ei saa deserialiseerida (unserialize)."
268
 
 
 
 
 
 
 
 
 
 
269
  #. translators: Docs as in Documentation
270
- #: class-sv-wc-plugin.php:525
271
  msgid "Docs"
272
  msgstr "Dokumentatsioon"
273
 
274
- #: class-sv-wc-plugin.php:618
275
  msgid "%1$s - A minimum of %2$s is required."
276
  msgstr ""
277
 
278
- #: class-sv-wc-plugin.php:627
279
  msgid "Set as %1$s - %2$s is required."
280
  msgstr ""
281
 
282
- #: class-sv-wc-plugin.php:850
 
283
  msgid "Configure"
284
  msgstr "Seadista"
285
 
286
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  #, fuzzy
288
  msgid ""
289
  "Are you sure you wish to process this capture? The action cannot be undone."
@@ -291,7 +432,7 @@ msgstr ""
291
  "Oled kindel, et soovid seda teha? Muudatust ei rakendata enne kui klikid "
292
  "\"Uuenda\""
293
 
294
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:101
295
  msgid ""
296
  "Something went wrong, and the capture could no be completed. Please try "
297
  "again."
@@ -301,108 +442,108 @@ msgstr ""
301
  #. amount has been pre-authorized before, but funds have not yet been captured
302
  #. (taken) from the card. Capturing the charge will take the money from the
303
  #. credit card and put it in the merchant's pockets.
304
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:146
305
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:219
306
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:281
307
  msgid "Capture Charge"
308
  msgstr "Teosta makse"
309
 
310
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:271
311
  msgid "This charge has been fully captured."
312
  msgstr ""
313
 
314
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:273
315
  msgid "This charge can no longer be captured."
316
  msgstr ""
317
 
318
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:275
319
  msgid "This charge cannot be captured."
320
  msgstr ""
321
 
322
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:89
323
  msgid "Are you sure you want to remove this token?"
324
  msgstr ""
325
 
326
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:99
327
  msgid "Invalid token data"
328
  msgstr ""
329
 
330
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:103
331
  #, fuzzy
332
  msgid "An error occurred. Please try again."
333
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
334
 
335
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:451
336
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:302
337
  msgid "(%s)"
338
  msgstr ""
339
 
340
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:480
341
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:650
342
  msgid "Default"
343
  msgstr ""
344
 
345
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:515
346
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:548
347
  msgid "Token ID"
348
  msgstr ""
349
 
350
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:520
351
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:299
352
  msgid "Card Type"
353
  msgstr "Kaardi tüüp"
354
 
355
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:525
356
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:561
357
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:191
358
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:297
359
  msgid "Last Four"
360
  msgstr "Viimased 4 numbrit"
361
 
362
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:532
363
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:313
364
  msgid "Expiration (MM/YY)"
365
  msgstr "Aegub (KK/AA)"
366
 
367
  #. translators: e-check account type, HTML form field label
368
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:553
369
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:419
370
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:298
371
  msgid "Account Type"
372
  msgstr "Konto tüüp"
373
 
374
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:556
375
  msgid "Checking"
376
  msgstr ""
377
 
378
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:557
379
  msgid "Savings"
380
  msgstr ""
381
 
382
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:657
383
  msgid "Refresh"
384
  msgstr ""
385
 
386
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:659
387
  msgid "Add New"
388
  msgstr ""
389
 
390
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:662
391
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:745
392
  msgid "Save"
393
  msgstr ""
394
 
395
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:684
396
  msgid "Remove"
397
  msgstr ""
398
 
399
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:221
400
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:208
401
  msgid "%s Payment Tokens"
402
  msgstr "%s maksevahendid"
403
 
404
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:299
405
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:660
406
  msgid "Customer ID"
407
  msgstr "Kliendi ID"
408
 
@@ -411,47 +552,47 @@ msgid "This section contains configuration settings for this gateway."
411
  msgstr ""
412
 
413
  #. translators: environment as in a software environment (test/production)
414
- #: payment-gateway/admin/views/html-admin-gateway-status.php:52
415
- #: payment-gateway/class-sv-wc-payment-gateway.php:1256
416
  msgid "Environment"
417
  msgstr "Keskkond"
418
 
419
- #: payment-gateway/admin/views/html-admin-gateway-status.php:53
420
  msgid "The transaction environment for this gateway."
421
  msgstr ""
422
 
423
- #: payment-gateway/admin/views/html-admin-gateway-status.php:60
424
  msgid "Tokenization Enabled"
425
  msgstr ""
426
 
427
- #: payment-gateway/admin/views/html-admin-gateway-status.php:61
428
  msgid "Displays whether or not tokenization is enabled for this gateway."
429
  msgstr ""
430
 
431
- #: payment-gateway/admin/views/html-admin-gateway-status.php:74
432
- #: payment-gateway/class-sv-wc-payment-gateway.php:1186
433
  msgid "Debug Mode"
434
  msgstr "Veaotsingu režiim"
435
 
436
- #: payment-gateway/admin/views/html-admin-gateway-status.php:75
437
  msgid "Displays whether or not debug logging is enabled for this gateway."
438
  msgstr ""
439
 
440
- #: payment-gateway/admin/views/html-admin-gateway-status.php:78
441
  msgid "Display at Checkout & Log"
442
  msgstr ""
443
 
444
- #: payment-gateway/admin/views/html-admin-gateway-status.php:80
445
  msgid "Display at Checkout"
446
  msgstr ""
447
 
448
- #: payment-gateway/admin/views/html-admin-gateway-status.php:82
449
- #: payment-gateway/class-sv-wc-payment-gateway.php:1194
450
  msgid "Save to Log"
451
  msgstr "Salvesta logifaili"
452
 
453
- #: payment-gateway/admin/views/html-admin-gateway-status.php:84
454
- #: payment-gateway/class-sv-wc-payment-gateway.php:1192
455
  msgid "Off"
456
  msgstr "Välja lülitatud"
457
 
@@ -483,7 +624,7 @@ msgid "Capture %s"
483
  msgstr "Teosta makse"
484
 
485
  #: payment-gateway/admin/views/html-order-partial-capture.php:66
486
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:225
487
  #, fuzzy
488
  msgid "Cancel"
489
  msgstr "Tühista tellimus"
@@ -502,12 +643,12 @@ msgstr ""
502
  "Kasutajale makseviisi poolt määratud kliendi tunnus. Muuda seda ainult siis, "
503
  "kui tõesti vajalik."
504
 
505
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:97
506
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:131
507
  msgid "An error occurred, please try again or try an alternate form of payment"
508
  msgstr "Esines viga, palun proovi uuesti või kasuta teistsugust makseviisi"
509
 
510
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:98
511
  msgid ""
512
  "We cannot process your order with the payment information that you provided. "
513
  "Please use a different payment account or an alternate payment method."
@@ -515,7 +656,7 @@ msgstr ""
515
  "Me ei saa sinu tellimust antud makseinfo alusel töödelda. Palun kasuta teist "
516
  "maksekontot või teistsugust makseviisi."
517
 
518
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99
519
  msgid ""
520
  "This order is being placed on hold for review. Please contact us to complete "
521
  "the transaction."
@@ -523,7 +664,7 @@ msgstr ""
523
  "Tellimus on pandud ülevaatuseks ootele. Tehingu sooritamiseks võta palun "
524
  "meiega ühendust."
525
 
526
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:104
527
  msgid ""
528
  "This order is being placed on hold for review due to an incorrect card "
529
  "verification number. You may contact the store to complete the transaction."
@@ -531,15 +672,15 @@ msgstr ""
531
  "Tellimus pandi ootele, kuna kaardi turvakood oli vale. Tehingu "
532
  "lõpuleviimiseks võid poega ühendust võtta."
533
 
534
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:105
535
  msgid "The card verification number is invalid, please try again."
536
  msgstr "Kaardi turvakood on vale, palun proovi uuesti."
537
 
538
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106
539
  msgid "Please enter your card verification number and try again."
540
  msgstr "Palun sisesta oma kaardi turvakood ja proovi uuesti."
541
 
542
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:109
543
  msgid ""
544
  "That card type is not accepted, please use an alternate card or other form "
545
  "of payment."
@@ -547,8 +688,8 @@ msgstr ""
547
  "Sellist tüüpi kaarti ei võeta vastu, palun proovi mõnda teist kaarti või "
548
  "teistsugust makseviisi."
549
 
550
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:110
551
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:114
552
  msgid ""
553
  "The card type is invalid or does not correlate with the credit card number. "
554
  "Please try again or use an alternate card or other form of payment."
@@ -556,47 +697,47 @@ msgstr ""
556
  "Kaardi tüüp on vigane või ei vasta kaardi numbrile. Palun proovi uuesti, "
557
  "proovi mõnda teist kaarti või teistsugust makseviisi."
558
 
559
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111
560
  msgid "Please select the card type and try again."
561
  msgstr "Palun vali kaardi tüüp ja proovi uuesti."
562
 
563
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:115
564
  msgid "The card number is invalid, please re-enter and try again."
565
  msgstr "Kaardi number on vigane, palun sisesta uuesti ja proovi veelkord."
566
 
567
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116
568
  msgid "Please enter your card number and try again."
569
  msgstr "Palun sisesta oma kaardi number ja proovi uuesti."
570
 
571
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:119
572
  msgid "The card expiration date is invalid, please re-enter and try again."
573
  msgstr ""
574
  "Kaardi aegumiskuupäev on vale, palun sisesta uuesti ja proovi veelkord."
575
 
576
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:120
577
  msgid "The card expiration month is invalid, please re-enter and try again."
578
  msgstr "Kaardi aegumise kuu on vale, palun sisesta uuesti ja proovi veelkord."
579
 
580
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121
581
  msgid "The card expiration year is invalid, please re-enter and try again."
582
  msgstr ""
583
  "Kaardi aegumise aasta on vale, palun sisesta uuesti ja proovi veelkord."
584
 
585
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122
586
  msgid "Please enter your card expiration date and try again."
587
  msgstr "Palun sisesta oma kaardi aegumiskuupäev ja proovi uuesti."
588
 
589
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:125
590
  msgid "The bank routing number is invalid, please re-enter and try again."
591
  msgstr ""
592
  "Panga suunakood ei ole korrektne, palun sisesta uuesti ja proovi veelkord."
593
 
594
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:126
595
  msgid "The bank account number is invalid, please re-enter and try again."
596
  msgstr ""
597
  "Pangakonto number ei ole korrektne, palun sisesta uuesti ja proovi veelkord."
598
 
599
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:129
600
  msgid ""
601
  "The provided card is expired, please use an alternate card or other form of "
602
  "payment."
@@ -604,7 +745,7 @@ msgstr ""
604
  "Antud kaart on aegunud, palun kasuta mõnda teist kaarti või teistsugust "
605
  "makseviisi."
606
 
607
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:130
608
  msgid ""
609
  "The provided card was declined, please use an alternate card or other form "
610
  "of payment."
@@ -612,7 +753,7 @@ msgstr ""
612
  "Antud kaart klükati tagasi, palun kasuta mõnda teist kaarti või teistsugust "
613
  "makseviisi."
614
 
615
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131
616
  msgid ""
617
  "Insufficient funds in account, please use an alternate card or other form of "
618
  "payment."
@@ -620,7 +761,7 @@ msgstr ""
620
  "Kontol pole piisavalt vahendeid, palun kasuta mõnda teist kaarti või "
621
  "teistsugust makseviisi."
622
 
623
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132
624
  msgid ""
625
  "The card is inactivate or not authorized for card-not-present transactions, "
626
  "please use an alternate card or other form of payment."
@@ -628,7 +769,7 @@ msgstr ""
628
  "Antud kaart ei ole aktiveeritud või ei ole sellega internetimaksed lubatud. "
629
  "Palun kasuta mõnda teist kaarti või teistsugust makseviisi."
630
 
631
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133
632
  msgid ""
633
  "The credit limit for the card has been reached, please use an alternate card "
634
  "or other form of payment."
@@ -636,12 +777,12 @@ msgstr ""
636
  "Kaardi krediitilimiit on ära kasutatud, palun kasuta mõnda teist kaarti või "
637
  "teistsugust makseviisi."
638
 
639
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134
640
  msgid ""
641
  "The card verification number does not match. Please re-enter and try again."
642
  msgstr "Kaardi turvakood ei klapi. Palun sisesta uuesti ja proovi veelkord."
643
 
644
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135
645
  msgid ""
646
  "The provided address does not match the billing address for cardholder. "
647
  "Please verify the address and try again."
@@ -649,85 +790,85 @@ msgstr ""
649
  "Antud aadress ei kattu kaardi omaniku aadressiga. Palun kontrolli, et "
650
  "sisestaid õige aadressi ning proovi uuesti."
651
 
652
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:81
653
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:99
654
  msgid "Apple Pay"
655
  msgstr ""
656
 
657
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:105
658
- #: payment-gateway/class-sv-wc-payment-gateway.php:1132
659
  msgid "Enable / Disable"
660
  msgstr "Luba / Keela"
661
 
662
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:106
663
  msgid "Accept Apple Pay"
664
  msgstr ""
665
 
666
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:113
667
  msgid "Allow Apple Pay on"
668
  msgstr ""
669
 
670
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:123
671
  msgid "Button Style"
672
  msgstr ""
673
 
674
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:126
675
  msgid "Black"
676
  msgstr ""
677
 
678
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:127
679
  msgid "White"
680
  msgstr ""
681
 
682
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:128
683
  msgid "White with outline"
684
  msgstr ""
685
 
686
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:140
687
- #: payment-gateway/class-sv-wc-payment-gateway.php:1307
688
  msgid "Connection Settings"
689
  msgstr ""
690
 
691
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:146
692
  msgid "Apple Merchant ID"
693
  msgstr ""
694
 
695
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:150
696
  msgid "This is found in your %1$sApple developer account%2$s"
697
  msgstr ""
698
 
699
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:157
700
  msgid "Certificate Path"
701
  msgstr ""
702
 
703
  #. translators: Placeholders: %s - the server's web root path
704
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:162
705
  msgid "For reference, your current web root path is: %s"
706
  msgstr ""
707
 
708
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:175
709
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:185
710
  msgid "Processing Gateway"
711
  msgstr ""
712
 
713
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:193
714
  #, fuzzy
715
  msgid "Test Mode"
716
  msgstr "Veaotsingu režiim"
717
 
718
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:194
719
  msgid ""
720
  "Enable to test Apple Pay functionality throughout your sites without "
721
  "processing real payments."
722
  msgstr ""
723
 
724
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:306
725
  msgid "Your site must be served over HTTPS with a valid SSL certificate."
726
  msgstr ""
727
 
728
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
729
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
730
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:316
731
  msgid ""
732
  "Accepts payment in %1$s only. %2$sConfigure%3$s WooCommerce to accept %1$s "
733
  "to enable Apple Pay."
@@ -737,240 +878,225 @@ msgid_plural ""
737
  msgstr[0] ""
738
  msgstr[1] ""
739
 
740
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:335
741
  msgid ""
742
  "Your %1$sMerchant Identity Certificate%2$s cannot be found. Please check "
743
  "your path configuration."
744
  msgstr ""
745
 
746
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:342
747
  msgid "Apple Pay is disabled."
748
  msgstr ""
749
 
750
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:381
751
  msgid "Single products"
752
  msgstr ""
753
 
754
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:382
755
  msgid "Cart"
756
  msgstr ""
757
 
758
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:383
759
  #, fuzzy
760
  msgid "Checkout"
761
  msgstr "E-tšekk"
762
 
763
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:168
764
  msgid "Buy with"
765
  msgstr ""
766
 
767
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:302
768
- #, fuzzy
769
- msgid "Pay with"
770
- msgstr "Maksa"
771
 
772
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:308
773
  msgid "or"
774
  msgstr ""
775
 
776
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:85
777
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:92
778
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:105
779
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:114
780
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:126
781
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:171
782
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:181
783
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:183
784
  msgid "Error %d: Unable to create order. Please try again."
785
  msgstr ""
786
 
787
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:120
788
  msgid "Apple Pay payment authorized."
789
  msgstr ""
790
 
791
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:156
792
  #, fuzzy
793
  msgid "Apple Pay payment failed. %s"
794
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
795
 
796
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:547
797
  msgid "Subtotal"
798
  msgstr ""
799
 
800
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:557
801
  #, fuzzy
802
  msgid "Discount"
803
  msgstr "Konto"
804
 
805
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:567
806
  msgid "Shipping"
807
  msgstr ""
808
 
809
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:577
810
  msgid "Fees"
811
  msgstr ""
812
 
813
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:587
814
  msgid "Taxes"
815
  msgstr ""
816
 
817
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:60
818
  msgid ""
819
  "Payment error, please try another payment method or contact us to complete "
820
  "your transaction."
821
  msgstr ""
822
  "Viga maksega, palun proovi teistsugust makseviisi või võta meiega ühendust."
823
 
824
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:160
825
- #: payment-gateway/class-sv-wc-payment-gateway.php:471
826
  msgid "Card expiration date is invalid"
827
  msgstr "Kaardi aegumiskuupäev ei ole korrektne"
828
 
829
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:184
830
- #: payment-gateway/class-sv-wc-payment-gateway.php:464
831
  msgid "Card number is missing"
832
  msgstr "Kaardi number on puudu"
833
 
834
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:190
835
- #: payment-gateway/class-sv-wc-payment-gateway.php:467
836
  msgid "Card number is invalid (wrong length)"
837
  msgstr "Kaardi number ei ole korrektne (pikkus on vale)"
838
 
839
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:195
840
- #: payment-gateway/class-sv-wc-payment-gateway.php:466
841
  msgid "Card number is invalid (only digits allowed)"
842
  msgstr "Kaardi number ei ole korrektne (lubatud on ainult numbrid)"
843
 
844
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:200
845
- #: payment-gateway/class-sv-wc-payment-gateway.php:465
846
  msgid "Card number is invalid"
847
  msgstr "Kaardi number ei ole korrektne"
848
 
849
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:227
850
- #: payment-gateway/class-sv-wc-payment-gateway.php:469
851
  msgid "Card security code is invalid (only digits are allowed)"
852
  msgstr "Kaardi turvakood ei ole korrektne (lubatud on ainult numbrid)"
853
 
854
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:233
855
- #: payment-gateway/class-sv-wc-payment-gateway.php:470
856
  msgid "Card security code is invalid (must be 3 or 4 digits)"
857
  msgstr "Kaardi turvakood ei ole korrektne (peab olema 3 või 4 numbrit)"
858
 
859
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:239
860
- #: payment-gateway/class-sv-wc-payment-gateway.php:468
861
  msgid "Card security code is missing"
862
  msgstr "Kaardi turvakood on puudu"
863
 
864
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:266
865
- #: payment-gateway/class-sv-wc-payment-gateway.php:480
866
  msgid "Routing Number is missing"
867
  msgstr "Suunakood on puudu"
868
 
869
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:273
870
- #: payment-gateway/class-sv-wc-payment-gateway.php:481
871
  msgid "Routing Number is invalid (only digits are allowed)"
872
  msgstr "Suunakood ei ole korrektne (lubatud on ainult numbrid)"
873
 
874
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:279
875
- #: payment-gateway/class-sv-wc-payment-gateway.php:482
876
  msgid "Routing number is invalid (must be 9 digits)"
877
  msgstr "Suunakood ei ole korrektne (peab olemas 9 numbrit)"
878
 
879
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:288
880
- #: payment-gateway/class-sv-wc-payment-gateway.php:477
881
  msgid "Account Number is missing"
882
  msgstr "Konto number on puudu"
883
 
884
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:295
885
- #: payment-gateway/class-sv-wc-payment-gateway.php:478
886
  msgid "Account Number is invalid (only digits are allowed)"
887
  msgstr "Konto number ei ole korrektne (lubatud on ainult numbrid)"
888
 
889
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:301
890
- #: payment-gateway/class-sv-wc-payment-gateway.php:479
891
  msgid "Account number is invalid (must be between 5 and 17 digits)"
892
  msgstr "Konto number ei ole korrektne (peab olemas 5-17 numbrit)"
893
 
894
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:308
895
- #: payment-gateway/class-sv-wc-payment-gateway.php:476
896
  msgid "Drivers license number is invalid"
897
  msgstr "Juhiloa number ei ole korrektne"
898
 
899
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:314
900
- #: payment-gateway/class-sv-wc-payment-gateway.php:472
901
  msgid "Check Number is invalid (only digits are allowed)"
902
  msgstr "Tšeki number ei ole korrektne (lubatud on ainult numbrid)"
903
 
 
 
 
 
 
 
 
 
 
 
904
  #. translators: Placeholders: %1$s - payment method title, %2$s - payment
905
  #. account type (savings/checking) (may or may not be available), %3$s - last
906
  #. four digits of the account
907
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:564
908
- #: payment-gateway/class-sv-wc-payment-gateway.php:2724
909
  msgid "%1$s Check Transaction Approved: %2$s account ending in %3$s"
910
  msgstr "%1$s: tšeki tehing vastu võetud: %2$s konto, lõpeb numbritega %3$s"
911
 
912
  #. translators: Placeholders: %s - check number
913
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:569
914
- #: payment-gateway/class-sv-wc-payment-gateway.php:2729
915
  msgid "Check number %s"
916
  msgstr "Tšeki number %s"
917
 
918
- #. translators: Placeholders: %s - transaction ID
919
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:574
920
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:658
921
- #: payment-gateway/class-sv-wc-payment-gateway.php:1770
922
- #: payment-gateway/class-sv-wc-payment-gateway.php:2162
923
- #: payment-gateway/class-sv-wc-payment-gateway.php:2383
924
- #: payment-gateway/class-sv-wc-payment-gateway.php:2690
925
- #: payment-gateway/class-sv-wc-payment-gateway.php:2734
926
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:340
927
- msgid "(Transaction ID %s)"
928
- msgstr "(Tehingu ID %s)"
929
-
930
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
931
  #. ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type
932
  #. (mastercard, visa, ...), %5$s - last four digits of the card
933
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:637
934
  #, fuzzy
935
  msgid "%1$s %2$s %3$s Approved: %4$s ending in %5$s"
936
  msgstr "%1$s %2$s: %3$s kinnitatud: %4$s lõpeb numbritega %5$s (aegub %6$s)"
937
 
938
  #. translators: Placeholders: %s - expiry date
939
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:650
940
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:661
941
- #: payment-gateway/class-sv-wc-payment-gateway.php:2682
942
  msgid "(expires %s)"
943
  msgstr "(aegub %s)"
944
 
945
  #. translators: Placeholders: %s - failure message
946
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:720
947
  msgid "Tokenization Request Failed: %s"
948
  msgstr "Maksevahendi salvestamise päring ebaõnnestus: %s"
949
 
950
  #. translators: Placeholders: %1$s - payment method title, %2$s - failure
951
  #. message
952
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:731
953
  msgid "%1$s Tokenization Request Failed: %2$s"
954
  msgstr "%1$s: maksevahendi salvestamise päring ebaõnnestus: %2$s"
955
 
956
- #. translators: This is a message describing that the transaction in question
957
- #. only performed a credit card authorization and did not capture any funds.
958
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:752
959
- #: payment-gateway/class-sv-wc-payment-gateway.php:1718
960
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:357
961
- msgid "Authorization only transaction"
962
- msgstr "Autoriseerimise tehing"
963
-
964
  #. translators: Placeholders: %s - failure message. Payment method as in a
965
  #. specific credit card, e-check or bank account
966
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:789
967
  msgid "Oops, adding your new payment method failed: %s"
968
  msgstr "Oih, sinu maksevahendi lisamine ebaõnnestus: %s"
969
 
970
  #. translators: Payment method as in a specific credit card. Placeholders: %1$s
971
  #. - card type (visa, mastercard, ...), %2$s - last four digits of the card,
972
  #. %3$s - card expiry date
973
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:830
974
  msgid "Nice! New payment method added: %1$s ending in %2$s (expires %3$s)"
975
  msgstr ""
976
  "Lahe! Uus maksevahend lisatud: %1$s, lõpeb numbritega %2$s (aegub %3$s)"
@@ -978,80 +1104,65 @@ msgstr ""
978
  #. translators: Payment method as in a specific e-check account. Placeholders:
979
  #. %1$s - account type (checking/savings), %2$s - last four digits of the
980
  #. account
981
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:840
982
  msgid "Nice! New payment method added: %1$s account ending in %2$s"
983
  msgstr "Lahe! Uus maksevahend lisatud: %1$s konto, lõpeb numbritega %2$s"
984
 
985
  #. translators: Payment method as in a specific credit card, e-check or bank
986
  #. account
987
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:847
988
  msgid "Nice! New payment method added."
989
  msgstr "Lahe! Uus maksevahend lisatud."
990
 
991
  #. translators: Placeholders: %1$s - site title, %2$s - customer email. Payment
992
  #. method as in a specific credit card, e-check or bank account
993
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:967
994
  msgid "%1$s - Add Payment Method for %2$s"
995
  msgstr "%1$s - Lisa maksevahend kliendile %2$s"
996
 
997
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:179
998
  msgid "PayPal"
999
  msgstr "PayPal"
1000
 
1001
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:180
1002
  msgid "Checking Account"
1003
  msgstr "Tšekikonto"
1004
 
1005
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:181
1006
  msgid "Savings Account"
1007
  msgstr "Hoiuarve"
1008
 
1009
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:182
1010
  msgid "Credit / Debit Card"
1011
  msgstr "Deebet- või krediitkaart"
1012
 
1013
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:183
1014
  msgid "Bank Account"
1015
  msgstr "Pangakonto"
1016
 
1017
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:294
1018
  msgid "Thank you for your order, please click the button below to pay."
1019
  msgstr "Aitäh tellimuse eest. Palun kliki maksmiseks alloleval nupul."
1020
 
1021
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:295
1022
  msgid ""
1023
  "Thank you for your order. We are now redirecting you to complete payment."
1024
  msgstr "Aitäh tellimuse eest. Makse teostamiseks suunatakse sind nüüd edasi."
1025
 
1026
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:296
1027
  msgid "Pay Now"
1028
  msgstr "Maksa"
1029
 
1030
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:297
1031
  msgid "Cancel Order"
1032
  msgstr "Tühista tellimus"
1033
 
1034
- #. translators: Placeholders: %s - a WooCommerce order ID
1035
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:436
1036
- msgid "Could not find order %s"
1037
- msgstr ""
1038
-
1039
- #. translators: Placeholders: %s - payment gateway title (such as
1040
- #. Authorize.net, Braintree, etc)
1041
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:500
1042
- msgid "%s duplicate transaction received"
1043
- msgstr "%s: duplikaattehing"
1044
-
1045
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:503
1046
- msgid "Order %s is already paid for."
1047
- msgstr ""
1048
-
1049
  #. translators: Placeholders: %1$s - payment gateway title (such as
1050
  #. Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank
1051
  #. account, etc), %3$s - last four digits of the card/account, %4$s -
1052
  #. card/account expiry date
1053
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:586
1054
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:795
1055
  msgid "%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)"
1056
  msgstr ""
1057
  "%1$s: maksevahend salvestatud: %2$s lõpeb numbritega in %3$s (aegub %4$s)"
@@ -1059,186 +1170,198 @@ msgstr ""
1059
  #. translators: Placeholders: %1$s - payment gateway title (such as CyberSouce,
1060
  #. NETbilling, etc), %2$s - account type (checking/savings - may or may not be
1061
  #. available), %3$s - last four digits of the account
1062
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:597
1063
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:806
1064
  msgid "%1$s eCheck Payment Method Saved: %2$s account ending in %3$s"
1065
  msgstr ""
1066
  "%1$s: e-tšeki maksevahend salvestatud: %2$s konto, lõpeb numbritega %3$s"
1067
 
1068
  #. translators: Placeholders: %s - payment gateway title (such as CyberSouce,
1069
  #. NETbilling, etc)
1070
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:606
1071
  #, fuzzy
1072
  msgid "%s Payment Method Saved"
1073
  msgstr "Minu maksevahendid."
1074
 
1075
  #. translators: Placeholders: %s - a failed tokenization API error
1076
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:615
1077
  #, fuzzy
1078
  msgid "Tokenization failed. %s"
1079
  msgstr "Maksevahendi salvestamise päring ebaõnnestus: %s"
1080
 
1081
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:224
1082
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:744
1083
  msgid "Edit"
1084
  msgstr ""
1085
 
1086
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:226
1087
  #, fuzzy
1088
  msgid ""
1089
  "Oops, there was an error updating your payment method. Please try again."
1090
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
1091
 
1092
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:227
1093
  msgid "Are you sure you want to delete this payment method?"
1094
  msgstr "Oled sa kindel, et soovid selle maksevahendi kustutada?"
1095
 
1096
  #. translators: Payment method as in a specific credit card, eCheck or bank
1097
  #. account
1098
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:284
1099
  msgid "You do not have any saved payment methods."
1100
  msgstr "Sul ei ole salvestatud maksevahendeid."
1101
 
1102
  #. translators: Payment method as in a specific credit card, eCheck or bank
1103
  #. account
1104
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:321
1105
  msgid "My Payment Methods"
1106
  msgstr "Minu maksevahendid."
1107
 
1108
  #. translators: Payment method as in a specific credit card, e-check or bank
1109
  #. account
1110
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:329
1111
  msgid "Add New Payment Method"
1112
  msgstr "Lisa uus maksevahend"
1113
 
1114
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:414
1115
  msgid "Method"
1116
  msgstr "Maksevahend"
1117
 
1118
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:415
1119
  msgid "Details"
1120
  msgstr ""
1121
 
1122
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:416
1123
  msgid "Expires"
1124
  msgstr "Aegub"
1125
 
1126
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:417
1127
  #, fuzzy
1128
  msgid "Default?"
1129
  msgstr "(vaikimisi)"
1130
 
1131
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:418
1132
  msgid "Actions"
1133
  msgstr ""
1134
 
1135
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:454
1136
  msgid "Credit/Debit Cards"
1137
  msgstr "Deebet- ja krediitkaardid"
1138
 
1139
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:463
1140
  msgid "Bank Accounts"
1141
  msgstr "Pangakontod"
1142
 
1143
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:515
1144
  msgid "N/A"
1145
  msgstr "-"
1146
 
1147
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:624
1148
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:199
1149
  msgid "Nickname"
1150
  msgstr ""
1151
 
1152
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:805
1153
  msgid "Delete"
1154
  msgstr "Kustuta"
1155
 
1156
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:959
1157
  msgid "Oops, you took too long, please try again."
1158
  msgstr "Oih, sul läks liiga kaua aega - palun proovi uuesti."
1159
 
1160
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:972
1161
  msgid "There was an error with your request, please try again."
1162
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
1163
 
1164
  #. translators: Payment method as in a specific credit card, e-check or bank
1165
  #. account
1166
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:985
1167
  msgid "Error removing payment method"
1168
  msgstr "Viga maksevahendi eemaldamisel"
1169
 
1170
  #. translators: Payment method as in a specific credit card, e-check or bank
1171
  #. account
1172
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:990
1173
  msgid "Payment method deleted."
1174
  msgstr "Maksevahend kustutatud."
1175
 
1176
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:295
1177
  msgid "Card Number"
1178
  msgstr "Kaardi number"
1179
 
1180
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:316
1181
  msgid "MM / YY"
1182
  msgstr "KK / AA"
1183
 
1184
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:334
1185
  msgid "Card Security Code"
1186
  msgstr "Kaardi turvakood"
1187
 
1188
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:337
1189
  msgid "CSC"
1190
  msgstr "Turvakood"
1191
 
1192
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:376
1193
  msgid "Where do I find this?"
1194
  msgstr "Kust ma selle leian?"
1195
 
1196
  #. translators: e-check routing number, HTML form field label,
1197
  #. https:en.wikipedia.org/wiki/Routing_transit_number
1198
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:382
1199
  msgid "Routing Number"
1200
  msgstr "Suunakood"
1201
 
1202
  #. translators: e-check account number, HTML form field label
1203
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:401
1204
  msgid "Account Number"
1205
  msgstr "Kontonumber"
1206
 
1207
  #. translators: Test mode refers to the current software environment
1208
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:466
1209
  msgid "TEST MODE ENABLED"
1210
  msgstr "TESTREŽIIM SISSE LÜLITATUD"
1211
 
 
 
 
 
 
1212
  #. translators: Payment method as in a specific credit card, eCheck or bank
1213
  #. account
1214
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:565
1215
  msgid "Manage Payment Methods"
1216
  msgstr "Halda maksevahendeid"
1217
 
1218
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:699
1219
  msgid "Use a new card"
1220
  msgstr "Kasuta uut kaarti"
1221
 
1222
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:699
1223
  msgid "Use a new bank account"
1224
  msgstr "Kasuta uut pangakontot"
1225
 
1226
  #. translators: account as in customer's account on the eCommerce site
1227
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:761
1228
  msgid "Securely Save to Account"
1229
  msgstr "Salvesta turvaliselt oma kontole"
1230
 
1231
- #. translators: Placeholders: %s - plugin name
1232
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:578
 
 
 
 
 
 
 
1233
  msgid ""
1234
- "%s: WooCommerce is not being forced over SSL; your customer's payment data "
1235
- "may be at risk."
1236
  msgstr ""
1237
  "%s: WooCommerce'i ei sunnita SSLi kasutama; sinu klientide andmed võivad "
1238
  "olla ohus."
1239
 
1240
  #. translators: Placeholders: %s - payment gateway name
1241
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:591
1242
  msgid ""
1243
  "%s will soon require TLS 1.2 support to process transactions and your server "
1244
  "environment may need to be updated. Please contact your hosting provider to "
@@ -1248,7 +1371,7 @@ msgstr ""
1248
 
1249
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
1250
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
1251
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:645
1252
  msgid ""
1253
  "%1$s accepts payment in %2$s only. %3$sConfigure%4$s WooCommerce to accept "
1254
  "%2$s to enable this gateway for checkout."
@@ -1258,9 +1381,35 @@ msgid_plural ""
1258
  msgstr[0] ""
1259
  msgstr[1] ""
1260
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1261
  #. translators: Placeholders: %1$s - payment gateway title (such as
1262
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1263
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:689
1264
  msgid ""
1265
  "%1$s is inactive for subscription transactions. Please %2$senable "
1266
  "tokenization%3$s to activate %1$s for Subscriptions."
@@ -1271,7 +1420,7 @@ msgstr ""
1271
 
1272
  #. translators: Placeholders: %1$s - payment gateway title (such as
1273
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1274
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:707
1275
  msgid ""
1276
  "%1$s is inactive for pre-order transactions. Please %2$senable tokenization"
1277
  "%3$s to activate %1$s for Pre-Orders."
@@ -1280,104 +1429,108 @@ msgstr ""
1280
  "maksevahendite salvestamine%3$s sisse, et aktiveerida %1$s Eeltellimuste "
1281
  "(Pre-Orders) jaoks."
1282
 
1283
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:743
1284
  msgid ""
1285
  "You must enable tokenization for this gateway in order to support automatic "
1286
  "renewal payments with the WooCommerce Subscriptions extension."
1287
  msgstr ""
1288
 
1289
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:744
1290
  msgid "Inactive"
1291
  msgstr ""
1292
 
1293
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:114
1294
  #, fuzzy
1295
  msgid "%s Customer ID"
1296
  msgstr "Kliendi ID"
1297
 
1298
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:183
1299
  #, fuzzy
1300
  msgid "Type"
1301
  msgstr "Kaardi tüüp"
1302
 
1303
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:253
1304
  msgid "Removed payment token \"%d\""
1305
  msgstr ""
1306
 
1307
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:300
1308
  #, fuzzy
1309
  msgid "Expiry Date"
1310
  msgstr "Aegumiskuupäev (01/%s)"
1311
 
1312
- #: payment-gateway/class-sv-wc-payment-gateway.php:332
1313
  msgid "you successfully processed a payment!"
1314
  msgstr ""
1315
 
1316
- #: payment-gateway/class-sv-wc-payment-gateway.php:337
1317
  msgid "you successfully processed a refund!"
1318
  msgstr ""
1319
 
1320
- #: payment-gateway/class-sv-wc-payment-gateway.php:473
1321
  msgid "Check Number is missing"
1322
  msgstr "Tšeki number on puudu"
1323
 
1324
- #: payment-gateway/class-sv-wc-payment-gateway.php:474
1325
  msgid "Drivers license state is missing"
1326
  msgstr "Juhiloa osariik on puudu"
1327
 
1328
- #: payment-gateway/class-sv-wc-payment-gateway.php:475
1329
  msgid "Drivers license number is missing"
1330
  msgstr "Juhiloa number on puudu"
1331
 
1332
- #: payment-gateway/class-sv-wc-payment-gateway.php:651
 
 
 
 
1333
  msgid "Place order"
1334
  msgstr "Esita tellimus"
1335
 
1336
- #: payment-gateway/class-sv-wc-payment-gateway.php:683
1337
  msgid "Thank you for your order."
1338
  msgstr "Aitäh tellimuse eest."
1339
 
1340
- #: payment-gateway/class-sv-wc-payment-gateway.php:1091
1341
  msgid "Credit Card"
1342
  msgstr "Krediitkaart"
1343
 
1344
- #: payment-gateway/class-sv-wc-payment-gateway.php:1093
1345
  msgid "eCheck"
1346
  msgstr "E-tšekk"
1347
 
1348
- #: payment-gateway/class-sv-wc-payment-gateway.php:1111
1349
  msgid "Pay securely using your credit card."
1350
  msgstr "Maksa turvaliselt oma krediitkaardiga."
1351
 
1352
- #: payment-gateway/class-sv-wc-payment-gateway.php:1113
1353
  msgid "Pay securely using your checking account."
1354
  msgstr "Maksa turvaliselt oma tšekikontoga."
1355
 
1356
- #: payment-gateway/class-sv-wc-payment-gateway.php:1133
1357
  msgid "Enable this gateway"
1358
  msgstr "Lülita see makseviis sisse"
1359
 
1360
- #: payment-gateway/class-sv-wc-payment-gateway.php:1139
1361
  msgid "Title"
1362
  msgstr "Nimetus"
1363
 
1364
- #: payment-gateway/class-sv-wc-payment-gateway.php:1141
1365
  msgid "Payment method title that the customer will see during checkout."
1366
  msgstr "Kliendile kassas nähtav makseviisi nimetus."
1367
 
1368
- #: payment-gateway/class-sv-wc-payment-gateway.php:1146
1369
  msgid "Description"
1370
  msgstr "Kirjeldus"
1371
 
1372
- #: payment-gateway/class-sv-wc-payment-gateway.php:1148
1373
  msgid "Payment method description that the customer will see during checkout."
1374
  msgstr "Kliendile kassas nähtav makseviisi kirjeldus."
1375
 
1376
- #: payment-gateway/class-sv-wc-payment-gateway.php:1177
1377
  msgid "Detailed Decline Messages"
1378
  msgstr "Täpsemad maksest keeldumise teated"
1379
 
1380
- #: payment-gateway/class-sv-wc-payment-gateway.php:1179
1381
  msgid ""
1382
  "Check to enable detailed decline messages to the customer during checkout "
1383
  "when possible, rather than a generic decline message."
@@ -1386,7 +1539,7 @@ msgstr ""
1386
  "teate asemel näidata võimaluse korral täpsemaid põhjusi."
1387
 
1388
  #. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
1389
- #: payment-gateway/class-sv-wc-payment-gateway.php:1189
1390
  msgid ""
1391
  "Show Detailed Error Messages and API requests/responses on the checkout page "
1392
  "and/or save them to the %1$sdebug log%2$s"
@@ -1394,112 +1547,90 @@ msgstr ""
1394
  "Näita üksikasjalikke veateateud ja API päringuid/vastuseid kassas ja/või "
1395
  "salvesta need %1$slogifaili%2$s"
1396
 
1397
- #: payment-gateway/class-sv-wc-payment-gateway.php:1193
1398
  msgid "Show on Checkout Page"
1399
  msgstr "Näita kassas"
1400
 
1401
  #. translators: show debugging information on both checkout page and in the log
1402
- #: payment-gateway/class-sv-wc-payment-gateway.php:1196
1403
  msgid "Both"
1404
  msgstr "Mõlemad"
1405
 
1406
- #: payment-gateway/class-sv-wc-payment-gateway.php:1259
1407
  msgid "Select the gateway environment to use for transactions."
1408
  msgstr "Vali makseviisi tehingute teostamise keskkond."
1409
 
1410
- #: payment-gateway/class-sv-wc-payment-gateway.php:1313
1411
  msgid "Share connection settings"
1412
  msgstr "Jaga ühenduse andmeid"
1413
 
1414
- #: payment-gateway/class-sv-wc-payment-gateway.php:1315
1415
  msgid "Use connection/authentication settings from other gateway"
1416
  msgstr "Kasuta teise makseviisi ühenduse/autentimise seadeid"
1417
 
1418
- #: payment-gateway/class-sv-wc-payment-gateway.php:1318
1419
  msgid "Disabled because the other gateway is using these settings"
1420
  msgstr "Ei saa muuta, kuna teine makseviis kasutab neid seadeid"
1421
 
1422
- #: payment-gateway/class-sv-wc-payment-gateway.php:1335
1423
  msgid "Card Verification (CSC)"
1424
  msgstr "Kaardi turvakood (CSC)"
1425
 
1426
- #: payment-gateway/class-sv-wc-payment-gateway.php:1336
1427
  msgid "Display the Card Security Code (CV2) field on checkout"
1428
  msgstr "Näita kassas kaardi turvakoodi (CV2) välja"
1429
 
1430
- #: payment-gateway/class-sv-wc-payment-gateway.php:1344
1431
  #, fuzzy
1432
  msgid "Saved Card Verification"
1433
  msgstr "Kaardi turvakood (CSC)"
1434
 
1435
- #: payment-gateway/class-sv-wc-payment-gateway.php:1345
1436
  #, fuzzy
1437
  msgid "Display the Card Security Code field when paying with a saved card"
1438
  msgstr "Näita kassas kaardi turvakoodi (CV2) välja"
1439
 
1440
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1441
- #: payment-gateway/class-sv-wc-payment-gateway.php:1673
1442
  msgid "%1$s - Order %2$s"
1443
  msgstr "%1$s - Tellimus %2$s"
1444
 
1445
- #. translators: Placeholders: %1$s - payment gateway title (such as
1446
- #. Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions:
1447
- #. Capture, as in capture funds from a credit card.
1448
- #: payment-gateway/class-sv-wc-payment-gateway.php:1763
1449
- msgid "%1$s Capture of %2$s Approved"
1450
- msgstr "%1$s: tasumine summas %2$s kinnitatud"
1451
-
1452
- #. translators: Placeholders: %1$s - payment gateway title (such as
1453
- #. Authorize.net, Braintree, etc), %2$s - transaction amount, %3$s -
1454
- #. transaction status message. Definitions: Capture, as in capture funds from a
1455
- #. credit card.
1456
- #: payment-gateway/class-sv-wc-payment-gateway.php:1802
1457
- msgid "%1$s Capture Failed: %2$s - %3$s"
1458
- msgstr "%1$s: tasumine ebaõnnestus: %2$s - %3$s"
1459
-
1460
- #. translators: Placeholders: %1$s - payment gateway title (such as
1461
- #. Authorize.net, Braintree, etc), %2$s - failure message. Definitions:
1462
- #. "capture" as in capturing funds from a credit card.
1463
- #: payment-gateway/class-sv-wc-payment-gateway.php:1820
1464
- msgid "%1$s Capture Failed: %2$s"
1465
- msgstr "%1$s: makse teostamine ebaõnnestus: %2$s"
1466
-
1467
  #. translators: Placeholders: %1$s - site title, %2$s - order number.
1468
  #. Definitions: Capture as in capture funds from a credit card.
1469
- #: payment-gateway/class-sv-wc-payment-gateway.php:1884
1470
  msgid "%1$s - Capture for Order %2$s"
1471
  msgstr "%1$s - Tasumine tellimuse %2$s eest"
1472
 
1473
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1474
- #: payment-gateway/class-sv-wc-payment-gateway.php:2092
1475
  msgid "%1$s - Refund for Order %2$s"
1476
  msgstr "%1$s - Tagasimakse tellimuse %2$s eest"
1477
 
1478
  #. translators: Placeholders: %1$s - payment gateway title (such as
1479
  #. Authorize.net, Braintree, etc), %2$s - a monetary amount
1480
- #: payment-gateway/class-sv-wc-payment-gateway.php:2155
1481
  msgid "%1$s Refund in the amount of %2$s approved."
1482
  msgstr "%1$s: tagasimakse summas %2$s kinnitatud."
1483
 
1484
  #. translators: Placeholders: %1$s - payment gateway title (such as
1485
  #. Authorize.net, Braintree, etc), %2$s - error code, %3$s - error message
1486
- #: payment-gateway/class-sv-wc-payment-gateway.php:2182
1487
  msgid "%1$s Refund Failed: %2$s - %3$s"
1488
  msgstr "%1$s: tagasimakse ebaõnnestus: %2$s - %3$s"
1489
 
1490
  #. translators: Placeholders: %1$s - payment gateway title (such as
1491
  #. Authorize.net, Braintree, etc), %2$s - error message
1492
- #: payment-gateway/class-sv-wc-payment-gateway.php:2190
1493
  msgid "%1$s Refund Failed: %2$s"
1494
  msgstr "%1$s: tagasimakse ebaõnnestus: %2$s"
1495
 
1496
  #. translators: Placeholders: %s - payment gateway title (such as
1497
  #. Authorize.net, Braintree, etc)
1498
- #: payment-gateway/class-sv-wc-payment-gateway.php:2210
1499
  msgid "%s Order completely refunded."
1500
  msgstr "%s: tellimus täielikult tagasi makstud."
1501
 
1502
- #: payment-gateway/class-sv-wc-payment-gateway.php:2263
1503
  msgid ""
1504
  "Oops, you cannot partially void this order. Please use the full order amount."
1505
  msgstr ""
@@ -1508,98 +1639,58 @@ msgstr ""
1508
 
1509
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error code,
1510
  #. %3$s - error message. Void as in to void an order.
1511
- #: payment-gateway/class-sv-wc-payment-gateway.php:2347
1512
  msgid "%1$s Void Failed: %2$s - %3$s"
1513
  msgstr "%1$s: tühistamine ebaõnnestus: %2$s - %3$s"
1514
 
1515
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1516
  #. message. Void as in to void an order.
1517
- #: payment-gateway/class-sv-wc-payment-gateway.php:2355
1518
  msgid "%1$s Void Failed: %2$s"
1519
  msgstr "%1$s: tühistamine ebaõnnestus: %2$s"
1520
 
1521
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - a monetary
1522
  #. amount. Void as in to void an order.
1523
- #: payment-gateway/class-sv-wc-payment-gateway.php:2376
1524
  msgid "%1$s Void in the amount of %2$s approved."
1525
  msgstr "%1$s: tühistamine summas %2$s kinnitatud."
1526
 
1527
- #. translators: Placeholders: %1$s - status code, %2$s - status message
1528
- #. translators: Placeholders: %1$s - payment request response status code, %2$s
1529
- #. - payment request response status message
1530
- #: payment-gateway/class-sv-wc-payment-gateway.php:2471
1531
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:149
1532
- msgid "Status code %1$s: %2$s"
1533
- msgstr "Staatuse kood %1$s: %2$s"
1534
-
1535
- #. translators: Placeholders: %s - status code
1536
- #. translators: Placeholders: %s - payment request response status code
1537
- #: payment-gateway/class-sv-wc-payment-gateway.php:2474
1538
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:152
1539
- msgid "Status code: %s"
1540
- msgstr "Staatuse kood: %s"
1541
-
1542
- #. translators: Placeholders; %s - status message
1543
- #. translators: Placeholders: %s - payment request response status message
1544
- #: payment-gateway/class-sv-wc-payment-gateway.php:2477
1545
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:155
1546
- msgid "Status message: %s"
1547
- msgstr "Staatuse teade: %s"
1548
-
1549
- #: payment-gateway/class-sv-wc-payment-gateway.php:2482
1550
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:162
1551
- msgid "Transaction ID %s"
1552
- msgstr "Tehingu ID %s"
1553
-
1554
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1555
  #. ("Test"), %3$s - transaction type (authorization/charge)
1556
- #: payment-gateway/class-sv-wc-payment-gateway.php:2661
1557
  #, fuzzy
1558
  msgid "%1$s %2$s %3$s Approved"
1559
  msgstr "%1$s: %2$s tehing kinnitatud"
1560
 
1561
  #. translators: Placeholders: %1$s - credit card type (MasterCard, Visa,
1562
  #. etc...), %2$s - last four digits of the card
1563
- #: payment-gateway/class-sv-wc-payment-gateway.php:2671
1564
  msgid "%1$s ending in %2$s"
1565
  msgstr ""
1566
 
1567
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - message
1568
  #. (probably reason for the transaction being held for review)
1569
- #: payment-gateway/class-sv-wc-payment-gateway.php:2765
1570
  msgid "%1$s Transaction Held for Review (%2$s)"
1571
  msgstr "%1$s: tehning pandi ülevaatuseks ootele (%2$s)"
1572
 
1573
- #: payment-gateway/class-sv-wc-payment-gateway.php:2796
1574
- msgid ""
1575
- "Your order has been received and is being reviewed. Thank you for your "
1576
- "business."
1577
- msgstr ""
1578
- "Sinu tellimus on vastu võetud ja on ülevaatamisel. Täname koostöö eest."
1579
-
1580
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1581
  #. message; e.g. Order Note: [Payment method] Payment failed [error]
1582
- #: payment-gateway/class-sv-wc-payment-gateway.php:2841
1583
  msgid "%1$s Payment Failed (%2$s)"
1584
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
1585
 
1586
- #: payment-gateway/class-sv-wc-payment-gateway.php:2858
1587
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:375
1588
- msgid ""
1589
- "An error occurred, please try again or try an alternate form of payment."
1590
- msgstr "Esines viga, palun proovi uuesti või kasuta teistsugust makseviisi."
1591
-
1592
  #. translators: Placeholders: %1$s - payment gateway title, %2$s -
1593
  #. message/error
1594
- #: payment-gateway/class-sv-wc-payment-gateway.php:2875
1595
  msgid "%1$s Transaction Cancelled (%2$s)"
1596
  msgstr "%1$s: tehing tühistatud (%2$s)"
1597
 
1598
- #: payment-gateway/class-sv-wc-payment-gateway.php:3119
1599
  msgid "Transaction Type"
1600
  msgstr "Tehingu tüüp"
1601
 
1602
- #: payment-gateway/class-sv-wc-payment-gateway.php:3121
1603
  msgid ""
1604
  "Select how transactions should be processed. Charge submits all transactions "
1605
  "for settlement, Authorization simply authorizes the order total for capture "
@@ -1609,341 +1700,427 @@ msgstr ""
1609
  "koheselt tasumisele, \"Autoriseerimine\" lihtsalt autoriseerib tellimuse "
1610
  "summa hilisemaks tasumiseks."
1611
 
1612
- #: payment-gateway/class-sv-wc-payment-gateway.php:3132
1613
  msgid "Charge Virtual-Only Orders"
1614
  msgstr ""
1615
 
1616
- #: payment-gateway/class-sv-wc-payment-gateway.php:3134
1617
  msgid ""
1618
  "If the order contains exclusively virtual items, enable this to immediately "
1619
  "charge, rather than authorize, the transaction."
1620
  msgstr ""
1621
 
1622
- #: payment-gateway/class-sv-wc-payment-gateway.php:3142
1623
  #, fuzzy
1624
  msgid "Enable Partial Capture"
1625
  msgstr "Lülita see makseviis sisse"
1626
 
1627
- #: payment-gateway/class-sv-wc-payment-gateway.php:3144
1628
  msgid "Allow orders to be partially captured multiple times."
1629
  msgstr ""
1630
 
1631
- #: payment-gateway/class-sv-wc-payment-gateway.php:3154
1632
  #, fuzzy
1633
  msgid "Capture Paid Orders"
1634
  msgstr "Teosta makse"
1635
 
1636
- #: payment-gateway/class-sv-wc-payment-gateway.php:3157
1637
  msgid "Automatically capture orders when they are changed to %s."
1638
  msgstr ""
1639
 
1640
- #: payment-gateway/class-sv-wc-payment-gateway.php:3158
1641
  msgid "a paid status"
1642
  msgstr ""
1643
 
1644
- #: payment-gateway/class-sv-wc-payment-gateway.php:3427
1645
  #, fuzzy
1646
  msgid "Accepted Card Logos"
1647
  msgstr "Vastuvõetavad kaardid"
1648
 
1649
- #: payment-gateway/class-sv-wc-payment-gateway.php:3429
1650
  #, fuzzy
1651
  msgid ""
1652
  "These are the card logos that are displayed to customers as accepted during "
1653
  "checkout."
1654
  msgstr "Kliendile kassas nähtav makseviisi nimetus."
1655
 
1656
- #: payment-gateway/class-sv-wc-payment-gateway.php:3430
 
1657
  msgid ""
1658
- "This can be configured to match those accepted by your payment processor, "
1659
- "but does not change your merchant account configuration."
1660
  msgstr ""
1661
 
1662
  #. translators:
1663
  #. http:www.cybersource.com/products/payment_security/payment_tokenization/ and
1664
  #. https:en.wikipedia.org/wiki/Tokenization_(data_security)
1665
- #: payment-gateway/class-sv-wc-payment-gateway.php:3518
1666
  msgid "Tokenization"
1667
  msgstr "Maksevahendite salvestamine"
1668
 
1669
- #: payment-gateway/class-sv-wc-payment-gateway.php:3519
1670
  msgid ""
1671
  "Allow customers to securely save their payment details for future checkout."
1672
  msgstr ""
1673
  "Võimalda klientidel oma makseandmeid edaspidisteks tehinguteks turvaliselt "
1674
  "talletada."
1675
 
1676
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:250
 
 
 
 
 
 
 
 
1677
  msgid "Pre-Order Tokenization attempt failed (%s)"
1678
  msgstr ""
1679
 
1680
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:294
1681
  msgid "%s - Pre-Order Release Payment for Order %s"
1682
  msgstr ""
1683
 
1684
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:298
1685
  msgid "Payment token missing/invalid."
1686
  msgstr "Maksevahend on puudu või vigane."
1687
 
1688
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:323
1689
  msgid "%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)"
1690
  msgstr ""
1691
 
1692
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:334
1693
  msgid "%s eCheck Pre-Order Release Payment Approved: %s ending in %s"
1694
  msgstr ""
1695
 
1696
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:376
1697
  msgid "Pre-Order Release Payment Failed: %s"
1698
  msgstr "Eeltellimuse väljastamise makse ebaõnnestus: %s"
1699
 
1700
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:212
1701
  msgid "Subscription Renewal: payment token is missing/invalid."
1702
  msgstr ""
1703
 
1704
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:238
1705
  msgid "%1$s - Subscription Renewal Order %2$s"
1706
  msgstr ""
1707
 
1708
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1709
  #. message; e.g. Order Note: [Payment method] Payment Change failed [error]
1710
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:370
1711
  #, fuzzy
1712
  msgid "%1$s Payment Change Failed (%2$s)"
1713
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
1714
 
1715
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:510
1716
  msgid "Via %s ending in %s"
1717
  msgstr ""
1718
 
1719
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:537
1720
  msgid "Subscriptions"
1721
  msgstr ""
1722
 
1723
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:605
1724
  msgid ""
1725
  "This payment method is tied to a subscription and cannot be deleted. Please "
1726
  "switch the subscription to another method first."
1727
  msgstr ""
1728
 
1729
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:656
1730
  msgid "Payment Token"
1731
  msgstr ""
1732
 
1733
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:684
1734
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:689
1735
  msgid "%s is required."
1736
  msgstr ""
1737
 
1738
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:157
1739
  msgid "Unknown Error"
1740
  msgstr "Esines tundmatu viga"
1741
 
1742
- #: utilities/class-sv-wp-background-job-handler.php:640
1743
- msgid "Job data key \"%s\" not set"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1744
  msgstr ""
1745
 
1746
  #: utilities/class-sv-wp-background-job-handler.php:644
 
 
 
 
1747
  msgid "Job data key \"%s\" is not an array"
1748
  msgstr ""
1749
 
1750
- #: utilities/class-sv-wp-background-job-handler.php:877
1751
  msgid "Every %d Minutes"
1752
  msgstr ""
1753
 
1754
- #: utilities/class-sv-wp-background-job-handler.php:1040
1755
  msgid "Background Processing Test"
1756
  msgstr ""
1757
 
1758
- #: utilities/class-sv-wp-background-job-handler.php:1041
1759
  #, fuzzy
1760
  msgid "Run Test"
1761
  msgstr "test"
1762
 
1763
- #: utilities/class-sv-wp-background-job-handler.php:1042
1764
  msgid ""
1765
  "This tool will test whether your server is capable of processing background "
1766
  "jobs."
1767
  msgstr ""
1768
 
1769
- #: utilities/class-sv-wp-background-job-handler.php:1060
1770
  msgid "Success! You should be able to process background jobs."
1771
  msgstr ""
1772
 
1773
- #: utilities/class-sv-wp-background-job-handler.php:1063
1774
  msgid ""
1775
  "Could not connect. Please ask your hosting company to ensure your server has "
1776
  "loopback connections enabled."
1777
  msgstr ""
1778
 
1779
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397
1780
  msgctxt "enhanced select"
1781
  msgid "No matches found"
1782
  msgstr ""
1783
 
1784
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398
1785
  msgctxt "enhanced select"
1786
  msgid "Loading failed"
1787
  msgstr ""
1788
 
1789
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399
1790
  msgctxt "enhanced select"
1791
  msgid "Please enter 1 or more characters"
1792
  msgstr ""
1793
 
1794
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400
1795
  msgctxt "enhanced select"
1796
  msgid "Please enter %qty% or more characters"
1797
  msgstr ""
1798
 
1799
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401
1800
  msgctxt "enhanced select"
1801
  msgid "Please delete 1 character"
1802
  msgstr ""
1803
 
1804
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402
1805
  msgctxt "enhanced select"
1806
  msgid "Please delete %qty% characters"
1807
  msgstr ""
1808
 
1809
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403
1810
  msgctxt "enhanced select"
1811
  msgid "You can only select 1 item"
1812
  msgstr ""
1813
 
1814
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404
1815
  msgctxt "enhanced select"
1816
  msgid "You can only select %qty% items"
1817
  msgstr ""
1818
 
1819
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:405
1820
  msgctxt "enhanced select"
1821
  msgid "Loading more results&hellip;"
1822
  msgstr ""
1823
 
1824
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:406
1825
  msgctxt "enhanced select"
1826
  msgid "Searching&hellip;"
1827
  msgstr ""
1828
 
1829
- #: class-sv-wc-helper.php:407
1830
  msgctxt "coordinating conjunction for a list of items: a, b, and c"
1831
  msgid "and"
1832
  msgstr ""
1833
 
1834
- #: class-sv-wc-plugin.php:530
1835
  msgctxt "noun"
1836
  msgid "Support"
1837
  msgstr "Kasutajatugi"
1838
 
1839
- #: class-sv-wc-plugin.php:535
1840
  msgctxt "verb"
1841
  msgid "Review"
1842
  msgstr ""
1843
 
1844
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:639
1845
- #: payment-gateway/class-sv-wc-payment-gateway.php:2663
1846
  msgctxt "noun, software environment"
1847
  msgid "Test"
1848
  msgstr "test"
1849
 
1850
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:640
1851
- #: payment-gateway/class-sv-wc-payment-gateway.php:2664
1852
- #: payment-gateway/class-sv-wc-payment-gateway.php:3125
1853
  msgctxt "credit card transaction type"
1854
  msgid "Authorization"
1855
  msgstr "Autoriseerimine"
1856
 
1857
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:640
1858
- #: payment-gateway/class-sv-wc-payment-gateway.php:2664
1859
- #: payment-gateway/class-sv-wc-payment-gateway.php:3124
1860
  msgctxt "noun, credit card transaction type"
1861
  msgid "Charge"
1862
  msgstr "Makse"
1863
 
1864
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:192
1865
  msgctxt "payment method type"
1866
  msgid "Account"
1867
  msgstr "Konto"
1868
 
1869
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:227
1870
- #: payment-gateway/class-sv-wc-payment-gateway.php:3455
1871
  msgctxt "credit card type"
1872
  msgid "Visa"
1873
  msgstr "Visa"
1874
 
1875
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:231
1876
- #: payment-gateway/class-sv-wc-payment-gateway.php:3456
1877
  msgctxt "credit card type"
1878
  msgid "MasterCard"
1879
  msgstr "MasterCard"
1880
 
1881
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:235
1882
- #: payment-gateway/class-sv-wc-payment-gateway.php:3457
1883
  msgctxt "credit card type"
1884
  msgid "American Express"
1885
  msgstr "American Express"
1886
 
1887
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:239
1888
  msgctxt "credit card type"
1889
  msgid "Diners Club"
1890
  msgstr ""
1891
 
1892
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:243
1893
- #: payment-gateway/class-sv-wc-payment-gateway.php:3458
1894
  msgctxt "credit card type"
1895
  msgid "Discover"
1896
  msgstr "Discover"
1897
 
1898
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:247
1899
- #: payment-gateway/class-sv-wc-payment-gateway.php:3460
1900
  msgctxt "credit card type"
1901
  msgid "JCB"
1902
  msgstr "JCB"
1903
 
1904
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:251
1905
  msgctxt "credit card type"
1906
  msgid "CarteBleue"
1907
  msgstr "CarteBleue"
1908
 
1909
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:255
1910
  msgctxt "credit card type"
1911
  msgid "Maestro"
1912
  msgstr ""
1913
 
1914
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:259
1915
  msgctxt "credit card type"
1916
  msgid "Laser"
1917
  msgstr ""
1918
 
1919
- #: payment-gateway/class-sv-wc-payment-gateway.php:3459
1920
  msgctxt "credit card type"
1921
  msgid "Diners"
1922
  msgstr "Diners"
1923
 
1924
  #. translators: http:www.investopedia.com/terms/c/checkingaccount.asp
1925
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:427
1926
  msgctxt "account type"
1927
  msgid "Checking"
1928
  msgstr "Tšekikonto"
1929
 
1930
  #. translators: http:www.investopedia.com/terms/s/savingsaccount.asp
1931
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:429
1932
  msgctxt "account type"
1933
  msgid "Savings"
1934
  msgstr "Hoiuarve"
1935
 
1936
- #: payment-gateway/class-sv-wc-payment-gateway.php:2450
1937
  msgctxt "hash before order number"
1938
  msgid "#"
1939
  msgstr "#"
1940
 
1941
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:567
1942
  msgctxt "hash before order number"
1943
  msgid "#%s"
1944
  msgstr ""
1945
 
1946
- #: payment-gateway/class-sv-wc-payment-gateway.php:3151
1947
  msgctxt ""
1948
  "coordinating conjunction for a list of order statuses: on-hold, processing, "
1949
  "or completed"
@@ -1951,13 +2128,17 @@ msgid "or"
1951
  msgstr ""
1952
 
1953
  #. translators: https:www.skyverge.com/for-translators-environments/
1954
- #: payment-gateway/class-sv-wc-payment-gateway.php:4055
1955
  msgctxt "software environment"
1956
  msgid "Production"
1957
  msgstr "Töö/avalik"
1958
 
1959
- #~ msgid "Dismiss"
1960
- #~ msgstr "Loobu"
 
 
 
 
1961
 
1962
  #~ msgid "(check number %s)"
1963
  #~ msgstr "(tšeki number %s)"
@@ -2012,9 +2193,6 @@ msgstr "Töö/avalik"
2012
  #~ "Kasutajale makseviisi poolt määratud kliendi tunnus %s keskkonnas. Muuda "
2013
  #~ "seda ainult siis, kui tõesti vajalik."
2014
 
2015
- #~ msgid "Payment Tokens"
2016
- #~ msgstr "Maksevahendid"
2017
-
2018
  #~ msgid "This customer has no saved payment tokens"
2019
  #~ msgstr "Sel kliendil ei ole salvestatud maksevahendeid"
2020
 
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "X-Generator: Poedit 1.8.11\n"
20
 
21
+ #: Lifecycle.php:394
22
  msgid "Awesome"
23
  msgstr ""
24
 
25
+ #: Lifecycle.php:395
26
  msgid "Fantastic"
27
  msgstr ""
28
 
29
+ #: Lifecycle.php:396
30
  msgid "Cowabunga"
31
  msgstr ""
32
 
33
+ #: Lifecycle.php:397
34
  msgid "Congratulations"
35
  msgstr ""
36
 
37
+ #: Lifecycle.php:398
38
  msgid "Hot dog"
39
  msgstr ""
40
 
41
  #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
42
  #. tag, %4$s - <a> tag, %5$s - </a> tag
43
+ #: Lifecycle.php:405
44
  msgid ""
45
  "Are you having a great experience with %1$s so far? Please consider "
46
  "%2$sleaving a review%3$s! If things aren't going quite as expected, we're "
47
  "happy to help -- please %4$sreach out to our support team%5$s."
48
  msgstr ""
49
 
50
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:182
51
  msgid ""
52
  "Thanks for installing %1$s! To get started, take a minute to %2$sread the "
53
  "documentation%3$s :)"
54
  msgstr ""
55
 
56
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:210
57
  msgid ""
58
  "Thanks for installing %1$s! To get started, take a minute to complete these "
59
  "%2$squick and easy setup steps%3$s :)"
60
  msgstr ""
61
 
62
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:235
63
  msgid "Setup"
64
  msgstr ""
65
 
66
  #. translators: Placeholders: %s - plugin name
67
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:303
68
  msgid "%s &rsaquo; Setup"
69
  msgstr ""
70
 
71
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:351
72
  #, fuzzy
73
  msgid "Oops! An error occurred, please try again."
74
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
75
 
76
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:489
77
+ msgid "Ready!"
78
  msgstr ""
79
 
80
  #. translators: Placeholder: %s - plugin name
81
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:582
82
  msgid "Welcome to %s!"
83
  msgstr ""
84
 
85
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:595
86
  msgid ""
87
  "This quick setup wizard will help you configure the basic settings and get "
88
  "you started."
89
  msgstr ""
90
 
91
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:609
92
  msgid "%s is ready!"
93
  msgstr ""
94
 
95
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:661
96
  msgid "Next step"
97
  msgstr ""
98
 
99
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:687
100
  msgid "You can also:"
101
  msgstr ""
102
 
103
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:731
104
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:761
105
  msgid "View the Docs"
106
  msgstr ""
107
 
108
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:732
109
  msgid "See more setup options"
110
  msgstr ""
111
 
112
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:733
113
  msgid "Learn more about customizing the plugin"
114
  msgstr ""
115
 
116
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:757
117
  msgid "Review Your Settings"
118
  msgstr ""
119
 
120
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:765
121
  msgid "Leave a Review"
122
  msgstr ""
123
 
124
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:789
 
125
  msgid "Continue"
126
  msgstr "Jätka"
127
 
128
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:949
129
  msgid "Return to the WordPress Dashboard"
130
  msgstr ""
131
 
132
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:951
133
  msgid "Not right now"
134
  msgstr ""
135
 
136
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:953
137
  msgid "Skip this step"
138
  msgstr ""
139
 
184
  msgid "Please %1$supdate WooCommerce%2$s"
185
  msgstr "Palun %1$suuenda WooCommerce'i%2$s"
186
 
187
+ #: class-sv-wc-plugin-compatibility.php:347
188
  msgid "WooCommerce"
189
  msgstr ""
190
 
191
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
192
  #. extension/comma-separated list of PHP extensions
193
+ #: class-sv-wc-plugin-dependencies.php:156
194
  msgid ""
195
  "%1$s requires the %2$s PHP extension to function. Contact your host or "
196
  "server administrator to install and configure the missing extension."
202
 
203
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
204
  #. function/comma-separated list of PHP functions
205
+ #: class-sv-wc-plugin-dependencies.php:184
206
  msgid ""
207
  "%1$s requires the %2$s PHP function to exist. Contact your host or server "
208
  "administrator to install and configure the missing function."
213
  msgstr[1] ""
214
 
215
  #. translators: Placeholders: %s - plugin name
216
+ #: class-sv-wc-plugin-dependencies.php:214
217
  msgid ""
218
  "%s may behave unexpectedly because the following PHP configuration settings "
219
  "are required:"
220
  msgstr ""
221
 
222
+ #: class-sv-wc-plugin-dependencies.php:228
223
  msgid "%s or higher"
224
  msgstr ""
225
 
226
+ #: class-sv-wc-plugin-dependencies.php:238
227
  msgid ""
228
  "Please contact your hosting provider or server administrator to configure "
229
  "these settings."
230
  msgstr ""
231
 
232
  #. translators: Placeholders: %1$s - <strong>, %2$s - </strong>
233
+ #: class-sv-wc-plugin-dependencies.php:260
234
  msgid ""
235
  "Hey there! We've noticed that your server is running %1$san outdated version "
236
  "of PHP%2$s, which is the programming language that WooCommerce and its "
244
  "resources to help you upgrade%5$s and to explain PHP versions further."
245
  msgstr ""
246
 
 
 
 
 
 
 
 
 
 
 
 
247
  #. translators: Placeholders: %s - plugin name
248
+ #: class-sv-wc-plugin.php:306
249
  msgid "You cannot clone instances of %s."
250
  msgstr "%s eksemplari ei saa kloonida."
251
 
252
  #. translators: Placeholders: %s - plugin name
253
+ #: class-sv-wc-plugin.php:317
254
  msgid "You cannot unserialize instances of %s."
255
  msgstr "%s eksemplari ei saa deserialiseerida (unserialize)."
256
 
257
+ #. translators: Placeholders: %1$s - plugin name, %2$s - WooCommerce version
258
+ #. number, %3$s - opening <a> HTML link tag, %4$s - closing </a> HTML link tag
259
+ #: class-sv-wc-plugin.php:573
260
+ msgid ""
261
+ "Heads up! %1$s will soon discontinue support for WooCommerce %2$s. Please "
262
+ "%3$supdate WooCommerce%4$s to take advantage of the latest updates and "
263
+ "features."
264
+ msgstr ""
265
+
266
  #. translators: Docs as in Documentation
267
+ #: class-sv-wc-plugin.php:616
268
  msgid "Docs"
269
  msgstr "Dokumentatsioon"
270
 
271
+ #: class-sv-wc-plugin.php:709
272
  msgid "%1$s - A minimum of %2$s is required."
273
  msgstr ""
274
 
275
+ #: class-sv-wc-plugin.php:718
276
  msgid "Set as %1$s - %2$s is required."
277
  msgstr ""
278
 
279
+ #: class-sv-wc-plugin.php:998
280
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:789
281
  msgid "Configure"
282
  msgstr "Seadista"
283
 
284
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:179
285
+ #, fuzzy
286
+ msgid ""
287
+ "There was a problem processing your order and it is being placed on hold for "
288
+ "review. Please contact us to complete the transaction."
289
+ msgstr ""
290
+ "Tellimus on pandud ülevaatuseks ootele. Tehingu sooritamiseks võta palun "
291
+ "meiega ühendust."
292
+
293
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:217
294
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2813
295
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:489
296
+ msgid ""
297
+ "An error occurred, please try again or try an alternate form of payment."
298
+ msgstr "Esines viga, palun proovi uuesti või kasuta teistsugust makseviisi."
299
+
300
+ #. translators: Placeholders: %s - a WooCommerce order ID
301
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:320
302
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:445
303
+ msgid "Could not find order %s"
304
+ msgstr ""
305
+
306
+ #. translators: Placeholders: %1$s - status code, %2$s - status message
307
+ #. translators: Placeholders: %1$s - payment request response status code, %2$s
308
+ #. - payment request response status message
309
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:152
310
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2406
311
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:165
312
+ msgid "Status code %1$s: %2$s"
313
+ msgstr "Staatuse kood %1$s: %2$s"
314
+
315
+ #. translators: Placeholders: %s - status code
316
+ #. translators: Placeholders: %s - payment request response status code
317
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:155
318
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2409
319
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:168
320
+ msgid "Status code: %s"
321
+ msgstr "Staatuse kood: %s"
322
+
323
+ #. translators: Placeholders; %s - status message
324
+ #. translators: Placeholders: %s - payment request response status message
325
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:158
326
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2412
327
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:171
328
+ msgid "Status message: %s"
329
+ msgstr "Staatuse teade: %s"
330
+
331
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:163
332
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2417
333
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:178
334
+ msgid "Transaction ID %s"
335
+ msgstr "Tehingu ID %s"
336
+
337
+ #. translators: Placeholders: %s - payment gateway title (such as
338
+ #. Authorize.net, Braintree, etc)
339
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:204
340
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:509
341
+ msgid "%s duplicate transaction received"
342
+ msgstr "%s: duplikaattehing"
343
+
344
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:207
345
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:512
346
+ msgid "Order %s is already paid for."
347
+ msgstr ""
348
+
349
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:267
350
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2749
351
+ msgid ""
352
+ "Your order has been received and is being reviewed. Thank you for your "
353
+ "business."
354
+ msgstr ""
355
+ "Sinu tellimus on vastu võetud ja on ülevaatamisel. Täname koostöö eest."
356
+
357
+ #. translators: This is a message describing that the transaction in question
358
+ #. only performed a credit card authorization and did not capture any funds.
359
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:274
360
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:861
361
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1784
362
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:370
363
+ msgid "Authorization only transaction"
364
+ msgstr "Autoriseerimise tehing"
365
+
366
+ #. translators: Placeholders: %s - payment gateway title
367
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:364
368
+ #, fuzzy
369
+ msgid "%s Transaction Held for Review"
370
+ msgstr "%1$s: tehning pandi ülevaatuseks ootele (%2$s)"
371
+
372
+ #. translators: Placeholders: %s - payment gateway title
373
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:435
374
+ #, fuzzy
375
+ msgid "%s Payment Failed"
376
+ msgstr "%1$s: makse ebaõnnestus (%2$s)"
377
+
378
+ #. translators: Placeholders: %s - payment gateway title
379
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:462
380
+ #, fuzzy
381
+ msgid "%s Transaction Cancelled"
382
+ msgstr "%1$s: tehing tühistatud (%2$s)"
383
+
384
+ #: payment-gateway/Handlers/Capture.php:158
385
+ msgid "Order cannot be captured"
386
+ msgstr ""
387
+
388
+ #: payment-gateway/Handlers/Capture.php:163
389
+ msgid "Transaction authorization has expired"
390
+ msgstr ""
391
+
392
+ #: payment-gateway/Handlers/Capture.php:168
393
+ msgid "Transaction has already been fully captured"
394
+ msgstr ""
395
+
396
+ #: payment-gateway/Handlers/Capture.php:173
397
+ #, fuzzy
398
+ msgid "Transaction cannot be captured"
399
+ msgstr "Tehingu tüüp"
400
+
401
+ #. translators: Placeholders: %1$s - payment gateway title (such as
402
+ #. Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions:
403
+ #. Capture, as in capture funds from a credit card.
404
+ #: payment-gateway/Handlers/Capture.php:189
405
+ msgid "%1$s Capture of %2$s Approved"
406
+ msgstr "%1$s: tasumine summas %2$s kinnitatud"
407
+
408
+ #. translators: Placeholders: %s - transaction ID
409
+ #: payment-gateway/Handlers/Capture.php:198
410
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:680
411
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:765
412
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2085
413
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2318
414
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2630
415
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2675
416
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:353
417
+ msgid "(Transaction ID %s)"
418
+ msgstr "(Tehingu ID %s)"
419
+
420
+ #. translators: Placeholders: %1$s - payment gateway title (such as
421
+ #. Authorize.net, Braintree, etc), %2$s - failure message. Definitions:
422
+ #. "capture" as in capturing funds from a credit card.
423
+ #: payment-gateway/Handlers/Capture.php:229
424
+ msgid "%1$s Capture Failed: %2$s"
425
+ msgstr "%1$s: makse teostamine ebaõnnestus: %2$s"
426
+
427
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:120
428
  #, fuzzy
429
  msgid ""
430
  "Are you sure you wish to process this capture? The action cannot be undone."
432
  "Oled kindel, et soovid seda teha? Muudatust ei rakendata enne kui klikid "
433
  "\"Uuenda\""
434
 
435
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:123
436
  msgid ""
437
  "Something went wrong, and the capture could no be completed. Please try "
438
  "again."
442
  #. amount has been pre-authorized before, but funds have not yet been captured
443
  #. (taken) from the card. Capturing the charge will take the money from the
444
  #. credit card and put it in the merchant's pockets.
445
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:167
446
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:242
447
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:305
448
  msgid "Capture Charge"
449
  msgstr "Teosta makse"
450
 
451
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:295
452
  msgid "This charge has been fully captured."
453
  msgstr ""
454
 
455
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:297
456
  msgid "This charge can no longer be captured."
457
  msgstr ""
458
 
459
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:299
460
  msgid "This charge cannot be captured."
461
  msgstr ""
462
 
463
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:91
464
  msgid "Are you sure you want to remove this token?"
465
  msgstr ""
466
 
467
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:101
468
  msgid "Invalid token data"
469
  msgstr ""
470
 
471
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:105
472
  #, fuzzy
473
  msgid "An error occurred. Please try again."
474
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
475
 
476
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:454
477
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:305
478
  msgid "(%s)"
479
  msgstr ""
480
 
481
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:484
482
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:754
483
  msgid "Default"
484
  msgstr ""
485
 
486
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:520
487
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:553
488
  msgid "Token ID"
489
  msgstr ""
490
 
491
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:525
492
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:300
493
  msgid "Card Type"
494
  msgstr "Kaardi tüüp"
495
 
496
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:530
497
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:566
498
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:192
499
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:298
500
  msgid "Last Four"
501
  msgstr "Viimased 4 numbrit"
502
 
503
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:537
504
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:358
505
  msgid "Expiration (MM/YY)"
506
  msgstr "Aegub (KK/AA)"
507
 
508
  #. translators: e-check account type, HTML form field label
509
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:558
510
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:466
511
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:299
512
  msgid "Account Type"
513
  msgstr "Konto tüüp"
514
 
515
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:561
516
  msgid "Checking"
517
  msgstr ""
518
 
519
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:562
520
  msgid "Savings"
521
  msgstr ""
522
 
523
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:663
524
  msgid "Refresh"
525
  msgstr ""
526
 
527
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:665
528
  msgid "Add New"
529
  msgstr ""
530
 
531
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:668
532
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:849
533
  msgid "Save"
534
  msgstr ""
535
 
536
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:691
537
  msgid "Remove"
538
  msgstr ""
539
 
540
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:224
541
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:209
542
  msgid "%s Payment Tokens"
543
  msgstr "%s maksevahendid"
544
 
545
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:302
546
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:779
547
  msgid "Customer ID"
548
  msgstr "Kliendi ID"
549
 
552
  msgstr ""
553
 
554
  #. translators: environment as in a software environment (test/production)
555
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:53
556
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1313
557
  msgid "Environment"
558
  msgstr "Keskkond"
559
 
560
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:54
561
  msgid "The transaction environment for this gateway."
562
  msgstr ""
563
 
564
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:61
565
  msgid "Tokenization Enabled"
566
  msgstr ""
567
 
568
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:62
569
  msgid "Displays whether or not tokenization is enabled for this gateway."
570
  msgstr ""
571
 
572
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:75
573
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1243
574
  msgid "Debug Mode"
575
  msgstr "Veaotsingu režiim"
576
 
577
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:76
578
  msgid "Displays whether or not debug logging is enabled for this gateway."
579
  msgstr ""
580
 
581
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:79
582
  msgid "Display at Checkout & Log"
583
  msgstr ""
584
 
585
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:81
586
  msgid "Display at Checkout"
587
  msgstr ""
588
 
589
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:83
590
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1251
591
  msgid "Save to Log"
592
  msgstr "Salvesta logifaili"
593
 
594
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:85
595
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1249
596
  msgid "Off"
597
  msgstr "Välja lülitatud"
598
 
624
  msgstr "Teosta makse"
625
 
626
  #: payment-gateway/admin/views/html-order-partial-capture.php:66
627
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:288
628
  #, fuzzy
629
  msgid "Cancel"
630
  msgstr "Tühista tellimus"
643
  "Kasutajale makseviisi poolt määratud kliendi tunnus. Muuda seda ainult siis, "
644
  "kui tõesti vajalik."
645
 
646
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99
647
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:186
648
  msgid "An error occurred, please try again or try an alternate form of payment"
649
  msgstr "Esines viga, palun proovi uuesti või kasuta teistsugust makseviisi"
650
 
651
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:100
652
  msgid ""
653
  "We cannot process your order with the payment information that you provided. "
654
  "Please use a different payment account or an alternate payment method."
656
  "Me ei saa sinu tellimust antud makseinfo alusel töödelda. Palun kasuta teist "
657
  "maksekontot või teistsugust makseviisi."
658
 
659
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:101
660
  msgid ""
661
  "This order is being placed on hold for review. Please contact us to complete "
662
  "the transaction."
664
  "Tellimus on pandud ülevaatuseks ootele. Tehingu sooritamiseks võta palun "
665
  "meiega ühendust."
666
 
667
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106
668
  msgid ""
669
  "This order is being placed on hold for review due to an incorrect card "
670
  "verification number. You may contact the store to complete the transaction."
672
  "Tellimus pandi ootele, kuna kaardi turvakood oli vale. Tehingu "
673
  "lõpuleviimiseks võid poega ühendust võtta."
674
 
675
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:107
676
  msgid "The card verification number is invalid, please try again."
677
  msgstr "Kaardi turvakood on vale, palun proovi uuesti."
678
 
679
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:108
680
  msgid "Please enter your card verification number and try again."
681
  msgstr "Palun sisesta oma kaardi turvakood ja proovi uuesti."
682
 
683
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111
684
  msgid ""
685
  "That card type is not accepted, please use an alternate card or other form "
686
  "of payment."
688
  "Sellist tüüpi kaarti ei võeta vastu, palun proovi mõnda teist kaarti või "
689
  "teistsugust makseviisi."
690
 
691
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:112
692
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116
693
  msgid ""
694
  "The card type is invalid or does not correlate with the credit card number. "
695
  "Please try again or use an alternate card or other form of payment."
697
  "Kaardi tüüp on vigane või ei vasta kaardi numbrile. Palun proovi uuesti, "
698
  "proovi mõnda teist kaarti või teistsugust makseviisi."
699
 
700
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:113
701
  msgid "Please select the card type and try again."
702
  msgstr "Palun vali kaardi tüüp ja proovi uuesti."
703
 
704
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:117
705
  msgid "The card number is invalid, please re-enter and try again."
706
  msgstr "Kaardi number on vigane, palun sisesta uuesti ja proovi veelkord."
707
 
708
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:118
709
  msgid "Please enter your card number and try again."
710
  msgstr "Palun sisesta oma kaardi number ja proovi uuesti."
711
 
712
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121
713
  msgid "The card expiration date is invalid, please re-enter and try again."
714
  msgstr ""
715
  "Kaardi aegumiskuupäev on vale, palun sisesta uuesti ja proovi veelkord."
716
 
717
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122
718
  msgid "The card expiration month is invalid, please re-enter and try again."
719
  msgstr "Kaardi aegumise kuu on vale, palun sisesta uuesti ja proovi veelkord."
720
 
721
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:123
722
  msgid "The card expiration year is invalid, please re-enter and try again."
723
  msgstr ""
724
  "Kaardi aegumise aasta on vale, palun sisesta uuesti ja proovi veelkord."
725
 
726
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:124
727
  msgid "Please enter your card expiration date and try again."
728
  msgstr "Palun sisesta oma kaardi aegumiskuupäev ja proovi uuesti."
729
 
730
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:127
731
  msgid "The bank routing number is invalid, please re-enter and try again."
732
  msgstr ""
733
  "Panga suunakood ei ole korrektne, palun sisesta uuesti ja proovi veelkord."
734
 
735
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:128
736
  msgid "The bank account number is invalid, please re-enter and try again."
737
  msgstr ""
738
  "Pangakonto number ei ole korrektne, palun sisesta uuesti ja proovi veelkord."
739
 
740
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131
741
  msgid ""
742
  "The provided card is expired, please use an alternate card or other form of "
743
  "payment."
745
  "Antud kaart on aegunud, palun kasuta mõnda teist kaarti või teistsugust "
746
  "makseviisi."
747
 
748
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132
749
  msgid ""
750
  "The provided card was declined, please use an alternate card or other form "
751
  "of payment."
753
  "Antud kaart klükati tagasi, palun kasuta mõnda teist kaarti või teistsugust "
754
  "makseviisi."
755
 
756
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133
757
  msgid ""
758
  "Insufficient funds in account, please use an alternate card or other form of "
759
  "payment."
761
  "Kontol pole piisavalt vahendeid, palun kasuta mõnda teist kaarti või "
762
  "teistsugust makseviisi."
763
 
764
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134
765
  msgid ""
766
  "The card is inactivate or not authorized for card-not-present transactions, "
767
  "please use an alternate card or other form of payment."
769
  "Antud kaart ei ole aktiveeritud või ei ole sellega internetimaksed lubatud. "
770
  "Palun kasuta mõnda teist kaarti või teistsugust makseviisi."
771
 
772
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135
773
  msgid ""
774
  "The credit limit for the card has been reached, please use an alternate card "
775
  "or other form of payment."
777
  "Kaardi krediitilimiit on ära kasutatud, palun kasuta mõnda teist kaarti või "
778
  "teistsugust makseviisi."
779
 
780
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:136
781
  msgid ""
782
  "The card verification number does not match. Please re-enter and try again."
783
  msgstr "Kaardi turvakood ei klapi. Palun sisesta uuesti ja proovi veelkord."
784
 
785
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:137
786
  msgid ""
787
  "The provided address does not match the billing address for cardholder. "
788
  "Please verify the address and try again."
790
  "Antud aadress ei kattu kaardi omaniku aadressiga. Palun kontrolli, et "
791
  "sisestaid õige aadressi ning proovi uuesti."
792
 
793
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:84
794
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:102
795
  msgid "Apple Pay"
796
  msgstr ""
797
 
798
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:108
799
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1189
800
  msgid "Enable / Disable"
801
  msgstr "Luba / Keela"
802
 
803
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:109
804
  msgid "Accept Apple Pay"
805
  msgstr ""
806
 
807
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:116
808
  msgid "Allow Apple Pay on"
809
  msgstr ""
810
 
811
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:126
812
  msgid "Button Style"
813
  msgstr ""
814
 
815
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:129
816
  msgid "Black"
817
  msgstr ""
818
 
819
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:130
820
  msgid "White"
821
  msgstr ""
822
 
823
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:131
824
  msgid "White with outline"
825
  msgstr ""
826
 
827
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:143
828
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1364
829
  msgid "Connection Settings"
830
  msgstr ""
831
 
832
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:152
833
  msgid "Apple Merchant ID"
834
  msgstr ""
835
 
836
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:156
837
  msgid "This is found in your %1$sApple developer account%2$s"
838
  msgstr ""
839
 
840
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:166
841
  msgid "Certificate Path"
842
  msgstr ""
843
 
844
  #. translators: Placeholders: %s - the server's web root path
845
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:171
846
  msgid "For reference, your current web root path is: %s"
847
  msgstr ""
848
 
849
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:184
850
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:194
851
  msgid "Processing Gateway"
852
  msgstr ""
853
 
854
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:202
855
  #, fuzzy
856
  msgid "Test Mode"
857
  msgstr "Veaotsingu režiim"
858
 
859
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:203
860
  msgid ""
861
  "Enable to test Apple Pay functionality throughout your sites without "
862
  "processing real payments."
863
  msgstr ""
864
 
865
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:312
866
  msgid "Your site must be served over HTTPS with a valid SSL certificate."
867
  msgstr ""
868
 
869
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
870
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
871
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:322
872
  msgid ""
873
  "Accepts payment in %1$s only. %2$sConfigure%3$s WooCommerce to accept %1$s "
874
  "to enable Apple Pay."
878
  msgstr[0] ""
879
  msgstr[1] ""
880
 
881
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:341
882
  msgid ""
883
  "Your %1$sMerchant Identity Certificate%2$s cannot be found. Please check "
884
  "your path configuration."
885
  msgstr ""
886
 
887
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:348
888
  msgid "Apple Pay is disabled."
889
  msgstr ""
890
 
891
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:387
892
  msgid "Single products"
893
  msgstr ""
894
 
895
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:388
896
  msgid "Cart"
897
  msgstr ""
898
 
899
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:389
900
  #, fuzzy
901
  msgid "Checkout"
902
  msgstr "E-tšekk"
903
 
904
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:300
905
  msgid "Buy with"
906
  msgstr ""
907
 
908
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:333
909
+ msgid ""
910
+ "By submitting your payment, you agree to our %1$sterms and conditions%2$s."
911
+ msgstr ""
912
 
913
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:558
914
  msgid "or"
915
  msgstr ""
916
 
917
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:123
918
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:136
919
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:140
 
 
 
 
 
920
  msgid "Error %d: Unable to create order. Please try again."
921
  msgstr ""
922
 
923
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:154
924
  msgid "Apple Pay payment authorized."
925
  msgstr ""
926
 
927
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:188
928
  #, fuzzy
929
  msgid "Apple Pay payment failed. %s"
930
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
931
 
932
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:566
933
  msgid "Subtotal"
934
  msgstr ""
935
 
936
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:576
937
  #, fuzzy
938
  msgid "Discount"
939
  msgstr "Konto"
940
 
941
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:586
942
  msgid "Shipping"
943
  msgstr ""
944
 
945
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:596
946
  msgid "Fees"
947
  msgstr ""
948
 
949
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:606
950
  msgid "Taxes"
951
  msgstr ""
952
 
953
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:61
954
  msgid ""
955
  "Payment error, please try another payment method or contact us to complete "
956
  "your transaction."
957
  msgstr ""
958
  "Viga maksega, palun proovi teistsugust makseviisi või võta meiega ühendust."
959
 
960
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:161
961
+ #: payment-gateway/class-sv-wc-payment-gateway.php:487
962
  msgid "Card expiration date is invalid"
963
  msgstr "Kaardi aegumiskuupäev ei ole korrektne"
964
 
965
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:185
966
+ #: payment-gateway/class-sv-wc-payment-gateway.php:480
967
  msgid "Card number is missing"
968
  msgstr "Kaardi number on puudu"
969
 
970
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:191
971
+ #: payment-gateway/class-sv-wc-payment-gateway.php:483
972
  msgid "Card number is invalid (wrong length)"
973
  msgstr "Kaardi number ei ole korrektne (pikkus on vale)"
974
 
975
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:196
976
+ #: payment-gateway/class-sv-wc-payment-gateway.php:482
977
  msgid "Card number is invalid (only digits allowed)"
978
  msgstr "Kaardi number ei ole korrektne (lubatud on ainult numbrid)"
979
 
980
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:201
981
+ #: payment-gateway/class-sv-wc-payment-gateway.php:481
982
  msgid "Card number is invalid"
983
  msgstr "Kaardi number ei ole korrektne"
984
 
985
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:228
986
+ #: payment-gateway/class-sv-wc-payment-gateway.php:485
987
  msgid "Card security code is invalid (only digits are allowed)"
988
  msgstr "Kaardi turvakood ei ole korrektne (lubatud on ainult numbrid)"
989
 
990
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:234
991
+ #: payment-gateway/class-sv-wc-payment-gateway.php:486
992
  msgid "Card security code is invalid (must be 3 or 4 digits)"
993
  msgstr "Kaardi turvakood ei ole korrektne (peab olema 3 või 4 numbrit)"
994
 
995
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:240
996
+ #: payment-gateway/class-sv-wc-payment-gateway.php:484
997
  msgid "Card security code is missing"
998
  msgstr "Kaardi turvakood on puudu"
999
 
1000
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:267
1001
+ #: payment-gateway/class-sv-wc-payment-gateway.php:496
1002
  msgid "Routing Number is missing"
1003
  msgstr "Suunakood on puudu"
1004
 
1005
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:274
1006
+ #: payment-gateway/class-sv-wc-payment-gateway.php:497
1007
  msgid "Routing Number is invalid (only digits are allowed)"
1008
  msgstr "Suunakood ei ole korrektne (lubatud on ainult numbrid)"
1009
 
1010
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:280
1011
+ #: payment-gateway/class-sv-wc-payment-gateway.php:498
1012
  msgid "Routing number is invalid (must be 9 digits)"
1013
  msgstr "Suunakood ei ole korrektne (peab olemas 9 numbrit)"
1014
 
1015
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:289
1016
+ #: payment-gateway/class-sv-wc-payment-gateway.php:493
1017
  msgid "Account Number is missing"
1018
  msgstr "Konto number on puudu"
1019
 
1020
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:296
1021
+ #: payment-gateway/class-sv-wc-payment-gateway.php:494
1022
  msgid "Account Number is invalid (only digits are allowed)"
1023
  msgstr "Konto number ei ole korrektne (lubatud on ainult numbrid)"
1024
 
1025
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:302
1026
+ #: payment-gateway/class-sv-wc-payment-gateway.php:495
1027
  msgid "Account number is invalid (must be between 5 and 17 digits)"
1028
  msgstr "Konto number ei ole korrektne (peab olemas 5-17 numbrit)"
1029
 
1030
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:309
1031
+ #: payment-gateway/class-sv-wc-payment-gateway.php:492
1032
  msgid "Drivers license number is invalid"
1033
  msgstr "Juhiloa number ei ole korrektne"
1034
 
1035
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:315
1036
+ #: payment-gateway/class-sv-wc-payment-gateway.php:488
1037
  msgid "Check Number is invalid (only digits are allowed)"
1038
  msgstr "Tšeki number ei ole korrektne (lubatud on ainult numbrid)"
1039
 
1040
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:494
1041
+ #, fuzzy
1042
+ msgid "Unknown error"
1043
+ msgstr "Esines tundmatu viga"
1044
+
1045
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:503
1046
+ #, fuzzy
1047
+ msgid "Payment method address could not be updated. %s"
1048
+ msgstr "Maksevahend kustutatud."
1049
+
1050
  #. translators: Placeholders: %1$s - payment method title, %2$s - payment
1051
  #. account type (savings/checking) (may or may not be available), %3$s - last
1052
  #. four digits of the account
1053
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:670
1054
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2665
1055
  msgid "%1$s Check Transaction Approved: %2$s account ending in %3$s"
1056
  msgstr "%1$s: tšeki tehing vastu võetud: %2$s konto, lõpeb numbritega %3$s"
1057
 
1058
  #. translators: Placeholders: %s - check number
1059
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:675
1060
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2670
1061
  msgid "Check number %s"
1062
  msgstr "Tšeki number %s"
1063
 
 
 
 
 
 
 
 
 
 
 
 
 
1064
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1065
  #. ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type
1066
  #. (mastercard, visa, ...), %5$s - last four digits of the card
1067
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:744
1068
  #, fuzzy
1069
  msgid "%1$s %2$s %3$s Approved: %4$s ending in %5$s"
1070
  msgstr "%1$s %2$s: %3$s kinnitatud: %4$s lõpeb numbritega %5$s (aegub %6$s)"
1071
 
1072
  #. translators: Placeholders: %s - expiry date
1073
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:757
1074
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:714
1075
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2622
1076
  msgid "(expires %s)"
1077
  msgstr "(aegub %s)"
1078
 
1079
  #. translators: Placeholders: %s - failure message
1080
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:829
1081
  msgid "Tokenization Request Failed: %s"
1082
  msgstr "Maksevahendi salvestamise päring ebaõnnestus: %s"
1083
 
1084
  #. translators: Placeholders: %1$s - payment method title, %2$s - failure
1085
  #. message
1086
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:840
1087
  msgid "%1$s Tokenization Request Failed: %2$s"
1088
  msgstr "%1$s: maksevahendi salvestamise päring ebaõnnestus: %2$s"
1089
 
 
 
 
 
 
 
 
 
1090
  #. translators: Placeholders: %s - failure message. Payment method as in a
1091
  #. specific credit card, e-check or bank account
1092
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:898
1093
  msgid "Oops, adding your new payment method failed: %s"
1094
  msgstr "Oih, sinu maksevahendi lisamine ebaõnnestus: %s"
1095
 
1096
  #. translators: Payment method as in a specific credit card. Placeholders: %1$s
1097
  #. - card type (visa, mastercard, ...), %2$s - last four digits of the card,
1098
  #. %3$s - card expiry date
1099
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:939
1100
  msgid "Nice! New payment method added: %1$s ending in %2$s (expires %3$s)"
1101
  msgstr ""
1102
  "Lahe! Uus maksevahend lisatud: %1$s, lõpeb numbritega %2$s (aegub %3$s)"
1104
  #. translators: Payment method as in a specific e-check account. Placeholders:
1105
  #. %1$s - account type (checking/savings), %2$s - last four digits of the
1106
  #. account
1107
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:949
1108
  msgid "Nice! New payment method added: %1$s account ending in %2$s"
1109
  msgstr "Lahe! Uus maksevahend lisatud: %1$s konto, lõpeb numbritega %2$s"
1110
 
1111
  #. translators: Payment method as in a specific credit card, e-check or bank
1112
  #. account
1113
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:956
1114
  msgid "Nice! New payment method added."
1115
  msgstr "Lahe! Uus maksevahend lisatud."
1116
 
1117
  #. translators: Placeholders: %1$s - site title, %2$s - customer email. Payment
1118
  #. method as in a specific credit card, e-check or bank account
1119
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:1079
1120
  msgid "%1$s - Add Payment Method for %2$s"
1121
  msgstr "%1$s - Lisa maksevahend kliendile %2$s"
1122
 
1123
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:180
1124
  msgid "PayPal"
1125
  msgstr "PayPal"
1126
 
1127
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:181
1128
  msgid "Checking Account"
1129
  msgstr "Tšekikonto"
1130
 
1131
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:182
1132
  msgid "Savings Account"
1133
  msgstr "Hoiuarve"
1134
 
1135
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:183
1136
  msgid "Credit / Debit Card"
1137
  msgstr "Deebet- või krediitkaart"
1138
 
1139
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:184
1140
  msgid "Bank Account"
1141
  msgstr "Pangakonto"
1142
 
1143
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:297
1144
  msgid "Thank you for your order, please click the button below to pay."
1145
  msgstr "Aitäh tellimuse eest. Palun kliki maksmiseks alloleval nupul."
1146
 
1147
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:298
1148
  msgid ""
1149
  "Thank you for your order. We are now redirecting you to complete payment."
1150
  msgstr "Aitäh tellimuse eest. Makse teostamiseks suunatakse sind nüüd edasi."
1151
 
1152
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:299
1153
  msgid "Pay Now"
1154
  msgstr "Maksa"
1155
 
1156
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:300
1157
  msgid "Cancel Order"
1158
  msgstr "Tühista tellimus"
1159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1160
  #. translators: Placeholders: %1$s - payment gateway title (such as
1161
  #. Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank
1162
  #. account, etc), %3$s - last four digits of the card/account, %4$s -
1163
  #. card/account expiry date
1164
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:597
1165
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:834
1166
  msgid "%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)"
1167
  msgstr ""
1168
  "%1$s: maksevahend salvestatud: %2$s lõpeb numbritega in %3$s (aegub %4$s)"
1170
  #. translators: Placeholders: %1$s - payment gateway title (such as CyberSouce,
1171
  #. NETbilling, etc), %2$s - account type (checking/savings - may or may not be
1172
  #. available), %3$s - last four digits of the account
1173
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:608
1174
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:845
1175
  msgid "%1$s eCheck Payment Method Saved: %2$s account ending in %3$s"
1176
  msgstr ""
1177
  "%1$s: e-tšeki maksevahend salvestatud: %2$s konto, lõpeb numbritega %3$s"
1178
 
1179
  #. translators: Placeholders: %s - payment gateway title (such as CyberSouce,
1180
  #. NETbilling, etc)
1181
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:617
1182
  #, fuzzy
1183
  msgid "%s Payment Method Saved"
1184
  msgstr "Minu maksevahendid."
1185
 
1186
  #. translators: Placeholders: %s - a failed tokenization API error
1187
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:626
1188
  #, fuzzy
1189
  msgid "Tokenization failed. %s"
1190
  msgstr "Maksevahendi salvestamise päring ebaõnnestus: %s"
1191
 
1192
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:287
1193
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:848
1194
  msgid "Edit"
1195
  msgstr ""
1196
 
1197
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:289
1198
  #, fuzzy
1199
  msgid ""
1200
  "Oops, there was an error updating your payment method. Please try again."
1201
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
1202
 
1203
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:290
1204
  msgid "Are you sure you want to delete this payment method?"
1205
  msgstr "Oled sa kindel, et soovid selle maksevahendi kustutada?"
1206
 
1207
  #. translators: Payment method as in a specific credit card, eCheck or bank
1208
  #. account
1209
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:377
1210
  msgid "You do not have any saved payment methods."
1211
  msgstr "Sul ei ole salvestatud maksevahendeid."
1212
 
1213
  #. translators: Payment method as in a specific credit card, eCheck or bank
1214
  #. account
1215
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:416
1216
  msgid "My Payment Methods"
1217
  msgstr "Minu maksevahendid."
1218
 
1219
  #. translators: Payment method as in a specific credit card, e-check or bank
1220
  #. account
1221
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:424
1222
  msgid "Add New Payment Method"
1223
  msgstr "Lisa uus maksevahend"
1224
 
1225
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:512
1226
  msgid "Method"
1227
  msgstr "Maksevahend"
1228
 
1229
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:513
1230
  msgid "Details"
1231
  msgstr ""
1232
 
1233
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:514
1234
  msgid "Expires"
1235
  msgstr "Aegub"
1236
 
1237
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:515
1238
  #, fuzzy
1239
  msgid "Default?"
1240
  msgstr "(vaikimisi)"
1241
 
1242
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:516
1243
  msgid "Actions"
1244
  msgstr ""
1245
 
1246
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:552
1247
  msgid "Credit/Debit Cards"
1248
  msgstr "Deebet- ja krediitkaardid"
1249
 
1250
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:561
1251
  msgid "Bank Accounts"
1252
  msgstr "Pangakontod"
1253
 
1254
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:616
1255
  msgid "N/A"
1256
  msgstr "-"
1257
 
1258
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:728
1259
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:200
1260
  msgid "Nickname"
1261
  msgstr ""
1262
 
1263
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:909
1264
  msgid "Delete"
1265
  msgstr "Kustuta"
1266
 
1267
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1063
1268
  msgid "Oops, you took too long, please try again."
1269
  msgstr "Oih, sul läks liiga kaua aega - palun proovi uuesti."
1270
 
1271
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1076
1272
  msgid "There was an error with your request, please try again."
1273
  msgstr "Sinu päringuga esines viga, palun proovi uuesti."
1274
 
1275
  #. translators: Payment method as in a specific credit card, e-check or bank
1276
  #. account
1277
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1089
1278
  msgid "Error removing payment method"
1279
  msgstr "Viga maksevahendi eemaldamisel"
1280
 
1281
  #. translators: Payment method as in a specific credit card, e-check or bank
1282
  #. account
1283
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1094
1284
  msgid "Payment method deleted."
1285
  msgstr "Maksevahend kustutatud."
1286
 
1287
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:340
1288
  msgid "Card Number"
1289
  msgstr "Kaardi number"
1290
 
1291
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:361
1292
  msgid "MM / YY"
1293
  msgstr "KK / AA"
1294
 
1295
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:380
1296
  msgid "Card Security Code"
1297
  msgstr "Kaardi turvakood"
1298
 
1299
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:383
1300
  msgid "CSC"
1301
  msgstr "Turvakood"
1302
 
1303
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:423
1304
  msgid "Where do I find this?"
1305
  msgstr "Kust ma selle leian?"
1306
 
1307
  #. translators: e-check routing number, HTML form field label,
1308
  #. https:en.wikipedia.org/wiki/Routing_transit_number
1309
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:429
1310
  msgid "Routing Number"
1311
  msgstr "Suunakood"
1312
 
1313
  #. translators: e-check account number, HTML form field label
1314
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:448
1315
  msgid "Account Number"
1316
  msgstr "Kontonumber"
1317
 
1318
  #. translators: Test mode refers to the current software environment
1319
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:514
1320
  msgid "TEST MODE ENABLED"
1321
  msgstr "TESTREŽIIM SISSE LÜLITATUD"
1322
 
1323
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:541
1324
+ #, fuzzy
1325
+ msgid "Sample Check"
1326
+ msgstr "E-tšekk"
1327
+
1328
  #. translators: Payment method as in a specific credit card, eCheck or bank
1329
  #. account
1330
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:616
1331
  msgid "Manage Payment Methods"
1332
  msgstr "Halda maksevahendeid"
1333
 
1334
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:753
1335
  msgid "Use a new card"
1336
  msgstr "Kasuta uut kaarti"
1337
 
1338
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:753
1339
  msgid "Use a new bank account"
1340
  msgstr "Kasuta uut pangakontot"
1341
 
1342
  #. translators: account as in customer's account on the eCommerce site
1343
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:816
1344
  msgid "Securely Save to Account"
1345
  msgstr "Salvesta turvaliselt oma kontole"
1346
 
1347
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:950
1348
+ #, fuzzy
1349
+ msgid "Payment Info"
1350
+ msgstr "Maksevahendid"
1351
+
1352
+ #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
1353
+ #. tag
1354
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:619
1355
+ #, fuzzy
1356
  msgid ""
1357
+ "%1$s: WooCommerce is not being forced over SSL; your customers' payment data "
1358
+ "may be at risk. %2$sVerify your site URLs here%3$s"
1359
  msgstr ""
1360
  "%s: WooCommerce'i ei sunnita SSLi kasutama; sinu klientide andmed võivad "
1361
  "olla ohus."
1362
 
1363
  #. translators: Placeholders: %s - payment gateway name
1364
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:636
1365
  msgid ""
1366
  "%s will soon require TLS 1.2 support to process transactions and your server "
1367
  "environment may need to be updated. Please contact your hosting provider to "
1371
 
1372
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
1373
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
1374
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:692
1375
  msgid ""
1376
  "%1$s accepts payment in %2$s only. %3$sConfigure%4$s WooCommerce to accept "
1377
  "%2$s to enable this gateway for checkout."
1381
  msgstr[0] ""
1382
  msgstr[1] ""
1383
 
1384
+ #. translators: Placeholders: %1$s - payment gateway name, %2$s - opening <a>
1385
+ #. tag, %3$s - closing </a> tag
1386
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:727
1387
+ msgid ""
1388
+ "Heads up! %1$s is currently configured to log transaction data for debugging "
1389
+ "purposes. If you are not experiencing any problems with payment processing, "
1390
+ "we recommend %2$sturning off Debug Mode%3$s"
1391
+ msgstr ""
1392
+
1393
+ #. translators: Placeholders: %s - gateway name
1394
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:778
1395
+ msgid "%s is not configured"
1396
+ msgstr ""
1397
+
1398
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:790
1399
+ msgid "Dismiss"
1400
+ msgstr "Loobu"
1401
+
1402
+ #. translators: Placeholders: %1$s - plugin name, %2$s - opening <a> HTML link
1403
+ #. tag, %3$s - closing </a> HTML link tag
1404
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:827
1405
+ msgid ""
1406
+ "Heads up! Apple Pay for %1$s requires WooCommerce version 3.2 or greater. "
1407
+ "Please %2$supdate WooCommerce%3$s."
1408
+ msgstr ""
1409
+
1410
  #. translators: Placeholders: %1$s - payment gateway title (such as
1411
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1412
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:863
1413
  msgid ""
1414
  "%1$s is inactive for subscription transactions. Please %2$senable "
1415
  "tokenization%3$s to activate %1$s for Subscriptions."
1420
 
1421
  #. translators: Placeholders: %1$s - payment gateway title (such as
1422
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1423
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:881
1424
  msgid ""
1425
  "%1$s is inactive for pre-order transactions. Please %2$senable tokenization"
1426
  "%3$s to activate %1$s for Pre-Orders."
1429
  "maksevahendite salvestamine%3$s sisse, et aktiveerida %1$s Eeltellimuste "
1430
  "(Pre-Orders) jaoks."
1431
 
1432
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:918
1433
  msgid ""
1434
  "You must enable tokenization for this gateway in order to support automatic "
1435
  "renewal payments with the WooCommerce Subscriptions extension."
1436
  msgstr ""
1437
 
1438
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:919
1439
  msgid "Inactive"
1440
  msgstr ""
1441
 
1442
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:115
1443
  #, fuzzy
1444
  msgid "%s Customer ID"
1445
  msgstr "Kliendi ID"
1446
 
1447
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:184
1448
  #, fuzzy
1449
  msgid "Type"
1450
  msgstr "Kaardi tüüp"
1451
 
1452
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:254
1453
  msgid "Removed payment token \"%d\""
1454
  msgstr ""
1455
 
1456
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:301
1457
  #, fuzzy
1458
  msgid "Expiry Date"
1459
  msgstr "Aegumiskuupäev (01/%s)"
1460
 
1461
+ #: payment-gateway/class-sv-wc-payment-gateway.php:347
1462
  msgid "you successfully processed a payment!"
1463
  msgstr ""
1464
 
1465
+ #: payment-gateway/class-sv-wc-payment-gateway.php:352
1466
  msgid "you successfully processed a refund!"
1467
  msgstr ""
1468
 
1469
+ #: payment-gateway/class-sv-wc-payment-gateway.php:489
1470
  msgid "Check Number is missing"
1471
  msgstr "Tšeki number on puudu"
1472
 
1473
+ #: payment-gateway/class-sv-wc-payment-gateway.php:490
1474
  msgid "Drivers license state is missing"
1475
  msgstr "Juhiloa osariik on puudu"
1476
 
1477
+ #: payment-gateway/class-sv-wc-payment-gateway.php:491
1478
  msgid "Drivers license number is missing"
1479
  msgstr "Juhiloa number on puudu"
1480
 
1481
+ #: payment-gateway/class-sv-wc-payment-gateway.php:704
1482
+ msgid "Continue to Payment"
1483
+ msgstr ""
1484
+
1485
+ #: payment-gateway/class-sv-wc-payment-gateway.php:704
1486
  msgid "Place order"
1487
  msgstr "Esita tellimus"
1488
 
1489
+ #: payment-gateway/class-sv-wc-payment-gateway.php:736
1490
  msgid "Thank you for your order."
1491
  msgstr "Aitäh tellimuse eest."
1492
 
1493
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1148
1494
  msgid "Credit Card"
1495
  msgstr "Krediitkaart"
1496
 
1497
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1150
1498
  msgid "eCheck"
1499
  msgstr "E-tšekk"
1500
 
1501
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1168
1502
  msgid "Pay securely using your credit card."
1503
  msgstr "Maksa turvaliselt oma krediitkaardiga."
1504
 
1505
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1170
1506
  msgid "Pay securely using your checking account."
1507
  msgstr "Maksa turvaliselt oma tšekikontoga."
1508
 
1509
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1190
1510
  msgid "Enable this gateway"
1511
  msgstr "Lülita see makseviis sisse"
1512
 
1513
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1196
1514
  msgid "Title"
1515
  msgstr "Nimetus"
1516
 
1517
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1198
1518
  msgid "Payment method title that the customer will see during checkout."
1519
  msgstr "Kliendile kassas nähtav makseviisi nimetus."
1520
 
1521
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1203
1522
  msgid "Description"
1523
  msgstr "Kirjeldus"
1524
 
1525
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1205
1526
  msgid "Payment method description that the customer will see during checkout."
1527
  msgstr "Kliendile kassas nähtav makseviisi kirjeldus."
1528
 
1529
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1234
1530
  msgid "Detailed Decline Messages"
1531
  msgstr "Täpsemad maksest keeldumise teated"
1532
 
1533
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1236
1534
  msgid ""
1535
  "Check to enable detailed decline messages to the customer during checkout "
1536
  "when possible, rather than a generic decline message."
1539
  "teate asemel näidata võimaluse korral täpsemaid põhjusi."
1540
 
1541
  #. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
1542
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1246
1543
  msgid ""
1544
  "Show Detailed Error Messages and API requests/responses on the checkout page "
1545
  "and/or save them to the %1$sdebug log%2$s"
1547
  "Näita üksikasjalikke veateateud ja API päringuid/vastuseid kassas ja/või "
1548
  "salvesta need %1$slogifaili%2$s"
1549
 
1550
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1250
1551
  msgid "Show on Checkout Page"
1552
  msgstr "Näita kassas"
1553
 
1554
  #. translators: show debugging information on both checkout page and in the log
1555
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1253
1556
  msgid "Both"
1557
  msgstr "Mõlemad"
1558
 
1559
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1316
1560
  msgid "Select the gateway environment to use for transactions."
1561
  msgstr "Vali makseviisi tehingute teostamise keskkond."
1562
 
1563
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1370
1564
  msgid "Share connection settings"
1565
  msgstr "Jaga ühenduse andmeid"
1566
 
1567
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1372
1568
  msgid "Use connection/authentication settings from other gateway"
1569
  msgstr "Kasuta teise makseviisi ühenduse/autentimise seadeid"
1570
 
1571
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1375
1572
  msgid "Disabled because the other gateway is using these settings"
1573
  msgstr "Ei saa muuta, kuna teine makseviis kasutab neid seadeid"
1574
 
1575
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1392
1576
  msgid "Card Verification (CSC)"
1577
  msgstr "Kaardi turvakood (CSC)"
1578
 
1579
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1393
1580
  msgid "Display the Card Security Code (CV2) field on checkout"
1581
  msgstr "Näita kassas kaardi turvakoodi (CV2) välja"
1582
 
1583
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1401
1584
  #, fuzzy
1585
  msgid "Saved Card Verification"
1586
  msgstr "Kaardi turvakood (CSC)"
1587
 
1588
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1402
1589
  #, fuzzy
1590
  msgid "Display the Card Security Code field when paying with a saved card"
1591
  msgstr "Näita kassas kaardi turvakoodi (CV2) välja"
1592
 
1593
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1594
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1737
1595
  msgid "%1$s - Order %2$s"
1596
  msgstr "%1$s - Tellimus %2$s"
1597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1598
  #. translators: Placeholders: %1$s - site title, %2$s - order number.
1599
  #. Definitions: Capture as in capture funds from a credit card.
1600
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1866
1601
  msgid "%1$s - Capture for Order %2$s"
1602
  msgstr "%1$s - Tasumine tellimuse %2$s eest"
1603
 
1604
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1605
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2009
1606
  msgid "%1$s - Refund for Order %2$s"
1607
  msgstr "%1$s - Tagasimakse tellimuse %2$s eest"
1608
 
1609
  #. translators: Placeholders: %1$s - payment gateway title (such as
1610
  #. Authorize.net, Braintree, etc), %2$s - a monetary amount
1611
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2076
1612
  msgid "%1$s Refund in the amount of %2$s approved."
1613
  msgstr "%1$s: tagasimakse summas %2$s kinnitatud."
1614
 
1615
  #. translators: Placeholders: %1$s - payment gateway title (such as
1616
  #. Authorize.net, Braintree, etc), %2$s - error code, %3$s - error message
1617
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2106
1618
  msgid "%1$s Refund Failed: %2$s - %3$s"
1619
  msgstr "%1$s: tagasimakse ebaõnnestus: %2$s - %3$s"
1620
 
1621
  #. translators: Placeholders: %1$s - payment gateway title (such as
1622
  #. Authorize.net, Braintree, etc), %2$s - error message
1623
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2114
1624
  msgid "%1$s Refund Failed: %2$s"
1625
  msgstr "%1$s: tagasimakse ebaõnnestus: %2$s"
1626
 
1627
  #. translators: Placeholders: %s - payment gateway title (such as
1628
  #. Authorize.net, Braintree, etc)
1629
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2135
1630
  msgid "%s Order completely refunded."
1631
  msgstr "%s: tellimus täielikult tagasi makstud."
1632
 
1633
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2190
1634
  msgid ""
1635
  "Oops, you cannot partially void this order. Please use the full order amount."
1636
  msgstr ""
1639
 
1640
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error code,
1641
  #. %3$s - error message. Void as in to void an order.
1642
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2277
1643
  msgid "%1$s Void Failed: %2$s - %3$s"
1644
  msgstr "%1$s: tühistamine ebaõnnestus: %2$s - %3$s"
1645
 
1646
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1647
  #. message. Void as in to void an order.
1648
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2285
1649
  msgid "%1$s Void Failed: %2$s"
1650
  msgstr "%1$s: tühistamine ebaõnnestus: %2$s"
1651
 
1652
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - a monetary
1653
  #. amount. Void as in to void an order.
1654
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2309
1655
  msgid "%1$s Void in the amount of %2$s approved."
1656
  msgstr "%1$s: tühistamine summas %2$s kinnitatud."
1657
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1658
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1659
  #. ("Test"), %3$s - transaction type (authorization/charge)
1660
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2601
1661
  #, fuzzy
1662
  msgid "%1$s %2$s %3$s Approved"
1663
  msgstr "%1$s: %2$s tehing kinnitatud"
1664
 
1665
  #. translators: Placeholders: %1$s - credit card type (MasterCard, Visa,
1666
  #. etc...), %2$s - last four digits of the card
1667
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2611
1668
  msgid "%1$s ending in %2$s"
1669
  msgstr ""
1670
 
1671
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - message
1672
  #. (probably reason for the transaction being held for review)
1673
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2707
1674
  msgid "%1$s Transaction Held for Review (%2$s)"
1675
  msgstr "%1$s: tehning pandi ülevaatuseks ootele (%2$s)"
1676
 
 
 
 
 
 
 
 
1677
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1678
  #. message; e.g. Order Note: [Payment method] Payment failed [error]
1679
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2796
1680
  msgid "%1$s Payment Failed (%2$s)"
1681
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
1682
 
 
 
 
 
 
 
1683
  #. translators: Placeholders: %1$s - payment gateway title, %2$s -
1684
  #. message/error
1685
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2831
1686
  msgid "%1$s Transaction Cancelled (%2$s)"
1687
  msgstr "%1$s: tehing tühistatud (%2$s)"
1688
 
1689
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3079
1690
  msgid "Transaction Type"
1691
  msgstr "Tehingu tüüp"
1692
 
1693
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3081
1694
  msgid ""
1695
  "Select how transactions should be processed. Charge submits all transactions "
1696
  "for settlement, Authorization simply authorizes the order total for capture "
1700
  "koheselt tasumisele, \"Autoriseerimine\" lihtsalt autoriseerib tellimuse "
1701
  "summa hilisemaks tasumiseks."
1702
 
1703
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3092
1704
  msgid "Charge Virtual-Only Orders"
1705
  msgstr ""
1706
 
1707
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3094
1708
  msgid ""
1709
  "If the order contains exclusively virtual items, enable this to immediately "
1710
  "charge, rather than authorize, the transaction."
1711
  msgstr ""
1712
 
1713
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3102
1714
  #, fuzzy
1715
  msgid "Enable Partial Capture"
1716
  msgstr "Lülita see makseviis sisse"
1717
 
1718
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3104
1719
  msgid "Allow orders to be partially captured multiple times."
1720
  msgstr ""
1721
 
1722
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3116
1723
  #, fuzzy
1724
  msgid "Capture Paid Orders"
1725
  msgstr "Teosta makse"
1726
 
1727
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3119
1728
  msgid "Automatically capture orders when they are changed to %s."
1729
  msgstr ""
1730
 
1731
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3120
1732
  msgid "a paid status"
1733
  msgstr ""
1734
 
1735
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3310
1736
  #, fuzzy
1737
  msgid "Accepted Card Logos"
1738
  msgstr "Vastuvõetavad kaardid"
1739
 
1740
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3312
1741
  #, fuzzy
1742
  msgid ""
1743
  "These are the card logos that are displayed to customers as accepted during "
1744
  "checkout."
1745
  msgstr "Kliendile kassas nähtav makseviisi nimetus."
1746
 
1747
+ #. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag
1748
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3315
1749
  msgid ""
1750
+ "This setting %1$sdoes not%2$s change which card types the gateway will "
1751
+ "accept. Accepted cards are configured from your payment processor account."
1752
  msgstr ""
1753
 
1754
  #. translators:
1755
  #. http:www.cybersource.com/products/payment_security/payment_tokenization/ and
1756
  #. https:en.wikipedia.org/wiki/Tokenization_(data_security)
1757
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3406
1758
  msgid "Tokenization"
1759
  msgstr "Maksevahendite salvestamine"
1760
 
1761
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3407
1762
  msgid ""
1763
  "Allow customers to securely save their payment details for future checkout."
1764
  msgstr ""
1765
  "Võimalda klientidel oma makseandmeid edaspidisteks tehinguteks turvaliselt "
1766
  "talletada."
1767
 
1768
+ #. translators: %1$s - gateway name, %2$s - <a> tag, %3$s - </a> tag, %4$s -
1769
+ #. <a> tag, %5$s - </a> tag
1770
+ #: payment-gateway/class-sv-wc-payment-gateway.php:4226
1771
+ msgid ""
1772
+ "Heads up! %1$s is not fully configured and cannot accept payments. Please "
1773
+ "%2$sreview the documentation%3$s and configure the %4$sgateway settings%5$s."
1774
+ msgstr ""
1775
+
1776
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:261
1777
  msgid "Pre-Order Tokenization attempt failed (%s)"
1778
  msgstr ""
1779
 
1780
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:307
1781
  msgid "%s - Pre-Order Release Payment for Order %s"
1782
  msgstr ""
1783
 
1784
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:311
1785
  msgid "Payment token missing/invalid."
1786
  msgstr "Maksevahend on puudu või vigane."
1787
 
1788
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:336
1789
  msgid "%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)"
1790
  msgstr ""
1791
 
1792
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:347
1793
  msgid "%s eCheck Pre-Order Release Payment Approved: %s ending in %s"
1794
  msgstr ""
1795
 
1796
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:391
1797
  msgid "Pre-Order Release Payment Failed: %s"
1798
  msgstr "Eeltellimuse väljastamise makse ebaõnnestus: %s"
1799
 
1800
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:326
1801
  msgid "Subscription Renewal: payment token is missing/invalid."
1802
  msgstr ""
1803
 
1804
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:352
1805
  msgid "%1$s - Subscription Renewal Order %2$s"
1806
  msgstr ""
1807
 
1808
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1809
  #. message; e.g. Order Note: [Payment method] Payment Change failed [error]
1810
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:484
1811
  #, fuzzy
1812
  msgid "%1$s Payment Change Failed (%2$s)"
1813
  msgstr "%1$s: makse ebaõnnestus (%2$s)"
1814
 
1815
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:627
1816
  msgid "Via %s ending in %s"
1817
  msgstr ""
1818
 
1819
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:654
1820
  msgid "Subscriptions"
1821
  msgstr ""
1822
 
1823
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:723
1824
  msgid ""
1825
  "This payment method is tied to a subscription and cannot be deleted. Please "
1826
  "switch the subscription to another method first."
1827
  msgstr ""
1828
 
1829
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:775
1830
  msgid "Payment Token"
1831
  msgstr ""
1832
 
1833
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:804
1834
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:809
1835
  msgid "%s is required."
1836
  msgstr ""
1837
 
1838
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:173
1839
  msgid "Unknown Error"
1840
  msgstr "Esines tundmatu viga"
1841
 
1842
+ #: rest-api/Controllers/Settings.php:83
1843
+ msgid "Unique identifier for the resource."
1844
+ msgstr ""
1845
+
1846
+ #: rest-api/Controllers/Settings.php:118
1847
+ msgid "Sorry, you cannot list resources."
1848
+ msgstr ""
1849
+
1850
+ #. translators: Placeholder: %s - setting ID
1851
+ #: rest-api/Controllers/Settings.php:167
1852
+ msgid "Setting %s does not exist"
1853
+ msgstr ""
1854
+
1855
+ #: rest-api/Controllers/Settings.php:190
1856
+ msgid "Sorry, you cannot edit this resource."
1857
+ msgstr ""
1858
+
1859
+ #: rest-api/Controllers/Settings.php:223
1860
+ msgid "Could not update setting: %s"
1861
+ msgstr ""
1862
+
1863
+ #: rest-api/Controllers/Settings.php:293
1864
+ msgid "Unique identifier of the setting."
1865
+ msgstr ""
1866
+
1867
+ #: rest-api/Controllers/Settings.php:299
1868
+ msgid "The type of the setting."
1869
+ msgstr ""
1870
+
1871
+ #: rest-api/Controllers/Settings.php:306
1872
+ msgid "The name of the setting."
1873
+ msgstr ""
1874
+
1875
+ #: rest-api/Controllers/Settings.php:312
1876
+ msgid "The description of the setting. It may or may not be used for display."
1877
+ msgstr ""
1878
+
1879
+ #: rest-api/Controllers/Settings.php:318
1880
+ msgid "Whether the setting stores an array of values or a single value."
1881
+ msgstr ""
1882
+
1883
+ #: rest-api/Controllers/Settings.php:324
1884
+ msgid "A list of valid options, used for validation before storing the value."
1885
+ msgstr ""
1886
+
1887
+ #: rest-api/Controllers/Settings.php:330
1888
+ msgid "Optional default value for the setting."
1889
+ msgstr ""
1890
+
1891
+ #: rest-api/Controllers/Settings.php:336
1892
+ msgid "The value of the setting."
1893
+ msgstr ""
1894
+
1895
+ #: rest-api/Controllers/Settings.php:341
1896
+ msgid ""
1897
+ "Optional object that defines how the user will interact with and update the "
1898
+ "setting."
1899
+ msgstr ""
1900
+
1901
+ #: rest-api/Controllers/Settings.php:345
1902
+ msgid "The type of the control."
1903
+ msgstr ""
1904
+
1905
+ #: rest-api/Controllers/Settings.php:352
1906
+ msgid "The name of the control. Inherits the setting's name."
1907
+ msgstr ""
1908
+
1909
+ #: rest-api/Controllers/Settings.php:358
1910
+ msgid "The description of the control. Inherits the setting's description."
1911
+ msgstr ""
1912
+
1913
+ #: rest-api/Controllers/Settings.php:364
1914
+ msgid ""
1915
+ "A list of key/value pairs defining the display value of each setting option. "
1916
+ "The keys should match the options defined in the base setting for validation."
1917
  msgstr ""
1918
 
1919
  #: utilities/class-sv-wp-background-job-handler.php:644
1920
+ msgid "Job data key \"%s\" not set"
1921
+ msgstr ""
1922
+
1923
+ #: utilities/class-sv-wp-background-job-handler.php:648
1924
  msgid "Job data key \"%s\" is not an array"
1925
  msgstr ""
1926
 
1927
+ #: utilities/class-sv-wp-background-job-handler.php:884
1928
  msgid "Every %d Minutes"
1929
  msgstr ""
1930
 
1931
+ #: utilities/class-sv-wp-background-job-handler.php:1048
1932
  msgid "Background Processing Test"
1933
  msgstr ""
1934
 
1935
+ #: utilities/class-sv-wp-background-job-handler.php:1049
1936
  #, fuzzy
1937
  msgid "Run Test"
1938
  msgstr "test"
1939
 
1940
+ #: utilities/class-sv-wp-background-job-handler.php:1050
1941
  msgid ""
1942
  "This tool will test whether your server is capable of processing background "
1943
  "jobs."
1944
  msgstr ""
1945
 
1946
+ #: utilities/class-sv-wp-background-job-handler.php:1068
1947
  msgid "Success! You should be able to process background jobs."
1948
  msgstr ""
1949
 
1950
+ #: utilities/class-sv-wp-background-job-handler.php:1071
1951
  msgid ""
1952
  "Could not connect. Please ask your hosting company to ensure your server has "
1953
  "loopback connections enabled."
1954
  msgstr ""
1955
 
1956
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:396
1957
  msgctxt "enhanced select"
1958
  msgid "No matches found"
1959
  msgstr ""
1960
 
1961
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397
1962
  msgctxt "enhanced select"
1963
  msgid "Loading failed"
1964
  msgstr ""
1965
 
1966
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398
1967
  msgctxt "enhanced select"
1968
  msgid "Please enter 1 or more characters"
1969
  msgstr ""
1970
 
1971
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399
1972
  msgctxt "enhanced select"
1973
  msgid "Please enter %qty% or more characters"
1974
  msgstr ""
1975
 
1976
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400
1977
  msgctxt "enhanced select"
1978
  msgid "Please delete 1 character"
1979
  msgstr ""
1980
 
1981
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401
1982
  msgctxt "enhanced select"
1983
  msgid "Please delete %qty% characters"
1984
  msgstr ""
1985
 
1986
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402
1987
  msgctxt "enhanced select"
1988
  msgid "You can only select 1 item"
1989
  msgstr ""
1990
 
1991
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403
1992
  msgctxt "enhanced select"
1993
  msgid "You can only select %qty% items"
1994
  msgstr ""
1995
 
1996
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404
1997
  msgctxt "enhanced select"
1998
  msgid "Loading more results&hellip;"
1999
  msgstr ""
2000
 
2001
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:405
2002
  msgctxt "enhanced select"
2003
  msgid "Searching&hellip;"
2004
  msgstr ""
2005
 
2006
+ #: class-sv-wc-helper.php:410
2007
  msgctxt "coordinating conjunction for a list of items: a, b, and c"
2008
  msgid "and"
2009
  msgstr ""
2010
 
2011
+ #: class-sv-wc-plugin.php:621
2012
  msgctxt "noun"
2013
  msgid "Support"
2014
  msgstr "Kasutajatugi"
2015
 
2016
+ #: class-sv-wc-plugin.php:626
2017
  msgctxt "verb"
2018
  msgid "Review"
2019
  msgstr ""
2020
 
2021
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:746
2022
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2603
2023
  msgctxt "noun, software environment"
2024
  msgid "Test"
2025
  msgstr "test"
2026
 
2027
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:747
2028
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2604
2029
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3085
2030
  msgctxt "credit card transaction type"
2031
  msgid "Authorization"
2032
  msgstr "Autoriseerimine"
2033
 
2034
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:747
2035
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2604
2036
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3084
2037
  msgctxt "noun, credit card transaction type"
2038
  msgid "Charge"
2039
  msgstr "Makse"
2040
 
2041
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:193
2042
  msgctxt "payment method type"
2043
  msgid "Account"
2044
  msgstr "Konto"
2045
 
2046
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:229
2047
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3343
2048
  msgctxt "credit card type"
2049
  msgid "Visa"
2050
  msgstr "Visa"
2051
 
2052
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:233
2053
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3344
2054
  msgctxt "credit card type"
2055
  msgid "MasterCard"
2056
  msgstr "MasterCard"
2057
 
2058
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:237
2059
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3345
2060
  msgctxt "credit card type"
2061
  msgid "American Express"
2062
  msgstr "American Express"
2063
 
2064
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:241
2065
  msgctxt "credit card type"
2066
  msgid "Diners Club"
2067
  msgstr ""
2068
 
2069
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:245
2070
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3346
2071
  msgctxt "credit card type"
2072
  msgid "Discover"
2073
  msgstr "Discover"
2074
 
2075
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:249
2076
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3348
2077
  msgctxt "credit card type"
2078
  msgid "JCB"
2079
  msgstr "JCB"
2080
 
2081
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:253
2082
  msgctxt "credit card type"
2083
  msgid "CarteBleue"
2084
  msgstr "CarteBleue"
2085
 
2086
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:257
2087
  msgctxt "credit card type"
2088
  msgid "Maestro"
2089
  msgstr ""
2090
 
2091
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:261
2092
  msgctxt "credit card type"
2093
  msgid "Laser"
2094
  msgstr ""
2095
 
2096
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3347
2097
  msgctxt "credit card type"
2098
  msgid "Diners"
2099
  msgstr "Diners"
2100
 
2101
  #. translators: http:www.investopedia.com/terms/c/checkingaccount.asp
2102
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:474
2103
  msgctxt "account type"
2104
  msgid "Checking"
2105
  msgstr "Tšekikonto"
2106
 
2107
  #. translators: http:www.investopedia.com/terms/s/savingsaccount.asp
2108
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:476
2109
  msgctxt "account type"
2110
  msgid "Savings"
2111
  msgstr "Hoiuarve"
2112
 
2113
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2384
2114
  msgctxt "hash before order number"
2115
  msgid "#"
2116
  msgstr "#"
2117
 
2118
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:684
2119
  msgctxt "hash before order number"
2120
  msgid "#%s"
2121
  msgstr ""
2122
 
2123
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3113
2124
  msgctxt ""
2125
  "coordinating conjunction for a list of order statuses: on-hold, processing, "
2126
  "or completed"
2128
  msgstr ""
2129
 
2130
  #. translators: https:www.skyverge.com/for-translators-environments/
2131
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3952
2132
  msgctxt "software environment"
2133
  msgid "Production"
2134
  msgstr "Töö/avalik"
2135
 
2136
+ #, fuzzy
2137
+ #~ msgid "Pay with"
2138
+ #~ msgstr "Maksa"
2139
+
2140
+ #~ msgid "%1$s Capture Failed: %2$s - %3$s"
2141
+ #~ msgstr "%1$s: tasumine ebaõnnestus: %2$s - %3$s"
2142
 
2143
  #~ msgid "(check number %s)"
2144
  #~ msgstr "(tšeki number %s)"
2193
  #~ "Kasutajale makseviisi poolt määratud kliendi tunnus %s keskkonnas. Muuda "
2194
  #~ "seda ainult siis, kui tõesti vajalik."
2195
 
 
 
 
2196
  #~ msgid "This customer has no saved payment tokens"
2197
  #~ msgstr "Sel kliendil ei ole salvestatud maksevahendeid"
2198
 
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/i18n/languages/woocommerce-plugin-framework.pot RENAMED
@@ -1,38 +1,38 @@
1
- # Copyright (C) 2018
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Plugin Framework 5.3.0\n"
6
  "Report-Msgid-Bugs-To: https://support.woocommerce.com/hc/\n"
7
  "POT-Creation-Date: 2015-07-22 12:09:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: Lifecycle.php:354
16
  msgid "Awesome"
17
  msgstr ""
18
 
19
- #: Lifecycle.php:355
20
  msgid "Fantastic"
21
  msgstr ""
22
 
23
- #: Lifecycle.php:356
24
  msgid "Cowabunga"
25
  msgstr ""
26
 
27
- #: Lifecycle.php:357
28
  msgid "Congratulations"
29
  msgstr ""
30
 
31
- #: Lifecycle.php:358
32
  msgid "Hot dog"
33
  msgstr ""
34
 
35
- #: Lifecycle.php:365
36
  #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
37
  #. tag, %4$s - <a> tag, %5$s - </a> tag
38
  msgid ""
@@ -41,93 +41,92 @@ msgid ""
41
  "happy to help -- please %4$sreach out to our support team%5$s."
42
  msgstr ""
43
 
44
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:183
45
  msgid ""
46
  "Thanks for installing %1$s! To get started, take a minute to %2$sread the "
47
  "documentation%3$s :)"
48
  msgstr ""
49
 
50
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:211
51
  msgid ""
52
  "Thanks for installing %1$s! To get started, take a minute to complete these "
53
  "%2$squick and easy setup steps%3$s :)"
54
  msgstr ""
55
 
56
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:236
57
  msgid "Setup"
58
  msgstr ""
59
 
60
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:304
61
  #. translators: Placeholders: %s - plugin name
62
  msgid "%s &rsaquo; Setup"
63
  msgstr ""
64
 
65
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:352
66
  msgid "Oops! An error occurred, please try again."
67
  msgstr ""
68
 
69
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:493
70
  msgid "Ready!"
71
  msgstr ""
72
 
73
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:586
74
  #. translators: Placeholder: %s - plugin name
75
  msgid "Welcome to %s!"
76
  msgstr ""
77
 
78
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:599
79
  msgid ""
80
  "This quick setup wizard will help you configure the basic settings and get "
81
  "you started."
82
  msgstr ""
83
 
84
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:613
85
  msgid "%s is ready!"
86
  msgstr ""
87
 
88
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:665
89
  msgid "Next step"
90
  msgstr ""
91
 
92
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:691
93
  msgid "You can also:"
94
  msgstr ""
95
 
96
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:735
97
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:765
98
  msgid "View the Docs"
99
  msgstr ""
100
 
101
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:736
102
  msgid "See more setup options"
103
  msgstr ""
104
 
105
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:737
106
  msgid "Learn more about customizing the plugin"
107
  msgstr ""
108
 
109
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:761
110
  msgid "Review Your Settings"
111
  msgstr ""
112
 
113
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:769
114
  msgid "Leave a Review"
115
  msgstr ""
116
 
117
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:793
118
- #: payment-gateway/class-sv-wc-payment-gateway.php:659
119
  msgid "Continue"
120
  msgstr ""
121
 
122
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:953
123
  msgid "Return to the WordPress Dashboard"
124
  msgstr ""
125
 
126
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:955
127
  msgid "Not right now"
128
  msgstr ""
129
 
130
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:957
131
  msgid "Skip this step"
132
  msgstr ""
133
 
@@ -174,11 +173,11 @@ msgstr ""
174
  msgid "Please %1$supdate WooCommerce%2$s"
175
  msgstr ""
176
 
177
- #: class-sv-wc-plugin-compatibility.php:278
178
  msgid "WooCommerce"
179
  msgstr ""
180
 
181
- #: class-sv-wc-plugin-dependencies.php:148
182
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
183
  #. extension/comma-separated list of PHP extensions
184
  msgid ""
@@ -191,7 +190,7 @@ msgid_plural ""
191
  msgstr[0] ""
192
  msgstr[1] ""
193
 
194
- #: class-sv-wc-plugin-dependencies.php:176
195
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
196
  #. function/comma-separated list of PHP functions
197
  msgid ""
@@ -203,24 +202,24 @@ msgid_plural ""
203
  msgstr[0] ""
204
  msgstr[1] ""
205
 
206
- #: class-sv-wc-plugin-dependencies.php:206
207
  #. translators: Placeholders: %s - plugin name
208
  msgid ""
209
  "%s may behave unexpectedly because the following PHP configuration settings "
210
  "are required:"
211
  msgstr ""
212
 
213
- #: class-sv-wc-plugin-dependencies.php:220
214
  msgid "%s or higher"
215
  msgstr ""
216
 
217
- #: class-sv-wc-plugin-dependencies.php:230
218
  msgid ""
219
  "Please contact your hosting provider or server administrator to configure "
220
  "these settings."
221
  msgstr ""
222
 
223
- #: class-sv-wc-plugin-dependencies.php:252
224
  #. translators: Placeholders: %1$s - <strong>, %2$s - </strong>
225
  msgid ""
226
  "Hey there! We've noticed that your server is running %1$san outdated "
@@ -235,99 +234,190 @@ msgid ""
235
  "resources to help you upgrade%5$s and to explain PHP versions further."
236
  msgstr ""
237
 
238
- #: class-sv-wc-plugin-dependencies.php:271
239
- #. translators: Placeholders: %1$s - WooCommerce version number, %2$s -
240
- #. <strong>, %3$s - </strong>, %4$s - Plugin name, %5$s - <a> tag, %6$s - </a>
241
- #. tag
242
- msgid ""
243
- "Hey there! We've noticed that your site is running version %1$s of "
244
- "WooCommerce, but %2$sWooCommerce 3.0 or higher will soon be required%3$s by "
245
- "%4$s. We recommend you %5$supdate WooCommerce%6$s to the latest version as "
246
- "soon as possible."
247
- msgstr ""
248
-
249
- #: class-sv-wc-plugin.php:297
250
  #. translators: Placeholders: %s - plugin name
251
  msgid "You cannot clone instances of %s."
252
  msgstr ""
253
 
254
- #: class-sv-wc-plugin.php:308
255
  #. translators: Placeholders: %s - plugin name
256
  msgid "You cannot unserialize instances of %s."
257
  msgstr ""
258
 
259
- #: class-sv-wc-plugin.php:529
 
 
 
 
 
 
 
 
 
260
  #. translators: Docs as in Documentation
261
  msgid "Docs"
262
  msgstr ""
263
 
264
- #: class-sv-wc-plugin.php:622
265
  msgid "%1$s - A minimum of %2$s is required."
266
  msgstr ""
267
 
268
- #: class-sv-wc-plugin.php:631
269
  msgid "Set as %1$s - %2$s is required."
270
  msgstr ""
271
 
272
- #: class-sv-wc-plugin.php:854
 
273
  msgid "Configure"
274
  msgstr ""
275
 
276
- #: payment-gateway/Handlers/Capture.php:157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  msgid "Order cannot be captured"
278
  msgstr ""
279
 
280
- #: payment-gateway/Handlers/Capture.php:162
281
  msgid "Transaction authorization has expired"
282
  msgstr ""
283
 
284
- #: payment-gateway/Handlers/Capture.php:167
285
  msgid "Transaction has already been fully captured"
286
  msgstr ""
287
 
288
- #: payment-gateway/Handlers/Capture.php:172
289
  msgid "Transaction cannot be captured"
290
  msgstr ""
291
 
292
- #: payment-gateway/Handlers/Capture.php:188
293
  #. translators: Placeholders: %1$s - payment gateway title (such as
294
  #. Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions:
295
  #. Capture, as in capture funds from a credit card.
296
  msgid "%1$s Capture of %2$s Approved"
297
  msgstr ""
298
 
299
- #: payment-gateway/Handlers/Capture.php:195
300
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:668
301
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:752
302
- #: payment-gateway/class-sv-wc-payment-gateway.php:2018
303
- #: payment-gateway/class-sv-wc-payment-gateway.php:2239
304
- #: payment-gateway/class-sv-wc-payment-gateway.php:2546
305
- #: payment-gateway/class-sv-wc-payment-gateway.php:2590
306
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:340
307
  #. translators: Placeholders: %s - transaction ID
308
  msgid "(Transaction ID %s)"
309
  msgstr ""
310
 
311
- #: payment-gateway/Handlers/Capture.php:226
312
  #. translators: Placeholders: %1$s - payment gateway title (such as
313
  #. Authorize.net, Braintree, etc), %2$s - failure message. Definitions:
314
  #. "capture" as in capturing funds from a credit card.
315
  msgid "%1$s Capture Failed: %2$s"
316
  msgstr ""
317
 
318
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:119
319
  msgid "Are you sure you wish to process this capture? The action cannot be undone."
320
  msgstr ""
321
 
322
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:122
323
  msgid ""
324
  "Something went wrong, and the capture could no be completed. Please try "
325
  "again."
326
  msgstr ""
327
 
328
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:166
329
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:241
330
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:304
331
  #. translators: verb, as in "Capture credit card charge". Used when an
332
  #. amount has been pre-authorized before, but funds have not yet been captured
333
  #. (taken) from the card. Capturing the charge will take the money from the
@@ -335,101 +425,101 @@ msgstr ""
335
  msgid "Capture Charge"
336
  msgstr ""
337
 
338
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:294
339
  msgid "This charge has been fully captured."
340
  msgstr ""
341
 
342
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:296
343
  msgid "This charge can no longer be captured."
344
  msgstr ""
345
 
346
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:298
347
  msgid "This charge cannot be captured."
348
  msgstr ""
349
 
350
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:89
351
  msgid "Are you sure you want to remove this token?"
352
  msgstr ""
353
 
354
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:99
355
  msgid "Invalid token data"
356
  msgstr ""
357
 
358
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:103
359
  msgid "An error occurred. Please try again."
360
  msgstr ""
361
 
362
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:451
363
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:302
364
  msgid "(%s)"
365
  msgstr ""
366
 
367
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:480
368
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:650
369
  msgid "Default"
370
  msgstr ""
371
 
372
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:515
373
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:548
374
  msgid "Token ID"
375
  msgstr ""
376
 
377
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:520
378
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:299
379
  msgid "Card Type"
380
  msgstr ""
381
 
382
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:525
383
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:561
384
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:191
385
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:297
386
  msgid "Last Four"
387
  msgstr ""
388
 
389
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:532
390
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:313
391
  msgid "Expiration (MM/YY)"
392
  msgstr ""
393
 
394
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:553
395
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:419
396
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:298
397
  #. translators: e-check account type, HTML form field label
398
  msgid "Account Type"
399
  msgstr ""
400
 
401
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:556
402
  msgid "Checking"
403
  msgstr ""
404
 
405
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:557
406
  msgid "Savings"
407
  msgstr ""
408
 
409
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:657
410
  msgid "Refresh"
411
  msgstr ""
412
 
413
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:659
414
  msgid "Add New"
415
  msgstr ""
416
 
417
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:662
418
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:745
419
  msgid "Save"
420
  msgstr ""
421
 
422
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:684
423
  msgid "Remove"
424
  msgstr ""
425
 
426
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:221
427
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:208
428
  msgid "%s Payment Tokens"
429
  msgstr ""
430
 
431
- #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:299
432
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:660
433
  msgid "Customer ID"
434
  msgstr ""
435
 
@@ -437,48 +527,48 @@ msgstr ""
437
  msgid "This section contains configuration settings for this gateway."
438
  msgstr ""
439
 
440
- #: payment-gateway/admin/views/html-admin-gateway-status.php:52
441
- #: payment-gateway/class-sv-wc-payment-gateway.php:1264
442
  #. translators: environment as in a software environment (test/production)
443
  msgid "Environment"
444
  msgstr ""
445
 
446
- #: payment-gateway/admin/views/html-admin-gateway-status.php:53
447
  msgid "The transaction environment for this gateway."
448
  msgstr ""
449
 
450
- #: payment-gateway/admin/views/html-admin-gateway-status.php:60
451
  msgid "Tokenization Enabled"
452
  msgstr ""
453
 
454
- #: payment-gateway/admin/views/html-admin-gateway-status.php:61
455
  msgid "Displays whether or not tokenization is enabled for this gateway."
456
  msgstr ""
457
 
458
- #: payment-gateway/admin/views/html-admin-gateway-status.php:74
459
- #: payment-gateway/class-sv-wc-payment-gateway.php:1194
460
  msgid "Debug Mode"
461
  msgstr ""
462
 
463
- #: payment-gateway/admin/views/html-admin-gateway-status.php:75
464
  msgid "Displays whether or not debug logging is enabled for this gateway."
465
  msgstr ""
466
 
467
- #: payment-gateway/admin/views/html-admin-gateway-status.php:78
468
  msgid "Display at Checkout & Log"
469
  msgstr ""
470
 
471
- #: payment-gateway/admin/views/html-admin-gateway-status.php:80
472
  msgid "Display at Checkout"
473
  msgstr ""
474
 
475
- #: payment-gateway/admin/views/html-admin-gateway-status.php:82
476
- #: payment-gateway/class-sv-wc-payment-gateway.php:1202
477
  msgid "Save to Log"
478
  msgstr ""
479
 
480
- #: payment-gateway/admin/views/html-admin-gateway-status.php:84
481
- #: payment-gateway/class-sv-wc-payment-gateway.php:1200
482
  msgid "Off"
483
  msgstr ""
484
 
@@ -507,7 +597,7 @@ msgid "Capture %s"
507
  msgstr ""
508
 
509
  #: payment-gateway/admin/views/html-order-partial-capture.php:66
510
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:225
511
  msgid "Cancel"
512
  msgstr ""
513
 
@@ -523,203 +613,203 @@ msgstr ""
523
  msgid "The gateway customer ID for the user. Only edit this if necessary."
524
  msgstr ""
525
 
526
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:97
527
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:131
528
  msgid "An error occurred, please try again or try an alternate form of payment"
529
  msgstr ""
530
 
531
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:98
532
  msgid ""
533
  "We cannot process your order with the payment information that you "
534
  "provided. Please use a different payment account or an alternate payment "
535
  "method."
536
  msgstr ""
537
 
538
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99
539
  msgid ""
540
  "This order is being placed on hold for review. Please contact us to "
541
  "complete the transaction."
542
  msgstr ""
543
 
544
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:104
545
  msgid ""
546
  "This order is being placed on hold for review due to an incorrect card "
547
  "verification number. You may contact the store to complete the transaction."
548
  msgstr ""
549
 
550
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:105
551
  msgid "The card verification number is invalid, please try again."
552
  msgstr ""
553
 
554
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106
555
  msgid "Please enter your card verification number and try again."
556
  msgstr ""
557
 
558
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:109
559
  msgid ""
560
  "That card type is not accepted, please use an alternate card or other form "
561
  "of payment."
562
  msgstr ""
563
 
564
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:110
565
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:114
566
  msgid ""
567
  "The card type is invalid or does not correlate with the credit card number. "
568
  " Please try again or use an alternate card or other form of payment."
569
  msgstr ""
570
 
571
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111
572
  msgid "Please select the card type and try again."
573
  msgstr ""
574
 
575
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:115
576
  msgid "The card number is invalid, please re-enter and try again."
577
  msgstr ""
578
 
579
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116
580
  msgid "Please enter your card number and try again."
581
  msgstr ""
582
 
583
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:119
584
  msgid "The card expiration date is invalid, please re-enter and try again."
585
  msgstr ""
586
 
587
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:120
588
  msgid "The card expiration month is invalid, please re-enter and try again."
589
  msgstr ""
590
 
591
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121
592
  msgid "The card expiration year is invalid, please re-enter and try again."
593
  msgstr ""
594
 
595
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122
596
  msgid "Please enter your card expiration date and try again."
597
  msgstr ""
598
 
599
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:125
600
  msgid "The bank routing number is invalid, please re-enter and try again."
601
  msgstr ""
602
 
603
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:126
604
  msgid "The bank account number is invalid, please re-enter and try again."
605
  msgstr ""
606
 
607
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:129
608
  msgid ""
609
  "The provided card is expired, please use an alternate card or other form of "
610
  "payment."
611
  msgstr ""
612
 
613
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:130
614
  msgid ""
615
  "The provided card was declined, please use an alternate card or other form "
616
  "of payment."
617
  msgstr ""
618
 
619
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131
620
  msgid ""
621
  "Insufficient funds in account, please use an alternate card or other form "
622
  "of payment."
623
  msgstr ""
624
 
625
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132
626
  msgid ""
627
  "The card is inactivate or not authorized for card-not-present transactions, "
628
  "please use an alternate card or other form of payment."
629
  msgstr ""
630
 
631
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133
632
  msgid ""
633
  "The credit limit for the card has been reached, please use an alternate "
634
  "card or other form of payment."
635
  msgstr ""
636
 
637
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134
638
  msgid "The card verification number does not match. Please re-enter and try again."
639
  msgstr ""
640
 
641
- #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135
642
  msgid ""
643
  "The provided address does not match the billing address for cardholder. "
644
  "Please verify the address and try again."
645
  msgstr ""
646
 
647
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:81
648
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:99
649
  msgid "Apple Pay"
650
  msgstr ""
651
 
652
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:105
653
- #: payment-gateway/class-sv-wc-payment-gateway.php:1140
654
  msgid "Enable / Disable"
655
  msgstr ""
656
 
657
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:106
658
  msgid "Accept Apple Pay"
659
  msgstr ""
660
 
661
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:113
662
  msgid "Allow Apple Pay on"
663
  msgstr ""
664
 
665
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:123
666
  msgid "Button Style"
667
  msgstr ""
668
 
669
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:126
670
  msgid "Black"
671
  msgstr ""
672
 
673
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:127
674
  msgid "White"
675
  msgstr ""
676
 
677
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:128
678
  msgid "White with outline"
679
  msgstr ""
680
 
681
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:140
682
- #: payment-gateway/class-sv-wc-payment-gateway.php:1315
683
  msgid "Connection Settings"
684
  msgstr ""
685
 
686
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:146
687
  msgid "Apple Merchant ID"
688
  msgstr ""
689
 
690
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:150
691
  msgid "This is found in your %1$sApple developer account%2$s"
692
  msgstr ""
693
 
694
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:157
695
  msgid "Certificate Path"
696
  msgstr ""
697
 
698
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:162
699
  #. translators: Placeholders: %s - the server's web root path
700
  msgid "For reference, your current web root path is: %s"
701
  msgstr ""
702
 
703
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:175
704
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:185
705
  msgid "Processing Gateway"
706
  msgstr ""
707
 
708
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:193
709
  msgid "Test Mode"
710
  msgstr ""
711
 
712
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:194
713
  msgid ""
714
  "Enable to test Apple Pay functionality throughout your sites without "
715
  "processing real payments."
716
  msgstr ""
717
 
718
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:306
719
  msgid "Your site must be served over HTTPS with a valid SSL certificate."
720
  msgstr ""
721
 
722
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:316
723
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
724
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
725
  msgid ""
@@ -731,305 +821,277 @@ msgid_plural ""
731
  msgstr[0] ""
732
  msgstr[1] ""
733
 
734
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:335
735
  msgid ""
736
  "Your %1$sMerchant Identity Certificate%2$s cannot be found. Please check "
737
  "your path configuration."
738
  msgstr ""
739
 
740
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:342
741
  msgid "Apple Pay is disabled."
742
  msgstr ""
743
 
744
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:381
745
  msgid "Single products"
746
  msgstr ""
747
 
748
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:382
749
  msgid "Cart"
750
  msgstr ""
751
 
752
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:383
753
  msgid "Checkout"
754
  msgstr ""
755
 
756
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:168
757
  msgid "Buy with"
758
  msgstr ""
759
 
760
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:302
761
- msgid "Pay with"
762
  msgstr ""
763
 
764
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:308
765
  msgid "or"
766
  msgstr ""
767
 
768
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:85
769
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:92
770
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:105
771
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:114
772
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:126
773
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:171
774
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:181
775
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:183
776
  msgid "Error %d: Unable to create order. Please try again."
777
  msgstr ""
778
 
779
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:120
780
  msgid "Apple Pay payment authorized."
781
  msgstr ""
782
 
783
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:156
784
  msgid "Apple Pay payment failed. %s"
785
  msgstr ""
786
 
787
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:547
788
  msgid "Subtotal"
789
  msgstr ""
790
 
791
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:557
792
  msgid "Discount"
793
  msgstr ""
794
 
795
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:567
796
  msgid "Shipping"
797
  msgstr ""
798
 
799
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:577
800
  msgid "Fees"
801
  msgstr ""
802
 
803
- #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:587
804
  msgid "Taxes"
805
  msgstr ""
806
 
807
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:60
808
  msgid ""
809
  "Payment error, please try another payment method or contact us to complete "
810
  "your transaction."
811
  msgstr ""
812
 
813
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:160
814
- #: payment-gateway/class-sv-wc-payment-gateway.php:479
815
  msgid "Card expiration date is invalid"
816
  msgstr ""
817
 
818
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:184
819
- #: payment-gateway/class-sv-wc-payment-gateway.php:472
820
  msgid "Card number is missing"
821
  msgstr ""
822
 
823
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:190
824
- #: payment-gateway/class-sv-wc-payment-gateway.php:475
825
  msgid "Card number is invalid (wrong length)"
826
  msgstr ""
827
 
828
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:195
829
- #: payment-gateway/class-sv-wc-payment-gateway.php:474
830
  msgid "Card number is invalid (only digits allowed)"
831
  msgstr ""
832
 
833
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:200
834
- #: payment-gateway/class-sv-wc-payment-gateway.php:473
835
  msgid "Card number is invalid"
836
  msgstr ""
837
 
838
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:227
839
- #: payment-gateway/class-sv-wc-payment-gateway.php:477
840
  msgid "Card security code is invalid (only digits are allowed)"
841
  msgstr ""
842
 
843
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:233
844
- #: payment-gateway/class-sv-wc-payment-gateway.php:478
845
  msgid "Card security code is invalid (must be 3 or 4 digits)"
846
  msgstr ""
847
 
848
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:239
849
- #: payment-gateway/class-sv-wc-payment-gateway.php:476
850
  msgid "Card security code is missing"
851
  msgstr ""
852
 
853
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:266
854
- #: payment-gateway/class-sv-wc-payment-gateway.php:488
855
  msgid "Routing Number is missing"
856
  msgstr ""
857
 
858
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:273
859
- #: payment-gateway/class-sv-wc-payment-gateway.php:489
860
  msgid "Routing Number is invalid (only digits are allowed)"
861
  msgstr ""
862
 
863
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:279
864
- #: payment-gateway/class-sv-wc-payment-gateway.php:490
865
  msgid "Routing number is invalid (must be 9 digits)"
866
  msgstr ""
867
 
868
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:288
869
- #: payment-gateway/class-sv-wc-payment-gateway.php:485
870
  msgid "Account Number is missing"
871
  msgstr ""
872
 
873
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:295
874
- #: payment-gateway/class-sv-wc-payment-gateway.php:486
875
  msgid "Account Number is invalid (only digits are allowed)"
876
  msgstr ""
877
 
878
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:301
879
- #: payment-gateway/class-sv-wc-payment-gateway.php:487
880
  msgid "Account number is invalid (must be between 5 and 17 digits)"
881
  msgstr ""
882
 
883
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:308
884
- #: payment-gateway/class-sv-wc-payment-gateway.php:484
885
  msgid "Drivers license number is invalid"
886
  msgstr ""
887
 
888
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:314
889
- #: payment-gateway/class-sv-wc-payment-gateway.php:480
890
  msgid "Check Number is invalid (only digits are allowed)"
891
  msgstr ""
892
 
893
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:482
894
  msgid "Unknown error"
895
  msgstr ""
896
 
897
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:491
898
  msgid "Payment method address could not be updated. %s"
899
  msgstr ""
900
 
901
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:658
902
- #: payment-gateway/class-sv-wc-payment-gateway.php:2580
903
  #. translators: Placeholders: %1$s - payment method title, %2$s - payment
904
  #. account type (savings/checking) (may or may not be available), %3$s - last
905
  #. four digits of the account
906
  msgid "%1$s Check Transaction Approved: %2$s account ending in %3$s"
907
  msgstr ""
908
 
909
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:663
910
- #: payment-gateway/class-sv-wc-payment-gateway.php:2585
911
  #. translators: Placeholders: %s - check number
912
  msgid "Check number %s"
913
  msgstr ""
914
 
915
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:731
916
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
917
  #. ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type
918
  #. (mastercard, visa, ...), %5$s - last four digits of the card
919
  msgid "%1$s %2$s %3$s Approved: %4$s ending in %5$s"
920
  msgstr ""
921
 
922
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:744
923
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:661
924
- #: payment-gateway/class-sv-wc-payment-gateway.php:2538
925
  #. translators: Placeholders: %s - expiry date
926
  msgid "(expires %s)"
927
  msgstr ""
928
 
929
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:815
930
  #. translators: Placeholders: %s - failure message
931
  msgid "Tokenization Request Failed: %s"
932
  msgstr ""
933
 
934
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:826
935
  #. translators: Placeholders: %1$s - payment method title, %2$s - failure
936
  #. message
937
  msgid "%1$s Tokenization Request Failed: %2$s"
938
  msgstr ""
939
 
940
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:847
941
- #: payment-gateway/class-sv-wc-payment-gateway.php:1726
942
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:357
943
- #. translators: This is a message describing that the transaction in question
944
- #. only performed a credit card authorization and did not capture any funds.
945
- msgid "Authorization only transaction"
946
- msgstr ""
947
-
948
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:884
949
  #. translators: Placeholders: %s - failure message. Payment method as in a
950
  #. specific credit card, e-check or bank account
951
  msgid "Oops, adding your new payment method failed: %s"
952
  msgstr ""
953
 
954
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:925
955
  #. translators: Payment method as in a specific credit card. Placeholders: %1$s
956
  #. - card type (visa, mastercard, ...), %2$s - last four digits of the card,
957
  #. %3$s - card expiry date
958
  msgid "Nice! New payment method added: %1$s ending in %2$s (expires %3$s)"
959
  msgstr ""
960
 
961
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:935
962
  #. translators: Payment method as in a specific e-check account. Placeholders:
963
  #. %1$s - account type (checking/savings), %2$s - last four digits of the
964
  #. account
965
  msgid "Nice! New payment method added: %1$s account ending in %2$s"
966
  msgstr ""
967
 
968
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:942
969
  #. translators: Payment method as in a specific credit card, e-check or bank
970
  #. account
971
  msgid "Nice! New payment method added."
972
  msgstr ""
973
 
974
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:1062
975
  #. translators: Placeholders: %1$s - site title, %2$s - customer email. Payment
976
  #. method as in a specific credit card, e-check or bank account
977
  msgid "%1$s - Add Payment Method for %2$s"
978
  msgstr ""
979
 
980
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:179
981
  msgid "PayPal"
982
  msgstr ""
983
 
984
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:180
985
  msgid "Checking Account"
986
  msgstr ""
987
 
988
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:181
989
  msgid "Savings Account"
990
  msgstr ""
991
 
992
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:182
993
  msgid "Credit / Debit Card"
994
  msgstr ""
995
 
996
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:183
997
  msgid "Bank Account"
998
  msgstr ""
999
 
1000
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:294
1001
  msgid "Thank you for your order, please click the button below to pay."
1002
  msgstr ""
1003
 
1004
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:295
1005
  msgid "Thank you for your order. We are now redirecting you to complete payment."
1006
  msgstr ""
1007
 
1008
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:296
1009
  msgid "Pay Now"
1010
  msgstr ""
1011
 
1012
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:297
1013
  msgid "Cancel Order"
1014
  msgstr ""
1015
 
1016
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:436
1017
- #. translators: Placeholders: %s - a WooCommerce order ID
1018
- msgid "Could not find order %s"
1019
- msgstr ""
1020
-
1021
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:500
1022
- #. translators: Placeholders: %s - payment gateway title (such as
1023
- #. Authorize.net, Braintree, etc)
1024
- msgid "%s duplicate transaction received"
1025
- msgstr ""
1026
-
1027
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:503
1028
- msgid "Order %s is already paid for."
1029
- msgstr ""
1030
-
1031
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:586
1032
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:832
1033
  #. translators: Placeholders: %1$s - payment gateway title (such as
1034
  #. Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank
1035
  #. account, etc), %3$s - last four digits of the card/account, %4$s -
@@ -1037,180 +1099,189 @@ msgstr ""
1037
  msgid "%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)"
1038
  msgstr ""
1039
 
1040
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:597
1041
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:843
1042
  #. translators: Placeholders: %1$s - payment gateway title (such as CyberSouce,
1043
  #. NETbilling, etc), %2$s - account type (checking/savings - may or may not be
1044
  #. available), %3$s - last four digits of the account
1045
  msgid "%1$s eCheck Payment Method Saved: %2$s account ending in %3$s"
1046
  msgstr ""
1047
 
1048
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:606
1049
  #. translators: Placeholders: %s - payment gateway title (such as CyberSouce,
1050
  #. NETbilling, etc)
1051
  msgid "%s Payment Method Saved"
1052
  msgstr ""
1053
 
1054
- #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:615
1055
  #. translators: Placeholders: %s - a failed tokenization API error
1056
  msgid "Tokenization failed. %s"
1057
  msgstr ""
1058
 
1059
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:224
1060
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:744
1061
  msgid "Edit"
1062
  msgstr ""
1063
 
1064
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:226
1065
  msgid "Oops, there was an error updating your payment method. Please try again."
1066
  msgstr ""
1067
 
1068
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:227
1069
  msgid "Are you sure you want to delete this payment method?"
1070
  msgstr ""
1071
 
1072
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:284
1073
  #. translators: Payment method as in a specific credit card, eCheck or bank
1074
  #. account
1075
  msgid "You do not have any saved payment methods."
1076
  msgstr ""
1077
 
1078
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:321
1079
  #. translators: Payment method as in a specific credit card, eCheck or bank
1080
  #. account
1081
  msgid "My Payment Methods"
1082
  msgstr ""
1083
 
1084
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:329
1085
  #. translators: Payment method as in a specific credit card, e-check or bank
1086
  #. account
1087
  msgid "Add New Payment Method"
1088
  msgstr ""
1089
 
1090
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:414
1091
  msgid "Method"
1092
  msgstr ""
1093
 
1094
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:415
1095
  msgid "Details"
1096
  msgstr ""
1097
 
1098
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:416
1099
  msgid "Expires"
1100
  msgstr ""
1101
 
1102
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:417
1103
  msgid "Default?"
1104
  msgstr ""
1105
 
1106
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:418
1107
  msgid "Actions"
1108
  msgstr ""
1109
 
1110
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:454
1111
  msgid "Credit/Debit Cards"
1112
  msgstr ""
1113
 
1114
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:463
1115
  msgid "Bank Accounts"
1116
  msgstr ""
1117
 
1118
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:515
1119
  msgid "N/A"
1120
  msgstr ""
1121
 
1122
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:624
1123
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:199
1124
  msgid "Nickname"
1125
  msgstr ""
1126
 
1127
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:805
1128
  msgid "Delete"
1129
  msgstr ""
1130
 
1131
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:959
1132
  msgid "Oops, you took too long, please try again."
1133
  msgstr ""
1134
 
1135
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:972
1136
  msgid "There was an error with your request, please try again."
1137
  msgstr ""
1138
 
1139
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:985
1140
  #. translators: Payment method as in a specific credit card, e-check or bank
1141
  #. account
1142
  msgid "Error removing payment method"
1143
  msgstr ""
1144
 
1145
- #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:990
1146
  #. translators: Payment method as in a specific credit card, e-check or bank
1147
  #. account
1148
  msgid "Payment method deleted."
1149
  msgstr ""
1150
 
1151
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:295
1152
  msgid "Card Number"
1153
  msgstr ""
1154
 
1155
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:316
1156
  msgid "MM / YY"
1157
  msgstr ""
1158
 
1159
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:334
1160
  msgid "Card Security Code"
1161
  msgstr ""
1162
 
1163
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:337
1164
  msgid "CSC"
1165
  msgstr ""
1166
 
1167
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:376
1168
  msgid "Where do I find this?"
1169
  msgstr ""
1170
 
1171
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:382
1172
  #. translators: e-check routing number, HTML form field label,
1173
  #. https:en.wikipedia.org/wiki/Routing_transit_number
1174
  msgid "Routing Number"
1175
  msgstr ""
1176
 
1177
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:401
1178
  #. translators: e-check account number, HTML form field label
1179
  msgid "Account Number"
1180
  msgstr ""
1181
 
1182
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:466
1183
  #. translators: Test mode refers to the current software environment
1184
  msgid "TEST MODE ENABLED"
1185
  msgstr ""
1186
 
1187
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:565
 
 
 
 
1188
  #. translators: Payment method as in a specific credit card, eCheck or bank
1189
  #. account
1190
  msgid "Manage Payment Methods"
1191
  msgstr ""
1192
 
1193
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:699
1194
  msgid "Use a new card"
1195
  msgstr ""
1196
 
1197
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:699
1198
  msgid "Use a new bank account"
1199
  msgstr ""
1200
 
1201
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:761
1202
  #. translators: account as in customer's account on the eCommerce site
1203
  msgid "Securely Save to Account"
1204
  msgstr ""
1205
 
1206
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:601
1207
- #. translators: Placeholders: %s - plugin name
 
 
 
 
 
1208
  msgid ""
1209
- "%s: WooCommerce is not being forced over SSL; your customer's payment data "
1210
- "may be at risk."
1211
  msgstr ""
1212
 
1213
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:614
1214
  #. translators: Placeholders: %s - payment gateway name
1215
  msgid ""
1216
  "%s will soon require TLS 1.2 support to process transactions and your "
@@ -1219,7 +1290,7 @@ msgid ""
1219
  "and request they make any necessary updates."
1220
  msgstr ""
1221
 
1222
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:670
1223
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
1224
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
1225
  msgid ""
@@ -1231,7 +1302,7 @@ msgid_plural ""
1231
  msgstr[0] ""
1232
  msgstr[1] ""
1233
 
1234
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:705
1235
  #. translators: Placeholders: %1$s - payment gateway name, %2$s - opening <a>
1236
  #. tag, %3$s - closing </a> tag
1237
  msgid ""
@@ -1240,7 +1311,24 @@ msgid ""
1240
  "processing, we recommend %2$sturning off Debug Mode%3$s"
1241
  msgstr ""
1242
 
1243
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:744
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1244
  #. translators: Placeholders: %1$s - payment gateway title (such as
1245
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1246
  msgid ""
@@ -1248,7 +1336,7 @@ msgid ""
1248
  "tokenization%3$s to activate %1$s for Subscriptions."
1249
  msgstr ""
1250
 
1251
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:762
1252
  #. translators: Placeholders: %1$s - payment gateway title (such as
1253
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1254
  msgid ""
@@ -1256,630 +1344,683 @@ msgid ""
1256
  "tokenization%3$s to activate %1$s for Pre-Orders."
1257
  msgstr ""
1258
 
1259
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:799
1260
  msgid ""
1261
  "You must enable tokenization for this gateway in order to support automatic "
1262
  "renewal payments with the WooCommerce Subscriptions extension."
1263
  msgstr ""
1264
 
1265
- #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:800
1266
  msgid "Inactive"
1267
  msgstr ""
1268
 
1269
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:114
1270
  msgid "%s Customer ID"
1271
  msgstr ""
1272
 
1273
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:183
1274
  msgid "Type"
1275
  msgstr ""
1276
 
1277
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:253
1278
  msgid "Removed payment token \"%d\""
1279
  msgstr ""
1280
 
1281
- #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:300
1282
  msgid "Expiry Date"
1283
  msgstr ""
1284
 
1285
- #: payment-gateway/class-sv-wc-payment-gateway.php:340
1286
  msgid "you successfully processed a payment!"
1287
  msgstr ""
1288
 
1289
- #: payment-gateway/class-sv-wc-payment-gateway.php:345
1290
  msgid "you successfully processed a refund!"
1291
  msgstr ""
1292
 
1293
- #: payment-gateway/class-sv-wc-payment-gateway.php:481
1294
  msgid "Check Number is missing"
1295
  msgstr ""
1296
 
1297
- #: payment-gateway/class-sv-wc-payment-gateway.php:482
1298
  msgid "Drivers license state is missing"
1299
  msgstr ""
1300
 
1301
- #: payment-gateway/class-sv-wc-payment-gateway.php:483
1302
  msgid "Drivers license number is missing"
1303
  msgstr ""
1304
 
1305
- #: payment-gateway/class-sv-wc-payment-gateway.php:659
 
 
 
 
1306
  msgid "Place order"
1307
  msgstr ""
1308
 
1309
- #: payment-gateway/class-sv-wc-payment-gateway.php:691
1310
  msgid "Thank you for your order."
1311
  msgstr ""
1312
 
1313
- #: payment-gateway/class-sv-wc-payment-gateway.php:1099
1314
  msgid "Credit Card"
1315
  msgstr ""
1316
 
1317
- #: payment-gateway/class-sv-wc-payment-gateway.php:1101
1318
  msgid "eCheck"
1319
  msgstr ""
1320
 
1321
- #: payment-gateway/class-sv-wc-payment-gateway.php:1119
1322
  msgid "Pay securely using your credit card."
1323
  msgstr ""
1324
 
1325
- #: payment-gateway/class-sv-wc-payment-gateway.php:1121
1326
  msgid "Pay securely using your checking account."
1327
  msgstr ""
1328
 
1329
- #: payment-gateway/class-sv-wc-payment-gateway.php:1141
1330
  msgid "Enable this gateway"
1331
  msgstr ""
1332
 
1333
- #: payment-gateway/class-sv-wc-payment-gateway.php:1147
1334
  msgid "Title"
1335
  msgstr ""
1336
 
1337
- #: payment-gateway/class-sv-wc-payment-gateway.php:1149
1338
  msgid "Payment method title that the customer will see during checkout."
1339
  msgstr ""
1340
 
1341
- #: payment-gateway/class-sv-wc-payment-gateway.php:1154
1342
  msgid "Description"
1343
  msgstr ""
1344
 
1345
- #: payment-gateway/class-sv-wc-payment-gateway.php:1156
1346
  msgid "Payment method description that the customer will see during checkout."
1347
  msgstr ""
1348
 
1349
- #: payment-gateway/class-sv-wc-payment-gateway.php:1185
1350
  msgid "Detailed Decline Messages"
1351
  msgstr ""
1352
 
1353
- #: payment-gateway/class-sv-wc-payment-gateway.php:1187
1354
  msgid ""
1355
  "Check to enable detailed decline messages to the customer during checkout "
1356
  "when possible, rather than a generic decline message."
1357
  msgstr ""
1358
 
1359
- #: payment-gateway/class-sv-wc-payment-gateway.php:1197
1360
  #. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
1361
  msgid ""
1362
  "Show Detailed Error Messages and API requests/responses on the checkout "
1363
  "page and/or save them to the %1$sdebug log%2$s"
1364
  msgstr ""
1365
 
1366
- #: payment-gateway/class-sv-wc-payment-gateway.php:1201
1367
  msgid "Show on Checkout Page"
1368
  msgstr ""
1369
 
1370
- #: payment-gateway/class-sv-wc-payment-gateway.php:1204
1371
  #. translators: show debugging information on both checkout page and in the log
1372
  msgid "Both"
1373
  msgstr ""
1374
 
1375
- #: payment-gateway/class-sv-wc-payment-gateway.php:1267
1376
  msgid "Select the gateway environment to use for transactions."
1377
  msgstr ""
1378
 
1379
- #: payment-gateway/class-sv-wc-payment-gateway.php:1321
1380
  msgid "Share connection settings"
1381
  msgstr ""
1382
 
1383
- #: payment-gateway/class-sv-wc-payment-gateway.php:1323
1384
  msgid "Use connection/authentication settings from other gateway"
1385
  msgstr ""
1386
 
1387
- #: payment-gateway/class-sv-wc-payment-gateway.php:1326
1388
  msgid "Disabled because the other gateway is using these settings"
1389
  msgstr ""
1390
 
1391
- #: payment-gateway/class-sv-wc-payment-gateway.php:1343
1392
  msgid "Card Verification (CSC)"
1393
  msgstr ""
1394
 
1395
- #: payment-gateway/class-sv-wc-payment-gateway.php:1344
1396
  msgid "Display the Card Security Code (CV2) field on checkout"
1397
  msgstr ""
1398
 
1399
- #: payment-gateway/class-sv-wc-payment-gateway.php:1352
1400
  msgid "Saved Card Verification"
1401
  msgstr ""
1402
 
1403
- #: payment-gateway/class-sv-wc-payment-gateway.php:1353
1404
  msgid "Display the Card Security Code field when paying with a saved card"
1405
  msgstr ""
1406
 
1407
- #: payment-gateway/class-sv-wc-payment-gateway.php:1681
1408
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1409
  msgid "%1$s - Order %2$s"
1410
  msgstr ""
1411
 
1412
- #: payment-gateway/class-sv-wc-payment-gateway.php:1807
1413
  #. translators: Placeholders: %1$s - site title, %2$s - order number.
1414
  #. Definitions: Capture as in capture funds from a credit card.
1415
  msgid "%1$s - Capture for Order %2$s"
1416
  msgstr ""
1417
 
1418
- #: payment-gateway/class-sv-wc-payment-gateway.php:1948
1419
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1420
  msgid "%1$s - Refund for Order %2$s"
1421
  msgstr ""
1422
 
1423
- #: payment-gateway/class-sv-wc-payment-gateway.php:2011
1424
  #. translators: Placeholders: %1$s - payment gateway title (such as
1425
  #. Authorize.net, Braintree, etc), %2$s - a monetary amount
1426
  msgid "%1$s Refund in the amount of %2$s approved."
1427
  msgstr ""
1428
 
1429
- #: payment-gateway/class-sv-wc-payment-gateway.php:2038
1430
  #. translators: Placeholders: %1$s - payment gateway title (such as
1431
  #. Authorize.net, Braintree, etc), %2$s - error code, %3$s - error message
1432
  msgid "%1$s Refund Failed: %2$s - %3$s"
1433
  msgstr ""
1434
 
1435
- #: payment-gateway/class-sv-wc-payment-gateway.php:2046
1436
  #. translators: Placeholders: %1$s - payment gateway title (such as
1437
  #. Authorize.net, Braintree, etc), %2$s - error message
1438
  msgid "%1$s Refund Failed: %2$s"
1439
  msgstr ""
1440
 
1441
- #: payment-gateway/class-sv-wc-payment-gateway.php:2066
1442
  #. translators: Placeholders: %s - payment gateway title (such as
1443
  #. Authorize.net, Braintree, etc)
1444
  msgid "%s Order completely refunded."
1445
  msgstr ""
1446
 
1447
- #: payment-gateway/class-sv-wc-payment-gateway.php:2119
1448
  msgid ""
1449
  "Oops, you cannot partially void this order. Please use the full order "
1450
  "amount."
1451
  msgstr ""
1452
 
1453
- #: payment-gateway/class-sv-wc-payment-gateway.php:2203
1454
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error code,
1455
  #. %3$s - error message. Void as in to void an order.
1456
  msgid "%1$s Void Failed: %2$s - %3$s"
1457
  msgstr ""
1458
 
1459
- #: payment-gateway/class-sv-wc-payment-gateway.php:2211
1460
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1461
  #. message. Void as in to void an order.
1462
  msgid "%1$s Void Failed: %2$s"
1463
  msgstr ""
1464
 
1465
- #: payment-gateway/class-sv-wc-payment-gateway.php:2232
1466
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - a monetary
1467
  #. amount. Void as in to void an order.
1468
  msgid "%1$s Void in the amount of %2$s approved."
1469
  msgstr ""
1470
 
1471
- #: payment-gateway/class-sv-wc-payment-gateway.php:2327
1472
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:163
1473
- #. translators: Placeholders: %1$s - status code, %2$s - status message
1474
- #. translators: Placeholders: %1$s - payment request response status code, %2$s
1475
- #. - payment request response status message
1476
- msgid "Status code %1$s: %2$s"
1477
- msgstr ""
1478
-
1479
- #: payment-gateway/class-sv-wc-payment-gateway.php:2330
1480
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:166
1481
- #. translators: Placeholders: %s - status code
1482
- #. translators: Placeholders: %s - payment request response status code
1483
- msgid "Status code: %s"
1484
- msgstr ""
1485
-
1486
- #: payment-gateway/class-sv-wc-payment-gateway.php:2333
1487
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:169
1488
- #. translators: Placeholders; %s - status message
1489
- #. translators: Placeholders: %s - payment request response status message
1490
- msgid "Status message: %s"
1491
- msgstr ""
1492
-
1493
- #: payment-gateway/class-sv-wc-payment-gateway.php:2338
1494
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:176
1495
- msgid "Transaction ID %s"
1496
- msgstr ""
1497
-
1498
- #: payment-gateway/class-sv-wc-payment-gateway.php:2517
1499
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1500
  #. ("Test"), %3$s - transaction type (authorization/charge)
1501
  msgid "%1$s %2$s %3$s Approved"
1502
  msgstr ""
1503
 
1504
- #: payment-gateway/class-sv-wc-payment-gateway.php:2527
1505
  #. translators: Placeholders: %1$s - credit card type (MasterCard, Visa,
1506
  #. etc...), %2$s - last four digits of the card
1507
  msgid "%1$s ending in %2$s"
1508
  msgstr ""
1509
 
1510
- #: payment-gateway/class-sv-wc-payment-gateway.php:2621
1511
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - message
1512
  #. (probably reason for the transaction being held for review)
1513
  msgid "%1$s Transaction Held for Review (%2$s)"
1514
  msgstr ""
1515
 
1516
- #: payment-gateway/class-sv-wc-payment-gateway.php:2663
1517
- msgid ""
1518
- "Your order has been received and is being reviewed. Thank you for your "
1519
- "business."
1520
- msgstr ""
1521
-
1522
- #: payment-gateway/class-sv-wc-payment-gateway.php:2708
1523
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1524
  #. message; e.g. Order Note: [Payment method] Payment failed [error]
1525
  msgid "%1$s Payment Failed (%2$s)"
1526
  msgstr ""
1527
 
1528
- #: payment-gateway/class-sv-wc-payment-gateway.php:2725
1529
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:375
1530
- msgid "An error occurred, please try again or try an alternate form of payment."
1531
- msgstr ""
1532
-
1533
- #: payment-gateway/class-sv-wc-payment-gateway.php:2742
1534
  #. translators: Placeholders: %1$s - payment gateway title, %2$s -
1535
  #. message/error
1536
  msgid "%1$s Transaction Cancelled (%2$s)"
1537
  msgstr ""
1538
 
1539
- #: payment-gateway/class-sv-wc-payment-gateway.php:2986
1540
  msgid "Transaction Type"
1541
  msgstr ""
1542
 
1543
- #: payment-gateway/class-sv-wc-payment-gateway.php:2988
1544
  msgid ""
1545
  "Select how transactions should be processed. Charge submits all "
1546
  "transactions for settlement, Authorization simply authorizes the order "
1547
  "total for capture later."
1548
  msgstr ""
1549
 
1550
- #: payment-gateway/class-sv-wc-payment-gateway.php:2999
1551
  msgid "Charge Virtual-Only Orders"
1552
  msgstr ""
1553
 
1554
- #: payment-gateway/class-sv-wc-payment-gateway.php:3001
1555
  msgid ""
1556
  "If the order contains exclusively virtual items, enable this to immediately "
1557
  "charge, rather than authorize, the transaction."
1558
  msgstr ""
1559
 
1560
- #: payment-gateway/class-sv-wc-payment-gateway.php:3009
1561
  msgid "Enable Partial Capture"
1562
  msgstr ""
1563
 
1564
- #: payment-gateway/class-sv-wc-payment-gateway.php:3011
1565
  msgid "Allow orders to be partially captured multiple times."
1566
  msgstr ""
1567
 
1568
- #: payment-gateway/class-sv-wc-payment-gateway.php:3023
1569
  msgid "Capture Paid Orders"
1570
  msgstr ""
1571
 
1572
- #: payment-gateway/class-sv-wc-payment-gateway.php:3026
1573
  msgid "Automatically capture orders when they are changed to %s."
1574
  msgstr ""
1575
 
1576
- #: payment-gateway/class-sv-wc-payment-gateway.php:3027
1577
  msgid "a paid status"
1578
  msgstr ""
1579
 
1580
- #: payment-gateway/class-sv-wc-payment-gateway.php:3216
1581
  msgid "Accepted Card Logos"
1582
  msgstr ""
1583
 
1584
- #: payment-gateway/class-sv-wc-payment-gateway.php:3218
1585
  msgid ""
1586
  "These are the card logos that are displayed to customers as accepted during "
1587
  "checkout."
1588
  msgstr ""
1589
 
1590
- #: payment-gateway/class-sv-wc-payment-gateway.php:3219
 
1591
  msgid ""
1592
- "This can be configured to match those accepted by your payment processor, "
1593
- "but does not change your merchant account configuration."
1594
  msgstr ""
1595
 
1596
- #: payment-gateway/class-sv-wc-payment-gateway.php:3307
1597
  #. translators:
1598
  #. http:www.cybersource.com/products/payment_security/payment_tokenization/ and
1599
  #. https:en.wikipedia.org/wiki/Tokenization_(data_security)
1600
  msgid "Tokenization"
1601
  msgstr ""
1602
 
1603
- #: payment-gateway/class-sv-wc-payment-gateway.php:3308
1604
  msgid "Allow customers to securely save their payment details for future checkout."
1605
  msgstr ""
1606
 
1607
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:250
 
 
 
 
 
 
 
 
1608
  msgid "Pre-Order Tokenization attempt failed (%s)"
1609
  msgstr ""
1610
 
1611
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:294
1612
  msgid "%s - Pre-Order Release Payment for Order %s"
1613
  msgstr ""
1614
 
1615
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:298
1616
  msgid "Payment token missing/invalid."
1617
  msgstr ""
1618
 
1619
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:323
1620
  msgid "%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)"
1621
  msgstr ""
1622
 
1623
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:334
1624
  msgid "%s eCheck Pre-Order Release Payment Approved: %s ending in %s"
1625
  msgstr ""
1626
 
1627
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:376
1628
  msgid "Pre-Order Release Payment Failed: %s"
1629
  msgstr ""
1630
 
1631
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:212
1632
  msgid "Subscription Renewal: payment token is missing/invalid."
1633
  msgstr ""
1634
 
1635
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:238
1636
  msgid "%1$s - Subscription Renewal Order %2$s"
1637
  msgstr ""
1638
 
1639
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:370
1640
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1641
  #. message; e.g. Order Note: [Payment method] Payment Change failed [error]
1642
  msgid "%1$s Payment Change Failed (%2$s)"
1643
  msgstr ""
1644
 
1645
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:510
1646
  msgid "Via %s ending in %s"
1647
  msgstr ""
1648
 
1649
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:537
1650
  msgid "Subscriptions"
1651
  msgstr ""
1652
 
1653
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:605
1654
  msgid ""
1655
  "This payment method is tied to a subscription and cannot be deleted. Please "
1656
  "switch the subscription to another method first."
1657
  msgstr ""
1658
 
1659
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:656
1660
  msgid "Payment Token"
1661
  msgstr ""
1662
 
1663
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:684
1664
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:689
1665
  msgid "%s is required."
1666
  msgstr ""
1667
 
1668
- #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:171
1669
  msgid "Unknown Error"
1670
  msgstr ""
1671
 
1672
- #: utilities/class-sv-wp-background-job-handler.php:640
1673
- msgid "Job data key \"%s\" not set"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1674
  msgstr ""
1675
 
1676
  #: utilities/class-sv-wp-background-job-handler.php:644
 
 
 
 
1677
  msgid "Job data key \"%s\" is not an array"
1678
  msgstr ""
1679
 
1680
- #: utilities/class-sv-wp-background-job-handler.php:877
1681
  msgid "Every %d Minutes"
1682
  msgstr ""
1683
 
1684
- #: utilities/class-sv-wp-background-job-handler.php:1040
1685
  msgid "Background Processing Test"
1686
  msgstr ""
1687
 
1688
- #: utilities/class-sv-wp-background-job-handler.php:1041
1689
  msgid "Run Test"
1690
  msgstr ""
1691
 
1692
- #: utilities/class-sv-wp-background-job-handler.php:1042
1693
  msgid ""
1694
  "This tool will test whether your server is capable of processing background "
1695
  "jobs."
1696
  msgstr ""
1697
 
1698
- #: utilities/class-sv-wp-background-job-handler.php:1060
1699
  msgid "Success! You should be able to process background jobs."
1700
  msgstr ""
1701
 
1702
- #: utilities/class-sv-wp-background-job-handler.php:1063
1703
  msgid ""
1704
  "Could not connect. Please ask your hosting company to ensure your server "
1705
  "has loopback connections enabled."
1706
  msgstr ""
1707
 
1708
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397
1709
  msgctxt "enhanced select"
1710
  msgid "No matches found"
1711
  msgstr ""
1712
 
1713
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398
1714
  msgctxt "enhanced select"
1715
  msgid "Loading failed"
1716
  msgstr ""
1717
 
1718
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399
1719
  msgctxt "enhanced select"
1720
  msgid "Please enter 1 or more characters"
1721
  msgstr ""
1722
 
1723
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400
1724
  msgctxt "enhanced select"
1725
  msgid "Please enter %qty% or more characters"
1726
  msgstr ""
1727
 
1728
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401
1729
  msgctxt "enhanced select"
1730
  msgid "Please delete 1 character"
1731
  msgstr ""
1732
 
1733
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402
1734
  msgctxt "enhanced select"
1735
  msgid "Please delete %qty% characters"
1736
  msgstr ""
1737
 
1738
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403
1739
  msgctxt "enhanced select"
1740
  msgid "You can only select 1 item"
1741
  msgstr ""
1742
 
1743
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404
1744
  msgctxt "enhanced select"
1745
  msgid "You can only select %qty% items"
1746
  msgstr ""
1747
 
1748
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:405
1749
  msgctxt "enhanced select"
1750
  msgid "Loading more results&hellip;"
1751
  msgstr ""
1752
 
1753
- #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:406
1754
  msgctxt "enhanced select"
1755
  msgid "Searching&hellip;"
1756
  msgstr ""
1757
 
1758
- #: class-sv-wc-helper.php:407
1759
  msgctxt "coordinating conjunction for a list of items: a, b, and c"
1760
  msgid "and"
1761
  msgstr ""
1762
 
1763
- #: class-sv-wc-plugin.php:534
1764
  msgctxt "noun"
1765
  msgid "Support"
1766
  msgstr ""
1767
 
1768
- #: class-sv-wc-plugin.php:539
1769
  msgctxt "verb"
1770
  msgid "Review"
1771
  msgstr ""
1772
 
1773
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:733
1774
- #: payment-gateway/class-sv-wc-payment-gateway.php:2519
1775
  msgctxt "noun, software environment"
1776
  msgid "Test"
1777
  msgstr ""
1778
 
1779
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:734
1780
- #: payment-gateway/class-sv-wc-payment-gateway.php:2520
1781
- #: payment-gateway/class-sv-wc-payment-gateway.php:2992
1782
  msgctxt "credit card transaction type"
1783
  msgid "Authorization"
1784
  msgstr ""
1785
 
1786
- #: payment-gateway/class-sv-wc-payment-gateway-direct.php:734
1787
- #: payment-gateway/class-sv-wc-payment-gateway.php:2520
1788
- #: payment-gateway/class-sv-wc-payment-gateway.php:2991
1789
  msgctxt "noun, credit card transaction type"
1790
  msgid "Charge"
1791
  msgstr ""
1792
 
1793
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:192
1794
  msgctxt "payment method type"
1795
  msgid "Account"
1796
  msgstr ""
1797
 
1798
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:227
1799
- #: payment-gateway/class-sv-wc-payment-gateway.php:3244
1800
  msgctxt "credit card type"
1801
  msgid "Visa"
1802
  msgstr ""
1803
 
1804
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:231
1805
- #: payment-gateway/class-sv-wc-payment-gateway.php:3245
1806
  msgctxt "credit card type"
1807
  msgid "MasterCard"
1808
  msgstr ""
1809
 
1810
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:235
1811
- #: payment-gateway/class-sv-wc-payment-gateway.php:3246
1812
  msgctxt "credit card type"
1813
  msgid "American Express"
1814
  msgstr ""
1815
 
1816
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:239
1817
  msgctxt "credit card type"
1818
  msgid "Diners Club"
1819
  msgstr ""
1820
 
1821
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:243
1822
- #: payment-gateway/class-sv-wc-payment-gateway.php:3247
1823
  msgctxt "credit card type"
1824
  msgid "Discover"
1825
  msgstr ""
1826
 
1827
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:247
1828
- #: payment-gateway/class-sv-wc-payment-gateway.php:3249
1829
  msgctxt "credit card type"
1830
  msgid "JCB"
1831
  msgstr ""
1832
 
1833
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:251
1834
  msgctxt "credit card type"
1835
  msgid "CarteBleue"
1836
  msgstr ""
1837
 
1838
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:255
1839
  msgctxt "credit card type"
1840
  msgid "Maestro"
1841
  msgstr ""
1842
 
1843
- #: payment-gateway/class-sv-wc-payment-gateway-helper.php:259
1844
  msgctxt "credit card type"
1845
  msgid "Laser"
1846
  msgstr ""
1847
 
1848
- #: payment-gateway/class-sv-wc-payment-gateway.php:3248
1849
  msgctxt "credit card type"
1850
  msgid "Diners"
1851
  msgstr ""
1852
 
1853
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:427
1854
  #. translators: http:www.investopedia.com/terms/c/checkingaccount.asp
1855
  msgctxt "account type"
1856
  msgid "Checking"
1857
  msgstr ""
1858
 
1859
- #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:429
1860
  #. translators: http:www.investopedia.com/terms/s/savingsaccount.asp
1861
  msgctxt "account type"
1862
  msgid "Savings"
1863
  msgstr ""
1864
 
1865
- #: payment-gateway/class-sv-wc-payment-gateway.php:2306
1866
  msgctxt "hash before order number"
1867
  msgid "#"
1868
  msgstr ""
1869
 
1870
- #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:567
1871
  msgctxt "hash before order number"
1872
  msgid "#%s"
1873
  msgstr ""
1874
 
1875
- #: payment-gateway/class-sv-wc-payment-gateway.php:3020
1876
  msgctxt ""
1877
  "coordinating conjunction for a list of order statuses: on-hold, processing, "
1878
  "or completed"
1879
  msgid "or"
1880
  msgstr ""
1881
 
1882
- #: payment-gateway/class-sv-wc-payment-gateway.php:3844
1883
  #. translators: https:www.skyverge.com/for-translators-environments/
1884
  msgctxt "software environment"
1885
  msgid "Production"
1
+ # Copyright (C) 2020
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Plugin Framework 5.7.1\n"
6
  "Report-Msgid-Bugs-To: https://support.woocommerce.com/hc/\n"
7
  "POT-Creation-Date: 2015-07-22 12:09:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: Lifecycle.php:394
16
  msgid "Awesome"
17
  msgstr ""
18
 
19
+ #: Lifecycle.php:395
20
  msgid "Fantastic"
21
  msgstr ""
22
 
23
+ #: Lifecycle.php:396
24
  msgid "Cowabunga"
25
  msgstr ""
26
 
27
+ #: Lifecycle.php:397
28
  msgid "Congratulations"
29
  msgstr ""
30
 
31
+ #: Lifecycle.php:398
32
  msgid "Hot dog"
33
  msgstr ""
34
 
35
+ #: Lifecycle.php:405
36
  #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
37
  #. tag, %4$s - <a> tag, %5$s - </a> tag
38
  msgid ""
41
  "happy to help -- please %4$sreach out to our support team%5$s."
42
  msgstr ""
43
 
44
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:182
45
  msgid ""
46
  "Thanks for installing %1$s! To get started, take a minute to %2$sread the "
47
  "documentation%3$s :)"
48
  msgstr ""
49
 
50
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:210
51
  msgid ""
52
  "Thanks for installing %1$s! To get started, take a minute to complete these "
53
  "%2$squick and easy setup steps%3$s :)"
54
  msgstr ""
55
 
56
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:235
57
  msgid "Setup"
58
  msgstr ""
59
 
60
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:303
61
  #. translators: Placeholders: %s - plugin name
62
  msgid "%s &rsaquo; Setup"
63
  msgstr ""
64
 
65
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:351
66
  msgid "Oops! An error occurred, please try again."
67
  msgstr ""
68
 
69
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:489
70
  msgid "Ready!"
71
  msgstr ""
72
 
73
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:582
74
  #. translators: Placeholder: %s - plugin name
75
  msgid "Welcome to %s!"
76
  msgstr ""
77
 
78
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:595
79
  msgid ""
80
  "This quick setup wizard will help you configure the basic settings and get "
81
  "you started."
82
  msgstr ""
83
 
84
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:609
85
  msgid "%s is ready!"
86
  msgstr ""
87
 
88
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:661
89
  msgid "Next step"
90
  msgstr ""
91
 
92
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:687
93
  msgid "You can also:"
94
  msgstr ""
95
 
96
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:731
97
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:761
98
  msgid "View the Docs"
99
  msgstr ""
100
 
101
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:732
102
  msgid "See more setup options"
103
  msgstr ""
104
 
105
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:733
106
  msgid "Learn more about customizing the plugin"
107
  msgstr ""
108
 
109
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:757
110
  msgid "Review Your Settings"
111
  msgstr ""
112
 
113
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:765
114
  msgid "Leave a Review"
115
  msgstr ""
116
 
117
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:789
 
118
  msgid "Continue"
119
  msgstr ""
120
 
121
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:949
122
  msgid "Return to the WordPress Dashboard"
123
  msgstr ""
124
 
125
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:951
126
  msgid "Not right now"
127
  msgstr ""
128
 
129
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:953
130
  msgid "Skip this step"
131
  msgstr ""
132
 
173
  msgid "Please %1$supdate WooCommerce%2$s"
174
  msgstr ""
175
 
176
+ #: class-sv-wc-plugin-compatibility.php:347
177
  msgid "WooCommerce"
178
  msgstr ""
179
 
180
+ #: class-sv-wc-plugin-dependencies.php:156
181
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
182
  #. extension/comma-separated list of PHP extensions
183
  msgid ""
190
  msgstr[0] ""
191
  msgstr[1] ""
192
 
193
+ #: class-sv-wc-plugin-dependencies.php:184
194
  #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP
195
  #. function/comma-separated list of PHP functions
196
  msgid ""
202
  msgstr[0] ""
203
  msgstr[1] ""
204
 
205
+ #: class-sv-wc-plugin-dependencies.php:214
206
  #. translators: Placeholders: %s - plugin name
207
  msgid ""
208
  "%s may behave unexpectedly because the following PHP configuration settings "
209
  "are required:"
210
  msgstr ""
211
 
212
+ #: class-sv-wc-plugin-dependencies.php:228
213
  msgid "%s or higher"
214
  msgstr ""
215
 
216
+ #: class-sv-wc-plugin-dependencies.php:238
217
  msgid ""
218
  "Please contact your hosting provider or server administrator to configure "
219
  "these settings."
220
  msgstr ""
221
 
222
+ #: class-sv-wc-plugin-dependencies.php:260
223
  #. translators: Placeholders: %1$s - <strong>, %2$s - </strong>
224
  msgid ""
225
  "Hey there! We've noticed that your server is running %1$san outdated "
234
  "resources to help you upgrade%5$s and to explain PHP versions further."
235
  msgstr ""
236
 
237
+ #: class-sv-wc-plugin.php:306
 
 
 
 
 
 
 
 
 
 
 
238
  #. translators: Placeholders: %s - plugin name
239
  msgid "You cannot clone instances of %s."
240
  msgstr ""
241
 
242
+ #: class-sv-wc-plugin.php:317
243
  #. translators: Placeholders: %s - plugin name
244
  msgid "You cannot unserialize instances of %s."
245
  msgstr ""
246
 
247
+ #: class-sv-wc-plugin.php:573
248
+ #. translators: Placeholders: %1$s - plugin name, %2$s - WooCommerce version
249
+ #. number, %3$s - opening <a> HTML link tag, %4$s - closing </a> HTML link tag
250
+ msgid ""
251
+ "Heads up! %1$s will soon discontinue support for WooCommerce %2$s. Please "
252
+ "%3$supdate WooCommerce%4$s to take advantage of the latest updates and "
253
+ "features."
254
+ msgstr ""
255
+
256
+ #: class-sv-wc-plugin.php:616
257
  #. translators: Docs as in Documentation
258
  msgid "Docs"
259
  msgstr ""
260
 
261
+ #: class-sv-wc-plugin.php:709
262
  msgid "%1$s - A minimum of %2$s is required."
263
  msgstr ""
264
 
265
+ #: class-sv-wc-plugin.php:718
266
  msgid "Set as %1$s - %2$s is required."
267
  msgstr ""
268
 
269
+ #: class-sv-wc-plugin.php:998
270
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:789
271
  msgid "Configure"
272
  msgstr ""
273
 
274
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:179
275
+ msgid ""
276
+ "There was a problem processing your order and it is being placed on hold "
277
+ "for review. Please contact us to complete the transaction."
278
+ msgstr ""
279
+
280
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:217
281
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2813
282
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:489
283
+ msgid "An error occurred, please try again or try an alternate form of payment."
284
+ msgstr ""
285
+
286
+ #: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:320
287
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:445
288
+ #. translators: Placeholders: %s - a WooCommerce order ID
289
+ msgid "Could not find order %s"
290
+ msgstr ""
291
+
292
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:152
293
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2406
294
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:165
295
+ #. translators: Placeholders: %1$s - status code, %2$s - status message
296
+ #. translators: Placeholders: %1$s - payment request response status code, %2$s
297
+ #. - payment request response status message
298
+ msgid "Status code %1$s: %2$s"
299
+ msgstr ""
300
+
301
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:155
302
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2409
303
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:168
304
+ #. translators: Placeholders: %s - status code
305
+ #. translators: Placeholders: %s - payment request response status code
306
+ msgid "Status code: %s"
307
+ msgstr ""
308
+
309
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:158
310
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2412
311
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:171
312
+ #. translators: Placeholders; %s - status message
313
+ #. translators: Placeholders: %s - payment request response status message
314
+ msgid "Status message: %s"
315
+ msgstr ""
316
+
317
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:163
318
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2417
319
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:178
320
+ msgid "Transaction ID %s"
321
+ msgstr ""
322
+
323
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:204
324
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:509
325
+ #. translators: Placeholders: %s - payment gateway title (such as
326
+ #. Authorize.net, Braintree, etc)
327
+ msgid "%s duplicate transaction received"
328
+ msgstr ""
329
+
330
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:207
331
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:512
332
+ msgid "Order %s is already paid for."
333
+ msgstr ""
334
+
335
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:267
336
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2749
337
+ msgid ""
338
+ "Your order has been received and is being reviewed. Thank you for your "
339
+ "business."
340
+ msgstr ""
341
+
342
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:274
343
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:861
344
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1784
345
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:370
346
+ #. translators: This is a message describing that the transaction in question
347
+ #. only performed a credit card authorization and did not capture any funds.
348
+ msgid "Authorization only transaction"
349
+ msgstr ""
350
+
351
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:364
352
+ #. translators: Placeholders: %s - payment gateway title
353
+ msgid "%s Transaction Held for Review"
354
+ msgstr ""
355
+
356
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:435
357
+ #. translators: Placeholders: %s - payment gateway title
358
+ msgid "%s Payment Failed"
359
+ msgstr ""
360
+
361
+ #: payment-gateway/Handlers/Abstract_Payment_Handler.php:462
362
+ #. translators: Placeholders: %s - payment gateway title
363
+ msgid "%s Transaction Cancelled"
364
+ msgstr ""
365
+
366
+ #: payment-gateway/Handlers/Capture.php:158
367
  msgid "Order cannot be captured"
368
  msgstr ""
369
 
370
+ #: payment-gateway/Handlers/Capture.php:163
371
  msgid "Transaction authorization has expired"
372
  msgstr ""
373
 
374
+ #: payment-gateway/Handlers/Capture.php:168
375
  msgid "Transaction has already been fully captured"
376
  msgstr ""
377
 
378
+ #: payment-gateway/Handlers/Capture.php:173
379
  msgid "Transaction cannot be captured"
380
  msgstr ""
381
 
382
+ #: payment-gateway/Handlers/Capture.php:189
383
  #. translators: Placeholders: %1$s - payment gateway title (such as
384
  #. Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions:
385
  #. Capture, as in capture funds from a credit card.
386
  msgid "%1$s Capture of %2$s Approved"
387
  msgstr ""
388
 
389
+ #: payment-gateway/Handlers/Capture.php:198
390
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:680
391
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:765
392
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2085
393
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2318
394
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2630
395
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2675
396
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:353
397
  #. translators: Placeholders: %s - transaction ID
398
  msgid "(Transaction ID %s)"
399
  msgstr ""
400
 
401
+ #: payment-gateway/Handlers/Capture.php:229
402
  #. translators: Placeholders: %1$s - payment gateway title (such as
403
  #. Authorize.net, Braintree, etc), %2$s - failure message. Definitions:
404
  #. "capture" as in capturing funds from a credit card.
405
  msgid "%1$s Capture Failed: %2$s"
406
  msgstr ""
407
 
408
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:120
409
  msgid "Are you sure you wish to process this capture? The action cannot be undone."
410
  msgstr ""
411
 
412
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:123
413
  msgid ""
414
  "Something went wrong, and the capture could no be completed. Please try "
415
  "again."
416
  msgstr ""
417
 
418
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:167
419
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:242
420
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:305
421
  #. translators: verb, as in "Capture credit card charge". Used when an
422
  #. amount has been pre-authorized before, but funds have not yet been captured
423
  #. (taken) from the card. Capturing the charge will take the money from the
425
  msgid "Capture Charge"
426
  msgstr ""
427
 
428
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:295
429
  msgid "This charge has been fully captured."
430
  msgstr ""
431
 
432
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:297
433
  msgid "This charge can no longer be captured."
434
  msgstr ""
435
 
436
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:299
437
  msgid "This charge cannot be captured."
438
  msgstr ""
439
 
440
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:91
441
  msgid "Are you sure you want to remove this token?"
442
  msgstr ""
443
 
444
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:101
445
  msgid "Invalid token data"
446
  msgstr ""
447
 
448
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:105
449
  msgid "An error occurred. Please try again."
450
  msgstr ""
451
 
452
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:454
453
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:305
454
  msgid "(%s)"
455
  msgstr ""
456
 
457
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:484
458
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:754
459
  msgid "Default"
460
  msgstr ""
461
 
462
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:520
463
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:553
464
  msgid "Token ID"
465
  msgstr ""
466
 
467
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:525
468
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:300
469
  msgid "Card Type"
470
  msgstr ""
471
 
472
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:530
473
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:566
474
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:192
475
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:298
476
  msgid "Last Four"
477
  msgstr ""
478
 
479
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:537
480
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:358
481
  msgid "Expiration (MM/YY)"
482
  msgstr ""
483
 
484
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:558
485
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:466
486
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:299
487
  #. translators: e-check account type, HTML form field label
488
  msgid "Account Type"
489
  msgstr ""
490
 
491
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:561
492
  msgid "Checking"
493
  msgstr ""
494
 
495
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:562
496
  msgid "Savings"
497
  msgstr ""
498
 
499
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:663
500
  msgid "Refresh"
501
  msgstr ""
502
 
503
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:665
504
  msgid "Add New"
505
  msgstr ""
506
 
507
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:668
508
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:849
509
  msgid "Save"
510
  msgstr ""
511
 
512
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:691
513
  msgid "Remove"
514
  msgstr ""
515
 
516
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:224
517
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:209
518
  msgid "%s Payment Tokens"
519
  msgstr ""
520
 
521
+ #: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:302
522
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:779
523
  msgid "Customer ID"
524
  msgstr ""
525
 
527
  msgid "This section contains configuration settings for this gateway."
528
  msgstr ""
529
 
530
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:53
531
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1313
532
  #. translators: environment as in a software environment (test/production)
533
  msgid "Environment"
534
  msgstr ""
535
 
536
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:54
537
  msgid "The transaction environment for this gateway."
538
  msgstr ""
539
 
540
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:61
541
  msgid "Tokenization Enabled"
542
  msgstr ""
543
 
544
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:62
545
  msgid "Displays whether or not tokenization is enabled for this gateway."
546
  msgstr ""
547
 
548
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:75
549
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1243
550
  msgid "Debug Mode"
551
  msgstr ""
552
 
553
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:76
554
  msgid "Displays whether or not debug logging is enabled for this gateway."
555
  msgstr ""
556
 
557
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:79
558
  msgid "Display at Checkout & Log"
559
  msgstr ""
560
 
561
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:81
562
  msgid "Display at Checkout"
563
  msgstr ""
564
 
565
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:83
566
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1251
567
  msgid "Save to Log"
568
  msgstr ""
569
 
570
+ #: payment-gateway/admin/views/html-admin-gateway-status.php:85
571
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1249
572
  msgid "Off"
573
  msgstr ""
574
 
597
  msgstr ""
598
 
599
  #: payment-gateway/admin/views/html-order-partial-capture.php:66
600
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:288
601
  msgid "Cancel"
602
  msgstr ""
603
 
613
  msgid "The gateway customer ID for the user. Only edit this if necessary."
614
  msgstr ""
615
 
616
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99
617
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:186
618
  msgid "An error occurred, please try again or try an alternate form of payment"
619
  msgstr ""
620
 
621
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:100
622
  msgid ""
623
  "We cannot process your order with the payment information that you "
624
  "provided. Please use a different payment account or an alternate payment "
625
  "method."
626
  msgstr ""
627
 
628
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:101
629
  msgid ""
630
  "This order is being placed on hold for review. Please contact us to "
631
  "complete the transaction."
632
  msgstr ""
633
 
634
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106
635
  msgid ""
636
  "This order is being placed on hold for review due to an incorrect card "
637
  "verification number. You may contact the store to complete the transaction."
638
  msgstr ""
639
 
640
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:107
641
  msgid "The card verification number is invalid, please try again."
642
  msgstr ""
643
 
644
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:108
645
  msgid "Please enter your card verification number and try again."
646
  msgstr ""
647
 
648
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111
649
  msgid ""
650
  "That card type is not accepted, please use an alternate card or other form "
651
  "of payment."
652
  msgstr ""
653
 
654
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:112
655
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116
656
  msgid ""
657
  "The card type is invalid or does not correlate with the credit card number. "
658
  " Please try again or use an alternate card or other form of payment."
659
  msgstr ""
660
 
661
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:113
662
  msgid "Please select the card type and try again."
663
  msgstr ""
664
 
665
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:117
666
  msgid "The card number is invalid, please re-enter and try again."
667
  msgstr ""
668
 
669
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:118
670
  msgid "Please enter your card number and try again."
671
  msgstr ""
672
 
673
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121
674
  msgid "The card expiration date is invalid, please re-enter and try again."
675
  msgstr ""
676
 
677
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122
678
  msgid "The card expiration month is invalid, please re-enter and try again."
679
  msgstr ""
680
 
681
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:123
682
  msgid "The card expiration year is invalid, please re-enter and try again."
683
  msgstr ""
684
 
685
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:124
686
  msgid "Please enter your card expiration date and try again."
687
  msgstr ""
688
 
689
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:127
690
  msgid "The bank routing number is invalid, please re-enter and try again."
691
  msgstr ""
692
 
693
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:128
694
  msgid "The bank account number is invalid, please re-enter and try again."
695
  msgstr ""
696
 
697
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131
698
  msgid ""
699
  "The provided card is expired, please use an alternate card or other form of "
700
  "payment."
701
  msgstr ""
702
 
703
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132
704
  msgid ""
705
  "The provided card was declined, please use an alternate card or other form "
706
  "of payment."
707
  msgstr ""
708
 
709
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133
710
  msgid ""
711
  "Insufficient funds in account, please use an alternate card or other form "
712
  "of payment."
713
  msgstr ""
714
 
715
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134
716
  msgid ""
717
  "The card is inactivate or not authorized for card-not-present transactions, "
718
  "please use an alternate card or other form of payment."
719
  msgstr ""
720
 
721
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135
722
  msgid ""
723
  "The credit limit for the card has been reached, please use an alternate "
724
  "card or other form of payment."
725
  msgstr ""
726
 
727
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:136
728
  msgid "The card verification number does not match. Please re-enter and try again."
729
  msgstr ""
730
 
731
+ #: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:137
732
  msgid ""
733
  "The provided address does not match the billing address for cardholder. "
734
  "Please verify the address and try again."
735
  msgstr ""
736
 
737
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:84
738
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:102
739
  msgid "Apple Pay"
740
  msgstr ""
741
 
742
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:108
743
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1189
744
  msgid "Enable / Disable"
745
  msgstr ""
746
 
747
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:109
748
  msgid "Accept Apple Pay"
749
  msgstr ""
750
 
751
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:116
752
  msgid "Allow Apple Pay on"
753
  msgstr ""
754
 
755
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:126
756
  msgid "Button Style"
757
  msgstr ""
758
 
759
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:129
760
  msgid "Black"
761
  msgstr ""
762
 
763
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:130
764
  msgid "White"
765
  msgstr ""
766
 
767
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:131
768
  msgid "White with outline"
769
  msgstr ""
770
 
771
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:143
772
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1364
773
  msgid "Connection Settings"
774
  msgstr ""
775
 
776
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:152
777
  msgid "Apple Merchant ID"
778
  msgstr ""
779
 
780
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:156
781
  msgid "This is found in your %1$sApple developer account%2$s"
782
  msgstr ""
783
 
784
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:166
785
  msgid "Certificate Path"
786
  msgstr ""
787
 
788
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:171
789
  #. translators: Placeholders: %s - the server's web root path
790
  msgid "For reference, your current web root path is: %s"
791
  msgstr ""
792
 
793
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:184
794
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:194
795
  msgid "Processing Gateway"
796
  msgstr ""
797
 
798
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:202
799
  msgid "Test Mode"
800
  msgstr ""
801
 
802
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:203
803
  msgid ""
804
  "Enable to test Apple Pay functionality throughout your sites without "
805
  "processing real payments."
806
  msgstr ""
807
 
808
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:312
809
  msgid "Your site must be served over HTTPS with a valid SSL certificate."
810
  msgstr ""
811
 
812
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:322
813
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
814
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
815
  msgid ""
821
  msgstr[0] ""
822
  msgstr[1] ""
823
 
824
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:341
825
  msgid ""
826
  "Your %1$sMerchant Identity Certificate%2$s cannot be found. Please check "
827
  "your path configuration."
828
  msgstr ""
829
 
830
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:348
831
  msgid "Apple Pay is disabled."
832
  msgstr ""
833
 
834
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:387
835
  msgid "Single products"
836
  msgstr ""
837
 
838
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:388
839
  msgid "Cart"
840
  msgstr ""
841
 
842
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:389
843
  msgid "Checkout"
844
  msgstr ""
845
 
846
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:300
847
  msgid "Buy with"
848
  msgstr ""
849
 
850
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:333
851
+ msgid "By submitting your payment, you agree to our %1$sterms and conditions%2$s."
852
  msgstr ""
853
 
854
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:558
855
  msgid "or"
856
  msgstr ""
857
 
858
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:123
859
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:136
860
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php:140
 
 
 
 
 
861
  msgid "Error %d: Unable to create order. Please try again."
862
  msgstr ""
863
 
864
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:154
865
  msgid "Apple Pay payment authorized."
866
  msgstr ""
867
 
868
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:188
869
  msgid "Apple Pay payment failed. %s"
870
  msgstr ""
871
 
872
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:566
873
  msgid "Subtotal"
874
  msgstr ""
875
 
876
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:576
877
  msgid "Discount"
878
  msgstr ""
879
 
880
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:586
881
  msgid "Shipping"
882
  msgstr ""
883
 
884
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:596
885
  msgid "Fees"
886
  msgstr ""
887
 
888
+ #: payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:606
889
  msgid "Taxes"
890
  msgstr ""
891
 
892
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:61
893
  msgid ""
894
  "Payment error, please try another payment method or contact us to complete "
895
  "your transaction."
896
  msgstr ""
897
 
898
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:161
899
+ #: payment-gateway/class-sv-wc-payment-gateway.php:487
900
  msgid "Card expiration date is invalid"
901
  msgstr ""
902
 
903
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:185
904
+ #: payment-gateway/class-sv-wc-payment-gateway.php:480
905
  msgid "Card number is missing"
906
  msgstr ""
907
 
908
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:191
909
+ #: payment-gateway/class-sv-wc-payment-gateway.php:483
910
  msgid "Card number is invalid (wrong length)"
911
  msgstr ""
912
 
913
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:196
914
+ #: payment-gateway/class-sv-wc-payment-gateway.php:482
915
  msgid "Card number is invalid (only digits allowed)"
916
  msgstr ""
917
 
918
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:201
919
+ #: payment-gateway/class-sv-wc-payment-gateway.php:481
920
  msgid "Card number is invalid"
921
  msgstr ""
922
 
923
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:228
924
+ #: payment-gateway/class-sv-wc-payment-gateway.php:485
925
  msgid "Card security code is invalid (only digits are allowed)"
926
  msgstr ""
927
 
928
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:234
929
+ #: payment-gateway/class-sv-wc-payment-gateway.php:486
930
  msgid "Card security code is invalid (must be 3 or 4 digits)"
931
  msgstr ""
932
 
933
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:240
934
+ #: payment-gateway/class-sv-wc-payment-gateway.php:484
935
  msgid "Card security code is missing"
936
  msgstr ""
937
 
938
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:267
939
+ #: payment-gateway/class-sv-wc-payment-gateway.php:496
940
  msgid "Routing Number is missing"
941
  msgstr ""
942
 
943
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:274
944
+ #: payment-gateway/class-sv-wc-payment-gateway.php:497
945
  msgid "Routing Number is invalid (only digits are allowed)"
946
  msgstr ""
947
 
948
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:280
949
+ #: payment-gateway/class-sv-wc-payment-gateway.php:498
950
  msgid "Routing number is invalid (must be 9 digits)"
951
  msgstr ""
952
 
953
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:289
954
+ #: payment-gateway/class-sv-wc-payment-gateway.php:493
955
  msgid "Account Number is missing"
956
  msgstr ""
957
 
958
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:296
959
+ #: payment-gateway/class-sv-wc-payment-gateway.php:494
960
  msgid "Account Number is invalid (only digits are allowed)"
961
  msgstr ""
962
 
963
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:302
964
+ #: payment-gateway/class-sv-wc-payment-gateway.php:495
965
  msgid "Account number is invalid (must be between 5 and 17 digits)"
966
  msgstr ""
967
 
968
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:309
969
+ #: payment-gateway/class-sv-wc-payment-gateway.php:492
970
  msgid "Drivers license number is invalid"
971
  msgstr ""
972
 
973
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:315
974
+ #: payment-gateway/class-sv-wc-payment-gateway.php:488
975
  msgid "Check Number is invalid (only digits are allowed)"
976
  msgstr ""
977
 
978
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:494
979
  msgid "Unknown error"
980
  msgstr ""
981
 
982
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:503
983
  msgid "Payment method address could not be updated. %s"
984
  msgstr ""
985
 
986
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:670
987
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2665
988
  #. translators: Placeholders: %1$s - payment method title, %2$s - payment
989
  #. account type (savings/checking) (may or may not be available), %3$s - last
990
  #. four digits of the account
991
  msgid "%1$s Check Transaction Approved: %2$s account ending in %3$s"
992
  msgstr ""
993
 
994
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:675
995
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2670
996
  #. translators: Placeholders: %s - check number
997
  msgid "Check number %s"
998
  msgstr ""
999
 
1000
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:744
1001
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1002
  #. ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type
1003
  #. (mastercard, visa, ...), %5$s - last four digits of the card
1004
  msgid "%1$s %2$s %3$s Approved: %4$s ending in %5$s"
1005
  msgstr ""
1006
 
1007
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:757
1008
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:714
1009
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2622
1010
  #. translators: Placeholders: %s - expiry date
1011
  msgid "(expires %s)"
1012
  msgstr ""
1013
 
1014
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:829
1015
  #. translators: Placeholders: %s - failure message
1016
  msgid "Tokenization Request Failed: %s"
1017
  msgstr ""
1018
 
1019
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:840
1020
  #. translators: Placeholders: %1$s - payment method title, %2$s - failure
1021
  #. message
1022
  msgid "%1$s Tokenization Request Failed: %2$s"
1023
  msgstr ""
1024
 
1025
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:898
 
 
 
 
 
 
 
 
1026
  #. translators: Placeholders: %s - failure message. Payment method as in a
1027
  #. specific credit card, e-check or bank account
1028
  msgid "Oops, adding your new payment method failed: %s"
1029
  msgstr ""
1030
 
1031
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:939
1032
  #. translators: Payment method as in a specific credit card. Placeholders: %1$s
1033
  #. - card type (visa, mastercard, ...), %2$s - last four digits of the card,
1034
  #. %3$s - card expiry date
1035
  msgid "Nice! New payment method added: %1$s ending in %2$s (expires %3$s)"
1036
  msgstr ""
1037
 
1038
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:949
1039
  #. translators: Payment method as in a specific e-check account. Placeholders:
1040
  #. %1$s - account type (checking/savings), %2$s - last four digits of the
1041
  #. account
1042
  msgid "Nice! New payment method added: %1$s account ending in %2$s"
1043
  msgstr ""
1044
 
1045
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:956
1046
  #. translators: Payment method as in a specific credit card, e-check or bank
1047
  #. account
1048
  msgid "Nice! New payment method added."
1049
  msgstr ""
1050
 
1051
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:1079
1052
  #. translators: Placeholders: %1$s - site title, %2$s - customer email. Payment
1053
  #. method as in a specific credit card, e-check or bank account
1054
  msgid "%1$s - Add Payment Method for %2$s"
1055
  msgstr ""
1056
 
1057
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:180
1058
  msgid "PayPal"
1059
  msgstr ""
1060
 
1061
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:181
1062
  msgid "Checking Account"
1063
  msgstr ""
1064
 
1065
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:182
1066
  msgid "Savings Account"
1067
  msgstr ""
1068
 
1069
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:183
1070
  msgid "Credit / Debit Card"
1071
  msgstr ""
1072
 
1073
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:184
1074
  msgid "Bank Account"
1075
  msgstr ""
1076
 
1077
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:297
1078
  msgid "Thank you for your order, please click the button below to pay."
1079
  msgstr ""
1080
 
1081
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:298
1082
  msgid "Thank you for your order. We are now redirecting you to complete payment."
1083
  msgstr ""
1084
 
1085
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:299
1086
  msgid "Pay Now"
1087
  msgstr ""
1088
 
1089
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:300
1090
  msgid "Cancel Order"
1091
  msgstr ""
1092
 
1093
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:597
1094
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1095
  #. translators: Placeholders: %1$s - payment gateway title (such as
1096
  #. Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank
1097
  #. account, etc), %3$s - last four digits of the card/account, %4$s -
1099
  msgid "%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)"
1100
  msgstr ""
1101
 
1102
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:608
1103
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:845
1104
  #. translators: Placeholders: %1$s - payment gateway title (such as CyberSouce,
1105
  #. NETbilling, etc), %2$s - account type (checking/savings - may or may not be
1106
  #. available), %3$s - last four digits of the account
1107
  msgid "%1$s eCheck Payment Method Saved: %2$s account ending in %3$s"
1108
  msgstr ""
1109
 
1110
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:617
1111
  #. translators: Placeholders: %s - payment gateway title (such as CyberSouce,
1112
  #. NETbilling, etc)
1113
  msgid "%s Payment Method Saved"
1114
  msgstr ""
1115
 
1116
+ #: payment-gateway/class-sv-wc-payment-gateway-hosted.php:626
1117
  #. translators: Placeholders: %s - a failed tokenization API error
1118
  msgid "Tokenization failed. %s"
1119
  msgstr ""
1120
 
1121
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:287
1122
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:848
1123
  msgid "Edit"
1124
  msgstr ""
1125
 
1126
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:289
1127
  msgid "Oops, there was an error updating your payment method. Please try again."
1128
  msgstr ""
1129
 
1130
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:290
1131
  msgid "Are you sure you want to delete this payment method?"
1132
  msgstr ""
1133
 
1134
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:377
1135
  #. translators: Payment method as in a specific credit card, eCheck or bank
1136
  #. account
1137
  msgid "You do not have any saved payment methods."
1138
  msgstr ""
1139
 
1140
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:416
1141
  #. translators: Payment method as in a specific credit card, eCheck or bank
1142
  #. account
1143
  msgid "My Payment Methods"
1144
  msgstr ""
1145
 
1146
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:424
1147
  #. translators: Payment method as in a specific credit card, e-check or bank
1148
  #. account
1149
  msgid "Add New Payment Method"
1150
  msgstr ""
1151
 
1152
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:512
1153
  msgid "Method"
1154
  msgstr ""
1155
 
1156
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:513
1157
  msgid "Details"
1158
  msgstr ""
1159
 
1160
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:514
1161
  msgid "Expires"
1162
  msgstr ""
1163
 
1164
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:515
1165
  msgid "Default?"
1166
  msgstr ""
1167
 
1168
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:516
1169
  msgid "Actions"
1170
  msgstr ""
1171
 
1172
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:552
1173
  msgid "Credit/Debit Cards"
1174
  msgstr ""
1175
 
1176
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:561
1177
  msgid "Bank Accounts"
1178
  msgstr ""
1179
 
1180
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:616
1181
  msgid "N/A"
1182
  msgstr ""
1183
 
1184
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:728
1185
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:200
1186
  msgid "Nickname"
1187
  msgstr ""
1188
 
1189
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:909
1190
  msgid "Delete"
1191
  msgstr ""
1192
 
1193
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1063
1194
  msgid "Oops, you took too long, please try again."
1195
  msgstr ""
1196
 
1197
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1076
1198
  msgid "There was an error with your request, please try again."
1199
  msgstr ""
1200
 
1201
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1089
1202
  #. translators: Payment method as in a specific credit card, e-check or bank
1203
  #. account
1204
  msgid "Error removing payment method"
1205
  msgstr ""
1206
 
1207
+ #: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1094
1208
  #. translators: Payment method as in a specific credit card, e-check or bank
1209
  #. account
1210
  msgid "Payment method deleted."
1211
  msgstr ""
1212
 
1213
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:340
1214
  msgid "Card Number"
1215
  msgstr ""
1216
 
1217
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:361
1218
  msgid "MM / YY"
1219
  msgstr ""
1220
 
1221
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:380
1222
  msgid "Card Security Code"
1223
  msgstr ""
1224
 
1225
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:383
1226
  msgid "CSC"
1227
  msgstr ""
1228
 
1229
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:423
1230
  msgid "Where do I find this?"
1231
  msgstr ""
1232
 
1233
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:429
1234
  #. translators: e-check routing number, HTML form field label,
1235
  #. https:en.wikipedia.org/wiki/Routing_transit_number
1236
  msgid "Routing Number"
1237
  msgstr ""
1238
 
1239
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:448
1240
  #. translators: e-check account number, HTML form field label
1241
  msgid "Account Number"
1242
  msgstr ""
1243
 
1244
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:514
1245
  #. translators: Test mode refers to the current software environment
1246
  msgid "TEST MODE ENABLED"
1247
  msgstr ""
1248
 
1249
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:541
1250
+ msgid "Sample Check"
1251
+ msgstr ""
1252
+
1253
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:616
1254
  #. translators: Payment method as in a specific credit card, eCheck or bank
1255
  #. account
1256
  msgid "Manage Payment Methods"
1257
  msgstr ""
1258
 
1259
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:753
1260
  msgid "Use a new card"
1261
  msgstr ""
1262
 
1263
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:753
1264
  msgid "Use a new bank account"
1265
  msgstr ""
1266
 
1267
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:816
1268
  #. translators: account as in customer's account on the eCommerce site
1269
  msgid "Securely Save to Account"
1270
  msgstr ""
1271
 
1272
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:950
1273
+ msgid "Payment Info"
1274
+ msgstr ""
1275
+
1276
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:619
1277
+ #. translators: Placeholders: %1$s - plugin name, %2$s - <a> tag, %3$s - </a>
1278
+ #. tag
1279
  msgid ""
1280
+ "%1$s: WooCommerce is not being forced over SSL; your customers' payment "
1281
+ "data may be at risk. %2$sVerify your site URLs here%3$s"
1282
  msgstr ""
1283
 
1284
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:636
1285
  #. translators: Placeholders: %s - payment gateway name
1286
  msgid ""
1287
  "%s will soon require TLS 1.2 support to process transactions and your "
1290
  "and request they make any necessary updates."
1291
  msgstr ""
1292
 
1293
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:692
1294
  #. translators: Placeholders: %1$s - plugin name, %2$s - a
1295
  #. currency/comma-separated list of currencies, %3$s - <a> tag, %4$s - </a> tag
1296
  msgid ""
1302
  msgstr[0] ""
1303
  msgstr[1] ""
1304
 
1305
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:727
1306
  #. translators: Placeholders: %1$s - payment gateway name, %2$s - opening <a>
1307
  #. tag, %3$s - closing </a> tag
1308
  msgid ""
1311
  "processing, we recommend %2$sturning off Debug Mode%3$s"
1312
  msgstr ""
1313
 
1314
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:778
1315
+ #. translators: Placeholders: %s - gateway name
1316
+ msgid "%s is not configured"
1317
+ msgstr ""
1318
+
1319
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:790
1320
+ msgid "Dismiss"
1321
+ msgstr ""
1322
+
1323
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:827
1324
+ #. translators: Placeholders: %1$s - plugin name, %2$s - opening <a> HTML link
1325
+ #. tag, %3$s - closing </a> HTML link tag
1326
+ msgid ""
1327
+ "Heads up! Apple Pay for %1$s requires WooCommerce version 3.2 or greater. "
1328
+ "Please %2$supdate WooCommerce%3$s."
1329
+ msgstr ""
1330
+
1331
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:863
1332
  #. translators: Placeholders: %1$s - payment gateway title (such as
1333
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1334
  msgid ""
1336
  "tokenization%3$s to activate %1$s for Subscriptions."
1337
  msgstr ""
1338
 
1339
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:881
1340
  #. translators: Placeholders: %1$s - payment gateway title (such as
1341
  #. Authorize.net, Braintree, etc), %2$s - <a> tag, %3$s - </a> tag
1342
  msgid ""
1344
  "tokenization%3$s to activate %1$s for Pre-Orders."
1345
  msgstr ""
1346
 
1347
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:918
1348
  msgid ""
1349
  "You must enable tokenization for this gateway in order to support automatic "
1350
  "renewal payments with the WooCommerce Subscriptions extension."
1351
  msgstr ""
1352
 
1353
+ #: payment-gateway/class-sv-wc-payment-gateway-plugin.php:919
1354
  msgid "Inactive"
1355
  msgstr ""
1356
 
1357
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:115
1358
  msgid "%s Customer ID"
1359
  msgstr ""
1360
 
1361
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:184
1362
  msgid "Type"
1363
  msgstr ""
1364
 
1365
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:254
1366
  msgid "Removed payment token \"%d\""
1367
  msgstr ""
1368
 
1369
+ #: payment-gateway/class-sv-wc-payment-gateway-privacy.php:301
1370
  msgid "Expiry Date"
1371
  msgstr ""
1372
 
1373
+ #: payment-gateway/class-sv-wc-payment-gateway.php:347
1374
  msgid "you successfully processed a payment!"
1375
  msgstr ""
1376
 
1377
+ #: payment-gateway/class-sv-wc-payment-gateway.php:352
1378
  msgid "you successfully processed a refund!"
1379
  msgstr ""
1380
 
1381
+ #: payment-gateway/class-sv-wc-payment-gateway.php:489
1382
  msgid "Check Number is missing"
1383
  msgstr ""
1384
 
1385
+ #: payment-gateway/class-sv-wc-payment-gateway.php:490
1386
  msgid "Drivers license state is missing"
1387
  msgstr ""
1388
 
1389
+ #: payment-gateway/class-sv-wc-payment-gateway.php:491
1390
  msgid "Drivers license number is missing"
1391
  msgstr ""
1392
 
1393
+ #: payment-gateway/class-sv-wc-payment-gateway.php:704
1394
+ msgid "Continue to Payment"
1395
+ msgstr ""
1396
+
1397
+ #: payment-gateway/class-sv-wc-payment-gateway.php:704
1398
  msgid "Place order"
1399
  msgstr ""
1400
 
1401
+ #: payment-gateway/class-sv-wc-payment-gateway.php:736
1402
  msgid "Thank you for your order."
1403
  msgstr ""
1404
 
1405
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1148
1406
  msgid "Credit Card"
1407
  msgstr ""
1408
 
1409
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1150
1410
  msgid "eCheck"
1411
  msgstr ""
1412
 
1413
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1168
1414
  msgid "Pay securely using your credit card."
1415
  msgstr ""
1416
 
1417
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1170
1418
  msgid "Pay securely using your checking account."
1419
  msgstr ""
1420
 
1421
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1190
1422
  msgid "Enable this gateway"
1423
  msgstr ""
1424
 
1425
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1196
1426
  msgid "Title"
1427
  msgstr ""
1428
 
1429
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1198
1430
  msgid "Payment method title that the customer will see during checkout."
1431
  msgstr ""
1432
 
1433
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1203
1434
  msgid "Description"
1435
  msgstr ""
1436
 
1437
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1205
1438
  msgid "Payment method description that the customer will see during checkout."
1439
  msgstr ""
1440
 
1441
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1234
1442
  msgid "Detailed Decline Messages"
1443
  msgstr ""
1444
 
1445
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1236
1446
  msgid ""
1447
  "Check to enable detailed decline messages to the customer during checkout "
1448
  "when possible, rather than a generic decline message."
1449
  msgstr ""
1450
 
1451
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1246
1452
  #. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
1453
  msgid ""
1454
  "Show Detailed Error Messages and API requests/responses on the checkout "
1455
  "page and/or save them to the %1$sdebug log%2$s"
1456
  msgstr ""
1457
 
1458
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1250
1459
  msgid "Show on Checkout Page"
1460
  msgstr ""
1461
 
1462
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1253
1463
  #. translators: show debugging information on both checkout page and in the log
1464
  msgid "Both"
1465
  msgstr ""
1466
 
1467
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1316
1468
  msgid "Select the gateway environment to use for transactions."
1469
  msgstr ""
1470
 
1471
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1370
1472
  msgid "Share connection settings"
1473
  msgstr ""
1474
 
1475
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1372
1476
  msgid "Use connection/authentication settings from other gateway"
1477
  msgstr ""
1478
 
1479
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1375
1480
  msgid "Disabled because the other gateway is using these settings"
1481
  msgstr ""
1482
 
1483
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1392
1484
  msgid "Card Verification (CSC)"
1485
  msgstr ""
1486
 
1487
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1393
1488
  msgid "Display the Card Security Code (CV2) field on checkout"
1489
  msgstr ""
1490
 
1491
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1401
1492
  msgid "Saved Card Verification"
1493
  msgstr ""
1494
 
1495
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1402
1496
  msgid "Display the Card Security Code field when paying with a saved card"
1497
  msgstr ""
1498
 
1499
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1737
1500
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1501
  msgid "%1$s - Order %2$s"
1502
  msgstr ""
1503
 
1504
+ #: payment-gateway/class-sv-wc-payment-gateway.php:1866
1505
  #. translators: Placeholders: %1$s - site title, %2$s - order number.
1506
  #. Definitions: Capture as in capture funds from a credit card.
1507
  msgid "%1$s - Capture for Order %2$s"
1508
  msgstr ""
1509
 
1510
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2009
1511
  #. translators: Placeholders: %1$s - site title, %2$s - order number
1512
  msgid "%1$s - Refund for Order %2$s"
1513
  msgstr ""
1514
 
1515
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2076
1516
  #. translators: Placeholders: %1$s - payment gateway title (such as
1517
  #. Authorize.net, Braintree, etc), %2$s - a monetary amount
1518
  msgid "%1$s Refund in the amount of %2$s approved."
1519
  msgstr ""
1520
 
1521
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2106
1522
  #. translators: Placeholders: %1$s - payment gateway title (such as
1523
  #. Authorize.net, Braintree, etc), %2$s - error code, %3$s - error message
1524
  msgid "%1$s Refund Failed: %2$s - %3$s"
1525
  msgstr ""
1526
 
1527
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2114
1528
  #. translators: Placeholders: %1$s - payment gateway title (such as
1529
  #. Authorize.net, Braintree, etc), %2$s - error message
1530
  msgid "%1$s Refund Failed: %2$s"
1531
  msgstr ""
1532
 
1533
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2135
1534
  #. translators: Placeholders: %s - payment gateway title (such as
1535
  #. Authorize.net, Braintree, etc)
1536
  msgid "%s Order completely refunded."
1537
  msgstr ""
1538
 
1539
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2190
1540
  msgid ""
1541
  "Oops, you cannot partially void this order. Please use the full order "
1542
  "amount."
1543
  msgstr ""
1544
 
1545
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2277
1546
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error code,
1547
  #. %3$s - error message. Void as in to void an order.
1548
  msgid "%1$s Void Failed: %2$s - %3$s"
1549
  msgstr ""
1550
 
1551
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2285
1552
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1553
  #. message. Void as in to void an order.
1554
  msgid "%1$s Void Failed: %2$s"
1555
  msgstr ""
1556
 
1557
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2309
1558
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - a monetary
1559
  #. amount. Void as in to void an order.
1560
  msgid "%1$s Void in the amount of %2$s approved."
1561
  msgstr ""
1562
 
1563
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1564
  #. translators: Placeholders: %1$s - payment method title, %2$s - environment
1565
  #. ("Test"), %3$s - transaction type (authorization/charge)
1566
  msgid "%1$s %2$s %3$s Approved"
1567
  msgstr ""
1568
 
1569
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2611
1570
  #. translators: Placeholders: %1$s - credit card type (MasterCard, Visa,
1571
  #. etc...), %2$s - last four digits of the card
1572
  msgid "%1$s ending in %2$s"
1573
  msgstr ""
1574
 
1575
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2707
1576
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - message
1577
  #. (probably reason for the transaction being held for review)
1578
  msgid "%1$s Transaction Held for Review (%2$s)"
1579
  msgstr ""
1580
 
1581
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2796
 
 
 
 
 
 
1582
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1583
  #. message; e.g. Order Note: [Payment method] Payment failed [error]
1584
  msgid "%1$s Payment Failed (%2$s)"
1585
  msgstr ""
1586
 
1587
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2831
 
 
 
 
 
1588
  #. translators: Placeholders: %1$s - payment gateway title, %2$s -
1589
  #. message/error
1590
  msgid "%1$s Transaction Cancelled (%2$s)"
1591
  msgstr ""
1592
 
1593
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3079
1594
  msgid "Transaction Type"
1595
  msgstr ""
1596
 
1597
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3081
1598
  msgid ""
1599
  "Select how transactions should be processed. Charge submits all "
1600
  "transactions for settlement, Authorization simply authorizes the order "
1601
  "total for capture later."
1602
  msgstr ""
1603
 
1604
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3092
1605
  msgid "Charge Virtual-Only Orders"
1606
  msgstr ""
1607
 
1608
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3094
1609
  msgid ""
1610
  "If the order contains exclusively virtual items, enable this to immediately "
1611
  "charge, rather than authorize, the transaction."
1612
  msgstr ""
1613
 
1614
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3102
1615
  msgid "Enable Partial Capture"
1616
  msgstr ""
1617
 
1618
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3104
1619
  msgid "Allow orders to be partially captured multiple times."
1620
  msgstr ""
1621
 
1622
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3116
1623
  msgid "Capture Paid Orders"
1624
  msgstr ""
1625
 
1626
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3119
1627
  msgid "Automatically capture orders when they are changed to %s."
1628
  msgstr ""
1629
 
1630
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3120
1631
  msgid "a paid status"
1632
  msgstr ""
1633
 
1634
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3310
1635
  msgid "Accepted Card Logos"
1636
  msgstr ""
1637
 
1638
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3312
1639
  msgid ""
1640
  "These are the card logos that are displayed to customers as accepted during "
1641
  "checkout."
1642
  msgstr ""
1643
 
1644
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3315
1645
+ #. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag
1646
  msgid ""
1647
+ "This setting %1$sdoes not%2$s change which card types the gateway will "
1648
+ "accept. Accepted cards are configured from your payment processor account."
1649
  msgstr ""
1650
 
1651
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3406
1652
  #. translators:
1653
  #. http:www.cybersource.com/products/payment_security/payment_tokenization/ and
1654
  #. https:en.wikipedia.org/wiki/Tokenization_(data_security)
1655
  msgid "Tokenization"
1656
  msgstr ""
1657
 
1658
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3407
1659
  msgid "Allow customers to securely save their payment details for future checkout."
1660
  msgstr ""
1661
 
1662
+ #: payment-gateway/class-sv-wc-payment-gateway.php:4226
1663
+ #. translators: %1$s - gateway name, %2$s - <a> tag, %3$s - </a> tag, %4$s -
1664
+ #. <a> tag, %5$s - </a> tag
1665
+ msgid ""
1666
+ "Heads up! %1$s is not fully configured and cannot accept payments. Please "
1667
+ "%2$sreview the documentation%3$s and configure the %4$sgateway settings%5$s."
1668
+ msgstr ""
1669
+
1670
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:261
1671
  msgid "Pre-Order Tokenization attempt failed (%s)"
1672
  msgstr ""
1673
 
1674
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:307
1675
  msgid "%s - Pre-Order Release Payment for Order %s"
1676
  msgstr ""
1677
 
1678
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:311
1679
  msgid "Payment token missing/invalid."
1680
  msgstr ""
1681
 
1682
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:336
1683
  msgid "%s %s Pre-Order Release Payment Approved: %s ending in %s (expires %s)"
1684
  msgstr ""
1685
 
1686
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:347
1687
  msgid "%s eCheck Pre-Order Release Payment Approved: %s ending in %s"
1688
  msgstr ""
1689
 
1690
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:391
1691
  msgid "Pre-Order Release Payment Failed: %s"
1692
  msgstr ""
1693
 
1694
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:326
1695
  msgid "Subscription Renewal: payment token is missing/invalid."
1696
  msgstr ""
1697
 
1698
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:352
1699
  msgid "%1$s - Subscription Renewal Order %2$s"
1700
  msgstr ""
1701
 
1702
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:484
1703
  #. translators: Placeholders: %1$s - payment gateway title, %2$s - error
1704
  #. message; e.g. Order Note: [Payment method] Payment Change failed [error]
1705
  msgid "%1$s Payment Change Failed (%2$s)"
1706
  msgstr ""
1707
 
1708
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:627
1709
  msgid "Via %s ending in %s"
1710
  msgstr ""
1711
 
1712
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:654
1713
  msgid "Subscriptions"
1714
  msgstr ""
1715
 
1716
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:723
1717
  msgid ""
1718
  "This payment method is tied to a subscription and cannot be deleted. Please "
1719
  "switch the subscription to another method first."
1720
  msgstr ""
1721
 
1722
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:775
1723
  msgid "Payment Token"
1724
  msgstr ""
1725
 
1726
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:804
1727
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:809
1728
  msgid "%s is required."
1729
  msgstr ""
1730
 
1731
+ #: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:173
1732
  msgid "Unknown Error"
1733
  msgstr ""
1734
 
1735
+ #: rest-api/Controllers/Settings.php:83
1736
+ msgid "Unique identifier for the resource."
1737
+ msgstr ""
1738
+
1739
+ #: rest-api/Controllers/Settings.php:118
1740
+ msgid "Sorry, you cannot list resources."
1741
+ msgstr ""
1742
+
1743
+ #: rest-api/Controllers/Settings.php:167
1744
+ #. translators: Placeholder: %s - setting ID
1745
+ msgid "Setting %s does not exist"
1746
+ msgstr ""
1747
+
1748
+ #: rest-api/Controllers/Settings.php:190
1749
+ msgid "Sorry, you cannot edit this resource."
1750
+ msgstr ""
1751
+
1752
+ #: rest-api/Controllers/Settings.php:223
1753
+ msgid "Could not update setting: %s"
1754
+ msgstr ""
1755
+
1756
+ #: rest-api/Controllers/Settings.php:293
1757
+ msgid "Unique identifier of the setting."
1758
+ msgstr ""
1759
+
1760
+ #: rest-api/Controllers/Settings.php:299
1761
+ msgid "The type of the setting."
1762
+ msgstr ""
1763
+
1764
+ #: rest-api/Controllers/Settings.php:306
1765
+ msgid "The name of the setting."
1766
+ msgstr ""
1767
+
1768
+ #: rest-api/Controllers/Settings.php:312
1769
+ msgid "The description of the setting. It may or may not be used for display."
1770
+ msgstr ""
1771
+
1772
+ #: rest-api/Controllers/Settings.php:318
1773
+ msgid "Whether the setting stores an array of values or a single value."
1774
+ msgstr ""
1775
+
1776
+ #: rest-api/Controllers/Settings.php:324
1777
+ msgid "A list of valid options, used for validation before storing the value."
1778
+ msgstr ""
1779
+
1780
+ #: rest-api/Controllers/Settings.php:330
1781
+ msgid "Optional default value for the setting."
1782
+ msgstr ""
1783
+
1784
+ #: rest-api/Controllers/Settings.php:336
1785
+ msgid "The value of the setting."
1786
+ msgstr ""
1787
+
1788
+ #: rest-api/Controllers/Settings.php:341
1789
+ msgid ""
1790
+ "Optional object that defines how the user will interact with and update the "
1791
+ "setting."
1792
+ msgstr ""
1793
+
1794
+ #: rest-api/Controllers/Settings.php:345
1795
+ msgid "The type of the control."
1796
+ msgstr ""
1797
+
1798
+ #: rest-api/Controllers/Settings.php:352
1799
+ msgid "The name of the control. Inherits the setting's name."
1800
+ msgstr ""
1801
+
1802
+ #: rest-api/Controllers/Settings.php:358
1803
+ msgid "The description of the control. Inherits the setting's description."
1804
+ msgstr ""
1805
+
1806
+ #: rest-api/Controllers/Settings.php:364
1807
+ msgid ""
1808
+ "A list of key/value pairs defining the display value of each setting "
1809
+ "option. The keys should match the options defined in the base setting for "
1810
+ "validation."
1811
  msgstr ""
1812
 
1813
  #: utilities/class-sv-wp-background-job-handler.php:644
1814
+ msgid "Job data key \"%s\" not set"
1815
+ msgstr ""
1816
+
1817
+ #: utilities/class-sv-wp-background-job-handler.php:648
1818
  msgid "Job data key \"%s\" is not an array"
1819
  msgstr ""
1820
 
1821
+ #: utilities/class-sv-wp-background-job-handler.php:884
1822
  msgid "Every %d Minutes"
1823
  msgstr ""
1824
 
1825
+ #: utilities/class-sv-wp-background-job-handler.php:1048
1826
  msgid "Background Processing Test"
1827
  msgstr ""
1828
 
1829
+ #: utilities/class-sv-wp-background-job-handler.php:1049
1830
  msgid "Run Test"
1831
  msgstr ""
1832
 
1833
+ #: utilities/class-sv-wp-background-job-handler.php:1050
1834
  msgid ""
1835
  "This tool will test whether your server is capable of processing background "
1836
  "jobs."
1837
  msgstr ""
1838
 
1839
+ #: utilities/class-sv-wp-background-job-handler.php:1068
1840
  msgid "Success! You should be able to process background jobs."
1841
  msgstr ""
1842
 
1843
+ #: utilities/class-sv-wp-background-job-handler.php:1071
1844
  msgid ""
1845
  "Could not connect. Please ask your hosting company to ensure your server "
1846
  "has loopback connections enabled."
1847
  msgstr ""
1848
 
1849
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:396
1850
  msgctxt "enhanced select"
1851
  msgid "No matches found"
1852
  msgstr ""
1853
 
1854
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397
1855
  msgctxt "enhanced select"
1856
  msgid "Loading failed"
1857
  msgstr ""
1858
 
1859
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398
1860
  msgctxt "enhanced select"
1861
  msgid "Please enter 1 or more characters"
1862
  msgstr ""
1863
 
1864
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399
1865
  msgctxt "enhanced select"
1866
  msgid "Please enter %qty% or more characters"
1867
  msgstr ""
1868
 
1869
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400
1870
  msgctxt "enhanced select"
1871
  msgid "Please delete 1 character"
1872
  msgstr ""
1873
 
1874
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401
1875
  msgctxt "enhanced select"
1876
  msgid "Please delete %qty% characters"
1877
  msgstr ""
1878
 
1879
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402
1880
  msgctxt "enhanced select"
1881
  msgid "You can only select 1 item"
1882
  msgstr ""
1883
 
1884
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403
1885
  msgctxt "enhanced select"
1886
  msgid "You can only select %qty% items"
1887
  msgstr ""
1888
 
1889
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404
1890
  msgctxt "enhanced select"
1891
  msgid "Loading more results&hellip;"
1892
  msgstr ""
1893
 
1894
+ #: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:405
1895
  msgctxt "enhanced select"
1896
  msgid "Searching&hellip;"
1897
  msgstr ""
1898
 
1899
+ #: class-sv-wc-helper.php:410
1900
  msgctxt "coordinating conjunction for a list of items: a, b, and c"
1901
  msgid "and"
1902
  msgstr ""
1903
 
1904
+ #: class-sv-wc-plugin.php:621
1905
  msgctxt "noun"
1906
  msgid "Support"
1907
  msgstr ""
1908
 
1909
+ #: class-sv-wc-plugin.php:626
1910
  msgctxt "verb"
1911
  msgid "Review"
1912
  msgstr ""
1913
 
1914
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:746
1915
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2603
1916
  msgctxt "noun, software environment"
1917
  msgid "Test"
1918
  msgstr ""
1919
 
1920
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:747
1921
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2604
1922
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3085
1923
  msgctxt "credit card transaction type"
1924
  msgid "Authorization"
1925
  msgstr ""
1926
 
1927
+ #: payment-gateway/class-sv-wc-payment-gateway-direct.php:747
1928
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2604
1929
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3084
1930
  msgctxt "noun, credit card transaction type"
1931
  msgid "Charge"
1932
  msgstr ""
1933
 
1934
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:193
1935
  msgctxt "payment method type"
1936
  msgid "Account"
1937
  msgstr ""
1938
 
1939
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:229
1940
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3343
1941
  msgctxt "credit card type"
1942
  msgid "Visa"
1943
  msgstr ""
1944
 
1945
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:233
1946
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3344
1947
  msgctxt "credit card type"
1948
  msgid "MasterCard"
1949
  msgstr ""
1950
 
1951
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:237
1952
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3345
1953
  msgctxt "credit card type"
1954
  msgid "American Express"
1955
  msgstr ""
1956
 
1957
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:241
1958
  msgctxt "credit card type"
1959
  msgid "Diners Club"
1960
  msgstr ""
1961
 
1962
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:245
1963
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3346
1964
  msgctxt "credit card type"
1965
  msgid "Discover"
1966
  msgstr ""
1967
 
1968
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:249
1969
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3348
1970
  msgctxt "credit card type"
1971
  msgid "JCB"
1972
  msgstr ""
1973
 
1974
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:253
1975
  msgctxt "credit card type"
1976
  msgid "CarteBleue"
1977
  msgstr ""
1978
 
1979
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:257
1980
  msgctxt "credit card type"
1981
  msgid "Maestro"
1982
  msgstr ""
1983
 
1984
+ #: payment-gateway/class-sv-wc-payment-gateway-helper.php:261
1985
  msgctxt "credit card type"
1986
  msgid "Laser"
1987
  msgstr ""
1988
 
1989
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3347
1990
  msgctxt "credit card type"
1991
  msgid "Diners"
1992
  msgstr ""
1993
 
1994
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:474
1995
  #. translators: http:www.investopedia.com/terms/c/checkingaccount.asp
1996
  msgctxt "account type"
1997
  msgid "Checking"
1998
  msgstr ""
1999
 
2000
+ #: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:476
2001
  #. translators: http:www.investopedia.com/terms/s/savingsaccount.asp
2002
  msgctxt "account type"
2003
  msgid "Savings"
2004
  msgstr ""
2005
 
2006
+ #: payment-gateway/class-sv-wc-payment-gateway.php:2384
2007
  msgctxt "hash before order number"
2008
  msgid "#"
2009
  msgstr ""
2010
 
2011
+ #: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:684
2012
  msgctxt "hash before order number"
2013
  msgid "#%s"
2014
  msgstr ""
2015
 
2016
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3113
2017
  msgctxt ""
2018
  "coordinating conjunction for a list of order statuses: on-hold, processing, "
2019
  "or completed"
2020
  msgid "or"
2021
  msgstr ""
2022
 
2023
+ #: payment-gateway/class-sv-wc-payment-gateway.php:3952
2024
  #. translators: https:www.skyverge.com/for-translators-environments/
2025
  msgctxt "software environment"
2026
  msgid "Production"
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/index.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
18
  *
19
  * @package SkyVerge/WooCommerce
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Payment Gateway Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Payment_Gateway\Handlers;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as FrameworkBase;
28
+
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Payment_Gateway\\Handlers\\Abstract_Hosted_Payment_Handler' ) ) :
30
+
31
+
32
+ /**
33
+ * The base hosted payment handler.
34
+ *
35
+ * Gateways can use this for common hosted response handling.
36
+ *
37
+ * @since 5.4.0
38
+ */
39
+ abstract class Abstract_Hosted_Payment_Handler extends Abstract_Payment_Handler {
40
+
41
+
42
+ /**
43
+ * Adds the action & filter hooks.
44
+ *
45
+ * @since 5.4.0
46
+ */
47
+ protected function add_hooks() {
48
+
49
+ parent::add_hooks();
50
+
51
+ // renders the payment page
52
+ add_action( 'woocommerce_receipt_' . $this->get_gateway()->get_id(), array( $this, 'payment_page' ) );
53
+
54
+ // payment notification listener hook
55
+ if ( ! has_action( 'woocommerce_api_' . $this->get_gateway()->get_id() . '_process_payment', array( $this, 'handle_transaction_response_request' ) ) ) {
56
+ add_action( 'woocommerce_api_' . $this->get_gateway()->get_id() . '_process_payment', array( $this, 'handle_transaction_response_request' ) );
57
+ }
58
+ }
59
+
60
+
61
+ /**
62
+ * Processes a new order payment.
63
+ *
64
+ * This simply gets the URL for a redirect.
65
+ *
66
+ * @since 5.4.0
67
+ *
68
+ * @param \WC_Order $order order object
69
+ * @return array
70
+ * @throws FrameworkBase\SV_WC_Plugin_Exception
71
+ */
72
+ public function process_order_payment( \WC_Order $order ) {
73
+
74
+ if ( $this->is_redirect() ) {
75
+ $payment_url = add_query_arg( $this->get_order_payment_params( $order ), $this->get_hosted_payment_url() );
76
+ } else {
77
+ $payment_url = $order->get_checkout_payment_url( true );
78
+ }
79
+
80
+ return array(
81
+ 'result' => 'success',
82
+ 'redirect' => $payment_url,
83
+ );
84
+ }
85
+
86
+
87
+ /**
88
+ * Renders the payment page.
89
+ *
90
+ * @since 5.4.0
91
+ *
92
+ * @param int $order_id order ID
93
+ */
94
+ public function payment_page( $order_id ) {
95
+
96
+ // stub
97
+ }
98
+
99
+
100
+ /**
101
+ * Gets payment params for the given order object.
102
+ *
103
+ * @since 5.4.0
104
+ *
105
+ * @param \WC_Order $order order object
106
+ * @return array
107
+ */
108
+ public function get_order_payment_params( \WC_Order $order ) {
109
+
110
+ return array();
111
+ }
112
+
113
+
114
+ /**
115
+ * Gets the URL for the hosted payment page or form.
116
+ *
117
+ * @since 5.4.0
118
+ *
119
+ * @return string
120
+ */
121
+ abstract protected function get_hosted_payment_url();
122
+
123
+
124
+ /**
125
+ * Gets the response handler URL.
126
+ *
127
+ * @since 5.4.0
128
+ *
129
+ * @return string
130
+ */
131
+ public function get_response_handler_url() {
132
+
133
+ return add_query_arg( 'wc-api', $this->get_gateway()->get_id() . '_process_payment', home_url( '/' ) );
134
+ }
135
+
136
+
137
+ /**
138
+ * Handles a transaction response request via the wc-api endpoint.
139
+ *
140
+ * @since 5.4.0
141
+ */
142
+ public function handle_transaction_response_request() {
143
+
144
+ $order = null;
145
+ $response = null;
146
+
147
+ try {
148
+
149
+ // get the transaction response object for the current request
150
+ $response = $this->get_transaction_response( $_REQUEST );
151
+
152
+ // log the request
153
+ $this->log_transaction_response_request( $response->to_string_safe() );
154
+
155
+ // get the associated order, or die trying
156
+ $order = $this->get_order_from_response( $response );
157
+
158
+ // handle the order based on the response
159
+ $this->process_transaction_response( $response, $order );
160
+
161
+ $this->do_transaction_response_complete( $order, $response );
162
+
163
+ // catch general gateway exceptions, which indicate payment processing failures where the order should be retried
164
+ } catch ( FrameworkBase\SV_WC_Payment_Gateway_Exception $exception ) {
165
+
166
+ // try and get a user-friendly message if available
167
+ if ( ( $user_exception = $exception->getPrevious() ) && $user_exception->getMessage() ) {
168
+ $user_message = $user_exception->getMessage();
169
+ } else {
170
+ $user_message = '';
171
+ }
172
+
173
+ $this->do_transaction_response_failed( $order, $exception->getMessage(), $user_message, $response );
174
+
175
+ // catch other exceptions i.e. for malformed responses, where we don't want the customer to retry the order
176
+ } catch ( \Exception $exception ) {
177
+
178
+ if ( WC()->session ) {
179
+ WC()->session->held_order_received_text = __( 'There was a problem processing your order and it is being placed on hold for review. Please contact us to complete the transaction.', 'woocommerce-plugin-framework' );
180
+ }
181
+
182
+ // bail out and don't add a customer-facing notice to avoid them resubmitting
183
+ $this->do_transaction_response_invalid( $order, $exception->getMessage(), $response );
184
+ }
185
+ }
186
+
187
+
188
+ /**
189
+ * Handles the response when processing is complete.
190
+ *
191
+ * @since 5.4.0
192
+ *
193
+ * @param \WC_Order|null $order order object, if any
194
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object, if any
195
+ */
196
+ protected function do_transaction_response_complete( \WC_Order $order = null, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
197
+
198
+ $this->do_transaction_request_response( $response, $this->get_gateway()->get_return_url( $order ) );
199
+ }
200
+
201
+
202
+ /**
203
+ * Handles the response when processing has failed.
204
+ *
205
+ * @since 5.4.0
206
+ *
207
+ * @param \WC_Order|null $order order object, if any
208
+ * @param string $message error message, for logging
209
+ * @param string $user_message user-facing message
210
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object, if any
211
+ */
212
+ protected function do_transaction_response_failed( \WC_Order $order = null, $message = '', $user_message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
213
+
214
+ $this->get_gateway()->add_debug_message( $message, 'error' );
215
+
216
+ if ( ! $user_message || ! is_string( $user_message ) ) {
217
+ $user_message = __( 'An error occurred, please try again or try an alternate form of payment.', 'woocommerce-plugin-framework' );
218
+ }
219
+
220
+ FrameworkBase\SV_WC_Helper::wc_add_notice( $user_message, 'error' );
221
+
222
+ $this->do_transaction_request_response( $response, $order ? $order->get_checkout_payment_url() : '' );
223
+ }
224
+
225
+
226
+ /**
227
+ * Handles the response when the response data is invalid.
228
+ *
229
+ * This will trigger when there is no way to salvage the payment, i.e. when the response data is invalid.
230
+ *
231
+ * @since 5.4.0
232
+ *
233
+ * @param \WC_Order|null $order order object, if any
234
+ * @param string $message error message, for logging
235
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object, if any
236
+ */
237
+ protected function do_transaction_response_invalid( \WC_Order $order = null, $message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
238
+
239
+ $this->get_gateway()->add_debug_message( $message, 'error' );
240
+
241
+ // if we have an order, mark it as held and add an order note
242
+ if ( $order ) {
243
+
244
+ if ( $order->is_paid() ) {
245
+ $order->add_order_note( $message );
246
+ } else {
247
+ $this->mark_order_as_held( $order, $message, $response );
248
+ }
249
+ }
250
+
251
+ $this->do_transaction_request_response( $response, $order ? $this->get_gateway()->get_return_url( $order ) : '' );
252
+ }
253
+
254
+
255
+ /**
256
+ * Handles the final payment request response.
257
+ *
258
+ * This is the final step after all payment verification and processing, and runs regardless of the transaction
259
+ * result.
260
+ *
261
+ * @since 5.4.0
262
+ *
263
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response
264
+ * @param string $url
265
+ */
266
+ protected function do_transaction_request_response( FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null, $url = '' ) {
267
+
268
+ // if this is an IPN handler
269
+ if ( $this->is_ipn() ) {
270
+ status_header( 200 );
271
+ die;
272
+ }
273
+
274
+ wp_safe_redirect( $url ?: home_url() );
275
+ exit;
276
+ }
277
+
278
+
279
+ /**
280
+ * Logs a transaction response request.
281
+ *
282
+ * @since 5.4.0
283
+ *
284
+ * @param string $request data to log
285
+ * @param string $message prefix message, like Request: or Response:
286
+ */
287
+ protected function log_transaction_response_request( $request, $message = '' ) {
288
+
289
+ // add log message to WC logger if log/both is enabled
290
+ if ( $this->get_gateway()->debug_log() ) {
291
+
292
+ // if a message wasn't provided, make our best effort
293
+ if ( ! $message ) {
294
+ $message = 'Request: %s';
295
+ }
296
+
297
+ $this->get_gateway()->get_plugin()->log( sprintf( $message, print_r( $request, true ) ), $this->get_gateway()->get_id() );
298
+ }
299
+ }
300
+
301
+
302
+ /**
303
+ * Gets an order object from an API response.
304
+ *
305
+ * @since 5.4.0
306
+ *
307
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Payment_Notification_Response $response
308
+ * @return \WC_Order
309
+ * @throws \Exception
310
+ */
311
+ protected function get_order_from_response( FrameworkBase\SV_WC_Payment_Gateway_API_Payment_Notification_Response $response ) {
312
+
313
+ $order = wc_get_order( $response->get_order_id() );
314
+
315
+ // if the order is invalid, bail
316
+ if ( ! $order ) {
317
+
318
+ throw new FrameworkBase\SV_WC_API_Exception( sprintf(
319
+ /* translators: Placeholders: %s - a WooCommerce order ID */
320
+ __( 'Could not find order %s', 'woocommerce-plugin-framework' ),
321
+ $response->get_order_id()
322
+ ) );
323
+ }
324
+
325
+ $order = $this->get_gateway()->get_order( $order );
326
+
327
+ $order->payment->account_number = $response->get_account_number();
328
+
329
+ if ( $response instanceof FrameworkBase\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response ) {
330
+
331
+ $order->payment->exp_month = $response->get_exp_month();
332
+ $order->payment->exp_year = $response->get_exp_year();
333
+ $order->payment->card_type = $response->get_card_type();
334
+
335
+ } elseif ( $response instanceof FrameworkBase\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response ) {
336
+
337
+ $order->payment->account_type = $response->get_account_type();
338
+ $order->payment->check_number = $response->get_check_number();
339
+ }
340
+
341
+ return $order;
342
+ }
343
+
344
+
345
+ /**
346
+ * Gets an API response object for the given data.
347
+ *
348
+ * @since 5.4.0
349
+ *
350
+ * @param array $request_response_data the current request response data
351
+ * @return FrameworkBase\SV_WC_Payment_Gateway_API_Payment_Notification_Response API response object
352
+ * @throws FrameworkBase\SV_WC_API_Exception
353
+ */
354
+ abstract protected function get_transaction_response( $request_response_data );
355
+
356
+
357
+ /** Conditional methods *******************************************************************************************/
358
+
359
+
360
+ /**
361
+ * Determines whether the payment response is IPN.
362
+ *
363
+ * @since 5.4.0
364
+ *
365
+ * @return bool
366
+ */
367
+ public function is_ipn() {
368
+
369
+ return false;
370
+ }
371
+
372
+
373
+ /**
374
+ * Determines whether this is a redirect hosted form.
375
+ *
376
+ * @since 5.4.0
377
+ *
378
+ * @return bool
379
+ */
380
+ public function is_redirect() {
381
+
382
+ return false;
383
+ }
384
+
385
+
386
+ }
387
+
388
+
389
+ endif;
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Payment Gateway Framework
4
+ *
5
+ * This source file is subject to the GNU General Public License v3.0
6
+ * that is bundled with this package in the file license.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.html
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@skyverge.com so we can send you a copy immediately.
12
+ *
13
+ * DISCLAIMER
14
+ *
15
+ * Do not edit or add to this file if you wish to upgrade the plugin to newer
16
+ * versions in the future. If you wish to customize the plugin for your
17
+ * needs please refer to http://www.skyverge.com
18
+ *
19
+ * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
+ * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
+ */
24
+
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Payment_Gateway\Handlers;
26
+
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as FrameworkBase;
28
+
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' ) ) :
30
+
31
+
32
+ /**
33
+ * The base payment handler class.
34
+ *
35
+ * This acts as an abstracted handler for processing payments, regardless of their front-end or API implementation.
36
+ * Both direct and hosted gateways' transactions end up as the same response object, which this class handles for order
37
+ * updating.
38
+ *
39
+ * @see Abstract_Hosted_Payment_Handler
40
+ *
41
+ * @since 5.4.0
42
+ */
43
+ abstract class Abstract_Payment_Handler {
44
+
45
+
46
+ /** the success result code */
47
+ const RESULT_CODE_SUCCESS = 'success';
48
+
49
+ /** the failure result code */
50
+ const RESULT_CODE_FAILURE = 'failure';
51
+
52
+ /** @var FrameworkBase\SV_WC_Payment_Gateway gateway instance */
53
+ protected $gateway;
54
+
55
+
56
+ /**
57
+ * Constructs the class.
58
+ *
59
+ * @since 5.4.0
60
+ *
61
+ * @param FrameworkBase\SV_WC_Payment_Gateway $gateway
62
+ */
63
+ public function __construct( FrameworkBase\SV_WC_Payment_Gateway $gateway ) {
64
+
65
+ $this->gateway = $gateway;
66
+
67
+ $this->add_hooks();
68
+ }
69
+
70
+
71
+ /**
72
+ * Adds any action and filter hooks required by the handler.
73
+ *
74
+ * @since 5.4.0
75
+ */
76
+ protected function add_hooks() {
77
+
78
+ // filter order received text for held orders
79
+ add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'maybe_render_held_order_received_text' ), 10, 2 );
80
+ }
81
+
82
+
83
+ /**
84
+ * Renders a custom held order message if available.
85
+ *
86
+ * @since 5.4.0
87
+ *
88
+ * @param string $text default text
89
+ * @param \WC_Order $order order object
90
+ *
91
+ * @return mixed
92
+ */
93
+ public function maybe_render_held_order_received_text( $text, $order ) {
94
+
95
+ if ( $order && isset( WC()->session->held_order_received_text ) ) {
96
+
97
+ $text = WC()->session->held_order_received_text;
98
+
99
+ unset( WC()->session->held_order_received_text );
100
+ }
101
+
102
+ return $text;
103
+ }
104
+
105
+
106
+ /**
107
+ * Processes payment for an order.
108
+ *
109
+ * @since 5.4.0
110
+ *
111
+ * @param \WC_Order $order order object
112
+ * @return array
113
+ * @throws FrameworkBase\SV_WC_Plugin_Exception
114
+ */
115
+ abstract public function process_order_payment( \WC_Order $order );
116
+
117
+
118
+ /**
119
+ * Processes a gateway API payment response and handles the order accordingly.
120
+ *
121
+ * @since 5.4.0
122
+ *
123
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response $response
124
+ * @param \WC_Order $order
125
+ * @throws FrameworkBase\SV_WC_Payment_Gateway_Exception for payment failures
126
+ * @throws FrameworkBase\SV_WC_Plugin_Exception for other validation errors
127
+ */
128
+ protected function process_transaction_response( FrameworkBase\SV_WC_Payment_Gateway_API_Response $response, \WC_Order $order ) {
129
+
130
+ // validate the response data such as order ID and payment status
131
+ $this->validate_transaction_response( $order, $response );
132
+
133
+ try {
134
+
135
+ if ( $response->transaction_approved() || $response->transaction_held() ) {
136
+
137
+ if ( $response->transaction_held() || ( $this->get_gateway()->supports_credit_card_authorization() && $this->get_gateway()->perform_credit_card_authorization( $order ) ) ) {
138
+ $this->process_order_transaction_held( $order, $response );
139
+ } elseif ( $response->transaction_approved() ) {
140
+ $this->process_order_transaction_approved( $order, $response );
141
+ }
142
+
143
+ $this->mark_order_as_paid( $order, $response );
144
+
145
+ } else {
146
+
147
+ $message = '';
148
+
149
+ // build the order note with what data we have
150
+ if ( $response->get_status_code() && $response->get_status_message() ) {
151
+ /* translators: Placeholders: %1$s - status code, %2$s - status message */
152
+ $message = sprintf( esc_html__( 'Status code %1$s: %2$s', 'woocommerce-plugin-framework' ), $response->get_status_code(), $response->get_status_message() );
153
+ } elseif ( $response->get_status_code() ) {
154
+ /* translators: Placeholders: %s - status code */
155
+ $message = sprintf( esc_html__( 'Status code: %s', 'woocommerce-plugin-framework' ), $response->get_status_code() );
156
+ } elseif ( $response->get_status_message() ) {
157
+ /* translators: Placeholders; %s - status message */
158
+ $message = sprintf( esc_html__( 'Status message: %s', 'woocommerce-plugin-framework' ), $response->get_status_message() );
159
+ }
160
+
161
+ // add transaction id if there is one
162
+ if ( $response->get_transaction_id() ) {
163
+ $message .= ' ' . sprintf( esc_html__( 'Transaction ID %s', 'woocommerce-plugin-framework' ), $response->get_transaction_id() );
164
+ }
165
+
166
+ if ( $response->get_user_message() && $this->get_gateway()->is_detailed_customer_decline_messages_enabled() ) {
167
+ $user_exception = new FrameworkBase\SV_WC_Payment_Gateway_Exception( $response->get_user_message() );
168
+ } else {
169
+ $user_exception = null;
170
+ }
171
+
172
+ throw new FrameworkBase\SV_WC_Payment_Gateway_Exception( $message, null, $user_exception );
173
+ }
174
+
175
+ // add an order note for all exceptions and rethrow
176
+ } catch ( FrameworkBase\SV_WC_Payment_Gateway_Exception $exception ) {
177
+
178
+ $this->process_order_transaction_failed( $order, $exception->getMessage(), $response );
179
+
180
+ // one can not simply throw $exception or the previous (user-friendly) exception message won't make it through
181
+ throw new FrameworkBase\SV_WC_Payment_Gateway_Exception( $exception->getMessage(), $exception->getCode(), $exception->getPrevious() );
182
+ }
183
+ }
184
+
185
+
186
+ /**
187
+ * Validates a transaction response & its order.
188
+ *
189
+ * This ensures duplicate or fraudulent responses aren't processed. Implementations can add exceptions to this for
190
+ * things like invalid hashes, etc...
191
+ *
192
+ * @since 5.4.0
193
+ *
194
+ * @param \WC_Order $order order object
195
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response $response API response object
196
+ * @throws FrameworkBase\SV_WC_API_Exception
197
+ */
198
+ protected function validate_transaction_response( \WC_Order $order, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response ) {
199
+
200
+ // if the order has already been completed, bail
201
+ if ( ! $order->needs_payment() ) {
202
+
203
+ /* translators: Placeholders: %s - payment gateway title (such as Authorize.net, Braintree, etc) */
204
+ $order->add_order_note( sprintf( esc_html__( '%s duplicate transaction received', 'woocommerce-plugin-framework' ), $this->get_gateway()->get_method_title() ) );
205
+
206
+ throw new FrameworkBase\SV_WC_API_Exception( sprintf(
207
+ __( 'Order %s is already paid for.', 'woocommerce-plugin-framework' ),
208
+ $order->get_order_number()
209
+ ) );
210
+ }
211
+ }
212
+
213
+
214
+ /**
215
+ * Handles actions after an approved transaction.
216
+ *
217
+ * @since 5.4.0
218
+ *
219
+ * @param \WC_Order $order order object
220
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response $response API response object
221
+ */
222
+ protected function process_order_transaction_approved( \WC_Order $order, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response ) {
223
+
224
+ try {
225
+
226
+ $message = '';
227
+
228
+ if ( FrameworkBase\SV_WC_Payment_Gateway::PAYMENT_TYPE_CREDIT_CARD === $response->get_payment_type() ) {
229
+ $message = $this->get_gateway()->get_credit_card_transaction_approved_message( $order, $response );
230
+ } elseif ( FrameworkBase\SV_WC_Payment_Gateway::PAYMENT_TYPE_ECHECK === $response->get_payment_type() ) {
231
+ $message = $this->get_gateway()->get_echeck_transaction_approved_message( $order, $response );
232
+ } else {
233
+
234
+ $message_method = 'get_' . $response->get_payment_type() . '_transaction_approved_message';
235
+
236
+ if ( is_callable( array( $this->get_gateway(), $message_method ) ) ) {
237
+ $message = $this->get_gateway()->$message_method( $order, $response );
238
+ }
239
+ }
240
+
241
+ $this->mark_order_as_approved( $order, $message, $response );
242
+
243
+ } catch ( \Exception $exception ) {
244
+
245
+ // TODO
246
+ }
247
+ }
248
+
249
+
250
+ /**
251
+ * Handles actions after a held transaction.
252
+ *
253
+ * @since 5.4.0
254
+ *
255
+ * @param \WC_Order $order order object
256
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response $response API response object
257
+ */
258
+ protected function process_order_transaction_held( \WC_Order $order, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response ) {
259
+
260
+ $user_message = '';
261
+
262
+ if ( $this->get_gateway()->is_detailed_customer_decline_messages_enabled() ) {
263
+ $user_message = $response->get_user_message();
264
+ }
265
+
266
+ if ( ! $user_message || ( $this->get_gateway()->supports_credit_card_authorization() && $this->get_gateway()->perform_credit_card_authorization( $order ) ) ) {
267
+ $user_message = __( 'Your order has been received and is being reviewed. Thank you for your business.', 'woocommerce-plugin-framework' );
268
+ }
269
+
270
+ if ( null !== WC()->session ) {
271
+ WC()->session->held_order_received_text = $user_message;
272
+ }
273
+
274
+ $note_message = $this->get_gateway()->supports_credit_card_authorization() && $this->get_gateway()->perform_credit_card_authorization( $order ) ? __( 'Authorization only transaction', 'woocommerce-plugin-framework' ) : $response->get_status_message();
275
+
276
+ $this->mark_order_as_held( $order, $note_message, $response );
277
+ }
278
+
279
+
280
+ /**
281
+ * Handles actions after a failed transaction.
282
+ *
283
+ * @since 5.4.0
284
+ *
285
+ * @param \WC_Order $order order object
286
+ * @param string $message failure message
287
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response response object
288
+ */
289
+ protected function process_order_transaction_failed( \WC_Order $order, $message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
290
+
291
+ $this->mark_order_as_failed( $order, $message, $response );
292
+ }
293
+
294
+
295
+ /** Order marking methods *****************************************************************************************/
296
+
297
+
298
+ /**
299
+ * Marks an order as paid.
300
+ *
301
+ * @since 5.4.0
302
+ *
303
+ * @param \WC_Order $order order object
304
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Customer_Response|FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object
305
+ */
306
+ public function mark_order_as_paid( \WC_Order $order, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
307
+
308
+ $this->get_gateway()->add_transaction_data( $order, $response );
309
+
310
+ // let gateways easily add their own data
311
+ $this->get_gateway()->add_payment_gateway_transaction_data( $order, $response );
312
+
313
+ if ( $order->has_status( $this->get_held_order_status( $order, $response ) ) ) {
314
+ // reduce stock for held orders, but don't complete payment (pass order ID so WooCommerce fetches fresh order object with reduced_stock meta set on order status change)
315
+ wc_reduce_stock_levels( $order->get_id() );
316
+ } else {
317
+ // mark order as having received payment
318
+ $order->payment_complete();
319
+ }
320
+
321
+ /**
322
+ * Payment Gateway Payment Processed Action.
323
+ *
324
+ * Fired when a payment is processed for an order.
325
+ *
326
+ * @since 4.1.0
327
+ *
328
+ * @param \WC_Order $order order object
329
+ * @param FrameworkBase\SV_WC_Payment_Gateway_Direct $this instance
330
+ */
331
+ do_action( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_payment_processed', $order, $this->get_gateway() );
332
+ }
333
+
334
+
335
+ /**
336
+ * Marks an order as approved.
337
+ *
338
+ * @since 5.4.0
339
+ *
340
+ * @param \WC_Order $order order object
341
+ * @param string $message message for the order note
342
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object
343
+ */
344
+ public function mark_order_as_approved( \WC_Order $order, $message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
345
+
346
+ $order->add_order_note( $message );
347
+ }
348
+
349
+
350
+ /**
351
+ * Marks an order as held for review.
352
+ *
353
+ * Adds an order note and transitions to a held status.
354
+ *
355
+ * @since 5.4.0
356
+ *
357
+ * @param \WC_Order $order order object
358
+ * @param string $message order note message
359
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response
360
+ */
361
+ public function mark_order_as_held( \WC_Order $order, $message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
362
+
363
+ /* translators: Placeholders: %s - payment gateway title */
364
+ $order_note = sprintf( __( '%s Transaction Held for Review', 'woocommerce-plugin-framework' ), $this->get_gateway()->get_method_title() );
365
+
366
+ if ( $message ) {
367
+ $order_note .= " ({$message})";
368
+ }
369
+
370
+ $order_status = $this->get_held_order_status( $order, $response );
371
+
372
+ // mark order as held
373
+ if ( ! $order->has_status( $order_status ) ) {
374
+ $order->update_status( $order_status, $order_note );
375
+ } else {
376
+ $order->add_order_note( $order_note );
377
+ }
378
+ }
379
+
380
+
381
+ /**
382
+ * Gets the order status used for held orders.
383
+ *
384
+ * @since 5.4.0
385
+ *
386
+ * @param \WC_Order $order order object
387
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object
388
+ *
389
+ * @return string
390
+ */
391
+ public function get_held_order_status( \WC_Order $order, $response = null ) {
392
+
393
+ /**
394
+ * Held Order Status Filter.
395
+ *
396
+ * This filter is deprecated. Use wc_<gateway_id>_held_order_status instead.
397
+ *
398
+ * @since 4.0.1
399
+ * @deprecated 5.3.0
400
+ *
401
+ * @param string $order_status 'on-hold' by default
402
+ * @param \WC_Order $order WC order
403
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object, if any
404
+ * @param FrameworkBase\SV_WC_Payment_Gateway $gateway gateway instance
405
+ */
406
+ $status = apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_held_order_status', 'on-hold', $order, $response, $this->get_gateway() );
407
+
408
+ /**
409
+ * Filters the order status that's considered to be "held".
410
+ *
411
+ * @since 5.3.0
412
+ *
413
+ * @param string $status held order status
414
+ * @param \WC_Order $order order object
415
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response API response object, if any
416
+ */
417
+ $status = apply_filters( 'wc_' . $this->get_gateway()->get_id() . '_held_order_status', $status, $order, $response );
418
+
419
+ return (string) $status;
420
+ }
421
+
422
+
423
+ /**
424
+ * Marks an order as failed.
425
+ *
426
+ * @since 5.4.0
427
+ *
428
+ * @param \WC_Order $order order object
429
+ * @param string $message order note message
430
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response
431
+ */
432
+ public function mark_order_as_failed( \WC_Order $order, $message = '', FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
433
+
434
+ /* translators: Placeholders: %s - payment gateway title */
435
+ $order_note = sprintf( esc_html__( '%s Payment Failed', 'woocommerce-plugin-framework' ), $this->get_gateway()->get_method_title() );
436
+
437
+ if ( $message ) {
438
+ $order_note .= " ({$message})";
439
+ }
440
+
441
+ // Mark order as failed if not already set, otherwise, make sure we add the order note so we can detect when someone fails to check out multiple times
442
+ if ( ! $order->has_status( 'failed' ) ) {
443
+ $order->update_status( 'failed', $order_note );
444
+ } else {
445
+ $order->add_order_note( $order_note );
446
+ }
447
+ }
448
+
449
+
450
+ /**
451
+ * Marks an order as cancelled.
452
+ *
453
+ * @since 5.4.0
454
+ *
455
+ * @param \WC_Order $order order object
456
+ * @param string $message order note message
457
+ * @param FrameworkBase\SV_WC_Payment_Gateway_API_Response|null $response
458
+ */
459
+ public function mark_order_as_cancelled( \WC_Order $order, $message, FrameworkBase\SV_WC_Payment_Gateway_API_Response $response = null ) {
460
+
461
+ /* translators: Placeholders: %s - payment gateway title */
462
+ $order_note = sprintf( __( '%s Transaction Cancelled', 'woocommerce-plugin-framework' ), $this->get_gateway()->get_method_title() );
463
+
464
+ if ( $message ) {
465
+ $order_note .= " ({$message})";
466
+ }
467
+
468
+ // Mark order as cancelled if not already set
469
+ if ( ! $order->has_status( 'cancelled' ) ) {
470
+ $order->update_status( 'cancelled', $order_note );
471
+ } else {
472
+ $order->add_order_note( $order_note );
473
+ }
474
+ }
475
+
476
+
477
+ /** Conditional methods *******************************************************************************************/
478
+
479
+
480
+
481
+
482
+
483
+ /** Getter methods ************************************************************************************************/
484
+
485
+
486
+ /**
487
+ * Gets the gateway object.
488
+ *
489
+ * @since 5.4.0
490
+ *
491
+ * @return FrameworkBase\SV_WC_Payment_Gateway
492
+ */
493
+ public function get_gateway() {
494
+
495
+ return $this->gateway;
496
+ }
497
+
498
+
499
+ /** Setter methods ************************************************************************************************/
500
+
501
+
502
+ }
503
+
504
+
505
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/Handlers/Capture.php RENAMED
@@ -18,22 +18,23 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework\Payment_Gateway\Handlers;
26
 
27
- use WC_Braintree\Plugin_Framework as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
31
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Payment_Gateway\\Handlers\\Capture' ) ) :
 
32
 
33
  /**
34
  * The transaction capture handler.
35
  *
36
- * @since 5.3.0-dev
37
  */
38
  class Capture {
39
 
@@ -45,7 +46,7 @@ class Capture {
45
  /**
46
  * Capture constructor.
47
  *
48
- * @since 5.3.0-dev
49
  *
50
  * @param Framework\SV_WC_Payment_Gateway $gateway payment gateway instance
51
  */
@@ -65,7 +66,7 @@ class Capture {
65
  *
66
  * @internal
67
  *
68
- * @since 5.3.0-dev
69
  *
70
  * @param int $order_id order ID
71
  * @param string $old_status status being changed
@@ -73,7 +74,7 @@ class Capture {
73
  */
74
  public function maybe_capture_paid_order( $order_id, $old_status, $new_status ) {
75
 
76
- $paid_statuses = Framework\SV_WC_Plugin_Compatibility::wc_get_is_paid_statuses();
77
 
78
  // bail if changing to a non-paid status or from a paid status
79
  if ( ! in_array( $new_status, $paid_statuses, true ) || in_array( $old_status, $paid_statuses, true ) ) {
@@ -86,7 +87,7 @@ class Capture {
86
  return;
87
  }
88
 
89
- $payment_method = Framework\SV_WC_Order_Compatibility::get_prop( $order, 'payment_method' );
90
 
91
  if ( $payment_method !== $this->get_gateway()->get_id() ) {
92
  return;
@@ -102,7 +103,7 @@ class Capture {
102
  * This acts as a wrapper for when the process should just bail without logging any errors or order notes, like when
103
  * performing capture via bulk action.
104
  *
105
- * @since 5.3.0-dev
106
  *
107
  * @param \WC_Order $order order object
108
  * @param float|null $amount amount to capture
@@ -124,7 +125,7 @@ class Capture {
124
  /**
125
  * Performs a credit card capture for an order.
126
  *
127
- * @since 5.3.0-dev
128
  *
129
  * @param \WC_Order $order WooCommerce order object
130
  * @param float|null $amount amount to capture
@@ -147,29 +148,29 @@ class Capture {
147
 
148
  $message = "{$this->get_gateway()->get_method_title()} does not support payment captures";
149
 
150
- Framework\SV_WC_Plugin_Compatibility::wc_doing_it_wrong( __METHOD__, $message, '5.3.0-dev' );
151
 
152
  throw new Framework\SV_WC_Payment_Gateway_Exception( $message, 500 );
153
  }
154
 
155
- // don't try to capture cancelled/fully refunded transactions
156
  if ( ! $this->is_order_ready_for_capture( $order ) ) {
157
- throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Order cannot be captured', 'woocommerce-gateway-paypal-powered-by-braintree' ), 400 );
158
  }
159
 
160
  // don't re-capture fully captured orders
161
  if ( $this->has_order_authorization_expired( $order ) ) {
162
- throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction authorization has expired', 'woocommerce-gateway-paypal-powered-by-braintree' ), 400 );
163
  }
164
 
165
  // don't re-capture fully captured orders
166
  if ( $this->is_order_fully_captured( $order ) ) {
167
- throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction has already been fully captured', 'woocommerce-gateway-paypal-powered-by-braintree' ), 400 );
168
  }
169
 
170
  // generally unavailable
171
  if ( ! $this->order_can_be_captured( $order ) ) {
172
- throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction cannot be captured', 'woocommerce-gateway-paypal-powered-by-braintree' ), 400 );
173
  }
174
 
175
  // attempt the capture
@@ -185,14 +186,16 @@ class Capture {
185
 
186
  $message = sprintf(
187
  /* translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions: Capture, as in capture funds from a credit card. */
188
- __( '%1$s Capture of %2$s Approved', 'woocommerce-gateway-paypal-powered-by-braintree' ),
189
  $this->get_gateway()->get_method_title(),
190
- wc_price( $order->capture->amount, array( 'currency' => Framework\SV_WC_Order_Compatibility::get_prop( $order, 'currency', 'view' ) ) )
 
 
191
  );
192
 
193
  // adds the transaction id (if any) to the order note
194
  if ( $response->get_transaction_id() ) {
195
- $message .= ' ' . sprintf( esc_html__( '(Transaction ID %s)', 'woocommerce-gateway-paypal-powered-by-braintree' ), $response->get_transaction_id() );
196
  }
197
 
198
  $order->add_order_note( $message );
@@ -201,7 +204,7 @@ class Capture {
201
  $this->do_capture_success( $order, $response );
202
 
203
  // if the original auth amount has been captured, complete payment
204
- if ( $this->get_gateway()->get_order_meta( $order, 'capture_total' ) >= Framework\SV_WC_Helper::number_format( $this->get_order_authorization_amount( $order ) ) ) {
205
 
206
  // prevent stock from being reduced when payment is completed as this is done when the charge was authorized
207
  add_filter( 'woocommerce_payment_complete_reduce_order_stock', '__return_false', 100 );
@@ -223,7 +226,7 @@ class Capture {
223
 
224
  $note_message = sprintf(
225
  /* translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - failure message. Definitions: "capture" as in capturing funds from a credit card. */
226
- __( '%1$s Capture Failed: %2$s', 'woocommerce-gateway-paypal-powered-by-braintree' ),
227
  $this->get_gateway()->get_method_title(),
228
  $exception->getMessage()
229
  );
@@ -243,7 +246,7 @@ class Capture {
243
  /**
244
  * Adds the standard capture data to an order.
245
  *
246
- * @since 5.3.0-dev
247
  *
248
  * @param \WC_Order $order the order object
249
  * @param Framework\SV_WC_Payment_Gateway_API_Response $response transaction response
@@ -265,7 +268,7 @@ class Capture {
265
  /**
266
  * Lets gateways handle any specific capture failure results for the order.
267
  *
268
- * @since 5.3.0-dev
269
  *
270
  * @param \WC_Order $order WooCommerce order object
271
  * @param Framework\SV_WC_Payment_Gateway_API_Response $response API response object
@@ -279,7 +282,7 @@ class Capture {
279
  /**
280
  * Determines if an order is eligible for capture.
281
  *
282
- * @since 5.3.0-dev
283
  *
284
  * @param \WC_Order $order order object
285
  * @return bool
@@ -304,21 +307,23 @@ class Capture {
304
  /**
305
  * Determines if an order is ready for capture.
306
  *
307
- * @since 5.3.0-dev
 
 
308
  *
309
  * @param \WC_Order $order order object
310
  * @return bool
311
  */
312
  public function is_order_ready_for_capture( \WC_Order $order ) {
313
 
314
- return ! in_array( $order->get_status(), array( 'cancelled', 'refunded' ), true );
315
  }
316
 
317
 
318
  /**
319
  * Determines if an order has been fully captured
320
  *
321
- * @since 5.3.0-dev
322
  *
323
  * @param \WC_Order $order
324
  * @return bool
@@ -338,15 +343,14 @@ class Capture {
338
  /**
339
  * Determines if an order's authorization has expired.
340
  *
341
- * @since 5.3.0-dev
342
  *
343
  * @param \WC_Order $order
344
  * @return bool
345
  */
346
  public function has_order_authorization_expired( \WC_Order $order ) {
347
 
348
- $transaction_date = $this->get_gateway()->get_order_meta( Framework\SV_WC_Order_Compatibility::get_prop( $order, 'id' ), 'trans_date' );
349
-
350
  $transaction_time = strtotime( $transaction_date );
351
 
352
  return $transaction_date && floor( ( time() - $transaction_time ) / 3600 ) > $this->get_gateway()->get_authorization_time_window();
@@ -356,7 +360,7 @@ class Capture {
356
  /**
357
  * Determines if an order's authorization has been captured, even partially.
358
  *
359
- * @since 5.3.0-dev
360
  *
361
  * @param \WC_Order $order order object
362
  * @return bool
@@ -377,7 +381,7 @@ class Capture {
377
  * For instance, some processors allow capturing an amount a certain
378
  * percentage higher than the payment total.
379
  *
380
- * @since 5.3.0-dev
381
  *
382
  * @param \WC_Order $order WooCommerce order object
383
  * @return float
@@ -391,7 +395,7 @@ class Capture {
391
  /**
392
  * Gets the amount originally authorized for an order.
393
  *
394
- * @since 5.3.0-dev
395
  *
396
  * @param \WC_Order $order order object
397
  * @return float
@@ -409,7 +413,7 @@ class Capture {
409
  /**
410
  * Gets the payment gateway instance.
411
  *
412
- * @since 5.3.0-dev
413
  *
414
  * @return Framework\SV_WC_Payment_Gateway
415
  */
@@ -421,4 +425,5 @@ class Capture {
421
 
422
  }
423
 
424
- endif;
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Payment_Gateway\Handlers;
26
 
27
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
28
 
29
  defined( 'ABSPATH' ) or exit;
30
 
31
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Payment_Gateway\\Handlers\\Capture' ) ) :
32
+
33
 
34
  /**
35
  * The transaction capture handler.
36
  *
37
+ * @since 5.3.0
38
  */
39
  class Capture {
40
 
46
  /**
47
  * Capture constructor.
48
  *
49
+ * @since 5.3.0
50
  *
51
  * @param Framework\SV_WC_Payment_Gateway $gateway payment gateway instance
52
  */
66
  *
67
  * @internal
68
  *
69
+ * @since 5.3.0
70
  *
71
  * @param int $order_id order ID
72
  * @param string $old_status status being changed
74
  */
75
  public function maybe_capture_paid_order( $order_id, $old_status, $new_status ) {
76
 
77
+ $paid_statuses = (array) wc_get_is_paid_statuses();
78
 
79
  // bail if changing to a non-paid status or from a paid status
80
  if ( ! in_array( $new_status, $paid_statuses, true ) || in_array( $old_status, $paid_statuses, true ) ) {
87
  return;
88
  }
89
 
90
+ $payment_method = $order->get_payment_method( 'edit' );
91
 
92
  if ( $payment_method !== $this->get_gateway()->get_id() ) {
93
  return;
103
  * This acts as a wrapper for when the process should just bail without logging any errors or order notes, like when
104
  * performing capture via bulk action.
105
  *
106
+ * @since 5.3.0
107
  *
108
  * @param \WC_Order $order order object
109
  * @param float|null $amount amount to capture
125
  /**
126
  * Performs a credit card capture for an order.
127
  *
128
+ * @since 5.3.0
129
  *
130
  * @param \WC_Order $order WooCommerce order object
131
  * @param float|null $amount amount to capture
148
 
149
  $message = "{$this->get_gateway()->get_method_title()} does not support payment captures";
150
 
151
+ wc_doing_it_wrong( __METHOD__, $message, '5.3.0' );
152
 
153
  throw new Framework\SV_WC_Payment_Gateway_Exception( $message, 500 );
154
  }
155
 
156
+ // don't try to capture failed/cancelled/fully refunded transactions
157
  if ( ! $this->is_order_ready_for_capture( $order ) ) {
158
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Order cannot be captured', 'woocommerce-plugin-framework' ), 400 );
159
  }
160
 
161
  // don't re-capture fully captured orders
162
  if ( $this->has_order_authorization_expired( $order ) ) {
163
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction authorization has expired', 'woocommerce-plugin-framework' ), 400 );
164
  }
165
 
166
  // don't re-capture fully captured orders
167
  if ( $this->is_order_fully_captured( $order ) ) {
168
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction has already been fully captured', 'woocommerce-plugin-framework' ), 400 );
169
  }
170
 
171
  // generally unavailable
172
  if ( ! $this->order_can_be_captured( $order ) ) {
173
+ throw new Framework\SV_WC_Payment_Gateway_Exception( __( 'Transaction cannot be captured', 'woocommerce-plugin-framework' ), 400 );
174
  }
175
 
176
  // attempt the capture
186
 
187
  $message = sprintf(
188
  /* translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions: Capture, as in capture funds from a credit card. */
189
+ __( '%1$s Capture of %2$s Approved', 'woocommerce-plugin-framework' ),
190
  $this->get_gateway()->get_method_title(),
191
+ wc_price( $order->capture->amount, [
192
+ 'currency' => $order->get_currency()
193
+ ] )
194
  );
195
 
196
  // adds the transaction id (if any) to the order note
197
  if ( $response->get_transaction_id() ) {
198
+ $message .= ' ' . sprintf( esc_html__( '(Transaction ID %s)', 'woocommerce-plugin-framework' ), $response->get_transaction_id() );
199
  }
200
 
201
  $order->add_order_note( $message );
204
  $this->do_capture_success( $order, $response );
205
 
206
  // if the original auth amount has been captured, complete payment
207
+ if ( $this->get_gateway()->get_order_meta( $order, 'capture_total' ) >= $order->get_total() ) {
208
 
209
  // prevent stock from being reduced when payment is completed as this is done when the charge was authorized
210
  add_filter( 'woocommerce_payment_complete_reduce_order_stock', '__return_false', 100 );
226
 
227
  $note_message = sprintf(
228
  /* translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - failure message. Definitions: "capture" as in capturing funds from a credit card. */
229
+ __( '%1$s Capture Failed: %2$s', 'woocommerce-plugin-framework' ),
230
  $this->get_gateway()->get_method_title(),
231
  $exception->getMessage()
232
  );
246
  /**
247
  * Adds the standard capture data to an order.
248
  *
249
+ * @since 5.3.0
250
  *
251
  * @param \WC_Order $order the order object
252
  * @param Framework\SV_WC_Payment_Gateway_API_Response $response transaction response
268
  /**
269
  * Lets gateways handle any specific capture failure results for the order.
270
  *
271
+ * @since 5.3.0
272
  *
273
  * @param \WC_Order $order WooCommerce order object
274
  * @param Framework\SV_WC_Payment_Gateway_API_Response $response API response object
282
  /**
283
  * Determines if an order is eligible for capture.
284
  *
285
+ * @since 5.3.0
286
  *
287
  * @param \WC_Order $order order object
288
  * @return bool
307
  /**
308
  * Determines if an order is ready for capture.
309
  *
310
+ * The base implementation of this method checks for a valid order status and that a transaction ID is set.
311
+ *
312
+ * @since 5.3.0
313
  *
314
  * @param \WC_Order $order order object
315
  * @return bool
316
  */
317
  public function is_order_ready_for_capture( \WC_Order $order ) {
318
 
319
+ return ! in_array( $order->get_status(), array( 'cancelled', 'refunded', 'failed' ), true ) && $this->get_gateway()->get_order_meta( $order, 'trans_id' );
320
  }
321
 
322
 
323
  /**
324
  * Determines if an order has been fully captured
325
  *
326
+ * @since 5.3.0
327
  *
328
  * @param \WC_Order $order
329
  * @return bool
343
  /**
344
  * Determines if an order's authorization has expired.
345
  *
346
+ * @since 5.3.0
347
  *
348
  * @param \WC_Order $order
349
  * @return bool
350
  */
351
  public function has_order_authorization_expired( \WC_Order $order ) {
352
 
353
+ $transaction_date = $this->get_gateway()->get_order_meta( $order, 'trans_date' );
 
354
  $transaction_time = strtotime( $transaction_date );
355
 
356
  return $transaction_date && floor( ( time() - $transaction_time ) / 3600 ) > $this->get_gateway()->get_authorization_time_window();
360
  /**
361
  * Determines if an order's authorization has been captured, even partially.
362
  *
363
+ * @since 5.3.0
364
  *
365
  * @param \WC_Order $order order object
366
  * @return bool
381
  * For instance, some processors allow capturing an amount a certain
382
  * percentage higher than the payment total.
383
  *
384
+ * @since 5.3.0
385
  *
386
  * @param \WC_Order $order WooCommerce order object
387
  * @return float
395
  /**
396
  * Gets the amount originally authorized for an order.
397
  *
398
+ * @since 5.3.0
399
  *
400
  * @param \WC_Order $order order object
401
  * @return float
413
  /**
414
  * Gets the payment gateway instance.
415
  *
416
+ * @since 5.3.0
417
  *
418
  * @return Framework\SV_WC_Payment_Gateway
419
  */
425
 
426
  }
427
 
428
+
429
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php RENAMED
@@ -17,17 +17,18 @@
17
  * needs please refer to http://www.skyverge.com
18
  *
19
  * @author SkyVerge
20
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
21
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
  */
23
 
24
- namespace WC_Braintree\Plugin_Framework\Payment_Gateway\Admin;
25
 
26
  defined( 'ABSPATH' ) or exit;
27
 
28
- use WC_Braintree\Plugin_Framework as Framework;
 
 
29
 
30
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\Payment_Gateway\\Admin\\Setup_Wizard' ) ) :
31
 
32
  /**
33
  * The payment gateway plugin Setup Wizard class.
@@ -64,4 +65,5 @@ abstract class Setup_Wizard extends Framework\Admin\Setup_Wizard {
64
 
65
  }
66
 
 
67
  endif;
17
  * needs please refer to http://www.skyverge.com
18
  *
19
  * @author SkyVerge
20
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
21
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
  */
23
 
24
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1\Payment_Gateway\Admin;
25
 
26
  defined( 'ABSPATH' ) or exit;
27
 
28
+ use SkyVerge\WooCommerce\PluginFramework\v5_7_1 as Framework;
29
+
30
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\Payment_Gateway\\Admin\\Setup_Wizard' ) ) :
31
 
 
32
 
33
  /**
34
  * The payment gateway plugin Setup Wizard class.
65
 
66
  }
67
 
68
+
69
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Admin_Order' ) ) :
 
30
 
31
  /**
32
  * Handle the admin order screens.
@@ -84,7 +85,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
84
  // Edit Order screen assets
85
  if ( 'post.php' === $hook_suffix ) {
86
 
87
- $order = wc_get_order( SV_WC_Helper::get_request( 'post' ) );
88
 
89
  if ( ! $order ) {
90
  return;
@@ -104,7 +105,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
104
  /**
105
  * Enqueues the assets for the Edit Order screen.
106
  *
107
- * @since 5.3.0-dev
108
  *
109
  * @param \WC_Order $order order object
110
  */
@@ -114,12 +115,12 @@ class SV_WC_Payment_Gateway_Admin_Order {
114
 
115
  wp_localize_script( 'sv-wc-payment-gateway-admin-order', 'sv_wc_payment_gateway_admin_order', array(
116
  'ajax_url' => admin_url( 'admin-ajax.php' ),
117
- 'gateway_id' => SV_WC_Order_Compatibility::get_prop( $order, 'payment_method' ),
118
- 'order_id' => SV_WC_Order_Compatibility::get_prop( $order, 'id' ),
119
- 'capture_ays' => __( 'Are you sure you wish to process this capture? The action cannot be undone.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
120
  'capture_action' => 'wc_' . $this->get_plugin()->get_id() . '_capture_charge',
121
  'capture_nonce' => wp_create_nonce( 'wc_' . $this->get_plugin()->get_id() . '_capture_charge' ),
122
- 'capture_error' => __( 'Something went wrong, and the capture could no be completed. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
123
  ) );
124
 
125
  wp_enqueue_style( 'sv-wc-payment-gateway-admin-order', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/admin/sv-wc-payment-gateway-admin-order.min.css', SV_WC_Plugin::VERSION );
@@ -163,7 +164,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
163
  jQuery( document ).ready( function ( $ ) {
164
  if ( 0 == $( 'select[name^=action] option[value=wc_capture_charge]' ).size() ) {
165
  $( 'select[name^=action]' ).append(
166
- $( '<option>' ).val( '<?php echo esc_js( 'wc_capture_charge' ); ?>' ).text( '<?php _e( 'Capture Charge', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>' )
167
  );
168
  }
169
  });
@@ -238,7 +239,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
238
  /* translators: verb, as in "Capture credit card charge".
239
  Used when an amount has been pre-authorized before, but funds have not yet been captured (taken) from the card.
240
  Capturing the charge will take the money from the credit card and put it in the merchant's pockets. */
241
- $actions[ 'wc_' . $this->get_plugin()->get_id() . '_capture_charge' ] = esc_html__( 'Capture Charge', 'woocommerce-gateway-paypal-powered-by-braintree' );
242
 
243
  return $actions;
244
  }
@@ -256,7 +257,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
256
  public function add_capture_button( $order ) {
257
 
258
  // only display the button for core orders
259
- if ( ! $order instanceof \WC_Order || 'shop_order' !== get_post_type( SV_WC_Order_Compatibility::get_prop( $order, 'id' ) ) ) {
260
  return;
261
  }
262
 
@@ -291,17 +292,17 @@ class SV_WC_Payment_Gateway_Admin_Order {
291
 
292
  // add some tooltip wording explaining why this cannot be captured
293
  if ( $gateway->get_capture_handler()->is_order_fully_captured( $order ) ) {
294
- $tooltip = __( 'This charge has been fully captured.', 'woocommerce-gateway-paypal-powered-by-braintree' );
295
  } elseif ( $gateway->get_order_meta( $order, 'trans_date' ) && $gateway->get_capture_handler()->has_order_authorization_expired( $order ) ) {
296
- $tooltip = __( 'This charge can no longer be captured.', 'woocommerce-gateway-paypal-powered-by-braintree' );
297
  } else {
298
- $tooltip = __( 'This charge cannot be captured.', 'woocommerce-gateway-paypal-powered-by-braintree' );
299
  }
300
  }
301
 
302
  ?>
303
 
304
- <button type="button" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>" <?php echo ( $tooltip ) ? 'data-tip="' . esc_html( $tooltip ) . '"' : ''; ?>><?php _e( 'Capture Charge', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></button>
305
 
306
  <?php
307
 
@@ -341,7 +342,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
341
 
342
  check_ajax_referer( 'wc_' . $this->get_plugin()->get_id() . '_capture_charge', 'nonce' );
343
 
344
- $gateway_id = SV_WC_Helper::get_request( 'gateway_id' );
345
 
346
  if ( ! $this->get_plugin()->has_gateway( $gateway_id ) ) {
347
  die();
@@ -351,7 +352,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
351
 
352
  try {
353
 
354
- $order_id = SV_WC_Helper::get_request( 'order_id' );
355
  $order = wc_get_order( $order_id );
356
 
357
  if ( ! $order ) {
@@ -362,14 +363,14 @@ class SV_WC_Payment_Gateway_Admin_Order {
362
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid permissions' );
363
  }
364
 
365
- if ( SV_WC_Order_Compatibility::get_prop( $order, 'payment_method' ) !== $gateway->get_id() ) {
366
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid payment method' );
367
  }
368
 
369
  $amount_captured = (float) $gateway->get_order_meta( $order, 'capture_total' );
370
 
371
- if ( SV_WC_Helper::get_request( 'amount' ) ) {
372
- $amount = (float) SV_WC_Helper::get_request( 'amount' );
373
  } else {
374
  $amount = $order->get_total();
375
  }
@@ -380,15 +381,15 @@ class SV_WC_Payment_Gateway_Admin_Order {
380
  throw new SV_WC_Payment_Gateway_Exception( $result['message'] );
381
  }
382
 
383
- wp_send_json_success( array(
384
  'message' => html_entity_decode( wp_strip_all_tags( $result['message'] ) ), // ensure any HTML tags are removed and the currency symbol entity is decoded
385
- ) );
386
 
387
  } catch ( SV_WC_Payment_Gateway_Exception $e ) {
388
 
389
- wp_send_json_error( array(
390
  'message' => $e->getMessage(),
391
- ) );
392
  }
393
  }
394
 
@@ -404,8 +405,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
404
  protected function get_order_gateway( \WC_Order $order ) {
405
 
406
  $capture_gateway = null;
407
-
408
- $payment_method = SV_WC_Order_Compatibility::get_prop( $order, 'payment_method' );
409
 
410
  if ( $this->get_plugin()->has_gateway( $payment_method ) ) {
411
 
@@ -443,14 +443,14 @@ class SV_WC_Payment_Gateway_Admin_Order {
443
  * captured, and the gateway supports issuing a capture request
444
  *
445
  * @since 5.0.0
446
- * @deprecated 5.3.0-dev
447
  *
448
  * @param \WC_Order|int $order the order identifier or order object
449
  * @param float|null $amount capture amount
450
  */
451
  protected function maybe_capture_charge( $order, $amount = null ) {
452
 
453
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.3.0-dev' );
454
 
455
  if ( ! is_object( $order ) ) {
456
  $order = wc_get_order( $order );
@@ -482,8 +482,8 @@ class SV_WC_Payment_Gateway_Admin_Order {
482
  *
483
  * @internal
484
  *
485
- * @since 5.0.1-dev
486
- * @deprecated 5.3.0-dev
487
  *
488
  * @param int $order_id order ID
489
  * @param string $old_status status being changed
@@ -491,7 +491,7 @@ class SV_WC_Payment_Gateway_Admin_Order {
491
  */
492
  public function maybe_capture_paid_order( $order_id, $old_status, $new_status ) {
493
 
494
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.3.0-dev' );
495
  }
496
 
497
 
@@ -499,25 +499,22 @@ class SV_WC_Payment_Gateway_Admin_Order {
499
  * Determines if an order is ready for capture.
500
  *
501
  * @since 5.0.0
502
- * @deprecated 5.3.0-dev
503
  *
504
  * @param \WC_Order $order order object
505
  * @return bool
506
  */
507
  protected function is_order_ready_for_capture( \WC_Order $order ) {
508
 
509
- SV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.3.0-dev' );
510
 
511
  $gateway = $this->get_order_gateway( $order );
512
 
513
- if ( ! $gateway ) {
514
- return false;
515
- }
516
-
517
- return $gateway->get_capture_handler()->is_order_ready_for_capture( $order );
518
  }
519
 
520
 
521
  }
522
 
 
523
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Admin_Order' ) ) :
30
+
31
 
32
  /**
33
  * Handle the admin order screens.
85
  // Edit Order screen assets
86
  if ( 'post.php' === $hook_suffix ) {
87
 
88
+ $order = wc_get_order( SV_WC_Helper::get_requested_value( 'post' ) );
89
 
90
  if ( ! $order ) {
91
  return;
105
  /**
106
  * Enqueues the assets for the Edit Order screen.
107
  *
108
+ * @since 5.3.0
109
  *
110
  * @param \WC_Order $order order object
111
  */
115
 
116
  wp_localize_script( 'sv-wc-payment-gateway-admin-order', 'sv_wc_payment_gateway_admin_order', array(
117
  'ajax_url' => admin_url( 'admin-ajax.php' ),
118
+ 'gateway_id' => $order->get_payment_method( 'edit' ),
119
+ 'order_id' => $order->get_id(),
120
+ 'capture_ays' => __( 'Are you sure you wish to process this capture? The action cannot be undone.', 'woocommerce-plugin-framework' ),
121
  'capture_action' => 'wc_' . $this->get_plugin()->get_id() . '_capture_charge',
122
  'capture_nonce' => wp_create_nonce( 'wc_' . $this->get_plugin()->get_id() . '_capture_charge' ),
123
+ 'capture_error' => __( 'Something went wrong, and the capture could no be completed. Please try again.', 'woocommerce-plugin-framework' ),
124
  ) );
125
 
126
  wp_enqueue_style( 'sv-wc-payment-gateway-admin-order', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/admin/sv-wc-payment-gateway-admin-order.min.css', SV_WC_Plugin::VERSION );
164
  jQuery( document ).ready( function ( $ ) {
165
  if ( 0 == $( 'select[name^=action] option[value=wc_capture_charge]' ).size() ) {
166
  $( 'select[name^=action]' ).append(
167
+ $( '<option>' ).val( '<?php echo esc_js( 'wc_capture_charge' ); ?>' ).text( '<?php _e( 'Capture Charge', 'woocommerce-plugin-framework' ); ?>' )
168
  );
169
  }
170
  });
239
  /* translators: verb, as in "Capture credit card charge".
240
  Used when an amount has been pre-authorized before, but funds have not yet been captured (taken) from the card.
241
  Capturing the charge will take the money from the credit card and put it in the merchant's pockets. */
242
+ $actions[ 'wc_' . $this->get_plugin()->get_id() . '_capture_charge' ] = esc_html__( 'Capture Charge', 'woocommerce-plugin-framework' );
243
 
244
  return $actions;
245
  }
257
  public function add_capture_button( $order ) {
258
 
259
  // only display the button for core orders
260
+ if ( ! $order instanceof \WC_Order || 'shop_order' !== get_post_type( $order->get_id() ) ) {
261
  return;
262
  }
263
 
292
 
293
  // add some tooltip wording explaining why this cannot be captured
294
  if ( $gateway->get_capture_handler()->is_order_fully_captured( $order ) ) {
295
+ $tooltip = __( 'This charge has been fully captured.', 'woocommerce-plugin-framework' );
296
  } elseif ( $gateway->get_order_meta( $order, 'trans_date' ) && $gateway->get_capture_handler()->has_order_authorization_expired( $order ) ) {
297
+ $tooltip = __( 'This charge can no longer be captured.', 'woocommerce-plugin-framework' );
298
  } else {
299
+ $tooltip = __( 'This charge cannot be captured.', 'woocommerce-plugin-framework' );
300
  }
301
  }
302
 
303
  ?>
304
 
305
+ <button type="button" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>" <?php echo ( $tooltip ) ? 'data-tip="' . esc_html( $tooltip ) . '"' : ''; ?>><?php _e( 'Capture Charge', 'woocommerce-plugin-framework' ); ?></button>
306
 
307
  <?php
308
 
342
 
343
  check_ajax_referer( 'wc_' . $this->get_plugin()->get_id() . '_capture_charge', 'nonce' );
344
 
345
+ $gateway_id = SV_WC_Helper::get_requested_value( 'gateway_id' );
346
 
347
  if ( ! $this->get_plugin()->has_gateway( $gateway_id ) ) {
348
  die();
352
 
353
  try {
354
 
355
+ $order_id = SV_WC_Helper::get_requested_value( 'order_id' );
356
  $order = wc_get_order( $order_id );
357
 
358
  if ( ! $order ) {
363
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid permissions' );
364
  }
365
 
366
+ if ( $order->get_payment_method( 'edit' ) !== $gateway->get_id() ) {
367
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid payment method' );
368
  }
369
 
370
  $amount_captured = (float) $gateway->get_order_meta( $order, 'capture_total' );
371
 
372
+ if ( $request_amount = SV_WC_Helper::get_requested_value( 'amount' ) ) {
373
+ $amount = (float) $request_amount;
374
  } else {
375
  $amount = $order->get_total();
376
  }
381
  throw new SV_WC_Payment_Gateway_Exception( $result['message'] );
382
  }
383
 
384
+ wp_send_json_success( [
385
  'message' => html_entity_decode( wp_strip_all_tags( $result['message'] ) ), // ensure any HTML tags are removed and the currency symbol entity is decoded
386
+ ] );
387
 
388
  } catch ( SV_WC_Payment_Gateway_Exception $e ) {
389
 
390
+ wp_send_json_error( [
391
  'message' => $e->getMessage(),
392
+ ] );
393
  }
394
  }
395
 
405
  protected function get_order_gateway( \WC_Order $order ) {
406
 
407
  $capture_gateway = null;
408
+ $payment_method = $order->get_payment_method( 'edit' );
 
409
 
410
  if ( $this->get_plugin()->has_gateway( $payment_method ) ) {
411
 
443
  * captured, and the gateway supports issuing a capture request
444
  *
445
  * @since 5.0.0
446
+ * @deprecated 5.3.0
447
  *
448
  * @param \WC_Order|int $order the order identifier or order object
449
  * @param float|null $amount capture amount
450
  */
451
  protected function maybe_capture_charge( $order, $amount = null ) {
452
 
453
+ wc_deprecated_function( __METHOD__, '5.3.0' );
454
 
455
  if ( ! is_object( $order ) ) {
456
  $order = wc_get_order( $order );
482
  *
483
  * @internal
484
  *
485
+ * @since 5.0.1
486
+ * @deprecated 5.3.0
487
  *
488
  * @param int $order_id order ID
489
  * @param string $old_status status being changed
491
  */
492
  public function maybe_capture_paid_order( $order_id, $old_status, $new_status ) {
493
 
494
+ wc_deprecated_function( __METHOD__, '5.3.0' );
495
  }
496
 
497
 
499
  * Determines if an order is ready for capture.
500
  *
501
  * @since 5.0.0
502
+ * @deprecated 5.3.0
503
  *
504
  * @param \WC_Order $order order object
505
  * @return bool
506
  */
507
  protected function is_order_ready_for_capture( \WC_Order $order ) {
508
 
509
+ wc_deprecated_function( __METHOD__, '5.3.0' );
510
 
511
  $gateway = $this->get_order_gateway( $order );
512
 
513
+ return $gateway && $gateway->get_capture_handler()->is_order_ready_for_capture( $order );
 
 
 
 
514
  }
515
 
516
 
517
  }
518
 
519
+
520
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Admin_Payment_Token_Editor' ) ) :
 
30
 
31
  /**
32
  * The token editor.
@@ -36,15 +37,16 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Ad
36
  class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
37
 
38
 
39
- /** @var \SV_WC_Payment_Gateway_Direct the gateway object **/
40
  protected $gateway;
41
 
42
 
43
  /**
44
- * Construct the editor.
45
  *
46
  * @since 4.3.0
47
- * @param \SV_WC_Payment_Gateway_Direct the gateway object
 
48
  */
49
  public function __construct( SV_WC_Payment_Gateway_Direct $gateway ) {
50
 
@@ -86,7 +88,7 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
86
  'ajax_url' => admin_url( 'admin-ajax.php' ),
87
  'actions' => array(
88
  'remove_token' => array(
89
- 'ays' => __( 'Are you sure you want to remove this token?', 'woocommerce-gateway-paypal-powered-by-braintree' ),
90
  'nonce' => wp_create_nonce( 'wc_payment_gateway_admin_remove_payment_token' ),
91
  ),
92
  'add_token' => array(
@@ -96,11 +98,11 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
96
  'nonce' => wp_create_nonce( 'wc_payment_gateway_admin_refresh_payment_tokens' ),
97
  ),
98
  'save' => array(
99
- 'error' => __( 'Invalid token data', 'woocommerce-gateway-paypal-powered-by-braintree' ),
100
  ),
101
  ),
102
  'i18n' => array(
103
- 'general_error' => __( 'An error occurred. Please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ),
104
  ),
105
  ) );
106
  }
@@ -176,7 +178,7 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
176
  }
177
 
178
  // Set the default method
179
- $data['default'] = $token_id === SV_WC_Helper::get_post( $this->get_input_name() . '_default' );
180
 
181
  if ( $data = $this->validate_token_data( $token_id, $data ) ) {
182
  $built_tokens[ $token_id ] = $this->build_token( $user_id, $token_id, $data );
@@ -196,7 +198,7 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
196
 
197
  check_ajax_referer( 'wc_payment_gateway_admin_get_blank_payment_token', 'security' );
198
 
199
- $index = SV_WC_Helper::get_request( 'index' );
200
 
201
  if ( $index ) {
202
 
@@ -239,8 +241,8 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
239
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid nonce' );
240
  }
241
 
242
- $user_id = SV_WC_Helper::get_request( 'user_id' );
243
- $token_id = SV_WC_Helper::get_request( 'token_id' );
244
 
245
  if ( ! $user_id ) {
246
  throw new SV_WC_Payment_Gateway_Exception( 'User ID is missing' );
@@ -276,7 +278,7 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
276
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid nonce' );
277
  }
278
 
279
- $user_id = SV_WC_Helper::get_request( 'user_id' );
280
 
281
  if ( ! $user_id ) {
282
  throw new SV_WC_Payment_Gateway_Exception( 'User ID is missing' );
@@ -304,10 +306,11 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
304
  * See Authorize.net CIM for an example.
305
  *
306
  * @since 4.3.0
 
307
  * @param int $user_id the user ID
308
  * @param string $token_id the token ID
309
  * @param array $data the token data
310
- * @return \SV_WC_Payment_Gateway_Payment_Token the payment token object
311
  */
312
  protected function build_token( $user_id, $token_id, $data ) {
313
 
@@ -448,15 +451,16 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
448
 
449
  // Append the environment name if there are multiple
450
  if ( $this->get_gateway()->get_plugin()->get_admin_user_handler()->has_multiple_environments() ) {
451
- $title .= ' ' . sprintf( __( '(%s)', 'woocommerce-gateway-paypal-powered-by-braintree' ), $this->get_gateway()->get_environment_name() );
452
  }
453
 
454
  /**
455
- * Filter the token editor name.
456
  *
457
  * @since 4.3.0
 
458
  * @param string $title the editor title
459
- * @param \SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
460
  */
461
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_title', $title, $this );
462
  }
@@ -477,15 +481,16 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
477
  $columns[ $field_id ] = isset( $field['label'] ) ? $field['label'] : '';
478
  }
479
 
480
- $columns['default'] = __( 'Default', 'woocommerce-gateway-paypal-powered-by-braintree' );
481
  $columns['actions'] = '';
482
 
483
  /**
484
- * Filter the admin token editor columns.
485
  *
486
  * @since 4.3.0
 
487
  * @param array $columns
488
- * @param \SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
489
  */
490
  $columns = apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_columns', $columns, $this );
491
 
@@ -512,24 +517,24 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
512
  // Define the credit card fields
513
  $fields = array(
514
  'id' => array(
515
- 'label' => __( 'Token ID', 'woocommerce-gateway-paypal-powered-by-braintree' ),
516
  'editable' => ! $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods(),
517
  'required' => true,
518
  ),
519
  'card_type' => array(
520
- 'label' => __( 'Card Type', 'woocommerce-gateway-paypal-powered-by-braintree' ),
521
  'type' => 'select',
522
  'options' => $this->get_card_type_options(),
523
  ),
524
  'last_four' => array(
525
- 'label' => __( 'Last Four', 'woocommerce-gateway-paypal-powered-by-braintree' ),
526
  'attributes' => array(
527
  'pattern' => '[0-9]{4}',
528
  'maxlength' => 4,
529
  ),
530
  ),
531
  'expiry' => array(
532
- 'label' => __( 'Expiration (MM/YY)', 'woocommerce-gateway-paypal-powered-by-braintree' ),
533
  'attributes' => array(
534
  'placeholder' => 'MM/YY',
535
  'pattern' => '(0[1-9]|1[012])[- /.]\d\d',
@@ -545,20 +550,20 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
545
  // Define the echeck fields
546
  $fields = array(
547
  'id' => array(
548
- 'label' => __( 'Token ID', 'woocommerce-gateway-paypal-powered-by-braintree' ),
549
  'editable' => ! $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods(),
550
  'required' => true,
551
  ),
552
  'account_type' => array(
553
- 'label' => __( 'Account Type', 'woocommerce-gateway-paypal-powered-by-braintree' ),
554
  'type' => 'select',
555
  'options' => array(
556
- 'checking' => __( 'Checking', 'woocommerce-gateway-paypal-powered-by-braintree' ),
557
- 'savings' => __( 'Savings', 'woocommerce-gateway-paypal-powered-by-braintree' ),
558
  ),
559
  ),
560
  'last_four' => array(
561
- 'label' => __( 'Last Four', 'woocommerce-gateway-paypal-powered-by-braintree' ),
562
  'attributes' => array(
563
  'pattern' => '[0-9]{4}',
564
  'maxlength' => 4,
@@ -585,11 +590,12 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
585
  }
586
 
587
  /**
588
- * Filter the admin token editor fields.
589
  *
590
  * @since 4.3.0
 
591
  * @param array $fields
592
- * @param \SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
593
  */
594
  $fields = apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_fields', $fields, $this );
595
 
@@ -654,19 +660,20 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
654
  $actions = array();
655
 
656
  if ( $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods() ) {
657
- $actions['refresh'] = __( 'Refresh', 'woocommerce-gateway-paypal-powered-by-braintree' );
658
  } else {
659
- $actions['add-new'] = __( 'Add New', 'woocommerce-gateway-paypal-powered-by-braintree' );
660
  }
661
 
662
- $actions['save'] = __( 'Save', 'woocommerce-gateway-paypal-powered-by-braintree' );
663
 
664
  /**
665
- * Filter the payment token editor actions.
666
  *
667
  * @since 4.3.0
 
668
  * @param array $actions the actions
669
- * @param \SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
670
  */
671
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_actions', $actions, $this );
672
  }
@@ -681,29 +688,35 @@ class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
681
  protected function get_token_actions() {
682
 
683
  $actions = array(
684
- 'remove' => __( 'Remove', 'woocommerce-gateway-paypal-powered-by-braintree' ),
685
  );
686
 
687
  /**
688
- * Filter the token actions.
689
  *
690
  * @since 4.3.0
 
691
  * @param array $actions the token actions
692
- * @param \SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
693
  */
694
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_token_actions', $actions, $this );
695
  }
696
 
697
 
698
  /**
699
- * Get the gateway object.
700
  *
701
  * @since 4.3.0
702
- * @return \SV_WC_Payment_Gateway_Direct the gateway object
 
703
  */
704
  protected function get_gateway() {
 
705
  return $this->gateway;
706
  }
 
 
707
  }
708
 
 
709
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Admin_Payment_Token_Editor' ) ) :
30
+
31
 
32
  /**
33
  * The token editor.
37
  class SV_WC_Payment_Gateway_Admin_Payment_Token_Editor {
38
 
39
 
40
+ /** @var SV_WC_Payment_Gateway_Direct the gateway object **/
41
  protected $gateway;
42
 
43
 
44
  /**
45
+ * Constructs the editor.
46
  *
47
  * @since 4.3.0
48
+ *
49
+ * @param SV_WC_Payment_Gateway_Direct the gateway object
50
  */
51
  public function __construct( SV_WC_Payment_Gateway_Direct $gateway ) {
52
 
88
  'ajax_url' => admin_url( 'admin-ajax.php' ),
89
  'actions' => array(
90
  'remove_token' => array(
91
+ 'ays' => __( 'Are you sure you want to remove this token?', 'woocommerce-plugin-framework' ),
92
  'nonce' => wp_create_nonce( 'wc_payment_gateway_admin_remove_payment_token' ),
93
  ),
94
  'add_token' => array(
98
  'nonce' => wp_create_nonce( 'wc_payment_gateway_admin_refresh_payment_tokens' ),
99
  ),
100
  'save' => array(
101
+ 'error' => __( 'Invalid token data', 'woocommerce-plugin-framework' ),
102
  ),
103
  ),
104
  'i18n' => array(
105
+ 'general_error' => __( 'An error occurred. Please try again.', 'woocommerce-plugin-framework' ),
106
  ),
107
  ) );
108
  }
178
  }
179
 
180
  // Set the default method
181
+ $data['default'] = $token_id === SV_WC_Helper::get_posted_value( $this->get_input_name() . '_default' );
182
 
183
  if ( $data = $this->validate_token_data( $token_id, $data ) ) {
184
  $built_tokens[ $token_id ] = $this->build_token( $user_id, $token_id, $data );
198
 
199
  check_ajax_referer( 'wc_payment_gateway_admin_get_blank_payment_token', 'security' );
200
 
201
+ $index = SV_WC_Helper::get_requested_value( 'index' );
202
 
203
  if ( $index ) {
204
 
241
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid nonce' );
242
  }
243
 
244
+ $user_id = SV_WC_Helper::get_requested_value( 'user_id' );
245
+ $token_id = SV_WC_Helper::get_requested_value( 'token_id' );
246
 
247
  if ( ! $user_id ) {
248
  throw new SV_WC_Payment_Gateway_Exception( 'User ID is missing' );
278
  throw new SV_WC_Payment_Gateway_Exception( 'Invalid nonce' );
279
  }
280
 
281
+ $user_id = SV_WC_Helper::get_requested_value( 'user_id' );
282
 
283
  if ( ! $user_id ) {
284
  throw new SV_WC_Payment_Gateway_Exception( 'User ID is missing' );
306
  * See Authorize.net CIM for an example.
307
  *
308
  * @since 4.3.0
309
+ *
310
  * @param int $user_id the user ID
311
  * @param string $token_id the token ID
312
  * @param array $data the token data
313
+ * @return SV_WC_Payment_Gateway_Payment_Token the payment token object
314
  */
315
  protected function build_token( $user_id, $token_id, $data ) {
316
 
451
 
452
  // Append the environment name if there are multiple
453
  if ( $this->get_gateway()->get_plugin()->get_admin_user_handler()->has_multiple_environments() ) {
454
+ $title .= ' ' . sprintf( __( '(%s)', 'woocommerce-plugin-framework' ), $this->get_gateway()->get_environment_name() );
455
  }
456
 
457
  /**
458
+ * Filters the token editor name.
459
  *
460
  * @since 4.3.0
461
+ *
462
  * @param string $title the editor title
463
+ * @param SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
464
  */
465
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_title', $title, $this );
466
  }
481
  $columns[ $field_id ] = isset( $field['label'] ) ? $field['label'] : '';
482
  }
483
 
484
+ $columns['default'] = __( 'Default', 'woocommerce-plugin-framework' );
485
  $columns['actions'] = '';
486
 
487
  /**
488
+ * Filters the admin token editor columns.
489
  *
490
  * @since 4.3.0
491
+ *
492
  * @param array $columns
493
+ * @param SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
494
  */
495
  $columns = apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_columns', $columns, $this );
496
 
517
  // Define the credit card fields
518
  $fields = array(
519
  'id' => array(
520
+ 'label' => __( 'Token ID', 'woocommerce-plugin-framework' ),
521
  'editable' => ! $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods(),
522
  'required' => true,
523
  ),
524
  'card_type' => array(
525
+ 'label' => __( 'Card Type', 'woocommerce-plugin-framework' ),
526
  'type' => 'select',
527
  'options' => $this->get_card_type_options(),
528
  ),
529
  'last_four' => array(
530
+ 'label' => __( 'Last Four', 'woocommerce-plugin-framework' ),
531
  'attributes' => array(
532
  'pattern' => '[0-9]{4}',
533
  'maxlength' => 4,
534
  ),
535
  ),
536
  'expiry' => array(
537
+ 'label' => __( 'Expiration (MM/YY)', 'woocommerce-plugin-framework' ),
538
  'attributes' => array(
539
  'placeholder' => 'MM/YY',
540
  'pattern' => '(0[1-9]|1[012])[- /.]\d\d',
550
  // Define the echeck fields
551
  $fields = array(
552
  'id' => array(
553
+ 'label' => __( 'Token ID', 'woocommerce-plugin-framework' ),
554
  'editable' => ! $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods(),
555
  'required' => true,
556
  ),
557
  'account_type' => array(
558
+ 'label' => __( 'Account Type', 'woocommerce-plugin-framework' ),
559
  'type' => 'select',
560
  'options' => array(
561
+ 'checking' => __( 'Checking', 'woocommerce-plugin-framework' ),
562
+ 'savings' => __( 'Savings', 'woocommerce-plugin-framework' ),
563
  ),
564
  ),
565
  'last_four' => array(
566
+ 'label' => __( 'Last Four', 'woocommerce-plugin-framework' ),
567
  'attributes' => array(
568
  'pattern' => '[0-9]{4}',
569
  'maxlength' => 4,
590
  }
591
 
592
  /**
593
+ * Filters the admin token editor fields.
594
  *
595
  * @since 4.3.0
596
+ *
597
  * @param array $fields
598
+ * @param SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
599
  */
600
  $fields = apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_fields', $fields, $this );
601
 
660
  $actions = array();
661
 
662
  if ( $this->get_gateway()->get_api()->supports_get_tokenized_payment_methods() ) {
663
+ $actions['refresh'] = __( 'Refresh', 'woocommerce-plugin-framework' );
664
  } else {
665
+ $actions['add-new'] = __( 'Add New', 'woocommerce-plugin-framework' );
666
  }
667
 
668
+ $actions['save'] = __( 'Save', 'woocommerce-plugin-framework' );
669
 
670
  /**
671
+ * Filters the payment token editor actions.
672
  *
673
  * @since 4.3.0
674
+ *
675
  * @param array $actions the actions
676
+ * @param SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
677
  */
678
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_actions', $actions, $this );
679
  }
688
  protected function get_token_actions() {
689
 
690
  $actions = array(
691
+ 'remove' => __( 'Remove', 'woocommerce-plugin-framework' ),
692
  );
693
 
694
  /**
695
+ * Filters the token actions.
696
  *
697
  * @since 4.3.0
698
+ *
699
  * @param array $actions the token actions
700
+ * @param SV_WC_Payment_Gateway_Admin_Payment_Token_Editor $editor the editor object
701
  */
702
  return apply_filters( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_token_editor_token_actions', $actions, $this );
703
  }
704
 
705
 
706
  /**
707
+ * Gets the gateway object.
708
  *
709
  * @since 4.3.0
710
+ *
711
+ * @return SV_WC_Payment_Gateway_Direct the gateway object
712
  */
713
  protected function get_gateway() {
714
+
715
  return $this->gateway;
716
  }
717
+
718
+
719
  }
720
 
721
+
722
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Admin_User_Handler' ) ) :
 
30
 
31
  /**
32
  * Handle the admin user profile settings.
@@ -35,12 +36,14 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Ad
35
  */
36
  class SV_WC_Payment_Gateway_Admin_User_Handler {
37
 
 
38
  /** @var \SV_WC_Payment_Gateway_Plugin the plugin instance **/
39
  protected $plugin;
40
 
41
  /** @var array the token editor for each gateway **/
42
  protected $token_editors = array();
43
 
 
44
  /**
45
  * Construct the user handler.
46
  *
@@ -218,7 +221,7 @@ class SV_WC_Payment_Gateway_Admin_User_Handler {
218
 
219
  $plugin_title = trim( str_replace( 'WooCommerce', '', $this->get_plugin()->get_plugin_name() ) );
220
 
221
- $title = sprintf( __( '%s Payment Tokens', 'woocommerce-gateway-paypal-powered-by-braintree' ), $plugin_title );
222
 
223
  /**
224
  * Filter the admin token editor title.
@@ -296,10 +299,10 @@ class SV_WC_Payment_Gateway_Admin_User_Handler {
296
  continue;
297
  }
298
 
299
- $label = __( 'Customer ID', 'woocommerce-gateway-paypal-powered-by-braintree' );
300
 
301
  // If the plugin has multiple gateways configured for multiple environments, append the environment name to keep things straight
302
- $label .= ( $this->has_multiple_environments() ) ? ' ' . sprintf( __( '(%s)', 'woocommerce-gateway-paypal-powered-by-braintree' ), $gateway->get_environment_name() ) : '';
303
 
304
  $fields[] = array(
305
  'label' => $label,
@@ -401,6 +404,9 @@ class SV_WC_Payment_Gateway_Admin_User_Handler {
401
  protected function get_plugin() {
402
  return $this->plugin;
403
  }
 
 
404
  }
405
 
 
406
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Admin
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Admin_User_Handler' ) ) :
30
+
31
 
32
  /**
33
  * Handle the admin user profile settings.
36
  */
37
  class SV_WC_Payment_Gateway_Admin_User_Handler {
38
 
39
+
40
  /** @var \SV_WC_Payment_Gateway_Plugin the plugin instance **/
41
  protected $plugin;
42
 
43
  /** @var array the token editor for each gateway **/
44
  protected $token_editors = array();
45
 
46
+
47
  /**
48
  * Construct the user handler.
49
  *
221
 
222
  $plugin_title = trim( str_replace( 'WooCommerce', '', $this->get_plugin()->get_plugin_name() ) );
223
 
224
+ $title = sprintf( __( '%s Payment Tokens', 'woocommerce-plugin-framework' ), $plugin_title );
225
 
226
  /**
227
  * Filter the admin token editor title.
299
  continue;
300
  }
301
 
302
+ $label = __( 'Customer ID', 'woocommerce-plugin-framework' );
303
 
304
  // If the plugin has multiple gateways configured for multiple environments, append the environment name to keep things straight
305
+ $label .= ( $this->has_multiple_environments() ) ? ' ' . sprintf( __( '(%s)', 'woocommerce-plugin-framework' ), $gateway->get_environment_name() ) : '';
306
 
307
  $fields[] = array(
308
  'label' => $label,
404
  protected function get_plugin() {
405
  return $this->plugin;
406
  }
407
+
408
+
409
  }
410
 
411
+
412
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
@@ -29,7 +29,7 @@
29
  <tr>
30
  <th colspan="3" data-export-label="">
31
  <?php echo esc_html( $gateway->get_method_title() ); ?>
32
- <?php echo wc_help_tip( __( 'This section contains configuration settings for this gateway.', 'woocommerce-gateway-paypal-powered-by-braintree' ) ); ?>
33
  </th>
34
  </tr>
35
  </thead>
@@ -43,22 +43,23 @@
43
  * Allow actors to add info the start of the gateway system status section.
44
  *
45
  * @since 4.3.0
46
- * @param \SV_WC_Payment_Gateway $gateway
 
47
  */
48
  do_action( 'wc_payment_gateway_' . $gateway->get_id() . '_system_status_start', $gateway );
49
  ?>
50
 
51
  <tr>
52
- <td data-export-label="Environment"><?php esc_html_e( 'Environment', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
53
- <td class="help"><?php echo wc_help_tip( __( 'The transaction environment for this gateway.', 'woocommerce-gateway-paypal-powered-by-braintree' ) ); ?></td>
54
  <td><?php echo esc_html( $environment ); ?></td>
55
  </tr>
56
 
57
  <?php if ( $gateway->supports_tokenization() ) : ?>
58
 
59
  <tr>
60
- <td data-export-label="Tokenization Enabled"><?php esc_html_e( 'Tokenization Enabled', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
61
- <td class="help"><?php echo wc_help_tip( __( 'Displays whether or not tokenization is enabled for this gateway.', 'woocommerce-gateway-paypal-powered-by-braintree' ) ); ?></td>
62
  <td>
63
  <?php if ( $gateway->tokenization_enabled() ) : ?>
64
  <mark class="yes">&#10004;</mark>
@@ -71,17 +72,17 @@
71
  <?php endif; ?>
72
 
73
  <tr>
74
- <td data-export-label="Debug Mode"><?php esc_html_e( 'Debug Mode', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
75
- <td class="help"><?php echo wc_help_tip( __( 'Displays whether or not debug logging is enabled for this gateway.', 'woocommerce-gateway-paypal-powered-by-braintree' ) ); ?></td>
76
  <td>
77
  <?php if ( $gateway->debug_log() && $gateway->debug_checkout() ) : ?>
78
- <?php echo esc_html__( 'Display at Checkout & Log', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>
79
  <?php elseif ( $gateway->debug_checkout() ) : ?>
80
- <?php echo esc_html__( 'Display at Checkout', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>
81
  <?php elseif ( $gateway->debug_log() ) : ?>
82
- <?php echo esc_html__( 'Save to Log', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>
83
  <?php else : ?>
84
- <?php echo esc_html__( 'Off', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>
85
  <?php endif; ?>
86
  </td>
87
  </tr>
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
29
  <tr>
30
  <th colspan="3" data-export-label="">
31
  <?php echo esc_html( $gateway->get_method_title() ); ?>
32
+ <?php echo wc_help_tip( __( 'This section contains configuration settings for this gateway.', 'woocommerce-plugin-framework' ) ); ?>
33
  </th>
34
  </tr>
35
  </thead>
43
  * Allow actors to add info the start of the gateway system status section.
44
  *
45
  * @since 4.3.0
46
+ *
47
+ * @param SV_WC_Payment_Gateway $gateway
48
  */
49
  do_action( 'wc_payment_gateway_' . $gateway->get_id() . '_system_status_start', $gateway );
50
  ?>
51
 
52
  <tr>
53
+ <td data-export-label="Environment"><?php esc_html_e( 'Environment', 'woocommerce-plugin-framework' ); ?>:</td>
54
+ <td class="help"><?php echo wc_help_tip( __( 'The transaction environment for this gateway.', 'woocommerce-plugin-framework' ) ); ?></td>
55
  <td><?php echo esc_html( $environment ); ?></td>
56
  </tr>
57
 
58
  <?php if ( $gateway->supports_tokenization() ) : ?>
59
 
60
  <tr>
61
+ <td data-export-label="Tokenization Enabled"><?php esc_html_e( 'Tokenization Enabled', 'woocommerce-plugin-framework' ); ?>:</td>
62
+ <td class="help"><?php echo wc_help_tip( __( 'Displays whether or not tokenization is enabled for this gateway.', 'woocommerce-plugin-framework' ) ); ?></td>
63
  <td>
64
  <?php if ( $gateway->tokenization_enabled() ) : ?>
65
  <mark class="yes">&#10004;</mark>
72
  <?php endif; ?>
73
 
74
  <tr>
75
+ <td data-export-label="Debug Mode"><?php esc_html_e( 'Debug Mode', 'woocommerce-plugin-framework' ); ?>:</td>
76
+ <td class="help"><?php echo wc_help_tip( __( 'Displays whether or not debug logging is enabled for this gateway.', 'woocommerce-plugin-framework' ) ); ?></td>
77
  <td>
78
  <?php if ( $gateway->debug_log() && $gateway->debug_checkout() ) : ?>
79
+ <?php echo esc_html__( 'Display at Checkout & Log', 'woocommerce-plugin-framework' ); ?>
80
  <?php elseif ( $gateway->debug_checkout() ) : ?>
81
+ <?php echo esc_html__( 'Display at Checkout', 'woocommerce-plugin-framework' ); ?>
82
  <?php elseif ( $gateway->debug_log() ) : ?>
83
+ <?php echo esc_html__( 'Save to Log', 'woocommerce-plugin-framework' ); ?>
84
  <?php else : ?>
85
+ <?php echo esc_html__( 'Off', 'woocommerce-plugin-framework' ); ?>
86
  <?php endif; ?>
87
  </td>
88
  </tr>
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-order-partial-capture.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
@@ -27,30 +27,30 @@
27
  <table class="wc-order-totals">
28
 
29
  <tr>
30
- <td class="label"><?php esc_html_e( 'Authorization total', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
31
  <td class="total"><?php echo wc_price( $authorization_total, array( 'currency' => $order->get_currency() ) ); ?></td>
32
  </tr>
33
  <tr>
34
- <td class="label"><?php esc_html_e( 'Amount already captured', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
35
  <td class="total"><?php echo wc_price( $total_captured, array( 'currency' => $order->get_currency() ) ); ?></td>
36
  </tr>
37
 
38
  <?php if ( $remaining_total > 0 ) : ?>
39
  <tr>
40
- <td class="label"><?php esc_html_e( 'Remaining order total', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</td>
41
  <td class="total"><?php echo wc_price( $remaining_total, array( 'currency' => $order->get_currency() ) ); ?></td>
42
  </tr>
43
  <?php endif; ?>
44
 
45
  <tr>
46
- <td class="label"><label for="capture_amount"><?php esc_html_e( 'Capture amount', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?>:</label></td>
47
  <td class="total">
48
  <input type="text" class="text" id="capture_amount" name="capture_amount" class="wc_input_price" />
49
  <div class="clear"></div>
50
  </td>
51
  </tr>
52
  <tr>
53
- <td class="label"><label for="capture_comment"><?php esc_html_e( 'Comment (optional):', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></label></td>
54
  <td class="total">
55
  <input type="text" class="text" id="capture_comment" name="capture_comment" />
56
  <div class="clear"></div>
@@ -62,8 +62,8 @@
62
 
63
  <?php $amount = '<span class="capture-amount">' . wc_price( 0, array( 'currency' => $order->get_currency() ) ) . '</span>'; ?>
64
 
65
- <button type="button" class="button button-primary capture-action" disabled="disabled"><?php printf( esc_html__( 'Capture %s', 'woocommerce-gateway-paypal-powered-by-braintree' ), $amount ); ?></button>
66
- <button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></button>
67
 
68
  <div class="clear"></div>
69
  </div>
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
27
  <table class="wc-order-totals">
28
 
29
  <tr>
30
+ <td class="label"><?php esc_html_e( 'Authorization total', 'woocommerce-plugin-framework' ); ?>:</td>
31
  <td class="total"><?php echo wc_price( $authorization_total, array( 'currency' => $order->get_currency() ) ); ?></td>
32
  </tr>
33
  <tr>
34
+ <td class="label"><?php esc_html_e( 'Amount already captured', 'woocommerce-plugin-framework' ); ?>:</td>
35
  <td class="total"><?php echo wc_price( $total_captured, array( 'currency' => $order->get_currency() ) ); ?></td>
36
  </tr>
37
 
38
  <?php if ( $remaining_total > 0 ) : ?>
39
  <tr>
40
+ <td class="label"><?php esc_html_e( 'Remaining order total', 'woocommerce-plugin-framework' ); ?>:</td>
41
  <td class="total"><?php echo wc_price( $remaining_total, array( 'currency' => $order->get_currency() ) ); ?></td>
42
  </tr>
43
  <?php endif; ?>
44
 
45
  <tr>
46
+ <td class="label"><label for="capture_amount"><?php esc_html_e( 'Capture amount', 'woocommerce-plugin-framework' ); ?>:</label></td>
47
  <td class="total">
48
  <input type="text" class="text" id="capture_amount" name="capture_amount" class="wc_input_price" />
49
  <div class="clear"></div>
50
  </td>
51
  </tr>
52
  <tr>
53
+ <td class="label"><label for="capture_comment"><?php esc_html_e( 'Comment (optional):', 'woocommerce-plugin-framework' ); ?></label></td>
54
  <td class="total">
55
  <input type="text" class="text" id="capture_comment" name="capture_comment" />
56
  <div class="clear"></div>
62
 
63
  <?php $amount = '<span class="capture-amount">' . wc_price( 0, array( 'currency' => $order->get_currency() ) ) . '</span>'; ?>
64
 
65
+ <button type="button" class="button button-primary capture-action" disabled="disabled"><?php printf( esc_html__( 'Capture %s', 'woocommerce-plugin-framework' ), $amount ); ?></button>
66
+ <button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce-plugin-framework' ); ?></button>
67
 
68
  <div class="clear"></div>
69
  </div>
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
@@ -45,7 +45,7 @@
45
 
46
  <select name="<?php echo esc_attr( $token_input_name ); ?>[<?php echo esc_attr( $field_id ); ?>]">
47
 
48
- <option value=""><?php esc_html_e( '-- Select an option --', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></option>
49
 
50
  <?php foreach ( $field['options'] as $value => $label ) : ?>
51
  <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $token[ $field_id ] ); ?>><?php echo esc_html( $label ); ?></option>
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
45
 
46
  <select name="<?php echo esc_attr( $token_input_name ); ?>[<?php echo esc_attr( $field_id ); ?>]">
47
 
48
+ <option value=""><?php esc_html_e( '-- Select an option --', 'woocommerce-plugin-framework' ); ?></option>
49
 
50
  <?php foreach ( $field['options'] as $value => $label ) : ?>
51
  <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $token[ $field_id ] ); ?>><?php echo esc_html( $label ); ?></option>
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
@@ -56,7 +56,7 @@
56
 
57
  <tbody class="meta">
58
  <tr class="no-tokens">
59
- <td colspan="<?php echo count( $columns ); ?>"><?php esc_html_e( 'No saved payment tokens', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></td>
60
  </tr>
61
  </tbody>
62
 
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
56
 
57
  <tbody class="meta">
58
  <tr class="no-tokens">
59
+ <td colspan="<?php echo count( $columns ); ?>"><?php esc_html_e( 'No saved payment tokens', 'woocommerce-plugin-framework' ); ?></td>
60
  </tr>
61
  </tbody>
62
 
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-profile-field-customer-id.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
@@ -27,6 +27,6 @@
27
  <th><label for="<?php echo esc_attr( $name ); ?>"><?php echo esc_html( $label ); ?></label></th>
28
  <td>
29
  <input class="regular-text" name="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $value ); ?>" type="text" /><br/>
30
- <span class="description"><?php esc_html_e( 'The gateway customer ID for the user. Only edit this if necessary.', 'woocommerce-gateway-paypal-powered-by-braintree' ); ?></span>
31
  </td>
32
  </tr>
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
27
  <th><label for="<?php echo esc_attr( $name ); ?>"><?php echo esc_html( $label ); ?></label></th>
28
  <td>
29
  <input class="regular-text" name="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $value ); ?>" type="text" /><br/>
30
+ <span class="description"><?php esc_html_e( 'The gateway customer ID for the user. Only edit this if necessary.', 'woocommerce-plugin-framework' ); ?></span>
31
  </td>
32
  </tr>
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/admin/views/html-user-profile-section.php RENAMED
@@ -18,7 +18,7 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
18
  *
19
  * @package SkyVerge/WooCommerce/Plugin/Gateway/Admin/Views
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
  ?>
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Response_Message_Helper' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Payment Gateway API Response Message Helper
@@ -61,7 +62,8 @@ class SV_WC_Payment_Gateway_API_Response_Message_Helper {
61
  * info.
62
  *
63
  * @since 2.2.0
64
- * @param array $message_ids array of string $message_id's which identify the message(s) to return
 
65
  * @return string a user message, combining all $message_ids
66
  */
67
  public function get_user_messages( $message_ids ) {
@@ -94,45 +96,45 @@ class SV_WC_Payment_Gateway_API_Response_Message_Helper {
94
  switch ( $message_id ) {
95
 
96
  // generic messages
97
- case 'error': $message = esc_html__( 'An error occurred, please try again or try an alternate form of payment', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
98
- case 'decline': $message = esc_html__( 'We cannot process your order with the payment information that you provided. Please use a different payment account or an alternate payment method.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
99
- case 'held_for_review': $message = esc_html__( 'This order is being placed on hold for review. Please contact us to complete the transaction.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
100
 
101
  /* missing/invalid info */
102
 
103
  // csc
104
- case 'held_for_incorrect_csc': $message = esc_html__( 'This order is being placed on hold for review due to an incorrect card verification number. You may contact the store to complete the transaction.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
105
- case 'csc_invalid': $message = esc_html__( 'The card verification number is invalid, please try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
106
- case 'csc_missing': $message = esc_html__( 'Please enter your card verification number and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
107
 
108
  // card type
109
- case 'card_type_not_accepted': $message = esc_html__( 'That card type is not accepted, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
110
- case 'card_type_invalid': $message = esc_html__( 'The card type is invalid or does not correlate with the credit card number. Please try again or use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
111
- case 'card_type_missing': $message = esc_html__( 'Please select the card type and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
112
 
113
  // card number
114
- case 'card_number_type_invalid': $message = esc_html__( 'The card type is invalid or does not correlate with the credit card number. Please try again or use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
115
- case 'card_number_invalid': $message = esc_html__( 'The card number is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
116
- case 'card_number_missing': $message = esc_html__( 'Please enter your card number and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
117
 
118
  // card expiry
119
- case 'card_expiry_invalid': $message = esc_html__( 'The card expiration date is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
120
- case 'card_expiry_month_invalid': $message = esc_html__( 'The card expiration month is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
121
- case 'card_expiry_year_invalid': $message = esc_html__( 'The card expiration year is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
122
- case 'card_expiry_missing': $message = esc_html__( 'Please enter your card expiration date and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
123
 
124
  // bank
125
- case 'bank_aba_invalid': $message_id = esc_html__( 'The bank routing number is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
126
- case 'bank_account_number_invalid': $message_id = esc_html__( 'The bank account number is invalid, please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
127
 
128
  /* decline reasons */
129
- case 'card_expired': $message = esc_html__( 'The provided card is expired, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
130
- case 'card_declined': $message = esc_html__( 'The provided card was declined, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
131
- case 'insufficient_funds': $message = esc_html__( 'Insufficient funds in account, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
132
- case 'card_inactive': $message = esc_html__( 'The card is inactivate or not authorized for card-not-present transactions, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
133
- case 'credit_limit_reached': $message = esc_html__( 'The credit limit for the card has been reached, please use an alternate card or other form of payment.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
134
- case 'csc_mismatch': $message = esc_html__( 'The card verification number does not match. Please re-enter and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
135
- case 'avs_mismatch': $message = esc_html__( 'The provided address does not match the billing address for cardholder. Please verify the address and try again.', 'woocommerce-gateway-paypal-powered-by-braintree' ); break;
136
  }
137
 
138
  /**
@@ -145,7 +147,7 @@ class SV_WC_Payment_Gateway_API_Response_Message_Helper {
145
  * @since 2.2.0
146
  * @param string $message message to show to user
147
  * @param string $message_id machine code for the message, e.g. card_expired
148
- * @param \SV_WC_Payment_Gateway_API_Response_Message_Helper $this instance
149
  */
150
  return apply_filters( 'wc_payment_gateway_transaction_response_user_message', $message, $message_id, $this );
151
  }
@@ -153,4 +155,5 @@ class SV_WC_Payment_Gateway_API_Response_Message_Helper {
153
 
154
  }
155
 
 
156
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Response_Message_Helper' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Payment Gateway API Response Message Helper
62
  * info.
63
  *
64
  * @since 2.2.0
65
+ *
66
+ * @param string[] $message_ids array of string $message_id's which identify the message(s) to return
67
  * @return string a user message, combining all $message_ids
68
  */
69
  public function get_user_messages( $message_ids ) {
96
  switch ( $message_id ) {
97
 
98
  // generic messages
99
+ case 'error': $message = esc_html__( 'An error occurred, please try again or try an alternate form of payment', 'woocommerce-plugin-framework' ); break;
100
+ case 'decline': $message = esc_html__( 'We cannot process your order with the payment information that you provided. Please use a different payment account or an alternate payment method.', 'woocommerce-plugin-framework' ); break;
101
+ case 'held_for_review': $message = esc_html__( 'This order is being placed on hold for review. Please contact us to complete the transaction.', 'woocommerce-plugin-framework' ); break;
102
 
103
  /* missing/invalid info */
104
 
105
  // csc
106
+ case 'held_for_incorrect_csc': $message = esc_html__( 'This order is being placed on hold for review due to an incorrect card verification number. You may contact the store to complete the transaction.', 'woocommerce-plugin-framework' ); break;
107
+ case 'csc_invalid': $message = esc_html__( 'The card verification number is invalid, please try again.', 'woocommerce-plugin-framework' ); break;
108
+ case 'csc_missing': $message = esc_html__( 'Please enter your card verification number and try again.', 'woocommerce-plugin-framework' ); break;
109
 
110
  // card type
111
+ case 'card_type_not_accepted': $message = esc_html__( 'That card type is not accepted, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
112
+ case 'card_type_invalid': $message = esc_html__( 'The card type is invalid or does not correlate with the credit card number. Please try again or use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
113
+ case 'card_type_missing': $message = esc_html__( 'Please select the card type and try again.', 'woocommerce-plugin-framework' ); break;
114
 
115
  // card number
116
+ case 'card_number_type_invalid': $message = esc_html__( 'The card type is invalid or does not correlate with the credit card number. Please try again or use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
117
+ case 'card_number_invalid': $message = esc_html__( 'The card number is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
118
+ case 'card_number_missing': $message = esc_html__( 'Please enter your card number and try again.', 'woocommerce-plugin-framework' ); break;
119
 
120
  // card expiry
121
+ case 'card_expiry_invalid': $message = esc_html__( 'The card expiration date is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
122
+ case 'card_expiry_month_invalid': $message = esc_html__( 'The card expiration month is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
123
+ case 'card_expiry_year_invalid': $message = esc_html__( 'The card expiration year is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
124
+ case 'card_expiry_missing': $message = esc_html__( 'Please enter your card expiration date and try again.', 'woocommerce-plugin-framework' ); break;
125
 
126
  // bank
127
+ case 'bank_aba_invalid': $message_id = esc_html__( 'The bank routing number is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
128
+ case 'bank_account_number_invalid': $message_id = esc_html__( 'The bank account number is invalid, please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
129
 
130
  /* decline reasons */
131
+ case 'card_expired': $message = esc_html__( 'The provided card is expired, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
132
+ case 'card_declined': $message = esc_html__( 'The provided card was declined, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
133
+ case 'insufficient_funds': $message = esc_html__( 'Insufficient funds in account, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
134
+ case 'card_inactive': $message = esc_html__( 'The card is inactivate or not authorized for card-not-present transactions, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
135
+ case 'credit_limit_reached': $message = esc_html__( 'The credit limit for the card has been reached, please use an alternate card or other form of payment.', 'woocommerce-plugin-framework' ); break;
136
+ case 'csc_mismatch': $message = esc_html__( 'The card verification number does not match. Please re-enter and try again.', 'woocommerce-plugin-framework' ); break;
137
+ case 'avs_mismatch': $message = esc_html__( 'The provided address does not match the billing address for cardholder. Please verify the address and try again.', 'woocommerce-plugin-framework' ); break;
138
  }
139
 
140
  /**
147
  * @since 2.2.0
148
  * @param string $message message to show to user
149
  * @param string $message_id machine code for the message, e.g. card_expired
150
+ * @param SV_WC_Payment_Gateway_API_Response_Message_Helper $this instance
151
  */
152
  return apply_filters( 'wc_payment_gateway_transaction_response_user_message', $message, $message_id, $this );
153
  }
155
 
156
  }
157
 
158
+
159
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Authorization_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API Authorization Response
@@ -43,38 +44,43 @@ interface SV_WC_Payment_Gateway_API_Authorization_Response extends SV_WC_Payment
43
  * indicate that the charge will be paid by the card issuer.
44
  *
45
  * @since 1.0.0
 
46
  * @return string credit card authorization code
47
  */
48
  public function get_authorization_code();
49
 
50
 
51
  /**
52
- * Returns the result of the AVS check
53
  *
54
  * @since 1.0.0
 
55
  * @return string result of the AVS check, if any
56
  */
57
  public function get_avs_result();
58
 
59
 
60
  /**
61
- * Returns the result of the CSC check
62
  *
63
  * @since 1.0.0
 
64
  * @return string result of CSC check
65
  */
66
  public function get_csc_result();
67
 
68
 
69
  /**
70
- * Returns true if the CSC check was successful
71
  *
72
  * @since 1.0.0
 
73
  * @return boolean true if the CSC check was successful
74
  */
75
  public function csc_match();
76
 
77
 
78
- } // SV_WC_Payment_Gateway_API_Authorization_Response
 
79
 
80
- endif; // interface exists check
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Authorization_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API Authorization Response
44
  * indicate that the charge will be paid by the card issuer.
45
  *
46
  * @since 1.0.0
47
+ *
48
  * @return string credit card authorization code
49
  */
50
  public function get_authorization_code();
51
 
52
 
53
  /**
54
+ * Returns the result of the AVS check.
55
  *
56
  * @since 1.0.0
57
+ *
58
  * @return string result of the AVS check, if any
59
  */
60
  public function get_avs_result();
61
 
62
 
63
  /**
64
+ * Returns the result of the CSC check.
65
  *
66
  * @since 1.0.0
67
+ *
68
  * @return string result of CSC check
69
  */
70
  public function get_csc_result();
71
 
72
 
73
  /**
74
+ * Returns true if the CSC check was successful.
75
  *
76
  * @since 1.0.0
77
+ *
78
  * @return boolean true if the CSC check was successful
79
  */
80
  public function csc_match();
81
 
82
 
83
+ }
84
+
85
 
86
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API Create Payment Token Response
@@ -35,9 +36,10 @@ interface SV_WC_Payment_Gateway_API_Create_Payment_Token_Response extends SV_WC_
35
 
36
 
37
  /**
38
- * Returns the payment token
39
  *
40
  * @since 1.0.0
 
41
  * @return SV_WC_Payment_Gateway_Payment_Token payment token
42
  */
43
  public function get_payment_token();
@@ -45,4 +47,5 @@ interface SV_WC_Payment_Gateway_API_Create_Payment_Token_Response extends SV_WC_
45
 
46
  }
47
 
48
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API Create Payment Token Response
36
 
37
 
38
  /**
39
+ * Returns the payment token.
40
  *
41
  * @since 1.0.0
42
+ *
43
  * @return SV_WC_Payment_Gateway_Payment_Token payment token
44
  */
45
  public function get_payment_token();
47
 
48
  }
49
 
50
+
51
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php RENAMED
@@ -18,31 +18,34 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Customer_Response' ) ) :
 
 
 
 
 
 
 
30
 
31
  /**
32
- * WooCommerce Direct Payment Gateway API Customer Response
 
 
 
 
33
  */
34
- interface SV_WC_Payment_Gateway_API_Customer_Response extends SV_WC_Payment_Gateway_API_Response {
35
-
36
 
37
- /**
38
- * Returns the customer ID
39
- *
40
- * @since 4.0.0
41
- * @return string customer ID returned by the gateway
42
- */
43
- public function get_customer_id();
44
 
 
45
 
46
- }
47
 
48
- endif; // interface exists check
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Customer_Response' ) ) :
30
+
31
+
32
+ /**
33
+ * WooCommerce Direct Payment Gateway API Customer Response
34
+ */
35
+ interface SV_WC_Payment_Gateway_API_Customer_Response extends SV_WC_Payment_Gateway_API_Response {
36
+
37
 
38
  /**
39
+ * Returns the customer ID.
40
+ *
41
+ * @since 4.0.0
42
+ *
43
+ * @return string customer ID returned by the gateway
44
  */
45
+ public function get_customer_id();
 
46
 
 
 
 
 
 
 
 
47
 
48
+ }
49
 
 
50
 
51
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_API_Get_Tokenized_Payment_Methods_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API Create Payment Token Response
@@ -35,14 +36,16 @@ interface SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response exten
35
 
36
 
37
  /**
38
- * Returns any payment tokens
39
  *
40
  * @since 1.0.0
41
- * @return array array of SV_WC_Payment_Gateway_Payment_Token payment tokens, keyed by the token ID
 
42
  */
43
  public function get_payment_tokens();
44
 
45
 
46
  }
47
 
48
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_API_Get_Tokenized_Payment_Methods_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API Create Payment Token Response
36
 
37
 
38
  /**
39
+ * Returns any payment tokens.
40
  *
41
  * @since 1.0.0
42
+ *
43
+ * @return SV_WC_Payment_Gateway_Payment_Token[] array of SV_WC_Payment_Gateway_Payment_Token payment tokens, keyed by the token ID
44
  */
45
  public function get_payment_tokens();
46
 
47
 
48
  }
49
 
50
+
51
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Payment Gateway API Payment Credit Card Notification Response
@@ -39,33 +40,38 @@ interface SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response ex
39
 
40
 
41
  /**
42
- * Returns the card type, if available, i.e., 'visa', 'mastercard', etc
43
  *
44
- * @since 2.2.0
45
  * @see SV_WC_Payment_Gateway_Helper::payment_type_to_name()
46
- * @return string card type or null if not available
 
 
 
47
  */
48
  public function get_card_type();
49
 
50
 
51
  /**
52
- * Returns the card expiration month with leading zero, if available
53
  *
54
  * @since 2.2.0
55
- * @return string card expiration month or null if not available
 
56
  */
57
  public function get_exp_month();
58
 
59
 
60
  /**
61
- * Returns the card expiration year with four digits, if available
62
  *
63
  * @since 2.2.0
64
- * @return string card expiration year or null if not available
 
65
  */
66
  public function get_exp_year();
67
 
68
 
69
  }
70
 
71
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Payment Gateway API Payment Credit Card Notification Response
40
 
41
 
42
  /**
43
+ * Returns the card type, if available, i.e., 'visa', 'mastercard', etc.
44
  *
 
45
  * @see SV_WC_Payment_Gateway_Helper::payment_type_to_name()
46
+ *
47
+ * @since 2.2.0
48
+ *
49
+ * @return string|null card type or null if not available
50
  */
51
  public function get_card_type();
52
 
53
 
54
  /**
55
+ * Returns the card expiration month with leading zero, if available.
56
  *
57
  * @since 2.2.0
58
+ *
59
+ * @return string|null card expiration month or null if not available
60
  */
61
  public function get_exp_month();
62
 
63
 
64
  /**
65
+ * Returns the card expiration year with four digits, if available.
66
  *
67
  * @since 2.2.0
68
+ *
69
+ * @return string|null card expiration year or null if not available
70
  */
71
  public function get_exp_year();
72
 
73
 
74
  }
75
 
76
+
77
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Payment Gateway API Payment eCheck Notification Response
@@ -40,23 +41,26 @@ interface SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response extends
40
 
41
 
42
  /**
43
- * Returns the account type, one of 'checking' or 'savings', if available
44
  *
45
  * @since 2.2.0
 
46
  * @return string account type, one of 'checking' or 'savings'
47
  */
48
  public function get_account_type();
49
 
50
 
51
  /**
52
- * Returns the check number used, if available
53
  *
54
  * @since 2.2.0
55
- * @return int check number, or null
 
56
  */
57
  public function get_check_number();
58
 
59
 
60
  }
61
 
62
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Payment Gateway API Payment eCheck Notification Response
41
 
42
 
43
  /**
44
+ * Returns the account type, one of 'checking' or 'savings', if available.
45
  *
46
  * @since 2.2.0
47
+ *
48
  * @return string account type, one of 'checking' or 'savings'
49
  */
50
  public function get_account_type();
51
 
52
 
53
  /**
54
+ * Returns the check number used, if available.
55
  *
56
  * @since 2.2.0
57
+ *
58
+ * @return int|null check number, or null
59
  */
60
  public function get_check_number();
61
 
62
 
63
  }
64
 
65
+
66
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Payment_Notification_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Payment Gateway API Payment Notification Response
@@ -39,39 +40,43 @@ interface SV_WC_Payment_Gateway_API_Payment_Notification_Response extends SV_WC_
39
 
40
 
41
  /**
42
- * Returns the order id associated with this response
43
  *
44
  * @since 2.1.0
45
- * @return int the order id associated with this response, or null if it could not be determined
46
- * @throws Exception if there was a serious error finding the order id
 
47
  */
48
  public function get_order_id();
49
 
50
 
51
  /**
52
- * Returns true if the transaction was cancelled, false otherwise
53
  *
54
  * @since 2.1.0
 
55
  * @return bool true if cancelled, false otherwise
56
  */
57
  public function transaction_cancelled();
58
 
59
 
60
  /**
61
- * Returns the card PAN or checking account number, if available
62
  *
63
  * @since 2.2.0
64
- * @return string PAN or account number or null if not available
 
65
  */
66
  public function get_account_number();
67
 
68
 
69
  /**
70
- * Determine if this is an IPN response.
71
  *
72
  * Intentionally commented out to prevent fatal errors in older plugins
73
  *
74
  * @since 4.3.0
 
75
  * @return bool
76
  */
77
  public function is_ipn();
@@ -79,4 +84,5 @@ interface SV_WC_Payment_Gateway_API_Payment_Notification_Response extends SV_WC_
79
 
80
  }
81
 
82
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Payment_Notification_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Payment Gateway API Payment Notification Response
40
 
41
 
42
  /**
43
+ * Returns the order id associated with this response.
44
  *
45
  * @since 2.1.0
46
+ *
47
+ * @return int|null the order id associated with this response, or null if it could not be determined
48
+ * @throws \Exception if there was a serious error finding the order id
49
  */
50
  public function get_order_id();
51
 
52
 
53
  /**
54
+ * Returns true if the transaction was cancelled, false otherwise.
55
  *
56
  * @since 2.1.0
57
+ *
58
  * @return bool true if cancelled, false otherwise
59
  */
60
  public function transaction_cancelled();
61
 
62
 
63
  /**
64
+ * Returns the card PAN or checking account number, if available.
65
  *
66
  * @since 2.2.0
67
+ *
68
+ * @return string|null PAN or account number or null if not available
69
  */
70
  public function get_account_number();
71
 
72
 
73
  /**
74
+ * Determines if this is an IPN response.
75
  *
76
  * Intentionally commented out to prevent fatal errors in older plugins
77
  *
78
  * @since 4.3.0
79
+ *
80
  * @return bool
81
  */
82
  public function is_ipn();
84
 
85
  }
86
 
87
+
88
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Payment Gateway API Payment Credit Card Notification Response
@@ -118,7 +119,7 @@ interface SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response exten
118
  /**
119
  * Determines whether the overall payment tokenization was successful.
120
  *
121
- * Gatewways can check that the payment method was tokenized, and if a new
122
  * customer was created, that was successful.
123
  *
124
  * @since 5.0.0
@@ -153,7 +154,7 @@ interface SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response exten
153
  *
154
  * @since 5.0.0
155
  *
156
- * @return array
157
  */
158
  public function get_edited_payment_tokens();
159
 
@@ -163,11 +164,12 @@ interface SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response exten
163
  *
164
  * @since 5.0.0
165
  *
166
- * @return array
167
  */
168
  public function get_deleted_payment_tokens();
169
 
170
 
171
  }
172
 
173
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Payment Gateway API Payment Credit Card Notification Response
119
  /**
120
  * Determines whether the overall payment tokenization was successful.
121
  *
122
+ * Gateways can check that the payment method was tokenized, and if a new
123
  * customer was created, that was successful.
124
  *
125
  * @since 5.0.0
154
  *
155
  * @since 5.0.0
156
  *
157
+ * @return array|SV_WC_Payment_Gateway_Payment_Token[]
158
  */
159
  public function get_edited_payment_tokens();
160
 
164
  *
165
  * @since 5.0.0
166
  *
167
+ * @return array|SV_WC_Payment_Gateway_Payment_Token[]
168
  */
169
  public function get_deleted_payment_tokens();
170
 
171
 
172
  }
173
 
174
+
175
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php RENAMED
@@ -18,19 +18,21 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Request' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API Request
33
  */
34
  interface SV_WC_Payment_Gateway_API_Request extends SV_WC_API_Request { }
35
 
36
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Request' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API Request
34
  */
35
  interface SV_WC_Payment_Gateway_API_Request extends SV_WC_API_Request { }
36
 
37
+
38
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API_Response' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API Response
@@ -35,9 +36,10 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
35
 
36
 
37
  /**
38
- * Checks if the transaction was successful
39
  *
40
  * @since 1.0.0
 
41
  * @return bool true if approved, false otherwise
42
  */
43
  public function transaction_approved();
@@ -49,6 +51,7 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
49
  * did not pass a fraud check and should be reviewed.
50
  *
51
  * @since 1.0.0
 
52
  * @return bool true if the transaction was held, false otherwise
53
  */
54
  public function transaction_held();
@@ -59,6 +62,7 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
59
  * associated with this transaction.
60
  *
61
  * @since 1.0.0
 
62
  * @return string status message
63
  */
64
  public function get_status_message();
@@ -69,6 +73,7 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
69
  * associated with this transaction.
70
  *
71
  * @since 1.0.0
 
72
  * @return string status code
73
  */
74
  public function get_status_code();
@@ -79,6 +84,7 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
79
  * associated with this transaction.
80
  *
81
  * @since 1.0.0
 
82
  * @return string transaction id
83
  */
84
  public function get_transaction_id();
@@ -100,8 +106,10 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
100
  * issue on their own, but not enough to help nefarious folks fishing for
101
  * info.
102
  *
103
- * @since 2.2.0
104
  * @see SV_WC_Payment_Gateway_API_Response_Message_Helper
 
 
 
105
  * @return string user message, if there is one
106
  */
107
  public function get_user_message();
@@ -109,4 +117,5 @@ interface SV_WC_Payment_Gateway_API_Response extends SV_WC_API_Response {
109
 
110
  }
111
 
112
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API_Response' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API Response
36
 
37
 
38
  /**
39
+ * Checks if the transaction was successful.
40
  *
41
  * @since 1.0.0
42
+ *
43
  * @return bool true if approved, false otherwise
44
  */
45
  public function transaction_approved();
51
  * did not pass a fraud check and should be reviewed.
52
  *
53
  * @since 1.0.0
54
+ *
55
  * @return bool true if the transaction was held, false otherwise
56
  */
57
  public function transaction_held();
62
  * associated with this transaction.
63
  *
64
  * @since 1.0.0
65
+ *
66
  * @return string status message
67
  */
68
  public function get_status_message();
73
  * associated with this transaction.
74
  *
75
  * @since 1.0.0
76
+ *
77
  * @return string status code
78
  */
79
  public function get_status_code();
84
  * associated with this transaction.
85
  *
86
  * @since 1.0.0
87
+ *
88
  * @return string transaction id
89
  */
90
  public function get_transaction_id();
106
  * issue on their own, but not enough to help nefarious folks fishing for
107
  * info.
108
  *
 
109
  * @see SV_WC_Payment_Gateway_API_Response_Message_Helper
110
+ *
111
+ * @since 2.2.0
112
+ *
113
  * @return string user message, if there is one
114
  */
115
  public function get_user_message();
117
 
118
  }
119
 
120
+
121
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2019, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! interface_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_API' ) ) :
 
30
 
31
  /**
32
  * WooCommerce Direct Payment Gateway API
@@ -135,7 +136,7 @@ interface SV_WC_Payment_Gateway_API {
135
  /**
136
  * Updates a tokenized payment method.
137
  *
138
- * @since 5.3.0-dev
139
  *
140
  * @param \WC_Order $order order object
141
  * @return SV_WC_Payment_Gateway_API_Response
@@ -149,7 +150,7 @@ interface SV_WC_Payment_Gateway_API {
149
  *
150
  * @see SV_WC_Payment_Gateway_API::update_tokenized_payment_method()
151
  *
152
- * @since 5.3.0-dev
153
  *
154
  * @return bool
155
  */
@@ -245,4 +246,5 @@ interface SV_WC_Payment_Gateway_API {
245
 
246
  }
247
 
248
- endif; // interface exists check
 
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/API
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_API' ) ) :
30
+
31
 
32
  /**
33
  * WooCommerce Direct Payment Gateway API
136
  /**
137
  * Updates a tokenized payment method.
138
  *
139
+ * @since 5.3.0
140
  *
141
  * @param \WC_Order $order order object
142
  * @return SV_WC_Payment_Gateway_API_Response
150
  *
151
  * @see SV_WC_Payment_Gateway_API::update_tokenized_payment_method()
152
  *
153
+ * @since 5.3.0
154
  *
155
  * @return bool
156
  */
246
 
247
  }
248
 
249
+
250
+ endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) :
 
30
 
31
  /**
32
  * The Apple Pay API request object.
@@ -82,7 +83,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API_Request extends SV_WC_API_JSON_Request
82
  * @var string $domainName the verified domain name
83
  * @var string $displayName the merchant display name
84
  * }
85
- * @param \SV_WC_Payment_Gateway_Apple_Pay_API_Request the request object
86
  */
87
  $this->data = apply_filters( 'sv_wc_apple_pay_api_merchant_data', $data, $this );
88
  }
@@ -108,4 +109,5 @@ class SV_WC_Payment_Gateway_Apple_Pay_API_Request extends SV_WC_API_JSON_Request
108
 
109
  }
110
 
 
111
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) :
30
+
31
 
32
  /**
33
  * The Apple Pay API request object.
83
  * @var string $domainName the verified domain name
84
  * @var string $displayName the merchant display name
85
  * }
86
+ * @param SV_WC_Payment_Gateway_Apple_Pay_API_Request the request object
87
  */
88
  $this->data = apply_filters( 'sv_wc_apple_pay_api_merchant_data', $data, $this );
89
  }
109
 
110
  }
111
 
112
+
113
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) :
 
30
 
31
  /**
32
  * The Apple Pay API response object.
@@ -67,7 +68,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API_Response extends SV_WC_API_JSON_Respon
67
  *
68
  * @since 4.7.0
69
  *
70
- * @return array
71
  */
72
  public function get_merchant_session() {
73
 
@@ -107,4 +108,5 @@ class SV_WC_Payment_Gateway_Apple_Pay_API_Response extends SV_WC_API_JSON_Respon
107
 
108
  }
109
 
 
110
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) :
30
+
31
 
32
  /**
33
  * The Apple Pay API response object.
68
  *
69
  * @since 4.7.0
70
  *
71
+ * @return string|array
72
  */
73
  public function get_merchant_session() {
74
 
108
 
109
  }
110
 
111
+
112
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) :
 
30
 
31
  /**
32
  * Sets up the Apple Pay API.
@@ -36,7 +37,7 @@ if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Ap
36
  class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
37
 
38
 
39
- /** @var SV_WC_Payment_Gateway the gateway instance */
40
  protected $gateway;
41
 
42
 
@@ -45,7 +46,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
45
  *
46
  * @since 4.7.0
47
  *
48
- * @param SV_WC_Payment_Gateway the gateway instance
49
  */
50
  public function __construct( SV_WC_Payment_Gateway $gateway ) {
51
 
@@ -56,7 +57,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
56
  $this->set_request_content_type_header( 'application/json' );
57
  $this->set_request_accept_header( 'application/json' );
58
 
59
- $this->set_response_handler( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' );
60
  }
61
 
62
 
@@ -70,7 +71,6 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
70
  * @param string $domain_name the verified domain name
71
  * @param string $display_name the merchant display name
72
  * @return SV_WC_Payment_Gateway_Apple_Pay_API_Response the response object
73
- *
74
  * @throws SV_WC_API_Exception
75
  */
76
  public function validate_merchant( $url, $merchant_id, $domain_name, $display_name ) {
@@ -90,8 +90,8 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
90
  *
91
  * @since 4.7.0
92
  *
93
- * @param SV_WC_API_Request
94
- * @return SV_WC_API_Response
95
  * @throws SV_WC_API_Exception
96
  */
97
  protected function perform_request( $request ) {
@@ -168,7 +168,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
168
  *
169
  * @since 4.7.0
170
  *
171
- * @return SV_WC_Payment_Gateway
172
  */
173
  protected function get_gateway() {
174
 
@@ -181,7 +181,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
181
  *
182
  * @since 4.7.0
183
  *
184
- * @return SV_WC_Payment_Gateway_Plugin
185
  */
186
  protected function get_plugin() {
187
 
@@ -191,4 +191,5 @@ class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
191
 
192
  }
193
 
 
194
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) :
30
+
31
 
32
  /**
33
  * Sets up the Apple Pay API.
37
  class SV_WC_Payment_Gateway_Apple_Pay_API extends SV_WC_API_Base {
38
 
39
 
40
+ /** @var \SV_WC_Payment_Gateway the gateway instance */
41
  protected $gateway;
42
 
43
 
46
  *
47
  * @since 4.7.0
48
  *
49
+ * @param \SV_WC_Payment_Gateway the gateway instance
50
  */
51
  public function __construct( SV_WC_Payment_Gateway $gateway ) {
52
 
57
  $this->set_request_content_type_header( 'application/json' );
58
  $this->set_request_accept_header( 'application/json' );
59
 
60
+ $this->set_response_handler( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' );
61
  }
62
 
63
 
71
  * @param string $domain_name the verified domain name
72
  * @param string $display_name the merchant display name
73
  * @return SV_WC_Payment_Gateway_Apple_Pay_API_Response the response object
 
74
  * @throws SV_WC_API_Exception
75
  */
76
  public function validate_merchant( $url, $merchant_id, $domain_name, $display_name ) {
90
  *
91
  * @since 4.7.0
92
  *
93
+ * @param SV_WC_API_Request|object
94
+ * @return SV_WC_API_Response|object
95
  * @throws SV_WC_API_Exception
96
  */
97
  protected function perform_request( $request ) {
168
  *
169
  * @since 4.7.0
170
  *
171
+ * @return \SV_WC_Payment_Gateway
172
  */
173
  protected function get_gateway() {
174
 
181
  *
182
  * @since 4.7.0
183
  *
184
+ * @return \SV_WC_Payment_Gateway_Plugin
185
  */
186
  protected function get_plugin() {
187
 
191
 
192
  }
193
 
194
+
195
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) :
 
30
 
31
  /**
32
  * The Apple Pay payment response object.
@@ -41,7 +42,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_Payment_Response extends SV_WC_API_JSON_Re
41
  *
42
  * @since 4.7.0
43
  *
44
- * @return object
45
  */
46
  public function get_payment_data() {
47
 
@@ -145,7 +146,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_Payment_Response extends SV_WC_API_JSON_Re
145
  *
146
  * @since 4.7.0
147
  *
148
- * @param object $contact the address to prepare
149
  * @return array
150
  */
151
  protected function prepare_address( $contact ) {
@@ -202,4 +203,5 @@ class SV_WC_Payment_Gateway_Apple_Pay_Payment_Response extends SV_WC_API_JSON_Re
202
 
203
  }
204
 
 
205
  endif;
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) :
30
+
31
 
32
  /**
33
  * The Apple Pay payment response object.
42
  *
43
  * @since 4.7.0
44
  *
45
+ * @return array
46
  */
47
  public function get_payment_data() {
48
 
146
  *
147
  * @since 4.7.0
148
  *
149
+ * @param \stdClass|object $contact the address to prepare
150
  * @return array
151
  */
152
  protected function prepare_address( $contact ) {
203
 
204
  }
205
 
206
+
207
  endif;
{lib/skyverge → vendor/skyverge/wc-plugin-framework}/woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php RENAMED
@@ -18,15 +18,16 @@
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
- * @copyright Copyright (c) 2013-2016, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
- namespace WC_Braintree\Plugin_Framework;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
- if ( ! class_exists( '\\WC_Braintree\\Plugin_Framework\\SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) :
 
30
 
31
  /**
32
  * Sets up the Apple Pay settings screen.
@@ -44,6 +45,8 @@ class SV_WC_Payment_Gateway_Apple_Pay_Admin {
44
  * Construct the class.
45
  *
46
  * @since 4.7.0
 
 
47
  */
48
  public function __construct( $handler ) {
49
 
@@ -78,7 +81,7 @@ class SV_WC_Payment_Gateway_Apple_Pay_Admin {
78
  */
79
  public function add_settings_section( $sections ) {
80
 
81
- $sections['apple-pay'] = __( 'Apple Pay', 'woocommerce-gateway-paypal-powered-by-braintree' );
82
 
83
  return $sections;
84
  }
@@ -96,21 +99,21 @@ class SV_WC_Payment_Gateway_Appl
18
  *
19
  * @package SkyVerge/WooCommerce/Payment-Gateway/Apple-Pay
20
  * @author SkyVerge
21
+ * @copyright Copyright (c) 2013-2020, SkyVerge, Inc.
22
  * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
23
  */
24
 
25
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_7_1;
26
 
27
  defined( 'ABSPATH' ) or exit;
28
 
29
+ if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_7_1\\SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) :
30
+
31
 
32
  /**
33
  * Sets up the Apple Pay settings screen.
45
  * Construct the class.
46
  *
47
  * @since 4.7.0
48
+ *
49
+ * @param SV_WC_Payment_Gateway_Apple_Pay $handler main Apple Pay handler instance
50
  */
51
  public function __construct( $handler ) {
52
 
81
  */
82
  public function add_settings_section( $sections ) {
83
 
84
+ $sections['apple-pay'] = __( 'Apple Pay', 'woocommerce-plugin-framework' );
85
 
86
  return $sections;
87
  }