WooCommerce PDF Invoices & Packing Slips - Version 2.14.2

Version Description

  • Fix: unescape text strings entered in the setup wizard
  • Dev: New filter wpo_wcpdf_email_order_object
  • UI: Update setup wizard layout
  • Libraries: updated dompdf to 1.2.1 (addressing potential security vulnerability)
  • Marked tested up to WooCommerce 6.4
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 2.14.2
Comparing to
See all releases

Code changes from version 2.14.1 to 2.14.2

assets/css/setup-wizard.css CHANGED
@@ -1,373 +1,432 @@
1
- .wpo-wizard {
2
- background:#f9f9f9;
 
 
 
 
3
  }
4
 
5
- .wpo-wcpdf-setup {
6
- margin: 100px auto 25px;
7
  padding: 0;
8
- font-family: 'Ubuntu', sans-serif;
 
 
 
 
9
  font-size: 14px;
10
  line-height: 22px;
11
- color:#444;
12
- background: none;
13
- -webkit-box-shadow: none;
14
- box-shadow: none;
15
- border: none;
16
  }
17
 
18
- .wpo-wcpdf-setup h1, .wpo-wcpdf-setup h2 {
19
- border:none;
20
- color:#444;
21
- margin:0;
22
  }
23
 
24
- #confetti {
25
- width:100%;
26
- height:100%;
27
- position:absolute;
28
- left:0;
29
- top:0;
30
- z-index:-999;
31
  }
32
 
33
- .wpo-setup {
34
- background-color:#f9f9f9;
35
- font-family: 'Ubuntu', sans-serif;
36
- font-size: 14px;
37
- line-height: 22px;
38
- color:#444;
39
- width:100%;
40
- height:100%;
41
- margin:0;
42
- padding:0;
 
 
 
 
 
 
 
43
  }
44
 
45
- .confetti {
46
- width:100%;
47
- height:100%;
48
- z-index:-999;
49
- position:relative;
 
 
50
  }
51
 
52
  .wpo-setup-card {
53
- display:block;
54
- background-color:#f2fafa;
55
- max-width:900px;
56
- padding:0;
57
- border-radius:10px;
58
- box-shadow:10px 10px 80px rgba(0,0,0,0.05);
59
- overflow:hidden;
60
  }
61
 
62
  .wpo-plugin-title {
63
- width:100%;
64
- padding:30px 0 50px 0;
65
- margin:0;
66
- background-color:#fdfdfd;
67
- text-align:center;
68
- display:block;
69
- color:#61707d;
70
  }
71
 
72
  .wpo-progress-bar {
73
- width:100%;
74
- height:36px;
75
- overflow:hidden;
76
  list-style: none;
77
- margin:-18px 0 0 0;
78
- padding:0;
79
  }
80
 
