-
Notifications
You must be signed in to change notification settings - Fork 7
/
readme.txt
299 lines (209 loc) · 14.7 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
=== Kybernaut IČO DIČ ===
Contributors: vyskoczilova
Tags: DIČ, IČO, IČ, IČ DPH, VAT number
Requires at least: 4.6
Tested up to: 6.7
Stable tag: 1.9.1
Requires PHP: 7.3
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Donate link: https://www.paypal.me/KarolinaVyskocilova
Adds Company & VAT numbers (IČO & DIČ & IČ DPH) to WooCommerce billing fields and verifies if data are correct.
== Description ==
Adds Company & VAT numbers (IČO & DIČ & IČ DPH) to WooCommerce billing fields and verifies if data are correct. Verification is based either on ARES and VIES database or only on mathematics. When billing to Czech republic, you can autofill fields Company, VAT number, Address, City, and Postcode based on IČO.
The plugin doesn't support block checkout. [Use shortcode checkout instead.] (https://kybernaut.cz/clanky/jak-vratit-starou-woocommerce-pokladnu-misto-noveho-bloku/)
Supports both PHP 7.3+ (soon to be abandoned) & PHP 8.0+.
=== Main functionality ===
* for CZ as billing country
* ARES and VIES verification (or mathematically verifies IČO and DIČ)
* ARES autofill (fields Company, VAT number, Address, City, and Postcode) based on IČO
* for SK as billing country
* VIES DIČ validation (or just validate the format of values)
* for EU countries as billing country
* VIES DIČ validation
* VAT extempt feature
* adds fields to IČO & DIČ & IČ DPH WooCommerce frontend: Checkout and My Account page
* allows edits from administration (backend):
* `Users -> Joe Doe (Edit) -> Billing address of the customer`
* `E-shop-WooCommerce -> Orders-> Order (show(edit)) -> Billing Information (edit)`
* Enable toggle switch to show/hide input fields ("Buying as a company?")
* Move Country field above the "Buying as a company?" toggle
* Option to allow on order if if ARES or VIES check fails for technical reasons - an alert will be shown in the admin mail and order details
=== Compatibility ===
* [Kybernaut Mailstep](https://kybernaut.cz/pluginy/kybernaut-mailstep/) by Karolína Vyskočilová
* [WooCommerce SuperFaktura](https://wordpress.org/plugins/woocommerce-superfaktura/) by 2day.sk & Webikon
* [WooCommerce PDF Invoices & Packing Slips for WooCommerce](https://cs.wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/) by WP Overnight
* WooCommerce PDF Invoices and Packing Slips for WooCommerce PRO by Acowebs
* [WooCommerce Sequential Order Numbers](https://cs.wordpress.org/plugins/woocommerce-sequential-order-numbers/) by SkyVerge
* [Woo Checkout Field Editor Pro](https://cs.wordpress.org/plugins/woo-checkout-field-editor-pro/) by ThemeHigh
* [Fluid Checkout for WooCommerce - Lite](https://wordpress.org/plugins/fluid-checkout/) by Fluid Checkout - only partial support
* Woo iDoklad, Woo Doprava, Woo GoPay etc. by [Toret](https://toret.cz/obchod/ref/106/) (affiliate link)
=== Requirements ===
* SoapClient PHP library for VIES validation (ask your hosting)
=== Credits ===
* 10up and their [WordPress.org Plugin Deploy](https://github.com/10up/action-wordpress-plugin-deploy) and [WordPress.org Plugin Readme/Assets Update](https://github.com/10up/action-wordpress-plugin-asset-update) Github Actions
* [ibericode/vat](https://github.com/ibericode/vat)
If you want to help, join the [Github](https://github.com/vyskoczilova/kybernaut-ic-dic).
== Installation ==
1. Just follow the standard [WordPress plugin installation procedere](http://codex.wordpress.org/Managing_Plugins).
1. Go to `WooCommerce->Settings->General` and scroll down for `Kybernaut IČO DIČ options`.
== Frequently asked questions ==
= I want to display values in Woo iDoklad by Vladislav Musílek (Toret) =
Go to `Toret plugins -> Woo iDoklad` and scroll to `Přiřazení polí pro IČ a DIČ` and fill following values:
IČ: `_billing_ic`
DIČ: `_billing_dic`
SK DIČ: `_billing_dic_dph`
= I want to style ARES verified fields =
U can use css selectors `.kbnt-validating`, `.kbnt-ok`, and `.kbnt-wrong` for example:
`.kbnt-wrong input {
color: #e2401c;
}
.kbnt-ok input {
color: #0f834d;
}
.kbnt-validating input{
color: #3d9cd2;
}`
= I want to display fields in the same row, one besides other (half width) =
You can use this snippet to modify the classes of outputed fileds, just add them to your functions.php
`add_filter( 'woolab_icdic_class_billing_ic', 'my_theme_class_billing_ic', 10, 1 );
function my_theme_class_billing_ic ( $class ) {
return array('form-row-first');
}
add_filter( 'woolab_icdic_class_billing_dic', 'my_theme_class_billing_dic', 10, 1 );
function my_theme_class_billing_dic ( $class ) {
return array('form-row-last');
}`
= I want to update customers meta when I change IČO or DIČ value within order edit. =
You can use this snippet to update customers data when you edit an order, just add them to your functions.php
`add_filter( 'woolab_icdic_update_user_meta', '__return_true' );`
= How can I report security bugs? =
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. [Report a security vulnerability.](https://patchstack.com/database/vdp/woolab-ic-dic)
= I found a bug. Where should I post it? =
I personally prefer GitHub, to keep things straight. The plugin code is here: [GitHub](https://github.com/vyskoczilova/kybernaut-ic-dic)
But you may use the WordPress Forum as well.
= I found a bug and fixed it. How can I contribute? =
Either post it on [GitHub](https://github.com/vyskoczilova/kybernaut-ic-dic) or—if you are working on a cloned repository—send me a pull request.
== Screenshots ==
1. Checkout validation of IČO.
== Changelog ==
= 1.9.1 (2024-11-14) =
* Fix: Greek VAT number validation - VAT country prefix (EL) doesn't match WooCommerce coutry code (GR).
= 1.9.0 (2024-06-28) =
* Feature: New checkbox "Ignore when ARES or VIES check fails for technical reasons" in plugin settings. If this option is enabled and validation of business ID or VAT number fails for technical reason (not because it is invalid), an order is placed. For orders at which validation fails, there is an alert at admin edit screen and in admin e-mail. Big thanks to [@PavelVybiral](https://github.com/PavelVybiral) [#72](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/72)
= 1.8.2 (2024-01-09) =
* Feature: added support for [WooCommerce PDF Invoices and Packing Slips for WooCommerce](https://wordpress.org/plugins/pdf-invoices-and-packing-slips-for-woocommerce/) by Acowebs (sponsored by [tuningmotocyklov.sk](https://www.tuningmotocyklov.sk))
* Fixed compatibility with Fluid Checkout (using the JS they provided me)
= 1.8.1 (2024-01-05) =
* Fix: Bump minimum PHP compatibility to 7.3 (will be increased soon to 8.0).
= 1.8.0 (2024-01-05) =
* Fix: VAT exempt checkbox default to off.
* Fix: Work with new ARES API (the old in previous versions has been discontinued by the end of 2023). For initial solution and pointing to the thanks to [@lukas-tomoszek](https://github.com/lukas-tomoszek).
* Feature: Prefix dependencies to avoid conflicts (using [wpify/scoper](https://packagist.org/packages/wpify/scoper))
* Add test validating Ares REST API check and processing.
= 1.7.5 (2023-12-19) =
* Fix: Accidentally broken toggle switch in 1.7.4.
* Declare incompatibility with checkout blocks.
= 1.7.4 (2023-11-20) =
* Fix: Additional check - billing country and VAT country prefix must match for SK IC DPH.
* Feature: Added compatibility with [Fluid Checkout for WooCommerce - Lite](https://wordpress.org/plugins/fluid-checkout/).
* Feature: Added a filter `woolab_icdic_check_billing_country_and_dic` allowing to disable the feature introduced in 1.7.3.
= 1.7.3 (2023-10-08) =
* Feature: Localize address format for all EU countries.
* Feature: Additional check - billing country and VAT country prefix must match (paid by a supporter).
= 1.7.2 (2023-08-02) =
* Fix: non HPOS WooCommerce edit order - load IC DIC values [#60](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/60)
* Fix: ICO - load the city district (NCO) if the street (NO) is not filled in (case when the street = city name) [#62](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/62)
* Several code updates and cleanup [#61](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/61)
= 1.7.1 (2023-07-26) =
* Fix: Fatal error while updating manually order status [#59](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/59)
= 1.7.0 (2023-07-25) =
* Feature: HPOS support - together with [@morvy](https://github.com/morvy), [#55](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/55)
* Feature: VAT extempt - thanks to [@morvy](https://github.com/morvy), [#48](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/48)
* Feature: Math validation for Slovak IC DPH - thanks to [@morvy](https://github.com/morvy), [#56](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/56)
* Fix: Checked "Buying as a company" while any of Company related fields is filled - thanks to [@morvy](https://github.com/morvy), [#48](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/48)
* Fix: Validation of CZ DIC with different length than 10 numbers - thanks to [@morvy](https://github.com/morvy), [#56](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/56)
= 1.6.7 (2022-01-12) =
* Fix: Checkbox buy as a company - data are sent even when unchecked - thanks to [@morvy](https://github.com/morvy)
= 1.6.6 (2021-11-05) =
* Fix: jQuery 3.x compatibility [#41](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/41) - thanks to [@morvy](https://github.com/morvy)
* Fix: Notice: Undefined variable: dic [#43](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/43) - thanks to [@morvy](https://github.com/morvy)
= 1.6.5 (2021-10-01) =
* Fix: VAT label CSS bug [#40](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/40) - thanks to [@morvy](https://github.com/morvy)
= 1.6.4 (2021-04-05) =
* Fix: prefix toggle CSS class.
* Fix: call an old function in SK DIČ validation.
* Improve: remove duplicate class on IČ DPH.
* Improve: validate ARES only when CZ selected (when the country is re-selected again).
* Load toggle CSS only when used.
= 1.6.3 (2021-02-24) =
* Feature: Add compatibility with PHP 8
= 1.6.2 (2021-02-24) =
* Fix: VAT Validation error.
= 1.6.1 (2021-02-24) =
* Bump the version after SVN issues with "vendor" file
= 1.6.0 (2021-02-24) =
* Fix: Add correct classes on checkbox input for "Buy as Company"
* Update dependencies: VAT composer library to 2.0.5
* Bump minimum requirements to 7.1 (due to Composer dependency)
= 1.5.4 (2020-12-02) =
* Fix: Don't validate without billing country [#27](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/27) - thanks to [@morvy](https://github.com/morvy)
= 1.5.3 (2020-11-09) =
* Compatibility with [WooCommerce SuperFaktura](https://wordpress.org/plugins/woocommerce-superfaktura/)
* Compatibility [Kybernaut Mailstep](https://kybernaut.cz/pluginy/kybernaut-mailstep/)
= 1.5.2 (2020-10-13) =
* Fix wrong assets path.
* Use more general CSS selectors for better compatibility.
= 1.5.1 (2020-09-17) =
* Fix issues with quotes - [#25](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/25)
* Add custom filter for disabling required DIC when ICO filled for SK `add_filter( 'woolab_icdic_sk_required_ic_and_dic', '__return_false' );` - [#26](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/26)
= 1.5.0 (2020-07-20) =
* Fix: Slovak DIC validation fix, [#22](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/22) - thanks to [@morvy](https://github.com/morvy)
* Feature: Show/Hide toggle functionality, [#24](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/24) - [@morvy](https://github.com/morvy)
* Maintenance: Update language files and dependencies
= 1.4.0 (2019-09-05) =
* Fix: Strip spaces from ICO, DIC, DIC DPH fields ([#8](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/8))
* Fix: Validation of Slovak DIČ in Vies ([#9](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/9))
* Fix: Trigger update_checkout JS when address loaded
* Performance: Don't validate IČO in ARES when the value has not been changed, called after 'donetyping'
* Maintenance: Update node_modules
= 1.3.3 (2018-11-18) =
* Compatibility with WC 3.5.1 which has "fixed" old ordering of checkout fields [#21763](https://github.com/woocommerce/woocommerce/pull/21763)
= 1.3.2 (2018-08-14) =
* Fix: Use number for address in ARES when no correct land registry and hous number are not filled ([@pryx](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/6))
= 1.3.1 (2018-06-03) =
* Fix: Show "IČ DPH" on "Manually add new order" screen when "Slovakia" selected
* Fix: Correct validation "IČ DPH" (with SK prefix) and "DIČ" (without SK prefix)
* Fix: Remove the WC nonce check (already checked in WC itself)
* Fix: Problem with loading plugin options
* Added "How to" for Woo iDoklad to readme.txt
* Update .pot source file.
= 1.3.0 (2018-02-21) =
* Fix: Display "VAT reg. no." field in Order Billing-edit.
* Fix: Compatibility with WooCommerce Sequential Order Numbers ([#3](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/3))
* Performance: CSS in admin.
* Feature: Validation for Czech Business ID (via ARES)
* Feature: Autofill for fields such as Company, VAT number, Address, City, and Postcode based on Czech Business ID (via ARES)
* Feature: Validation of VAT (via [VIES](https://github.com/dannyvankooten/vat.php))
* Added: Plugin settings to `WooCommerce->Settings->General`
* Fields moved after "company" field.
= 1.2.0 (2018-02-08) =
* Fixed: Editing Business ID and VAT values within order in admin backend
* Feature: Texts in plugin only in English (Czech as a translation)
* Feature: Added `woolab_icdic_class_{field_name}` filters to customize class of added billing input fields
* Feature: Added `woolab_icdic_update_user_meta` filter to enable updating user meta on order details edit
* Added: Links to GitHub and Write a review to plugins page.
* Added: Basic SK support (based on this [article](https://podnikam.webnoviny.sk/ico-dic-ic-dph-co-znamenaju-tieto-skratky-a-kde-ich-hladat/))
= 1.1.0 (2017-04-05) =
* Fix: "Order properties should not be accessed directly." Added support for WooCommerce 3.0.
= 1.0.3 (2017-02-1) =
* Fix: display fields in My Account frontend page.
* Add: support for WooCommerce PDF Invoices & Packing Slips.
= 1.0.2.1 (2016-12-15) =
* Feature: Created the GIT repository
= 1.0.2 (2016-09-05) =
* Fix: the term "IČ" to "IČO".
= 1.0.1 (2016-07-18) =
* Feature: Checks billing country and validates IC & DIC if is set to CZ
= 1.0.0 (2016-07-16) =
* Initial release