81
  .wpo-progress-bar li {
82
- width:14.285%;
83
- float:left;
84
  box-sizing: border-box;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  .wpo-progress-marker {
88
- height:24px;
89
- width:24px;
90
- background-color:#fdfdfd;
91
- border:6px solid #3e9b9a;
92
- border-radius:50%;
93
- margin:0 auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
- .wpo-progress-bar .completed {
97
- background-color:#3e9b9a;
98
  }
99
 
100
- .wpo-progress-bar .active {
101
- background-color:#2d7170;
 
 
 
 
 
 
102
  }
103
 
104
  .wpo-setup-content {
105
- float:left;
106
- width:100%;
107
- overflow:hidden;
108
  }
109
 
110
  .wpo-step-description {
111
- width:50%;
112
- float:left;
113
- padding:50px;
114
  box-sizing: border-box;
115
  }
116
 
117
  .wpo-step-description ul {
118
- padding-left:16px;
119
  }
120
 
121
  .wpo-setup-input {
122
- width:50%;
123
- float:left;
124
- padding:50px 50px 50px 0;
125
  box-sizing: border-box;
126
- position:relative;
127
  }
128
 
129
  .wpo-setup-input select {
130
- width:100%;
131
- border:none;
132
- font-size:1.4em;
133
- background-color:#fdfdfd;
134
- color:#444;
135
- border:1px solid #3e9b9a;
136
- height:40px;
137
  }
138
 
139
  .wpo-setup-buttons {
140
- width:100%;
141
- float:left;
142
- padding:0px 50px 50px 50px;
143
  box-sizing: border-box;
144
  }
145
 
146
- .wpo-button-next, .wpo-button-previous, .wpo-skip-step {
147
- background-color:#3e9b9a;
148
- border-radius:5px;
149
- padding:10px 20px;
150
- border:none;
 
151
  box-sizing: border-box;
152
- font-size:1em;
153
  text-decoration: none;
154
- cursor:pointer;
155
- color:#fdfdfd;
156
- font-size:1.4em;
157
  box-sizing: border-box;
158
  }
159
 
160
- .wpo-button-next:hover, .wpo-button-previous:hover {
161
- background-color:#2d7170;
 
 
162
  }
163
 
164
- .wpo-button-next, .wpo-skip-step {
165
- float:right;
166
- margin-left:10px;
 
 
167
  }
168
 
169
- .wpo-button-previous {
170
- float:left;
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  }
172
 
173
- .wpo-skip-step {
174
- background-color:#fdfdfd;
175
- color:#61707d;
 
176
  }
177
 
178
- .wpo-skip-step:hover {
179
- color:#333;
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  /* Shop address */
183
 
184
  .wpo-setup-input .shop-name {
185
- width:100%;
186
- height:40px;
187
- padding:10px 15px;
188
  box-sizing: border-box;
189
- font-size:1.2em;
190
- margin-bottom:20px;
191
- border:1px solid #3e9b9a;
192
- font-family: 'Ubuntu', sans-serif;
193
  }
194
 
195
  .wpo-setup-input .shop-address {
196
- width:100%;
197
- height:200px;
198
- padding:15px 15px;
199
- font-size:1.2em;
200
- line-height:1.4em;
201
  box-sizing: border-box;
202
- border:1px solid #3e9b9a;
203
  resize: none;
204
- float:left;
205
- margin:0;
206
- font-family: 'Ubuntu', sans-serif;
207
- text-align:left!important;
208
  }
209
 
210
  /* Your logo */
211
 
212
  .wpo-setup-input #img-header_logo {
213
- width:100%;
214
- height:auto;
215
- background:#fdfdfd;
216
- margin-bottom:20px;
217
- padding:20px;
218
  box-sizing: border-box;
219
- position:relative;
 
220
  }
221
 
222
  .wpo-setup-input #logo-preview img {
223
- height:80%;
224
- position:absolute;
225
- left:50%;
226
- -ms-transform: translate(-50%, 0%); /* IE 9 */
227
- -webkit-transform: translate(-50%, 0%); /* Safari */
228
- transform: translate(-50%, 0%);
229
  }
230
 
231
- /* Attach to */
 
 
 
 
232
 
233
- .wpo-setup-input input[type=checkbox] {
234
- background-color: #fdfdfd;
235
- border: 1px solid #cacece;
236
- border-radius: 3px;
237
- vertical-align: text-bottom;
238
- margin-right: 20px;
239
  }
240
 
241
- .wpo-setup-input .checkbox {
242
- font-size:1.1em;
 
 
 
 
 
243
  }
244
 
245
- /* Customizer */
 
 
246
 
247
- .wpo-setup-input .how-to-box {
248
- float:right;
249
- width:auto;
250
- max-width:100%;
251
- height:auto;
252
- border:1px solid #3e9b9a;
253
- overflow:hidden;
254
- background:#fff;
255
  }
256
 
257
- .wpo-setup-input .how-to-box img {
258
- width:100%;
 
 
 
 
259
  }
260
 
261
- .wpo-step-description a:link, .wpo-step-description a:visited {
262
- color:#3e9b9a;
263
- text-decoration:none;
264
  }
265
 
266
  /* Good to go */
267
 
268
  .wpo-final {
269
- text-align:center;
270
- width:100%;
271
- padding:50px 200px;
272
  }
273
 
274
  .wpo-final h1 {
275
- font-size:3em;
276
- line-height:1em;
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  }
278
 
279
  /* Portrait tablets and small desktops */
280
  @media (min-width: 768px) and (max-width: 991px) {
281
- .wpo-setup-card {
282
- width:80%;
283
  }
284
  }
285
 
286
  /* Landscape phones and portrait tablets */
287
  @media (max-width: 767px) {
288
- .wpo-setup-card {
289
- width:100%;
290
- min-height:100%;
291
- border-radius:0px;
292
- margin:0;
293
- }
294
-
295
- .wpo-step-description, .wpo-setup-input {
296
- width:100%;
297
- padding-left:50px;
298
  }
299
 
300
- .wpo-final {
301
- padding:50px;
302
- }
303
-
304
- .wpo-progress-bar {
305
- margin-top:-12px;
306
- }
307
-
308
- .wpo-progress-marker {
309
- height:16px;
310
- width:16px;
311
- border-width:4px;
312
- }
313
-
314
- .wpo-button-next, .wpo-button-previous, .wpo-skip-step {
315
- font-size:1em;
316
- padding:8px 12px;
317
- }
318
- }
319
-
320
- /* Landscape phones and smaller */
321
- @media (max-width: 480px) {
322
-
323
- .wpo-wizard, .wpo-wcpdf-setup {
324
- margin:0;
325
- height:100%;
326
- }
327
-
328
- .wpo-wcpdf-setup form {
329
- height:100%;
330
  }
331
 
332
  .wpo-setup-card {
333
- width:100%;
334
- min-height:100%;
335
- border-radius:0px;
336
- margin:0;
337
- }
338
-
339
- .wpo-plugin-title {
340
- padding:25px 0 30px 0;
341
- font-size:1.4em;
342
  }
343
 
344
- .wpo-step-description, .wpo-setup-input, .wpo-setup-buttons {
345
- width:100%;
346
- padding:20px;
347
  }
348
 
349
- .wpo-step-description {
350
- padding-bottom:0;
 
 
 
351
  }
352
 
353
- .wpo-progress-bar {
354
- margin-top:-12px;
 
 
355
  }
356
 
357
  .wpo-progress-marker {
358
- height:16px;
359
- width:16px;
360
- border-width:4px;
361
  }
362
 
363
- .wpo-button-next, .wpo-button-previous, .wpo-skip-step {
364
- font-size:1em;
365
- padding:8px 12px;
366
- }
367
-
368
- .wpo-setup-input .checkbox {
369
- font-size:1em;
370
- }
371
  }
372
 
373
 
 
 
1
+ html.wpo-wizard {
2
+ margin: 0;
3
+ padding: 0;
4
+ width: 100%;
5
+ height: 100%;
6
+ background: transparent;
7
  }
8
 
9
+ body.wpo-wcpdf-setup {
10
+ border: none;
11
  padding: 0;
12
+ margin: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ background-repeat: no-repeat;
16
+ background-attachment: fixed!important;
17
  font-size: 14px;
18
  line-height: 22px;
19
+ background: #771787;
20
+ background: -webkit-linear-gradient(10deg, #3c105d, #771787);
21
+ background: -o-linear-gradient(10deg, #3c105d, #771787);
22
+ background: linear-gradient(100deg, #3c105d, #771787);
 
23
  }
24
 
25
+ body.wpo-wcpdf-setup a:link, body.wpo-wcpdf-setup a:visited {
26
+ color: #771787;
27
+ text-decoration: none;
 
28
  }
29
 
30
+ body.wpo-wcpdf-setup a:hover {
31
+ text-decoration: underline;
 
 
 
 
 
32
  }
33
 
34
+ body.wpo-wcpdf-setup input:focus,
35
+ body.wpo-wcpdf-setup textarea:focus,
36
+ body.wpo-wcpdf-setup select:focus {
37
+ border-color: #239bb9!important;
38
+ box-shadow: 0 0 0 1px #239bb9!important;
39
+ outline: 2px solid transparent!important;
40
+ color: black!important;
41
+ }
42
+
43
+ body.wpo-wcpdf-setup select:hover {
44
+ color: #666!important;
45
+ }
46
+
47
+ body.wpo-wcpdf-setup h1, body.wpo-wcpdf-setup h2 {
48
+ border: none;
49
+ margin: 0;
50
+ color: #000;
51
  }
52
 
53
+ body.wpo-wcpdf-setup form {
54
+ width: 80%;
55
+ max-width: 900px;
56
+ position: absolute;
57
+ left: 50%;
58
+ transform: translate(-50%, 0);
59
+ padding: 80px 15px 100px 15px;
60
  }
61
 
62
  .wpo-setup-card {
63
+ display: block;
64
+ background-color: #fff;
65
+ padding: 0;
66
+ overflow: hidden;
67
+ box-shadow: 0 20px 50px 20px rgba(0,0,0,0.2);
 
 
68
  }
69
 
70
  .wpo-plugin-title {
71
+ width: 100%;
72
+ padding: 40px 0 30px 0;
73
+ margin: 0;
74
+ text-align: center;
75
+ display: block;
76
+ font-weight: 200;
 
77
  }
78
 
79
  .wpo-progress-bar {
80
+ width: 100%;
81
+ overflow: hidden;
 
82
  list-style: none;
83
+ box-sizing: border-box;
84
+ padding: 0;
85
  }
86
 
87
  .wpo-progress-bar li {
88
+ width: 12.5%;
89
+ float: left;
90
  box-sizing: border-box;
91
+ position: relative;
92
+ padding: 0;
93
+ margin: 0;
94
+ }
95
+
96
+ .wpo-progress-bar li:first-child {
97
+ width: calc( ( 12.5% - ( 12.5% - 35px ) ) / 2 + 12.5% );
98
+ }
99
+
100
+ .wpo-progress-bar li::after {
101
+ content: '';
102
+ display: block;
103
+ height: 2px;
104
+ width: 100%;
105
+ background-color:#eaeaea;
106
+ position: absolute;
107
+ top: calc( 50% - 1px );
108
+ right: 0;
109
+ }
110
+
111
+ .wpo-progress-bar li:first-child::after {
112
+ display: none;
113
+ }
114
+
115
+ .wpo-progress-bar li.active::after,
116
+ .wpo-progress-bar li.completed::after {
117
+ background-color: #771787;
118
  }
119
 
120
  .wpo-progress-marker {
121
+ height: 35px;
122
+ width: 35px;
123
+ background-color: #eaeaea;
124
+ border: 2px solid #eaeaea;
125
+ border-radius: 50%;
126
+ position: relative;
127
+ z-index: 1;
128
+ float: right;
129
+ box-sizing: border-box;
130
+ }
131
+
132
+ .wpo-progress-bar {
133
+ counter-reset: section;
134
+ }
135
+
136
+ .wpo-progress-marker::before {
137
+ counter-increment: section;
138
+ content: counter(section);
139
+ position: absolute;
140
+ left: 50%;
141
+ top: 50%;
142
+ transform: translate(-50%, -50%);
143
+ color: #999;
144
+ }
145
+
146
+ li.active .wpo-progress-marker::before {
147
+ color: #771787;
148
  }
149
 
150
+ li.completed .wpo-progress-marker::before {
151
+ color: #fff;
152
  }
153
 
154
+ .wpo-progress-bar li.completed .wpo-progress-marker {
155
+ background-color: #771787;
156
+ border-color: #771787;
157
+ }
158
+
159
+ .wpo-progress-bar li.active .wpo-progress-marker {
160
+ border-color: #771787;
161
+ background-color: #fff;
162
  }
163
 
164
  .wpo-setup-content {
165
+ float: left;
166
+ width: 100%;
167
+ overflow: hidden;
168
  }
169
 
170
  .wpo-step-description {
171
+ width: 50%;
172
+ float: left;
173
+ padding: 50px;
174
  box-sizing: border-box;
175
  }
176
 
177
  .wpo-step-description ul {
178
+ padding-left: 16px;
179
  }
180
 
181
  .wpo-setup-input {
182
+ width: 50%;
183
+ float: left;
184
+ padding: 50px 50px 50px 0;
185
  box-sizing: border-box;
186
+ position: relative;
187
  }
188
 
189
  .wpo-setup-input select {
190
+ width: 100%;
 
 
 
 
 
 
191
  }
192
 
193
  .wpo-setup-buttons {
194
+ width: 100%;
195
+ float: left;
196
+ padding: 0px 50px 50px 50px;
197
  box-sizing: border-box;
198
  }
199
 
200
+ .wpo-setup-card .wpo-button-next,
201
+ .wpo-setup-card .wpo-button-previous,
202
+ .wpo-setup-card .wpo-skip-step,
203
+ .wpo-setup-card .wpo-setup-input span.button {
204
+ padding: 0.5em 1.2em;
205
+ border-radius: 3px;
206
  box-sizing: border-box;
207
+ font-size: 1em;
208
  text-decoration: none;
209
+ cursor: pointer;
210
+ font-size: 1.2em;
 
211
  box-sizing: border-box;
212
  }
213
 
214
+ .wpo-setup-card .wpo-button-next {
215
+ background-color: #1c6c8b;
216
+ border: 1px solid #1c6c8b;
217
+ color: #fff!important;
218
  }
219
 
220
+ .wpo-setup-card .wpo-button-previous,
221
+ .wpo-setup-input span.button {
222
+ background-color: transparent;
223
+ border: 1px solid #1c6c8b;
224
+ color: #1c6c8b;
225
  }
226
 
227
+ .wpo-setup-card .wpo-button-next:hover,
228
+ .wpo-setup-card .wpo-button-previous:hover,
229
+ .wpo-setup-input span.button:hover {
230
+ background-color: #239bb9;
231
+ color: #fff!important;
232
+ text-decoration: none;
233
+ border-color: #239bb9;
234
+ }
235
+
236
+ .wpo-setup-card .wpo-button-next:focus,
237
+ .wpo-setup-card .wpo-button-previous:focus,
238
+ .wpo-setup-input span.button:focus {
239
+ background-color: #239bb9;
240
+ color: #fff!important;
241
+ border-color: #239bb9;
242
  }
243
 
244
+ .wpo-setup-card .wpo-button-next,
245
+ .wpo-setup-card .wpo-skip-step {
246
+ float: right;
247
+ margin-left: 10px;
248
  }
249
 
250
+ .wpo-setup-card .wpo-button-previous {
251
+ float: left;
252
+ color: #1c6c8b!important;
253
+ }
254
+
255
+ .wpo-setup-card .wpo-skip-step {
256
+ background-color: transparent;
257
+ color: #666!important;
258
+ font-weight: 200;
259
+ border: 2px solid transparent;
260
+ }
261
+
262
+ .wpo-setup-card .wpo-skip-step:hover {
263
+ color: #000!important;
264
+ text-decoration: none;
265
  }
266
 
267
  /* Shop address */
268
 
269
  .wpo-setup-input .shop-name {
270
+ width: 100%;
271
+ height: 40px;
272
+ padding: 10px 15px;
273
  box-sizing: border-box;
274
+ font-size: 1.2em;
275
+ margin-bottom: 20px;
 
 
276
  }
277
 
278
  .wpo-setup-input .shop-address {
279
+ width: 100%;
280
+ height: 200px;
281
+ padding: 15px 15px;
282
+ font-size: 1.2em;
283
+ line-height: 1.4em;
284
  box-sizing: border-box;
285
+ border: 1px solid #8c8f94;
286
  resize: none;
287
+ float: left;
288
+ margin: 0;
289
+ text-align: left!important;
 
290
  }
291
 
292
  /* Your logo */
293
 
294
  .wpo-setup-input #img-header_logo {
295
+ width: 100%;
296
+ height: auto;
297
+ background: transparent;
298
+ margin-bottom: 20px;
299
+ padding: 20px;
300
  box-sizing: border-box;
301
+ position: relative;
302
+ border: 1px solid #8c8f94;
303
  }
304
 
305
  .wpo-setup-input #logo-preview img {
306
+ height: 80%;
307
+ position: absolute;
308
+ left: 50%;
309
+ transform: translate(-50%, 0%);
 
 
310
  }
311
 
312
+ .wpo-setup-card .wpo-setup-input span.button {
313
+ font-size: 0.9em;
314
+ padding: 0.2em 0.8em;
315
+ margin: 0 10px 10px 0;
316
+ }
317
 
318
+ .attachment-resolution-warning p {
319
+ font-size: 0.9em;
320
+ line-height: 1.4em;
321
+ font-style: italic;
322
+ color: #999;
323
+ padding-bottom: 10px;
324
  }
325
 
326
+ /* Attach to */
327
+
328
+ .wpo-setup-input table th,
329
+ .wpo-setup-input table td,
330
+ .wpo-setup-input table td label {
331
+ vertical-align: top;
332
+ padding: 0;
333
  }
334
 
335
+ .wpo-setup-input label:hover {
336
+ color: #666;
337
+ }
338
 
339
+ .wpo-setup-input table th,
340
+ .wpo-setup-input table td {
341
+ padding-bottom: 5px;
 
 
 
 
 
342
  }
343
 
344
+ .wpo-setup-input input[type=checkbox] {
345
+ background-color: #fff;
346
+ border: 1px solid #cacece;
347
+ border-radius: 2px;
348
+ vertical-align: text-bottom;
349
+ margin-right: 20px;
350
  }
351
 
352
+ .wpo-setup-input .checkbox {
353
+ font-size: 1.1em;
 
354
  }
355
 
356
  /* Good to go */
357
 
358
  .wpo-final {
359
+ text-align: center;
360
+ width: 100%;
361
+ padding: 50px;
362
  }
363
 
364
  .wpo-final h1 {
365
+ font-size: 3em;
366
+ line-height: 1em;
367
+ }
368
+
369
+ .wpo-final a:hover {
370
+ text-decoration: underline;
371
+ }
372
+
373
+ #confetti {
374
+ width: 100%;
375
+ height: 100%;
376
+ position: absolute;
377
+ left: 0;
378
+ top: 0;
379
+ z-index: -999;
380
  }
381
 
382
  /* Portrait tablets and small desktops */
383
  @media (min-width: 768px) and (max-width: 991px) {
384
+ body.wpo-wcpdf-setup form {
385
+ width: 90%;
386
  }
387
  }
388
 
389
  /* Landscape phones and portrait tablets */
390
  @media (max-width: 767px) {
391
+ body {
392
+ background: white!important;
 
 
 
 
 
 
 
 
393
  }
394
 
395
+ body.wpo-wcpdf-setup form {
396
+ width: 100%;
397
+ padding-top: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  }
399
 
400
  .wpo-setup-card {
401
+ box-shadow: none;
 
 
 
 
 
 
 
 
402
  }
403
 
404
+ .wpo-progress-bar {
405
+ padding: 0 0 25px 0;
 
406
  }
407
 
408
+ .wpo-step-description,
409
+ .wpo-setup-input,
410
+ .wpo-setup-buttons {
411
+ width: 100%;
412
+ padding: 15px 25px;
413
  }
414
 
415
+ .wpo-setup-card .wpo-button-next,
416
+ .wpo-setup-card .wpo-button-previous,
417
+ .wpo-setup-card .wpo-skip-step {
418
+ padding: 0.5em 0.8em;
419
  }
420
 
421
  .wpo-progress-marker {
422
+ height: 28px;
423
+ width: 28px;
424
+ font-size: 0.8em;
425
  }
426
 
427
+ #confetti { display: none }
 
 
 
 
 
 
 
428
  }
429
 
430
 
431
+
432
+
assets/css/setup-wizard.min.css CHANGED
@@ -1 +1 @@
1
- .wpo-wizard{background:#f9f9f9}.wpo-wcpdf-setup{margin:100px auto 25px;padding:0;font-family:Ubuntu,sans-serif;font-size:14px;line-height:22px;color:#444;background:0 0;-webkit-box-shadow:none;box-shadow:none;border:none}.wpo-wcpdf-setup h1,.wpo-wcpdf-setup h2{border:none;color:#444;margin:0}#confetti{width:100%;height:100%;position:absolute;left:0;top:0;z-index:-999}.wpo-setup{background-color:#f9f9f9;font-family:Ubuntu,sans-serif;font-size:14px;line-height:22px;color:#444;width:100%;height:100%;margin:0;padding:0}.confetti{width:100%;height:100%;z-index:-999;position:relative}.wpo-setup-card{display:block;background-color:#f2fafa;max-width:900px;padding:0;border-radius:10px;box-shadow:10px 10px 80px rgba(0,0,0,.05);overflow:hidden}.wpo-plugin-title{width:100%;padding:30px 0 50px 0;margin:0;background-color:#fdfdfd;text-align:center;display:block;color:#61707d}.wpo-progress-bar{width:100%;height:36px;overflow:hidden;list-style:none;margin:-18px 0 0 0;padding:0}.wpo-progress-bar li{width:14.285%;float:left;box-sizing:border-box}.wpo-progress-marker{height:24px;width:24px;background-color:#fdfdfd;border:6px solid #3e9b9a;border-radius:50%;margin:0 auto}.wpo-progress-bar .completed{background-color:#3e9b9a}.wpo-progress-bar .active{background-color:#2d7170}.wpo-setup-content{float:left;width:100%;overflow:hidden}.wpo-step-description{width:50%;float:left;padding:50px;box-sizing:border-box}.wpo-step-description ul{padding-left:16px}.wpo-setup-input{width:50%;float:left;padding:50px 50px 50px 0;box-sizing:border-box;position:relative}.wpo-setup-input select{width:100%;border:none;font-size:1.4em;background-color:#fdfdfd;color:#444;border:1px solid #3e9b9a;height:40px}.wpo-setup-buttons{width:100%;float:left;padding:0 50px 50px 50px;box-sizing:border-box}.wpo-button-next,.wpo-button-previous,.wpo-skip-step{background-color:#3e9b9a;border-radius:5px;padding:10px 20px;border:none;box-sizing:border-box;font-size:1em;text-decoration:none;cursor:pointer;color:#fdfdfd;font-size:1.4em;box-sizing:border-box}.wpo-button-next:hover,.wpo-button-previous:hover{background-color:#2d7170}.wpo-button-next,.wpo-skip-step{float:right;margin-left:10px}.wpo-button-previous{float:left}.wpo-skip-step{background-color:#fdfdfd;color:#61707d}.wpo-skip-step:hover{color:#333}.wpo-setup-input .shop-name{width:100%;height:40px;padding:10px 15px;box-sizing:border-box;font-size:1.2em;margin-bottom:20px;border:1px solid #3e9b9a;font-family:Ubuntu,sans-serif}.wpo-setup-input .shop-address{width:100%;height:200px;padding:15px 15px;font-size:1.2em;line-height:1.4em;box-sizing:border-box;border:1px solid #3e9b9a;resize:none;float:left;margin:0;font-family:Ubuntu,sans-serif;text-align:left!important}.wpo-setup-input #img-header_logo{width:100%;height:auto;background:#fdfdfd;margin-bottom:20px;padding:20px;box-sizing:border-box;position:relative}.wpo-setup-input #logo-preview img{height:80%;position:absolute;left:50%;-ms-transform:translate(-50%,0);-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}.wpo-setup-input input[type=checkbox]{background-color:#fdfdfd;border:1px solid #cacece;border-radius:3px;vertical-align:text-bottom;margin-right:20px}.wpo-setup-input .checkbox{font-size:1.1em}.wpo-setup-input .how-to-box{float:right;width:auto;max-width:100%;height:auto;border:1px solid #3e9b9a;overflow:hidden;background:#fff}.wpo-setup-input .how-to-box img{width:100%}.wpo-step-description a:link,.wpo-step-description a:visited{color:#3e9b9a;text-decoration:none}.wpo-final{text-align:center;width:100%;padding:50px 200px}.wpo-final h1{font-size:3em;line-height:1em}@media (min-width:768px) and (max-width:991px){.wpo-setup-card{width:80%}}@media (max-width:767px){.wpo-setup-card{width:100%;min-height:100%;border-radius:0;margin:0}.wpo-setup-input,.wpo-step-description{width:100%;padding-left:50px}.wpo-final{padding:50px}.wpo-progress-bar{margin-top:-12px}.wpo-progress-marker{height:16px;width:16px;border-width:4px}.wpo-button-next,.wpo-button-previous,.wpo-skip-step{font-size:1em;padding:8px 12px}}@media (max-width:480px){.wpo-wcpdf-setup,.wpo-wizard{margin:0;height:100%}.wpo-wcpdf-setup form{height:100%}.wpo-setup-card{width:100%;min-height:100%;border-radius:0;margin:0}.wpo-plugin-title{padding:25px 0 30px 0;font-size:1.4em}.wpo-setup-buttons,.wpo-setup-input,.wpo-step-description{width:100%;padding:20px}.wpo-step-description{padding-bottom:0}.wpo-progress-bar{margin-top:-12px}.wpo-progress-marker{height:16px;width:16px;border-width:4px}.wpo-button-next,.wpo-button-previous,.wpo-skip-step{font-size:1em;padding:8px 12px}.wpo-setup-input .checkbox{font-size:1em}}
1
+ html.wpo-wizard{margin:0;padding:0;width:100%;height:100%;background:0 0}body.wpo-wcpdf-setup{border:none;padding:0;margin:0;width:100%;height:100%;background-repeat:no-repeat;background-attachment:fixed!important;font-size:14px;line-height:22px;background:#771787;background:-webkit-linear-gradient(10deg,#3c105d,#771787);background:-o-linear-gradient(10deg,#3c105d,#771787);background:linear-gradient(100deg,#3c105d,#771787)}body.wpo-wcpdf-setup a:link,body.wpo-wcpdf-setup a:visited{color:#771787;text-decoration:none}body.wpo-wcpdf-setup a:hover{text-decoration:underline}body.wpo-wcpdf-setup input:focus,body.wpo-wcpdf-setup select:focus,body.wpo-wcpdf-setup textarea:focus{border-color:#239bb9!important;box-shadow:0 0 0 1px #239bb9!important;outline:2px solid transparent!important;color:#000!important}body.wpo-wcpdf-setup select:hover{color:#666!important}body.wpo-wcpdf-setup h1,body.wpo-wcpdf-setup h2{border:none;margin:0;color:#000}body.wpo-wcpdf-setup form{width:80%;max-width:900px;position:absolute;left:50%;transform:translate(-50%,0);padding:80px 15px 100px 15px}.wpo-setup-card{display:block;background-color:#fff;padding:0;overflow:hidden;box-shadow:0 20px 50px 20px rgba(0,0,0,.2)}.wpo-plugin-title{width:100%;padding:40px 0 30px 0;margin:0;text-align:center;display:block;font-weight:200}.wpo-progress-bar{width:100%;overflow:hidden;list-style:none;box-sizing:border-box;padding:0}.wpo-progress-bar li{width:12.5%;float:left;box-sizing:border-box;position:relative;padding:0;margin:0}.wpo-progress-bar li:first-child{width:calc((12.5% - (12.5% - 35px))/ 2 + 12.5%)}.wpo-progress-bar li::after{content:'';display:block;height:2px;width:100%;background-color:#eaeaea;position:absolute;top:calc(50% - 1px);right:0}.wpo-progress-bar li:first-child::after{display:none}.wpo-progress-bar li.active::after,.wpo-progress-bar li.completed::after{background-color:#771787}.wpo-progress-marker{height:35px;width:35px;background-color:#eaeaea;border:2px solid #eaeaea;border-radius:50%;position:relative;z-index:1;float:right;box-sizing:border-box}.wpo-progress-bar{counter-reset:section}.wpo-progress-marker::before{counter-increment:section;content:counter(section);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#999}li.active .wpo-progress-marker::before{color:#771787}li.completed .wpo-progress-marker::before{color:#fff}.wpo-progress-bar li.completed .wpo-progress-marker{background-color:#771787;border-color:#771787}.wpo-progress-bar li.active .wpo-progress-marker{border-color:#771787;background-color:#fff}.wpo-setup-content{float:left;width:100%;overflow:hidden}.wpo-step-description{width:50%;float:left;padding:50px;box-sizing:border-box}.wpo-step-description ul{padding-left:16px}.wpo-setup-input{width:50%;float:left;padding:50px 50px 50px 0;box-sizing:border-box;position:relative}.wpo-setup-input select{width:100%}.wpo-setup-buttons{width:100%;float:left;padding:0 50px 50px 50px;box-sizing:border-box}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-setup-input span.button,.wpo-setup-card .wpo-skip-step{padding:.5em 1.2em;border-radius:3px;box-sizing:border-box;font-size:1em;text-decoration:none;cursor:pointer;font-size:1.2em;box-sizing:border-box}.wpo-setup-card .wpo-button-next{background-color:#1c6c8b;border:1px solid #1c6c8b;color:#fff!important}.wpo-setup-card .wpo-button-previous,.wpo-setup-input span.button{background-color:transparent;border:1px solid #1c6c8b;color:#1c6c8b}.wpo-setup-card .wpo-button-next:hover,.wpo-setup-card .wpo-button-previous:hover,.wpo-setup-input span.button:hover{background-color:#239bb9;color:#fff!important;text-decoration:none;border-color:#239bb9}.wpo-setup-card .wpo-button-next:focus,.wpo-setup-card .wpo-button-previous:focus,.wpo-setup-input span.button:focus{background-color:#239bb9;color:#fff!important;border-color:#239bb9}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-skip-step{float:right;margin-left:10px}.wpo-setup-card .wpo-button-previous{float:left;color:#1c6c8b!important}.wpo-setup-card .wpo-skip-step{background-color:transparent;color:#666!important;font-weight:200;border:2px solid transparent}.wpo-setup-card .wpo-skip-step:hover{color:#000!important;text-decoration:none}.wpo-setup-input .shop-name{width:100%;height:40px;padding:10px 15px;box-sizing:border-box;font-size:1.2em;margin-bottom:20px}.wpo-setup-input .shop-address{width:100%;height:200px;padding:15px 15px;font-size:1.2em;line-height:1.4em;box-sizing:border-box;border:1px solid #8c8f94;resize:none;float:left;margin:0;text-align:left!important}.wpo-setup-input #img-header_logo{width:100%;height:auto;background:0 0;margin-bottom:20px;padding:20px;box-sizing:border-box;position:relative;border:1px solid #8c8f94}.wpo-setup-input #logo-preview img{height:80%;position:absolute;left:50%;transform:translate(-50%,0)}.wpo-setup-card .wpo-setup-input span.button{font-size:.9em;padding:.2em .8em;margin:0 10px 10px 0}.attachment-resolution-warning p{font-size:.9em;line-height:1.4em;font-style:italic;color:#999;padding-bottom:10px}.wpo-setup-input table td,.wpo-setup-input table td label,.wpo-setup-input table th{vertical-align:top;padding:0}.wpo-setup-input label:hover{color:#666}.wpo-setup-input table td,.wpo-setup-input table th{padding-bottom:5px}.wpo-setup-input input[type=checkbox]{background-color:#fff;border:1px solid #cacece;border-radius:2px;vertical-align:text-bottom;margin-right:20px}.wpo-setup-input .checkbox{font-size:1.1em}.wpo-final{text-align:center;width:100%;padding:50px}.wpo-final h1{font-size:3em;line-height:1em}.wpo-final a:hover{text-decoration:underline}#confetti{width:100%;height:100%;position:absolute;left:0;top:0;z-index:-999}@media (min-width:768px) and (max-width:991px){body.wpo-wcpdf-setup form{width:90%}}@media (max-width:767px){body{background:#fff!important}body.wpo-wcpdf-setup form{width:100%;padding-top:30px}.wpo-setup-card{box-shadow:none}.wpo-progress-bar{padding:0 0 25px 0}.wpo-setup-buttons,.wpo-setup-input,.wpo-step-description{width:100%;padding:15px 25px}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-skip-step{padding:.5em .8em}.wpo-progress-marker{height:28px;width:28px;font-size:.8em}#confetti{display:none}}
assets/js/confetti.js CHANGED
@@ -4,10 +4,7 @@ jQuery(document).ready(function($) {
4
  var DEG_TO_RAD = Math.PI / 180;
5
  var RAD_TO_DEG = 180 / Math.PI;
6
  var colors = [
7
- ["#df0049", "#660671"],
8
- ["#00e857", "#005291"],
9
- ["#2bebbc", "#05798a"],
10
- ["#ffd200", "#b06c00"]
11
  ];
12
 
13
  function Vector2(_x, _y) {
4
  var DEG_TO_RAD = Math.PI / 180;
5
  var RAD_TO_DEG = 180 / Math.PI;
6
  var colors = [
7
+ ["#771787", "#239bb9"],
 
 
 
8
  ];
9
 
10
  function Vector2(_x, _y) {
assets/js/confetti.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b=Math.PI,c=Math.sin,d=Math.cos,e=Math.round,f=Math.sqrt;function g(a,b){this.x=a,this.y=b,this.Length=function(){return f(this.SqrLength())},this.SqrLength=function(){return this.x*this.x+this.y*this.y},this.Equals=function(a,b){return a.x==b.x&&a.y==b.y},this.Add=function(a){this.x+=a.x,this.y+=a.y},this.Sub=function(a){this.x-=a.x,this.y-=a.y},this.Div=function(a){this.x/=a,this.y/=a},this.Mul=function(a){this.x*=a,this.y*=a},this.Normalize=function(){var a=this.SqrLength();if(0!=a){var b=1/f(a);this.x*=b,this.y*=b}},this.Normalized=function(){var a=this.SqrLength();if(0!=a){var b=1/f(a);return new g(this.x*b,this.y*b)}return new g(0,0)}}function h(a,b,c,d){this.position=new g(a,b),this.mass=c,this.drag=d,this.force=new g(0,0),this.velocity=new g(0,0),this.AddForce=function(a){this.force.Add(a)},this.Integrate=function(a){var b=this.CurrentForce(this.position);b.Div(this.mass);var c=new g(this.velocity.x,this.velocity.y);c.Mul(a),this.position.Add(c),b.Mul(a),this.velocity.Add(b),this.force=new g(0,0)},this.CurrentForce=function(){var a=new g(this.force.x,this.force.y),b=this.velocity.Length(),c=new g(this.velocity.x,this.velocity.y);return c.Mul(this.drag*this.mass*b),a.Sub(c),a}}function j(a,b){this.pos=new g(a,b),this.rotationSpeed=600*Math.random()+800,this.angle=360*(m*Math.random()),this.rotation=360*(m*Math.random()),this.cosA=1,this.size=5,this.oscillationSpeed=1.5*Math.random()+.5,this.xSpeed=40,this.ySpeed=60*Math.random()+50,this.corners=[],this.time=Math.random();var f=e(Math.random()*(n.length-1));this.frontColor=n[f][0],this.backColor=n[f][1];for(var h=0;4>h;h++){var k=d(this.angle+m*(90*h+45)),l=c(this.angle+m*(90*h+45));this.corners[h]=new g(k,l)}this.Update=function(a){this.time+=a,this.rotation+=this.rotationSpeed*a,this.cosA=d(m*this.rotation),this.pos.x+=d(this.time*this.oscillationSpeed)*this.xSpeed*a,this.pos.y+=this.ySpeed*a,this.pos.y>j.bounds.y&&(this.pos.x=Math.random()*j.bounds.x,this.pos.y=0)},this.Draw=function(a){a.fillStyle=0<this.cosA?this.frontColor:this.backColor,a.beginPath(),a.moveTo(this.pos.x+this.corners[0].x*this.size,this.pos.y+this.corners[0].y*this.size*this.cosA);for(var b=1;4>b;b++)a.lineTo(this.pos.x+this.corners[b].x*this.size,this.pos.y+this.corners[b].y*this.size*this.cosA);a.closePath(),a.fill()}}function k(a,b,j,l,o,p,q,r){this.particleDist=l,this.particleCount=j,this.particleMass=q,this.particleDrag=r,this.particles=[];var s=e(Math.random()*(n.length-1));this.frontColor=n[s][0],this.backColor=n[s][1],this.xOff=d(m*p)*o,this.yOff=c(m*p)*o,this.position=new g(a,b),this.prevPosition=new g(a,b),this.velocityInherit=2*Math.random()+4,this.time=100*Math.random(),this.oscillationSpeed=2*Math.random()+2,this.oscillationDistance=40*Math.random()+40,this.ySpeed=40*Math.random()+80;for(var t=0;t<this.particleCount;t++)this.particles[t]=new h(a,b-t*this.particleDist,this.particleMass,this.particleDrag);this.Update=function(a){var b=0;this.time+=a*this.oscillationSpeed,this.position.y+=this.ySpeed*a,this.position.x+=d(this.time)*this.oscillationDistance*a,this.particles[0].position=this.position;var c=this.prevPosition.x-this.position.x,e=this.prevPosition.y-this.position.y,h=f(c*c+e*e);for(this.prevPosition=new g(this.position.x,this.position.y),b=1;b<this.particleCount;b++){var j=g.Sub(this.particles[b-1].position,this.particles[b].position);j.Normalize(),j.Mul(h/a*this.velocityInherit),this.particles[b].AddForce(j)}for(b=1;b<this.particleCount;b++)this.particles[b].Integrate(a);for(b=1;b<this.particleCount;b++){var l=new g(this.particles[b].position.x,this.particles[b].position.y);l.Sub(this.particles[b-1].position),l.Normalize(),l.Mul(this.particleDist),l.Add(this.particles[b-1].position),this.particles[b].position=l}this.position.y>k.bounds.y+this.particleDist*this.particleCount&&this.Reset()},this.Reset=function(){this.position.y=-Math.random()*k.bounds.y,this.position.x=Math.random()*k.bounds.x,this.prevPosition=new g(this.position.x,this.position.y),this.velocityInherit=2*Math.random()+4,this.time=100*Math.random(),this.oscillationSpeed=2*Math.random()+1.5,this.oscillationDistance=40*Math.random()+40,this.ySpeed=40*Math.random()+80;var a=e(Math.random()*(n.length-1));this.frontColor=n[a][0],this.backColor=n[a][1],this.particles=[];for(var b=0;b<this.particleCount;b++)this.particles[b]=new h(this.position.x,this.position.y-b*this.particleDist,this.particleMass,this.particleDrag)},this.Draw=function(a){for(var b=0;b<this.particleCount-1;b++){var c=new g(this.particles[b].position.x+this.xOff,this.particles[b].position.y+this.yOff),d=new g(this.particles[b+1].position.x+this.xOff,this.particles[b+1].position.y+this.yOff);0>this.Side(this.particles[b].position.x,this.particles[b].position.y,this.particles[b+1].position.x,this.particles[b+1].position.y,d.x,d.y)?(a.fillStyle=this.frontColor,a.strokeStyle=this.frontColor):(a.fillStyle=this.backColor,a.strokeStyle=this.backColor),0==b?(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(.5*(this.particles[b+1].position.x+d.x),.5*(this.particles[b+1].position.y+d.y)),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(c.x,c.y),a.lineTo(.5*(this.particles[b+1].position.x+d.x),.5*(this.particles[b+1].position.y+d.y)),a.closePath(),a.stroke(),a.fill()):b==this.particleCount-2?(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(.5*(this.particles[b].position.x+c.x),.5*(this.particles[b].position.y+c.y)),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(c.x,c.y),a.lineTo(.5*(this.particles[b].position.x+c.x),.5*(this.particles[b].position.y+c.y)),a.closePath(),a.stroke(),a.fill()):(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(d.x,d.y),a.lineTo(c.x,c.y),a.closePath(),a.stroke(),a.fill())}},this.Side=function(a,b,c,d,e,f){return(a-c)*(f-d)-(b-d)*(e-c)}}var l=1/30,m=b/180,n=[["#df0049","#660671"],["#00e857","#005291"],["#2bebbc","#05798a"],["#ffd200","#b06c00"]];g.Lerp=function(a,b,c){return new g((b.x-a.x)*c+a.x,(b.y-a.y)*c+a.y)},g.Distance=function(a,b){return f(g.SqrDistance(a,b))},g.SqrDistance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d+z*z},g.Scale=function(a,b){return new g(a.x*b.x,a.y*b.y)},g.Min=function(a,b){var c=Math.min;return new g(c(a.x,b.x),c(a.y,b.y))},g.Max=function(a,b){var c=Math.max;return new g(c(a.x,b.x),c(a.y,b.y))},g.ClampMagnitude=function(a,b){var c=a.Normalized;return new g(c.x*b,c.y*b)},g.Sub=function(a,b){return new g(a.x-b.x,a.y-b.y,a.z-b.z)},j.bounds=new g(0,0),k.bounds=new g(0,0),o={},o.Context=function(a){var b=0,c=document.getElementById(a),d=document.createElement("canvas");d.width=c.offsetWidth,d.height=c.offsetHeight,c.appendChild(d);var e=d.getContext("2d"),f=7,h=[];for(k.bounds=new g(d.width,d.height),b=0;b<f;b++)h[b]=new k(Math.random()*d.width,2*(-Math.random()*d.height),30,8,8,45,1,.05);var m=[];for(j.bounds=new g(d.width,d.height),b=0;b<25;b++)m[b]=new j(Math.random()*d.width,Math.random()*d.height);this.resize=function(){d.width=c.offsetWidth,d.height=c.offsetHeight,j.bounds=new g(d.width,d.height),k.bounds=new g(d.width,d.height)},this.start=function(){this.stop();this;this.interval=setInterval(function(){o.update()},1e3/30)},this.stop=function(){clearInterval(this.interval)},this.update=function(){var a=0;for(e.clearRect(0,0,d.width,d.height),a=0;a<25;a++)m[a].Update(l),m[a].Draw(e);for(a=0;a<f;a++)h[a].Update(l),h[a].Draw(e)}};var o=new o.Context("confetti");o.start(),a(window).resize(function(){o.resize()})});
1
+ jQuery(document).ready(function(a){var b=Math.PI,c=Math.sin,d=Math.cos,e=Math.round,f=Math.sqrt;function g(a,b){this.x=a,this.y=b,this.Length=function(){return f(this.SqrLength())},this.SqrLength=function(){return this.x*this.x+this.y*this.y},this.Equals=function(a,b){return a.x==b.x&&a.y==b.y},this.Add=function(a){this.x+=a.x,this.y+=a.y},this.Sub=function(a){this.x-=a.x,this.y-=a.y},this.Div=function(a){this.x/=a,this.y/=a},this.Mul=function(a){this.x*=a,this.y*=a},this.Normalize=function(){var a=this.SqrLength();if(0!=a){var b=1/f(a);this.x*=b,this.y*=b}},this.Normalized=function(){var a=this.SqrLength();if(0!=a){var b=1/f(a);return new g(this.x*b,this.y*b)}return new g(0,0)}}function h(a,b,c,d){this.position=new g(a,b),this.mass=c,this.drag=d,this.force=new g(0,0),this.velocity=new g(0,0),this.AddForce=function(a){this.force.Add(a)},this.Integrate=function(a){var b=this.CurrentForce(this.position);b.Div(this.mass);var c=new g(this.velocity.x,this.velocity.y);c.Mul(a),this.position.Add(c),b.Mul(a),this.velocity.Add(b),this.force=new g(0,0)},this.CurrentForce=function(){var a=new g(this.force.x,this.force.y),b=this.velocity.Length(),c=new g(this.velocity.x,this.velocity.y);return c.Mul(this.drag*this.mass*b),a.Sub(c),a}}function j(a,b){this.pos=new g(a,b),this.rotationSpeed=600*Math.random()+800,this.angle=360*(m*Math.random()),this.rotation=360*(m*Math.random()),this.cosA=1,this.size=5,this.oscillationSpeed=1.5*Math.random()+.5,this.xSpeed=40,this.ySpeed=60*Math.random()+50,this.corners=[],this.time=Math.random();var f=e(Math.random()*(n.length-1));this.frontColor=n[f][0],this.backColor=n[f][1];for(var h=0;4>h;h++){var k=d(this.angle+m*(90*h+45)),l=c(this.angle+m*(90*h+45));this.corners[h]=new g(k,l)}this.Update=function(a){this.time+=a,this.rotation+=this.rotationSpeed*a,this.cosA=d(m*this.rotation),this.pos.x+=d(this.time*this.oscillationSpeed)*this.xSpeed*a,this.pos.y+=this.ySpeed*a,this.pos.y>j.bounds.y&&(this.pos.x=Math.random()*j.bounds.x,this.pos.y=0)},this.Draw=function(a){a.fillStyle=0<this.cosA?this.frontColor:this.backColor,a.beginPath(),a.moveTo(this.pos.x+this.corners[0].x*this.size,this.pos.y+this.corners[0].y*this.size*this.cosA);for(var b=1;4>b;b++)a.lineTo(this.pos.x+this.corners[b].x*this.size,this.pos.y+this.corners[b].y*this.size*this.cosA);a.closePath(),a.fill()}}function k(a,b,j,l,o,p,q,r){this.particleDist=l,this.particleCount=j,this.particleMass=q,this.particleDrag=r,this.particles=[];var s=e(Math.random()*(n.length-1));this.frontColor=n[s][0],this.backColor=n[s][1],this.xOff=d(m*p)*o,this.yOff=c(m*p)*o,this.position=new g(a,b),this.prevPosition=new g(a,b),this.velocityInherit=2*Math.random()+4,this.time=100*Math.random(),this.oscillationSpeed=2*Math.random()+2,this.oscillationDistance=40*Math.random()+40,this.ySpeed=40*Math.random()+80;for(var t=0;t<this.particleCount;t++)this.particles[t]=new h(a,b-t*this.particleDist,this.particleMass,this.particleDrag);this.Update=function(a){var b=0;this.time+=a*this.oscillationSpeed,this.position.y+=this.ySpeed*a,this.position.x+=d(this.time)*this.oscillationDistance*a,this.particles[0].position=this.position;var c=this.prevPosition.x-this.position.x,e=this.prevPosition.y-this.position.y,h=f(c*c+e*e);for(this.prevPosition=new g(this.position.x,this.position.y),b=1;b<this.particleCount;b++){var j=g.Sub(this.particles[b-1].position,this.particles[b].position);j.Normalize(),j.Mul(h/a*this.velocityInherit),this.particles[b].AddForce(j)}for(b=1;b<this.particleCount;b++)this.particles[b].Integrate(a);for(b=1;b<this.particleCount;b++){var l=new g(this.particles[b].position.x,this.particles[b].position.y);l.Sub(this.particles[b-1].position),l.Normalize(),l.Mul(this.particleDist),l.Add(this.particles[b-1].position),this.particles[b].position=l}this.position.y>k.bounds.y+this.particleDist*this.particleCount&&this.Reset()},this.Reset=function(){this.position.y=-Math.random()*k.bounds.y,this.position.x=Math.random()*k.bounds.x,this.prevPosition=new g(this.position.x,this.position.y),this.velocityInherit=2*Math.random()+4,this.time=100*Math.random(),this.oscillationSpeed=2*Math.random()+1.5,this.oscillationDistance=40*Math.random()+40,this.ySpeed=40*Math.random()+80;var a=e(Math.random()*(n.length-1));this.frontColor=n[a][0],this.backColor=n[a][1],this.particles=[];for(var b=0;b<this.particleCount;b++)this.particles[b]=new h(this.position.x,this.position.y-b*this.particleDist,this.particleMass,this.particleDrag)},this.Draw=function(a){for(var b=0;b<this.particleCount-1;b++){var c=new g(this.particles[b].position.x+this.xOff,this.particles[b].position.y+this.yOff),d=new g(this.particles[b+1].position.x+this.xOff,this.particles[b+1].position.y+this.yOff);0>this.Side(this.particles[b].position.x,this.particles[b].position.y,this.particles[b+1].position.x,this.particles[b+1].position.y,d.x,d.y)?(a.fillStyle=this.frontColor,a.strokeStyle=this.frontColor):(a.fillStyle=this.backColor,a.strokeStyle=this.backColor),0==b?(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(.5*(this.particles[b+1].position.x+d.x),.5*(this.particles[b+1].position.y+d.y)),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(c.x,c.y),a.lineTo(.5*(this.particles[b+1].position.x+d.x),.5*(this.particles[b+1].position.y+d.y)),a.closePath(),a.stroke(),a.fill()):b==this.particleCount-2?(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(.5*(this.particles[b].position.x+c.x),.5*(this.particles[b].position.y+c.y)),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(c.x,c.y),a.lineTo(.5*(this.particles[b].position.x+c.x),.5*(this.particles[b].position.y+c.y)),a.closePath(),a.stroke(),a.fill()):(a.beginPath(),a.moveTo(this.particles[b].position.x,this.particles[b].position.y),a.lineTo(this.particles[b+1].position.x,this.particles[b+1].position.y),a.lineTo(d.x,d.y),a.lineTo(c.x,c.y),a.closePath(),a.stroke(),a.fill())}},this.Side=function(a,b,c,d,e,f){return(a-c)*(f-d)-(b-d)*(e-c)}}var l=1/30,m=b/180,n=[["#771787","#239bb9"]];g.Lerp=function(a,b,c){return new g((b.x-a.x)*c+a.x,(b.y-a.y)*c+a.y)},g.Distance=function(a,b){return f(g.SqrDistance(a,b))},g.SqrDistance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d+z*z},g.Scale=function(a,b){return new g(a.x*b.x,a.y*b.y)},g.Min=function(a,b){var c=Math.min;return new g(c(a.x,b.x),c(a.y,b.y))},g.Max=function(a,b){var c=Math.max;return new g(c(a.x,b.x),c(a.y,b.y))},g.ClampMagnitude=function(a,b){var c=a.Normalized;return new g(c.x*b,c.y*b)},g.Sub=function(a,b){return new g(a.x-b.x,a.y-b.y,a.z-b.z)},j.bounds=new g(0,0),k.bounds=new g(0,0),o={},o.Context=function(a){var b=0,c=document.getElementById(a),d=document.createElement("canvas");d.width=c.offsetWidth,d.height=c.offsetHeight,c.appendChild(d);var e=d.getContext("2d"),f=7,h=[];for(k.bounds=new g(d.width,d.height),b=0;b<f;b++)h[b]=new k(Math.random()*d.width,2*(-Math.random()*d.height),30,8,8,45,1,.05);var m=[];for(j.bounds=new g(d.width,d.height),b=0;b<25;b++)m[b]=new j(Math.random()*d.width,Math.random()*d.height);this.resize=function(){d.width=c.offsetWidth,d.height=c.offsetHeight,j.bounds=new g(d.width,d.height),k.bounds=new g(d.width,d.height)},this.start=function(){this.stop();this;this.interval=setInterval(function(){o.update()},1e3/30)},this.stop=function(){clearInterval(this.interval)},this.update=function(){var a=0;for(e.clearRect(0,0,d.width,d.height),a=0;a<25;a++)m[a].Update(l),m[a].Draw(e);for(a=0;a<f;a++)h[a].Update(l),h[a].Draw(e)}};var o=new o.Context("confetti");o.start(),a(window).resize(function(){o.resize()})});
composer.lock CHANGED
@@ -8,16 +8,16 @@
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
- "version": "v1.2.0",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
- "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/60b704331479a69e9bcdb3496da2315b5c4f94fd",
20
- "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd",
21
  "shasum": ""
22
  },
23
  "require": {
@@ -69,9 +69,9 @@
69
  "homepage": "https://github.com/dompdf/dompdf",
70
  "support": {
71
  "issues": "https://github.com/dompdf/dompdf/issues",
72
- "source": "https://github.com/dompdf/dompdf/tree/v1.2.0"
73
  },
74
- "time": "2022-02-07T13:02:10+00:00"
75
  },
76
  {
77
  "name": "phenx/php-font-lib",
@@ -119,25 +119,25 @@
119
  },
120
  {
121
  "name": "phenx/php-svg-lib",
122
- "version": "0.4.0",
123
  "source": {
124
  "type": "git",
125
  "url": "https://github.com/dompdf/php-svg-lib.git",
126
- "reference": "3ffbbb037f0871c3a819e90cff8b36dd7e656189"
127
  },
128
  "dist": {
129
  "type": "zip",
130
- "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/3ffbbb037f0871c3a819e90cff8b36dd7e656189",
131
- "reference": "3ffbbb037f0871c3a819e90cff8b36dd7e656189",
132
  "shasum": ""
133
  },
134
  "require": {
135
  "ext-mbstring": "*",
136
- "php": "^7.4 || ^8.0",
137
  "sabberworm/php-css-parser": "^8.4"
138
  },
139
  "require-dev": {
140
- "phpunit/phpunit": "^9.5"
141
  },
142
  "type": "library",
143
  "autoload": {
@@ -159,9 +159,9 @@
159
  "homepage": "https://github.com/PhenX/php-svg-lib",
160
  "support": {
161
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
162
- "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.0"
163
  },
164
- "time": "2021-12-17T14:08:35+00:00"
165
  },
166
  {
167
  "name": "sabberworm/php-css-parser",
@@ -327,12 +327,12 @@
327
  }
328
  },
329
  "autoload": {
330
- "psr-4": {
331
- "Symfony\\Polyfill\\Mbstring\\": ""
332
- },
333
  "files": [
334
  "bootstrap.php"
335
- ]
 
 
 
336
  },
337
  "notification-url": "https://packagist.org/downloads/",
338
  "license": [
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
+ "version": "v1.2.1",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
+ "reference": "c6dfd9bb8b0040609f04754f729d4cb3016e0575"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c6dfd9bb8b0040609f04754f729d4cb3016e0575",
20
+ "reference": "c6dfd9bb8b0040609f04754f729d4cb3016e0575",
21
  "shasum": ""
22
  },
23
  "require": {
69
  "homepage": "https://github.com/dompdf/dompdf",
70
  "support": {
71
  "issues": "https://github.com/dompdf/dompdf/issues",
72
+ "source": "https://github.com/dompdf/dompdf/tree/v1.2.1"
73
  },
74
+ "time": "2022-03-24T12:57:42+00:00"
75
  },
76
  {
77
  "name": "phenx/php-font-lib",
119
  },
120
  {
121
  "name": "phenx/php-svg-lib",
122
+ "version": "0.4.1",
123
  "source": {
124
  "type": "git",
125
  "url": "https://github.com/dompdf/php-svg-lib.git",
126
+ "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02"
127
  },
128
  "dist": {
129
  "type": "zip",
130
+ "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02",
131
+ "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02",
132
  "shasum": ""
133
  },
134
  "require": {
135
  "ext-mbstring": "*",
136
+ "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0",
137
  "sabberworm/php-css-parser": "^8.4"
138
  },
139
  "require-dev": {
140
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
141
  },
142
  "type": "library",
143
  "autoload": {
159
  "homepage": "https://github.com/PhenX/php-svg-lib",
160
  "support": {
161
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
162
+ "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1"
163
  },
164
+ "time": "2022-03-07T12:52:04+00:00"
165
  },
166
  {
167
  "name": "sabberworm/php-css-parser",
327
  }
328
  },
329
  "autoload": {
 
 
 
330
  "files": [
331
  "bootstrap.php"
332
+ ],
333
+ "psr-4": {
334
+ "Symfony\\Polyfill\\Mbstring\\": ""
335
+ }
336
  },
337
  "notification-url": "https://packagist.org/downloads/",
338
  "license": [
includes/class-wcpdf-main.php CHANGED
@@ -68,10 +68,13 @@ class Main {
68
  */
69
  public function attach_pdf_to_email ( $attachments, $email_id, $order, $email = null ) {
70
  // check if all variables properly set
71
- if ( !is_object( $order ) || !isset( $email_id ) ) {
72
  return $attachments;
73
  }
74
 
 
 
 
75
  // Skip User emails
76
  if ( get_class( $order ) == 'WP_User' ) {
77
  return $attachments;
@@ -84,7 +87,7 @@ class Main {
84
  }
85
 
86
  // WooCommerce Booking compatibility
87
- if ( get_post_type( $order_id ) == 'wc_booking' && isset($order->order) ) {
88
  // $order is actually a WC_Booking object!
89
  $order = $order->order;
90
  $order_id = WCX_Order::get_id( $order );
@@ -96,11 +99,11 @@ class Main {
96
  }
97
 
98
  // final check on order object
99
- if ( ! ( $order instanceof \WC_Order || is_subclass_of( $order, '\WC_Abstract_Order') ) ) {
100
  return $attachments;
101
  }
102
 
103
- $tmp_path = $this->get_tmp_path('attachments');
104
  if ( ! @is_dir( $tmp_path ) || ! wp_is_writable( $tmp_path ) ) {
105
  return $attachments;
106
  }
@@ -132,7 +135,7 @@ class Main {
132
  // we use ID to force to reloading the order to make sure that all meta data is up to date.
133
  // this is especially important when multiple emails with the PDF document are sent in the same session
134
  $document = wcpdf_get_document( $document_type, (array) $email_order_id, true );
135
- if ( !$document ) { // something went wrong, continue trying with other documents
136
  continue;
137
  }
138
  $filename = $document->get_filename();
@@ -142,9 +145,9 @@ class Main {
142
 
143
  // if this file already exists in the temp path, we'll reuse it if it's not older than 60 seconds
144
  $max_reuse_age = apply_filters( 'wpo_wcpdf_reuse_attachment_age', 60 );
145
- if ( file_exists($pdf_path) && $max_reuse_age > 0 ) {
146
  // get last modification date
147
- if ($filemtime = filemtime($pdf_path)) {
148
  $time_difference = time() - $filemtime;
149
  if ( $time_difference < $max_reuse_age ) {
150
  // check if file is still being written to
68
  */
69
  public function attach_pdf_to_email ( $attachments, $email_id, $order, $email = null ) {
70
  // check if all variables properly set
71
+ if ( ! is_object( $order ) || ! isset( $email_id ) ) {
72
  return $attachments;
73
  }
74
 
75
+ // allow third party emails to swap the order object
76
+ $order = apply_filters( 'wpo_wcpdf_email_order_object', $order, $email_id, $email );
77
+
78
  // Skip User emails
79
  if ( get_class( $order ) == 'WP_User' ) {
80
  return $attachments;
87
  }
88
 
89
  // WooCommerce Booking compatibility
90
+ if ( get_post_type( $order_id ) == 'wc_booking' && isset( $order->order ) ) {
91
  // $order is actually a WC_Booking object!
92
  $order = $order->order;
93
  $order_id = WCX_Order::get_id( $order );
99
  }
100
 
101
  // final check on order object
102
+ if ( ! ( $order instanceof \WC_Order || is_subclass_of( $order, '\WC_Abstract_Order' ) ) ) {
103
  return $attachments;
104
  }
105
 
106
+ $tmp_path = $this->get_tmp_path( 'attachments' );
107
  if ( ! @is_dir( $tmp_path ) || ! wp_is_writable( $tmp_path ) ) {
108
  return $attachments;
109
  }
135
  // we use ID to force to reloading the order to make sure that all meta data is up to date.
136
  // this is especially important when multiple emails with the PDF document are sent in the same session
137
  $document = wcpdf_get_document( $document_type, (array) $email_order_id, true );
138
+ if ( ! $document ) { // something went wrong, continue trying with other documents
139
  continue;
140
  }
141
  $filename = $document->get_filename();
145
 
146
  // if this file already exists in the temp path, we'll reuse it if it's not older than 60 seconds
147
  $max_reuse_age = apply_filters( 'wpo_wcpdf_reuse_attachment_age', 60 );
148
+ if ( file_exists( $pdf_path ) && $max_reuse_age > 0 ) {
149
  // get last modification date
150
+ if ($filemtime = filemtime( $pdf_path )) {
151
  $time_difference = time() - $filemtime;
152
  if ( $time_difference < $max_reuse_age ) {
153
  // check if file is still being written to
includes/class-wcpdf-setup-wizard.php CHANGED
@@ -154,13 +154,13 @@ class Setup_Wizard {
154
  <h1 class="wpo-plugin-title"><?php esc_html_e( 'PDF Invoices & Packing Slips', 'woocommerce-pdf-invoices-packing-slips' ); ?></h1>
155
  <ol class="wpo-progress-bar">
156
  <?php foreach ( $output_steps as $step_key => $step ) : ?>
157
- <a href="<?php echo esc_attr( $this->get_step_link( $step_key ) ); ?>" ><li><div class="wpo-progress-marker <?php
158
  if ( $step_key === $this->step ) {
159
  echo 'active';
160
  } elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
161
  echo 'completed';
162
  }
163
- ?>"></div></li></a>
164
  <?php endforeach; ?>
165
  </ol>
166
  <?php
@@ -240,7 +240,9 @@ class Setup_Wizard {
240
  } else {
241
  $sanitize_function = 'sanitize_text_field';
242
  }
243
-
 
 
244
  if ( is_array( $value ) ) {
245
  $settings[$key] = array_map( $sanitize_function, $value );
246
  } else {
154
  <h1 class="wpo-plugin-title"><?php esc_html_e( 'PDF Invoices & Packing Slips', 'woocommerce-pdf-invoices-packing-slips' ); ?></h1>
155
  <ol class="wpo-progress-bar">
156
  <?php foreach ( $output_steps as $step_key => $step ) : ?>
157
+ <li class="<?php
158
  if ( $step_key === $this->step ) {
159
  echo 'active';
160
  } elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
161
  echo 'completed';
162
  }
163
+ ?>"><a href="<?php echo esc_attr( $this->get_step_link( $step_key ) ); ?>" ><div class="wpo-progress-marker"></div></a></li>
164
  <?php endforeach; ?>
165
  </ol>
166
  <?php
240
  } else {
241
  $sanitize_function = 'sanitize_text_field';
242
  }
243
+
244
+ $value = stripslashes_deep( $value );
245
+
246
  if ( is_array( $value ) ) {
247
  $settings[$key] = array_map( $sanitize_function, $value );
248
  } else {
includes/views/setup-wizard/attach-to.php CHANGED
@@ -20,10 +20,10 @@
20
  '<tr>
21
  <th>
22
  <input type="hidden" value="" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]">
23
- <input type="checkbox" %3$s name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]" value="1">
24
  </th>
25
  <td>
26
- <span class="checkbox">%2$s</span><br>
27
  </td>
28
  </tr>',
29
  esc_attr( $email_id ),
20
  '<tr>
21
  <th>
22
  <input type="hidden" value="" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]">
23
+ <input id="%1$s" type="checkbox" %3$s name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]" value="1">
24
  </th>
25
  <td>
26
+ <label for="%1$s" class="checkbox">%2$s</label>
27
  </td>
28
  </tr>',
29
  esc_attr( $email_id ),
includes/views/setup-wizard/display-options.php CHANGED
@@ -11,46 +11,46 @@
11
  <tr>
12
  <th>
13
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="">
14
- <input type="checkbox" <?php echo ! empty( $current_settings['display_shipping_address'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="1">
15
  </th>
16
  <td>
17
- <span class="checkbox"><?php esc_html_e( 'Display shipping address', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
18
  </td>
19
  </tr>
20
  <tr>
21
  <th>
22
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="">
23
- <input type="checkbox" <?php echo ! empty( $current_settings['display_email'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="1">
24
  </th>
25
  <td>
26
- <span class="checkbox"><?php esc_html_e( 'Display email address', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
27
  </td>
28
  </tr>
29
  <tr>
30
  <th>
31
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="">
32
- <input type="checkbox" <?php echo ! empty( $current_settings['display_phone'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="1">
33
  </th>
34
  <td>
35
- <span class="checkbox"><?php esc_html_e( 'Display phone number', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
36
  </td>
37
  </tr>
38
  <tr>
39
  <th>
40
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="">
41
- <input type="checkbox" <?php echo ! empty( $current_settings['display_date'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="invoice_date">
42
  </th>
43
  <td>
44
- <span class="checkbox"><?php esc_html_e( 'Display invoice date', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
45
  </td>
46
  <tr>
47
  </tr>
48
  <th>
49
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="">
50
- <input type="checkbox" <?php echo ! empty( $current_settings['display_number'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="invoice_number">
51
  </th>
52
  <td>
53
- <span class="checkbox"><?php esc_html_e( 'Display invoice number', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
54
  </td>
55
  </tr>
56
  </table>
11
  <tr>
12
  <th>
13
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="">
14
+ <input id="display-shipping-address" type="checkbox" <?php echo ! empty( $current_settings['display_shipping_address'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="1">
15
  </th>
16
  <td>
17
+ <label for="display-shipping-address" class="checkbox"><?php esc_html_e( 'Display shipping address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
18
  </td>
19
  </tr>
20
  <tr>
21
  <th>
22
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="">
23
+ <input id="display-email" type="checkbox" <?php echo ! empty( $current_settings['display_email'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="1">
24
  </th>
25
  <td>
26
+ <label for="display-email" class="checkbox"><?php esc_html_e( 'Display email address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
27
  </td>
28
  </tr>
29
  <tr>
30
  <th>
31
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="">
32
+ <input id="display-phone" type="checkbox" <?php echo ! empty( $current_settings['display_phone'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="1">
33
  </th>
34
  <td>
35
+ <label for="display-phone" class="checkbox"><?php esc_html_e( 'Display phone number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
36
  </td>
37
  </tr>
38
  <tr>
39
  <th>
40
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="">
41
+ <input id="display-date" type="checkbox" <?php echo ! empty( $current_settings['display_date'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="invoice_date">
42
  </th>
43
  <td>
44
+ <label for="display-date" class="checkbox"><?php esc_html_e( 'Display invoice date', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
45
  </td>
46
  <tr>
47
  </tr>
48
  <th>
49
  <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="">
50
+ <input id="display-number" type="checkbox" <?php echo ! empty( $current_settings['display_number'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="invoice_number">
51
  </th>
52
  <td>
53
+ <label for="display-number" class="checkbox"><?php esc_html_e( 'Display invoice number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
54
  </td>
55
  </tr>
56
  </table>
includes/views/setup-wizard/show-action-buttons.php CHANGED
@@ -15,5 +15,5 @@
15
  if ( in_array( 'wc_actions', $hidden ) )
16
  $actions = false
17
  ?>
18
- <input type="checkbox" <?php echo $actions !== false ? 'checked' : ''; ?> name="wc_show_action_buttons" value="1"><span class="checkbox"><?php esc_html_e( 'Show action buttons', 'woocommerce-pdf-invoices-packing-slips' ); ?></span><br>
19
  </div>
15
  if ( in_array( 'wc_actions', $hidden ) )
16
  $actions = false
17
  ?>
18
+ <input id="show-action-buttons" type="checkbox" <?php echo $actions !== false ? 'checked' : ''; ?> name="wc_show_action_buttons" value="1"><label for="show-action-buttons" class="checkbox"><?php esc_html_e( 'Show action buttons', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
19
  </div>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
5
  Requires at least: 3.5
6
  Tested up to: 5.9
7
  Requires PHP: 7.1
8
- Stable tag: 2.14.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,13 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
105
  = 2.14.1 =
106
  * New: Relaunch the Setup Wizard manually from the Status tab
107
  * Fix: Dynamic `wpo_wcpdf_tmp_path_{$type}` filter hook name parsing
5
  Requires at least: 3.5
6
  Tested up to: 5.9
7
  Requires PHP: 7.1
8
+ Stable tag: 2.14.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.14.2 =
106
+ * Fix: unescape text strings entered in the setup wizard
107
+ * Dev: New filter wpo_wcpdf_email_order_object
108
+ * UI: Update setup wizard layout
109
+ * Libraries: updated dompdf to 1.2.1 (addressing potential security vulnerability)
110
+ * Marked tested up to WooCommerce 6.4
111
+
112
  = 2.14.1 =
113
  * New: Relaunch the Setup Wizard manually from the Status tab
114
  * Fix: Dynamic `wpo_wcpdf_tmp_path_{$type}` filter hook name parsing
vendor/composer/installed.json CHANGED
@@ -2,17 +2,17 @@
2
  "packages": [
3
  {
4
  "name": "dompdf/dompdf",
5
- "version": "v1.2.0",
6
- "version_normalized": "1.2.0.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/dompdf/dompdf.git",
10
- "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd"
11
  },
12
  "dist": {
13
  "type": "zip",
14
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/60b704331479a69e9bcdb3496da2315b5c4f94fd",
15
- "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd",
16
  "shasum": ""
17
  },
18
  "require": {
@@ -33,7 +33,7 @@
33
  "ext-imagick": "Improves image processing performance",
34
  "ext-zlib": "Needed for pdf stream compression"
35
  },
36
- "time": "2022-02-07T13:02:10+00:00",
37
  "type": "library",
38
  "installation-source": "dist",
39
  "autoload": {
@@ -66,7 +66,7 @@
66
  "homepage": "https://github.com/dompdf/dompdf",
67
  "support": {
68
  "issues": "https://github.com/dompdf/dompdf/issues",
69
- "source": "https://github.com/dompdf/dompdf/tree/v1.2.0"
70
  },
71
  "install-path": "../dompdf/dompdf"
72
  },
@@ -119,28 +119,28 @@
119
  },
120
  {
121
  "name": "phenx/php-svg-lib",
122
- "version": "0.4.0",
123
- "version_normalized": "0.4.0.0",
124
  "source": {
125
  "type": "git",
126
  "url": "https://github.com/dompdf/php-svg-lib.git",
127
- "reference": "3ffbbb037f0871c3a819e90cff8b36dd7e656189"
128
  },
129
  "dist": {
130
  "type": "zip",
131
- "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/3ffbbb037f0871c3a819e90cff8b36dd7e656189",
132
- "reference": "3ffbbb037f0871c3a819e90cff8b36dd7e656189",
133
  "shasum": ""
134
  },
135
  "require": {
136
  "ext-mbstring": "*",
137
- "php": "^7.4 || ^8.0",
138
  "sabberworm/php-css-parser": "^8.4"
139
  },
140
  "require-dev": {
141
- "phpunit/phpunit": "^9.5"
142
  },
143
- "time": "2021-12-17T14:08:35+00:00",
144
  "type": "library",
145
  "installation-source": "dist",
146
  "autoload": {
@@ -162,7 +162,7 @@
162
  "homepage": "https://github.com/PhenX/php-svg-lib",
163
  "support": {
164
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
165
- "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.0"
166
  },
167
  "install-path": "../phenx/php-svg-lib"
168
  },
2
  "packages": [
3
  {
4
  "name": "dompdf/dompdf",
5
+ "version": "v1.2.1",
6
+ "version_normalized": "1.2.1.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/dompdf/dompdf.git",
10
+ "reference": "c6dfd9bb8b0040609f04754f729d4cb3016e0575"
11
  },
12
  "dist": {
13
  "type": "zip",
14
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c6dfd9bb8b0040609f04754f729d4cb3016e0575",
15
+ "reference": "c6dfd9bb8b0040609f04754f729d4cb3016e0575",
16
  "shasum": ""
17
  },
18
  "require": {
33
  "ext-imagick": "Improves image processing performance",
34
  "ext-zlib": "Needed for pdf stream compression"
35
  },
36
+ "time": "2022-03-24T12:57:42+00:00",
37
  "type": "library",
38
  "installation-source": "dist",
39
  "autoload": {
66
  "homepage": "https://github.com/dompdf/dompdf",
67
  "support": {
68
  "issues": "https://github.com/dompdf/dompdf/issues",
69
+ "source": "https://github.com/dompdf/dompdf/tree/v1.2.1"
70
  },
71
  "install-path": "../dompdf/dompdf"
72
  },
119
  },
120
  {
121
  "name": "phenx/php-svg-lib",
122
+ "version": "0.4.1",
123
+ "version_normalized": "0.4.1.0",
124
  "source": {
125
  "type": "git",
126
  "url": "https://github.com/dompdf/php-svg-lib.git",
127
+ "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02"
128
  },
129
  "dist": {
130
  "type": "zip",
131
+ "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02",
132
+ "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02",
133
  "shasum": ""
134
  },
135
  "require": {
136
  "ext-mbstring": "*",
137
+ "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0",
138
  "sabberworm/php-css-parser": "^8.4"
139
  },
140
  "require-dev": {
141
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
142
  },
143
+ "time": "2022-03-07T12:52:04+00:00",
144
  "type": "library",
145
  "installation-source": "dist",
146
  "autoload": {
162
  "homepage": "https://github.com/PhenX/php-svg-lib",
163
  "support": {
164
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
165
+ "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1"
166
  },
167
  "install-path": "../phenx/php-svg-lib"
168
  },
vendor/composer/installed.php CHANGED
@@ -1,31 +1,31 @@
1
  <?php return array(
2
  'root' => array(
3
- 'pretty_version' => 'dev-master',
4
- 'version' => 'dev-master',
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '655ed247e8fdfed995edd036e8ae37cc61e08b3a',
9
  'name' => '__root__',
10
  'dev' => true,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
14
- 'pretty_version' => 'dev-master',
15
- 'version' => 'dev-master',
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '655ed247e8fdfed995edd036e8ae37cc61e08b3a',
20
  'dev_requirement' => false,
21
  ),
22
  'dompdf/dompdf' => array(
23
- 'pretty_version' => 'v1.2.0',
24
- 'version' => '1.2.0.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../dompdf/dompdf',
27
  'aliases' => array(),
28
- 'reference' => '60b704331479a69e9bcdb3496da2315b5c4f94fd',
29
  'dev_requirement' => false,
30
  ),
31
  'phenx/php-font-lib' => array(
@@ -38,12 +38,12 @@
38
  'dev_requirement' => false,
39
  ),
40
  'phenx/php-svg-lib' => array(
41
- 'pretty_version' => '0.4.0',
42
- 'version' => '0.4.0.0',
43
  'type' => 'library',
44
  'install_path' => __DIR__ . '/../phenx/php-svg-lib',
45
  'aliases' => array(),
46
- 'reference' => '3ffbbb037f0871c3a819e90cff8b36dd7e656189',
47
  'dev_requirement' => false,
48
  ),
49
  'sabberworm/php-css-parser' => array(
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => 'dev-main',
4
+ 'version' => 'dev-main',
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'f5f9abd4ed6c1c1a1d6b4ff713be78d443666511',
9
  'name' => '__root__',
10
  'dev' => true,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
14
+ 'pretty_version' => 'dev-main',
15
+ 'version' => 'dev-main',
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => 'f5f9abd4ed6c1c1a1d6b4ff713be78d443666511',
20
  'dev_requirement' => false,
21
  ),
22
  'dompdf/dompdf' => array(
23
+ 'pretty_version' => 'v1.2.1',
24
+ 'version' => '1.2.1.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../dompdf/dompdf',
27
  'aliases' => array(),
28
+ 'reference' => 'c6dfd9bb8b0040609f04754f729d4cb3016e0575',
29
  'dev_requirement' => false,
30
  ),
31
  'phenx/php-font-lib' => array(
38
  'dev_requirement' => false,
39
  ),
40
  'phenx/php-svg-lib' => array(
41
+ 'pretty_version' => '0.4.1',
42
+ 'version' => '0.4.1.0',
43
  'type' => 'library',
44
  'install_path' => __DIR__ . '/../phenx/php-svg-lib',
45
  'aliases' => array(),
46
+ 'reference' => '4498b5df7b08e8469f0f8279651ea5de9626ed02',
47
  'dev_requirement' => false,
48
  ),
49
  'sabberworm/php-css-parser' => array(
vendor/dompdf/dompdf/README.md CHANGED
@@ -1,10 +1,9 @@
1
  Dompdf
2
  ======
3
 
4
- [![Build Status](https://travis-ci.org/dompdf/dompdf.png?branch=master)](https://travis-ci.org/dompdf/dompdf)
5
- [![Latest Stable Version](https://poser.pugx.org/dompdf/dompdf/v/stable.png)](https://packagist.org/packages/dompdf/dompdf)
6
  [![Total Downloads](https://poser.pugx.org/dompdf/dompdf/downloads.png)](https://packagist.org/packages/dompdf/dompdf)
7
- [![Latest Unstable Version](https://poser.pugx.org/dompdf/dompdf/v/unstable.png)](https://packagist.org/packages/dompdf/dompdf)
8
  [![License](https://poser.pugx.org/dompdf/dompdf/license.png)](https://packagist.org/packages/dompdf/dompdf)
9
 
10
  **Dompdf is an HTML to PDF converter**
1
  Dompdf
2
  ======
3
 
4
+ [![Build Status](https://github.com/dompdf/dompdf/actions/workflows/test.yml/badge.svg)](https://github.com/dompdf/dompdf/actions/workflows/test.yml)
5
+ [![Latest Release](https://poser.pugx.org/dompdf/dompdf/v/stable.png)](https://packagist.org/packages/dompdf/dompdf)
6
  [![Total Downloads](https://poser.pugx.org/dompdf/dompdf/downloads.png)](https://packagist.org/packages/dompdf/dompdf)
 
7
  [![License](https://poser.pugx.org/dompdf/dompdf/license.png)](https://packagist.org/packages/dompdf/dompdf)
8
 
9
  **Dompdf is an HTML to PDF converter**
vendor/dompdf/dompdf/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
vendor/dompdf/dompdf/src/Css/AttributeTranslator.php CHANGED
@@ -351,12 +351,14 @@ class AttributeTranslator
351
 
352
  protected static function _set_px_width(\DOMElement $node, string $value): string
353
  {
354
- if (Helpers::is_percent($value)) {
355
- return sprintf("width: %s;", $value);
 
 
356
  }
357
 
358
- if (is_numeric($value)) {
359
- return sprintf("width: %spx;", $value);
360
  }
361
 
362
  return "";
@@ -364,12 +366,14 @@ class AttributeTranslator
364
 
365
  protected static function _set_px_height(\DOMElement $node, string $value): string
366
  {
367
- if (Helpers::is_percent($value)) {
368
- return sprintf("height: %s;", $value);
 
 
369
  }
370
 
371
- if (is_numeric($value)) {
372
- return sprintf("height: %spx;", $value);
373
  }
374
 
375
  return "";
351
 
352
  protected static function _set_px_width(\DOMElement $node, string $value): string
353
  {
354
+ $v = trim($value);
355
+
356
+ if (Helpers::is_percent($v)) {
357
+ return sprintf("width: %s;", $v);
358
  }
359
 
360
+ if (is_numeric(mb_substr($v, 0, 1))) {
361
+ return sprintf("width: %spx;", (float) $v);
362
  }
363
 
364
  return "";
366
 
367
  protected static function _set_px_height(\DOMElement $node, string $value): string
368
  {
369
+ $v = trim($value);
370
+
371
+ if (Helpers::is_percent($v)) {
372
+ return sprintf("height: %s;", $v);
373
  }
374
 
375
+ if (is_numeric(mb_substr($v, 0, 1))) {
376
+ return sprintf("height: %spx;", (float) $v);
377
  }
378
 
379
  return "";
vendor/dompdf/dompdf/src/Css/Style.php CHANGED
@@ -882,45 +882,48 @@ class Style
882
 
883
 
884
  /**
885
- * Set inherited properties in this style using values in $parent
 
886
  *
887
  * https://www.w3.org/TR/css-cascade-3/#inheriting
888
  *
889
- * @param Style $parent
890
  *
891
  * @return Style
892
  */
893
- function inherit(Style $parent)
894
  {
895
  $this->parent_style = $parent;
896
 
897
- // Clear the computed value font size, as is might depend on the parent
898
  // font size
899
  unset($this->_props_computed["font_size"]);
900
  unset($this->_prop_cache["font_size"]);
901
 
902
- foreach (self::$_inherited as $prop) {
903
- // For properties that inherit by default: When the cascade did not
904
- // result in a value, inherit the parent value. Inheritance is
905
- // handled via the specific sub-properties for shorthands
906
- if (isset($this->_props[$prop]) || isset(self::$_props_shorthand[$prop])) {
907
- continue;
908
- }
909
-
910
- if (isset($parent->_props[$prop])) {
911
- $parent_val = \array_key_exists($prop, $parent->_props_computed)
912
- ? $parent->_props_computed[$prop]
913
- : $parent->compute_prop($prop, $parent->_props[$prop]);
914
-
915
- $this->_props[$prop] = $parent_val;
916
- $this->_props_computed[$prop] = $parent_val;
917
- $this->_prop_cache[$prop] = null;
 
 
918
  }
919
  }
920
 
921
  foreach ($this->_props as $prop => $val) {
922
  if ($val === "inherit") {
923
- if (isset($parent->_props[$prop])) {
924
  $parent_val = \array_key_exists($prop, $parent->_props_computed)
925
  ? $parent->_props_computed[$prop]
926
  : $parent->compute_prop($prop, $parent->_props[$prop]);
@@ -1052,7 +1055,7 @@ class Style
1052
  return;
1053
  }
1054
 
1055
- if ($prop !== "content" && is_string($val) && mb_strpos($val, "url") === false) {
1056
  $val = mb_strtolower(trim(str_replace(["\n", "\t"], [" "], $val)));
1057
  $val = preg_replace("/([0-9]+) (pt|px|pc|rem|em|ex|in|cm|mm|%)/S", "\\1\\2", $val);
1058
  }
@@ -1310,12 +1313,14 @@ class Style
1310
  self::$_methods_cache[$method] = method_exists($this, $method);
1311
  }
1312
 
1313
- // During style merge, let `inherit` compute to `inherit`, because the
1314
- // parent style is not available yet. The keyword is resolved during
1315
- // inheritance
1316
  if ($val === "inherit") {
1317
- $this->_props_computed[$prop] = $val;
1318
- } elseif (self::$_methods_cache[$method]) {
 
 
1319
  $this->$method($val);
1320
  } elseif ($val !== "") {
1321
  $this->_props_computed[$prop] = $val;
@@ -2068,6 +2073,12 @@ class Style
2068
 
2069
  $this->_props_computed[$prop] = $has_line_style ? $val_computed : 0;
2070
  }
 
 
 
 
 
 
2071
  } elseif ($style === "margin" || $style === "padding") {
2072
  if ($val === "none") {
2073
  // Legacy support for `none` keyword, not covered by spec
882
 
883
 
884
  /**
885
+ * Resolve inherited property values using the provided parent style or the
886
+ * default values, in case no parent style exists.
887
  *
888
  * https://www.w3.org/TR/css-cascade-3/#inheriting
889
  *
890
+ * @param Style|null $parent
891
  *
892
  * @return Style
893
  */
894
+ function inherit(?Style $parent = null)
895
  {
896
  $this->parent_style = $parent;
897
 
898
+ // Clear the computed font size, as it might depend on the parent
899
  // font size
900
  unset($this->_props_computed["font_size"]);
901
  unset($this->_prop_cache["font_size"]);
902
 
903
+ if ($parent) {
904
+ foreach (self::$_inherited as $prop) {
905
+ // For properties that inherit by default: When the cascade did
906
+ // not result in a value, inherit the parent value. Inheritance
907
+ // is handled via the specific sub-properties for shorthands
908
+ if (isset($this->_props[$prop]) || isset(self::$_props_shorthand[$prop])) {
909
+ continue;
910
+ }
911
+
912
+ if (isset($parent->_props[$prop])) {
913
+ $parent_val = \array_key_exists($prop, $parent->_props_computed)
914
+ ? $parent->_props_computed[$prop]
915
+ : $parent->compute_prop($prop, $parent->_props[$prop]);
916
+
917
+ $this->_props[$prop] = $parent_val;
918
+ $this->_props_computed[$prop] = $parent_val;
919
+ $this->_prop_cache[$prop] = null;
920
+ }
921
  }
922
  }
923
 
924
  foreach ($this->_props as $prop => $val) {
925
  if ($val === "inherit") {
926
+ if ($parent && isset($parent->_props[$prop])) {
927
  $parent_val = \array_key_exists($prop, $parent->_props_computed)
928
  ? $parent->_props_computed[$prop]
929
  : $parent->compute_prop($prop, $parent->_props[$prop]);
1055
  return;
1056
  }
1057
 
1058
+ if ($prop !== "content" && is_string($val) && mb_strpos($val, "url") === false && strlen($val) > 1) {
1059
  $val = mb_strtolower(trim(str_replace(["\n", "\t"], [" "], $val)));
1060
  $val = preg_replace("/([0-9]+) (pt|px|pc|rem|em|ex|in|cm|mm|%)/S", "\\1\\2", $val);
1061
  }
1313
  self::$_methods_cache[$method] = method_exists($this, $method);
1314
  }
1315
 
1316
+ // During style merge, the parent style is not available yet, so
1317
+ // temporarily use the initial value for `inherit` properties. The
1318
+ // keyword is properly resolved during inheritance
1319
  if ($val === "inherit") {
1320
+ $val = self::$_defaults[$prop];
1321
+ }
1322
+
1323
+ if (self::$_methods_cache[$method]) {
1324
  $this->$method($val);
1325
  } elseif ($val !== "") {
1326
  $this->_props_computed[$prop] = $val;
2073
 
2074
  $this->_props_computed[$prop] = $has_line_style ? $val_computed : 0;
2075
  }
2076
+ } elseif (($style === "border" || $style === "outline") && $type === "style") {
2077
+ if (in_array($val, Style::$BORDER_STYLES, true)) {
2078
+ $this->_props_computed[$prop] = $val;
2079
+ } else {
2080
+ $this->_props_computed[$prop] = null;
2081
+ }
2082
  } elseif ($style === "margin" || $style === "padding") {
2083
  if ($val === "none") {
2084
  // Legacy support for `none` keyword, not covered by spec
vendor/dompdf/dompdf/src/Css/Stylesheet.php CHANGED
@@ -579,8 +579,7 @@ class Stylesheet
579
  // This doesn't work because libxml only supports XPath 1.0...
580
  //$query .= "[matches(@$attr,\"^${tok}\$|^${tok}[ ]+|[ ]+${tok}\$|[ ]+${tok}[ ]+\")]";
581
 
582
- // Query improvement by Michael Sheakoski <michael@mjsdigital.com>:
583
- $query .= "[contains(concat(' ', @$attr, ' '), concat(' ', '$tok', ' '))]";
584
  $tok = "";
585
  break;
586
 
@@ -857,7 +856,7 @@ class Stylesheet
857
  // (e.g. [type~="a b c" "d e f"])
858
  // FIXME: Don't match anything if value contains
859
  // whitespace or is the empty string
860
- $query .= "[contains(concat(' ', @$attr, ' '), concat(' ', '$value', ' '))]";
861
  break;
862
 
863
  case "|=":
@@ -1095,10 +1094,7 @@ class Stylesheet
1095
  // Styles can only be applied directly to DOMElements; anonymous
1096
  // frames inherit from their parent
1097
  if ($frame->get_node()->nodeType !== XML_ELEMENT_NODE) {
1098
- if ($p) {
1099
- $style->inherit($p->get_style());
1100
- }
1101
-
1102
  $frame->set_style($style);
1103
  continue;
1104
  }
@@ -1209,16 +1205,15 @@ class Stylesheet
1209
  }
1210
  }
1211
 
1212
- // Inherit parent's styles if parent exists
1213
- if ($p) {
1214
- if ($DEBUGCSS) {
1215
- print " inherit [\n";
1216
- $p->get_style()->debug_print();
1217
- print " ]\n";
1218
- }
1219
- $style->inherit($p->get_style());
1220
  }
1221
 
 
 
1222
  if ($DEBUGCSS) {
1223
  print " DomElementStyle [\n";
1224
  $style->debug_print();
579
  // This doesn't work because libxml only supports XPath 1.0...
580
  //$query .= "[matches(@$attr,\"^${tok}\$|^${tok}[ ]+|[ ]+${tok}\$|[ ]+${tok}[ ]+\")]";
581
 
582
+ $query .= "[contains(concat(' ', normalize-space(@$attr), ' '), concat(' ', '$tok', ' '))]";
 
583
  $tok = "";
584
  break;
585
 
856
  // (e.g. [type~="a b c" "d e f"])
857
  // FIXME: Don't match anything if value contains
858
  // whitespace or is the empty string
859
+ $query .= "[contains(concat(' ', normalize-space(@$attr), ' '), concat(' ', '$value', ' '))]";
860
  break;
861
 
862
  case "|=":
1094
  // Styles can only be applied directly to DOMElements; anonymous
1095
  // frames inherit from their parent
1096
  if ($frame->get_node()->nodeType !== XML_ELEMENT_NODE) {
1097
+ $style->inherit($p ? $p->get_style() : null);
 
 
 
1098
  $frame->set_style($style);
1099
  continue;
1100
  }
1205
  }
1206
  }
1207
 
1208
+ // Handle inheritance
1209
+ if ($p && $DEBUGCSS) {
1210
+ print " inherit [\n";
1211
+ $p->get_style()->debug_print();
1212
+ print " ]\n";
 
 
 
1213
  }
1214
 
1215
+ $style->inherit($p ? $p->get_style() : null);
1216
+
1217
  if ($DEBUGCSS) {
1218
  print " DomElementStyle [\n";
1219
  $style->debug_print();
vendor/dompdf/dompdf/src/Dompdf.php CHANGED
@@ -155,14 +155,6 @@ class Dompdf
155
  */
156
  private $protocol = "";
157
 
158
- /**
159
- * HTTP context created with stream_context_create()
160
- * Will be used for file_get_contents
161
- *
162
- * @var resource
163
- */
164
- private $httpContext;
165
-
166
  /**
167
  * The system's locale
168
  *
@@ -400,7 +392,7 @@ class Dompdf
400
  $uri = $realfile;
401
  }
402
 
403
- [$contents, $http_response_header] = Helpers::getFileContent($uri, $this->httpContext);
404
  if ($contents === null) {
405
  throw new Exception("File '$file' not found.");
406
  }
@@ -1244,12 +1236,12 @@ class Dompdf
1244
  /**
1245
  * Sets the HTTP context
1246
  *
1247
- * @param resource $httpContext
1248
  * @return $this
1249
  */
1250
  public function setHttpContext($httpContext)
1251
  {
1252
- $this->httpContext = $httpContext;
1253
  return $this;
1254
  }
1255
 
@@ -1269,7 +1261,7 @@ class Dompdf
1269
  */
1270
  public function getHttpContext()
1271
  {
1272
- return $this->httpContext;
1273
  }
1274
 
1275
  /**
@@ -1363,6 +1355,11 @@ class Dompdf
1363
  */
1364
  public function setOptions(Options $options)
1365
  {
 
 
 
 
 
1366
  $this->options = $options;
1367
  $fontMetrics = $this->getFontMetrics();
1368
  if (isset($fontMetrics)) {
155
  */
156
  private $protocol = "";
157
 
 
 
 
 
 
 
 
 
158
  /**
159
  * The system's locale
160
  *
392
  $uri = $realfile;
393
  }
394
 
395
+ [$contents, $http_response_header] = Helpers::getFileContent($uri, $this->options->getHttpContext());
396
  if ($contents === null) {
397
  throw new Exception("File '$file' not found.");
398
  }
1236
  /**
1237
  * Sets the HTTP context
1238
  *
1239
+ * @param resource|array $httpContext
1240
  * @return $this
1241
  */
1242
  public function setHttpContext($httpContext)
1243
  {
1244
+ $this->options->setHttpContext($httpContext);
1245
  return $this;
1246
  }
1247
 
1261
  */
1262
  public function getHttpContext()
1263
  {
1264
+ return $this->options->getHttpContext();
1265
  }
1266
 
1267
  /**
1355
  */
1356
  public function setOptions(Options $options)
1357
  {
1358
+ // For backwards compatibility
1359
+ if ($this->options && $this->options->getHttpContext() && !$options->getHttpContext()) {
1360
+ $options->setHttpContext($this->options->getHttpContext());
1361
+ }
1362
+
1363
  $this->options = $options;
1364
  $fontMetrics = $this->getFontMetrics();
1365
  if (isset($fontMetrics)) {
vendor/dompdf/dompdf/src/FontMetrics.php CHANGED
@@ -206,7 +206,6 @@ class FontMetrics
206
  }
207
 
208
  $cacheEntry = $localFile;
209
- $localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION));
210
 
211
  $entry[$styleString] = $cacheEntry;
212
 
@@ -258,6 +257,13 @@ class FontMetrics
258
  return false;
259
  }
260
 
 
 
 
 
 
 
 
261
  $font->parse();
262
  $font->saveAdobeFontMetrics("$cacheEntry.ufm");
263
  $font->close();
@@ -427,38 +433,39 @@ class FontMetrics
427
  return null;
428
  }
429
 
430
- $family = "serif";
431
-
432
- if (isset($this->fontLookup[$family][$subtype])) {
433
- return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];
434
- }
435
-
436
- if (!isset($this->fontLookup[$family])) {
437
- return null;
438
- }
439
-
440
- $family = $this->fontLookup[$family];
441
-
442
- foreach ($family as $sub => $font) {
443
- if (strpos($subtype, $sub) !== false) {
444
- return $cache[$familyRaw][$subtypeRaw] = $font;
445
  }
446
- }
447
-
448
- if ($subtype !== "normal") {
 
 
 
 
449
  foreach ($family as $sub => $font) {
450
- if ($sub !== "normal") {
451
  return $cache[$familyRaw][$subtypeRaw] = $font;
452
  }
453
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  }
455
-
456
- $subtype = "normal";
457
-
458
- if (isset($family[$subtype])) {
459
- return $cache[$familyRaw][$subtypeRaw] = $family[$subtype];
460
- }
461
-
462
  return null;
463
  }
464
 
206
  }
207
 
208
  $cacheEntry = $localFile;
 
209
 
210
  $entry[$styleString] = $cacheEntry;
211
 
257
  return false;
258
  }
259
 
260
+ switch ($font->getFontType()) {
261
+ case "TrueType":
262
+ default:
263
+ $localFile .= ".ttf";
264
+ break;
265
+ }
266
+
267
  $font->parse();
268
  $font->saveAdobeFontMetrics("$cacheEntry.ufm");
269
  $font->close();
433
  return null;
434
  }
435
 
436
+ $fallback_families = [strtolower($this->options->getDefaultFont()), "serif"];
437
+ foreach ($fallback_families as $family) {
438
+ if (isset($this->fontLookup[$family][$subtype])) {
439
+ return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];
 
 
 
 
 
 
 
 
 
 
 
440
  }
441
+
442
+ if (!isset($this->fontLookup[$family])) {
443
+ continue;
444
+ }
445
+
446
+ $family = $this->fontLookup[$family];
447
+
448
  foreach ($family as $sub => $font) {
449
+ if (strpos($subtype, $sub) !== false) {
450
  return $cache[$familyRaw][$subtypeRaw] = $font;
451
  }
452
  }
453
+
454
+ if ($subtype !== "normal") {
455
+ foreach ($family as $sub => $font) {
456
+ if ($sub !== "normal") {
457
+ return $cache[$familyRaw][$subtypeRaw] = $font;
458
+ }
459
+ }
460
+ }
461
+
462
+ $subtype = "normal";
463
+
464
+ if (isset($family[$subtype])) {
465
+ return $cache[$familyRaw][$subtypeRaw] = $family[$subtype];
466
+ }
467
  }
468
+
 
 
 
 
 
 
469
  return null;
470
  }
471
 
vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php CHANGED
@@ -246,8 +246,12 @@ abstract class AbstractFrameDecorator extends Frame
246
  if ($this->content_set
247
  && $this->get_node()->nodeName === "dompdf_generated"
248
  ) {
249
- foreach ($this->get_children() as $child) {
250
- $this->remove_child($child);
 
 
 
 
251
  }
252
  }
253
  }
246
  if ($this->content_set
247
  && $this->get_node()->nodeName === "dompdf_generated"
248
  ) {
249
+ $content = $this->get_style()->content;
250
+
251
+ if ($content !== "normal" && $content !== "none") {
252
+ foreach ($this->get_children() as $child) {
253
+ $this->remove_child($child);
254
+ }
255
  }
256
  }
257
  }
vendor/dompdf/dompdf/src/FrameDecorator/Inline.php CHANGED
@@ -68,34 +68,39 @@ class Inline extends AbstractFrameDecorator
68
  $this->revert_counter_increment();
69
  $node = $this->_frame->get_node();
70
  $split = $this->copy($node->cloneNode());
71
- // if this is a generated node don't propagate the content style
72
- if ($split->get_node()->nodeName == "dompdf_generated") {
73
- $split->get_style()->content = "normal";
74
- }
75
- $this->get_parent()->insert_child_after($split, $this);
76
 
77
- // Unset the current node's right style properties
78
  $style = $this->_frame->get_style();
 
 
 
79
  $style->margin_right = 0;
80
  $style->padding_right = 0;
81
  $style->border_right_width = 0;
82
 
83
  // Unset the split node's left style properties since we don't want them
84
  // to propagate
85
- $style = $split->get_style();
86
- $style->margin_left = 0;
87
- $style->padding_left = 0;
88
- $style->border_left_width = 0;
 
 
 
 
89
 
90
  //On continuation of inline element on next line,
91
- //don't repeat non-vertically repeatable background images
92
  //See e.g. in testcase image_variants, long descriptions
93
- if (($url = $style->background_image) && $url !== "none"
94
- && ($repeat = $style->background_repeat) && $repeat !== "repeat" && $repeat !== "repeat-y"
95
  ) {
96
- $style->background_image = "none";
97
  }
98
 
 
 
 
 
99
  // Add $child and all following siblings to the new split node
100
  $iter = $child;
101
  while ($iter) {
68
  $this->revert_counter_increment();
69
  $node = $this->_frame->get_node();
70
  $split = $this->copy($node->cloneNode());
 
 
 
 
 
71
 
 
72
  $style = $this->_frame->get_style();
73
+ $split_style = $split->get_original_style();
74
+
75
+ // Unset the current node's right style properties
76
  $style->margin_right = 0;
77
  $style->padding_right = 0;
78
  $style->border_right_width = 0;
79
 
80
  // Unset the split node's left style properties since we don't want them
81
  // to propagate
82
+ $split_style->margin_left = 0;
83
+ $split_style->padding_left = 0;
84
+ $split_style->border_left_width = 0;
85
+
86
+ // If this is a generated node don't propagate the content style
87
+ if ($split->get_node()->nodeName == "dompdf_generated") {
88
+ $split_style->content = "normal";
89
+ }
90
 
91
  //On continuation of inline element on next line,
92
+ //don't repeat non-horizontally repeatable background images
93
  //See e.g. in testcase image_variants, long descriptions
94
+ if (($url = $split->get_style()->background_image) && $url !== "none"
95
+ && ($repeat = $split->get_style()->background_repeat) && $repeat !== "repeat" && $repeat !== "repeat-x"
96
  ) {
97
+ $split_style->background_image = "none";
98
  }
99
 
100
+ $split->set_style(clone $split_style);
101
+
102
+ $this->get_parent()->insert_child_after($split, $this);
103
+
104
  // Add $child and all following siblings to the new split node
105
  $iter = $child;
106
  while ($iter) {
vendor/dompdf/dompdf/src/FrameReflower/Inline.php CHANGED
@@ -157,6 +157,12 @@ class Inline extends AbstractFrameReflower
157
  foreach ($frame->get_children() as $child) {
158
  $child->set_containing_block($cb);
159
  $child->reflow($block);
 
 
 
 
 
 
160
  }
161
 
162
  // Assume the position of the first child
157
  foreach ($frame->get_children() as $child) {
158
  $child->set_containing_block($cb);
159
  $child->reflow($block);
160
+
161
+ // Stop reflow if the frame has been reset by a line or page break
162
+ // due to child reflow
163
+ if (!$frame->content_set) {
164
+ return;
165
+ }
166
  }
167
 
168
  // Assume the position of the first child
vendor/dompdf/dompdf/src/FrameReflower/Table.php CHANGED
@@ -166,7 +166,8 @@ class Table extends AbstractFrameReflower
166
 
167
  foreach ($auto as $i) {
168
  $max = $columns[$i]["max-width"];
169
- $w = $max + $increment * ($max / $auto_max);
 
170
  $cellmap->set_column_width($i, $w);
171
  }
172
  }
@@ -180,7 +181,8 @@ class Table extends AbstractFrameReflower
180
  foreach ($absolute as $i) {
181
  $min = $columns[$i]["min-width"];
182
  $abs = $columns[$i]["absolute"];
183
- $w = $min + $increment * ($abs / $absolute_used);
 
184
  $cellmap->set_column_width($i, $w);
185
  }
186
  return;
166
 
167
  foreach ($auto as $i) {
168
  $max = $columns[$i]["max-width"];
169
+ $f = $auto_max > 0 ? $max / $auto_max : 1 / count($auto);
170
+ $w = $max + $increment * $f;
171
  $cellmap->set_column_width($i, $w);
172
  }
173
  }
181
  foreach ($absolute as $i) {
182
  $min = $columns[$i]["min-width"];
183
  $abs = $columns[$i]["absolute"];
184
+ $f = $absolute_used > 0 ? $abs / $absolute_used : 1 / count($absolute);
185
+ $w = $min + $increment * $f;
186
  $cellmap->set_column_width($i, $w);
187
  }
188
  return;
vendor/dompdf/dompdf/src/Options.php CHANGED
@@ -275,6 +275,16 @@ class Options
275
  */
276
  private $pdflibLicense = "";
277
 
 
 
 
 
 
 
 
 
 
 
278
  /**
279
  * @param array $attributes
280
  */
@@ -356,6 +366,8 @@ class Options
356
  $this->setPdfBackend($value);
357
  } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') {
358
  $this->setPdflibLicense($value);
 
 
359
  }
360
  }
361
  return $this;
@@ -419,6 +431,8 @@ class Options
419
  return $this->getPdfBackend();
420
  } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') {
421
  return $this->getPdflibLicense();
 
 
422
  }
423
  return null;
424
  }
@@ -635,7 +649,11 @@ class Options
635
  */
636
  public function setDefaultFont($defaultFont)
637
  {
638
- $this->defaultFont = $defaultFont;
 
 
 
 
639
  return $this;
640
  }
641
 
@@ -956,4 +974,26 @@ class Options
956
  {
957
  return $this->rootDir;
958
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
959
  }
275
  */
276
  private $pdflibLicense = "";
277
 
278
+ /**
279
+ * HTTP context created with stream_context_create()
280
+ * Will be used for file_get_contents
281
+ *
282
+ * @link https://www.php.net/manual/context.php
283
+ *
284
+ * @var resource
285
+ */
286
+ private $httpContext;
287
+
288
  /**
289
  * @param array $attributes
290
  */
366
  $this->setPdfBackend($value);
367
  } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') {
368
  $this->setPdflibLicense($value);
369
+ } elseif ($key === 'httpContext' || $key === 'http_context') {
370
+ $this->setHttpContext($value);
371
  }
372
  }
373
  return $this;
431
  return $this->getPdfBackend();
432
  } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') {
433
  return $this->getPdflibLicense();
434
+ } elseif ($key === 'httpContext' || $key === 'http_context') {
435
+ return $this->getHttpContext();
436
  }
437
  return null;
438
  }
649
  */
650
  public function setDefaultFont($defaultFont)
651
  {
652
+ if (!($defaultFont === null || trim($defaultFont) === "")) {
653
+ $this->defaultFont = $defaultFont;
654
+ } else {
655
+ $this->defaultFont = "serif";
656
+ }
657
  return $this;
658
  }
659
 
974
  {
975
  return $this->rootDir;
976
  }
977
+
978
+ /**
979
+ * Sets the HTTP context
980
+ *
981
+ * @param resource|array $httpContext
982
+ * @return $this
983
+ */
984
+ public function setHttpContext($httpContext)
985
+ {
986
+ $this->httpContext = is_array($httpContext) ? stream_context_create($httpContext) : $httpContext;
987
+ return $this;
988
+ }
989
+
990
+ /**
991
+ * Returns the HTTP context
992
+ *
993
+ * @return resource
994
+ */
995
+ public function getHttpContext()
996
+ {
997
+ return $this->httpContext;
998
+ }
999
  }
vendor/phenx/php-svg-lib/composer.json CHANGED
@@ -21,11 +21,11 @@
21
  }
22
  },
23
  "require": {
24
- "php": "^7.4 || ^8.0",
25
  "ext-mbstring": "*",
26
  "sabberworm/php-css-parser": "^8.4"
27
  },
28
  "require-dev": {
29
- "phpunit/phpunit": "^9.5"
30
  }
31
  }
21
  }
22
  },
23
  "require": {
24
+ "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0",
25
  "ext-mbstring": "*",
26
  "sabberworm/php-css-parser": "^8.4"
27
  },
28
  "require-dev": {
29
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
30
  }
31
  }
vendor/phenx/php-svg-lib/src/Svg/Tag/Path.php CHANGED
@@ -451,7 +451,14 @@ class Path extends Shape
451
  array(),
452
  );
453
 
454
- $segsNorm = $this->arcToSegments($tx - $fx, $ty - $fy, $rx, $ry, $large, $sweep, $rot);
 
 
 
 
 
 
 
455
 
456
  for ($i = 0, $len = count($segsNorm); $i < $len; $i++) {
457
  $segs[$i][0] = $segsNorm[$i][0] + $fx;
451
  array(),
452
  );
453
 
454
+ $toX = $tx - $fx;
455
+ $toY = $ty - $fy;
456
+
457
+ if ($toX + $toY === 0) {
458
+ return;
459
+ }
460
+
461
+ $segsNorm = $this->arcToSegments($toX, $toY, $rx, $ry, $large, $sweep, $rot);
462
 
463
  for ($i = 0, $len = count($segsNorm); $i < $len; $i++) {
464
  $segs[$i][0] = $segsNorm[$i][0] + $fx;
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 2.14.1
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
- * WC tested up to: 6.3
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.14.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 2.14.2
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
+ * WC tested up to: 6.4
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.14.2';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;