Version Description
- Dismissable review request notice added to the admin screens.
- Added Woocommerce version - 5.2.2 compatibility.
Download this release
Release Info
Developer | ThemeHigh |
Plugin | WooCommerce Checkout Field Editor (Manager) Pro |
Version | 1.4.7 |
Comparing to | |
See all releases |
Code changes from version 1.4.6 to 1.4.7
- admin/assets/css/logo.svg +17 -0
- admin/assets/css/thwcfd-admin.min.css +1 -1
- admin/assets/js/thwcfd-admin.js +30 -6
- admin/assets/js/thwcfd-admin.min.js +1 -1
- admin/class-thwcfd-admin-settings-general.php +1 -1
- admin/class-thwcfd-admin-settings-pro.php +150 -0
- admin/class-thwcfd-admin-settings.php +1 -1
- admin/class-thwcfd-admin.php +62 -40
- checkout-form-designer.php +3 -3
- includes/class-thwcfd.php +2 -1
- readme.txt +5 -1
admin/assets/css/logo.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="166" height="27" viewBox="0 0 166 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M37.2581 6.43106V3.02706C37.2581 2.93306 37.2911 2.85106 37.3601 2.78506C37.4261 2.71906 37.5061 2.68506 37.6021 2.68506H40.8051C40.9011 2.68506 40.9811 2.71806 41.0491 2.78506C41.1151 2.85106 41.1491 2.93306 41.1491 3.02706V6.43106C41.1491 6.52706 41.1961 6.57406 41.2921 6.57406H44.8111C44.9071 6.57406 44.9871 6.60706 45.0531 6.67406C45.1191 6.74206 45.1551 6.82206 45.1551 6.91806V9.46306C45.1551 9.55906 45.1201 9.63906 45.0531 9.70506C44.9871 9.77306 44.9071 9.80706 44.8111 9.80706H41.2921C41.1961 9.80706 41.1491 9.85406 41.1491 9.95006V16.0131C41.1491 16.6421 41.2781 17.1111 41.5361 17.4151C41.7921 17.7201 42.2081 17.8721 42.7801 17.8721L44.4961 17.7961C44.5921 17.7961 44.6721 17.8291 44.7381 17.8961C44.8041 17.9641 44.8381 18.0441 44.8381 18.1401V20.8481C44.8381 21.0571 44.7251 21.1821 44.4961 21.2191C43.6951 21.2581 42.3501 21.3631 42.0071 21.3631C40.4251 21.3631 39.2431 21.0991 38.4601 20.5761C37.6791 20.0511 37.2781 19.0641 37.2591 17.6151V9.95106V6.43106H37.2581Z" fill="#1F2023"/>
|
3 |
+
<path d="M58.262 7.74506C59.196 8.68106 59.662 9.94806 59.662 11.5501V20.9311C59.662 21.0271 59.629 21.1071 59.562 21.1731C59.496 21.2411 59.414 21.275 59.318 21.275H55.972C55.876 21.275 55.796 21.2421 55.73 21.1731C55.662 21.1071 55.6281 21.0271 55.6281 20.9311V12.3801C55.6281 11.6161 55.415 10.9971 54.985 10.5211C54.555 10.0451 53.989 9.80605 53.284 9.80605C52.577 9.80605 52.011 10.0441 51.581 10.5211C51.153 10.9981 50.938 11.6171 50.938 12.3801V20.9311C50.938 21.0271 50.905 21.1071 50.838 21.1731C50.77 21.2411 50.69 21.275 50.594 21.275H47.248C47.152 21.275 47.072 21.2421 47.006 21.1731C46.938 21.1071 46.9041 21.0271 46.9041 20.9311V1.59705C46.9041 1.50105 46.937 1.42106 47.006 1.35506C47.072 1.28906 47.152 1.25305 47.248 1.25305H50.594C50.69 1.25305 50.77 1.28806 50.838 1.35506C50.904 1.42106 50.938 1.50105 50.938 1.59705V7.91705C50.938 7.97605 50.958 8.01305 50.995 8.03205C51.034 8.05205 51.061 8.04205 51.081 8.00305C51.862 6.89805 53.026 6.34505 54.571 6.34505C56.098 6.34505 57.326 6.81206 58.262 7.74506Z" fill="#1F2023"/>
|
4 |
+
<path d="M75.0211 14.8391C75.0011 15.0681 74.8761 15.1831 74.6481 15.1831H65.8101C65.6971 15.1831 65.6581 15.2301 65.6971 15.3261C65.7541 15.7071 65.8591 16.0881 66.0111 16.4711C66.5071 17.5371 67.5171 18.0731 69.0421 18.0731C70.2631 18.0531 71.2261 17.5571 71.9311 16.5851C72.0071 16.4721 72.0931 16.4131 72.1891 16.4131C72.2461 16.4131 72.3121 16.4521 72.3881 16.5281L74.4491 18.5591C74.5431 18.6531 74.5921 18.7391 74.5921 18.8151C74.5921 18.8541 74.5531 18.9301 74.4771 19.0441C73.8481 19.8271 73.0381 20.4331 72.0471 20.8601C71.0551 21.2901 69.9691 21.5051 68.7851 21.5051C67.1461 21.5051 65.7581 21.1321 64.6251 20.3901C63.4901 19.6461 62.6741 18.6071 62.1801 17.2731C61.7801 16.3201 61.5781 15.0701 61.5781 13.5251C61.5781 12.4781 61.7211 11.5521 62.0081 10.7521C62.4461 9.39809 63.2131 8.32009 64.3111 7.52009C65.4071 6.71909 66.7071 6.31909 68.2131 6.31909C70.1211 6.31909 71.6511 6.87209 72.8051 7.97909C73.9571 9.08409 74.6591 10.5611 74.9071 12.4111C75.0211 13.1321 75.0591 13.9421 75.0211 14.8391ZM65.8691 11.4931C65.7931 11.7411 65.7261 12.0461 65.6681 12.4071C65.6681 12.5031 65.7151 12.5501 65.8111 12.5501H70.7601C70.8731 12.5501 70.9121 12.5031 70.8731 12.4071C70.7771 11.8541 70.7301 11.5891 70.7301 11.6061C70.5581 11.0341 70.2571 10.5901 69.8301 10.2761C69.4001 9.96209 68.8711 9.80509 68.2421 9.80509C67.0411 9.80609 66.2501 10.3681 65.8691 11.4931Z" fill="#1F2023"/>
|
5 |
+
<path d="M96.729 7.68802C97.567 8.58402 97.987 9.84201 97.987 11.463V20.93C97.987 21.026 97.954 21.106 97.887 21.172C97.819 21.24 97.739 21.274 97.643 21.274H94.297C94.201 21.274 94.121 21.241 94.055 21.172C93.987 21.106 93.953 21.026 93.953 20.93V12.35C93.953 11.569 93.754 10.948 93.353 10.491C92.952 10.034 92.417 9.80502 91.751 9.80502C91.083 9.80502 90.54 10.034 90.12 10.491C89.7 10.948 89.491 11.559 89.491 12.321V20.93C89.491 21.026 89.458 21.106 89.391 21.172C89.323 21.24 89.243 21.274 89.147 21.274H85.831C85.735 21.274 85.653 21.241 85.587 21.172C85.521 21.106 85.487 21.026 85.487 20.93V12.35C85.487 11.588 85.276 10.973 84.858 10.504C84.438 10.037 83.895 9.80502 83.227 9.80502C82.618 9.80502 82.106 9.98701 81.698 10.348C81.288 10.709 81.044 11.215 80.968 11.864V20.93C80.968 21.026 80.935 21.106 80.868 21.172C80.802 21.24 80.72 21.274 80.626 21.274H77.278C77.182 21.274 77.102 21.241 77.036 21.172C76.97 21.106 76.936 21.026 76.936 20.93V6.91602C76.936 6.82002 76.969 6.74001 77.036 6.67201C77.102 6.60601 77.182 6.57201 77.278 6.57201H80.626C80.72 6.57201 80.802 6.60501 80.868 6.67201C80.934 6.74001 80.968 6.82002 80.968 6.91602V8.03101C80.968 8.08801 80.988 8.12701 81.027 8.14401C81.064 8.16401 81.101 8.14401 81.14 8.08701C81.921 6.92501 83.132 6.34302 84.773 6.34302C85.726 6.34302 86.56 6.54202 87.275 6.94302C87.99 7.34402 88.539 7.91602 88.92 8.66002C88.977 8.77502 89.043 8.77502 89.121 8.66002C89.539 7.87902 90.107 7.29702 90.822 6.91602C91.537 6.53502 92.342 6.34402 93.238 6.34402C94.727 6.34502 95.889 6.79202 96.729 7.68802Z" fill="#1F2023"/>
|
6 |
+
<path d="M113.287 14.8391C113.267 15.0681 113.144 15.1831 112.916 15.1831H104.078C103.963 15.1831 103.926 15.2301 103.963 15.3261C104.022 15.7071 104.125 16.0881 104.277 16.4711C104.773 17.5371 105.783 18.0731 107.31 18.0731C108.529 18.0531 109.492 17.5571 110.199 16.5851C110.273 16.4721 110.359 16.4131 110.455 16.4131C110.514 16.4131 110.58 16.4521 110.656 16.5281L112.715 18.5591C112.811 18.6531 112.858 18.7391 112.858 18.8151C112.858 18.8541 112.821 18.9301 112.745 19.0441C112.116 19.8271 111.306 20.4331 110.313 20.8601C109.321 21.2901 108.235 21.5051 107.053 21.5051C105.412 21.5051 104.026 21.1321 102.891 20.3901C101.756 19.6461 100.942 18.6071 100.446 17.2731C100.046 16.3201 99.8461 15.0701 99.8461 13.5251C99.8461 12.4781 99.9891 11.5521 100.274 10.7521C100.713 9.39809 101.481 8.32009 102.577 7.52009C103.673 6.72009 104.975 6.31909 106.481 6.31909C108.387 6.31909 109.917 6.87209 111.071 7.97909C112.225 9.08409 112.925 10.5611 113.173 12.4111C113.287 13.1321 113.324 13.9421 113.287 14.8391ZM104.135 11.4931C104.059 11.7411 103.992 12.0461 103.936 12.4071C103.936 12.5031 103.983 12.5501 104.079 12.5501H109.026C109.141 12.5501 109.178 12.5031 109.141 12.4071C109.045 11.8541 108.998 11.5891 108.998 11.6061C108.826 11.0341 108.525 10.5901 108.096 10.2761C107.668 9.96209 107.139 9.80509 106.51 9.80509C105.309 9.80609 104.516 10.3681 104.135 11.4931Z" fill="#1F2023"/>
|
7 |
+
<path d="M126.557 7.74506C127.493 8.68106 127.959 9.94806 127.959 11.5501V20.9311C127.959 21.0271 127.926 21.1071 127.859 21.1731C127.791 21.2411 127.711 21.275 127.615 21.275H124.269C124.173 21.275 124.093 21.2421 124.025 21.1731C123.959 21.1071 123.925 21.0271 123.925 20.9311V12.3801C123.925 11.6161 123.71 10.9971 123.282 10.5211C122.852 10.0441 122.286 9.80605 121.581 9.80605C120.874 9.80605 120.308 10.0441 119.878 10.5211C119.45 10.9981 119.235 11.6171 119.235 12.3801V20.9311C119.235 21.0271 119.202 21.1071 119.135 21.1731C119.067 21.2411 118.987 21.275 118.891 21.275H115.545C115.449 21.275 115.367 21.2421 115.301 21.1731C115.235 21.1071 115.201 21.0271 115.201 20.9311V1.59705C115.201 1.50105 115.234 1.42106 115.301 1.35506C115.368 1.28906 115.449 1.25305 115.545 1.25305H118.891C118.987 1.25305 119.067 1.28806 119.135 1.35506C119.201 1.42106 119.235 1.50105 119.235 1.59705V7.91705C119.235 7.97605 119.253 8.01305 119.292 8.03205C119.329 8.05205 119.358 8.04205 119.378 8.00305C120.159 6.89805 121.323 6.34505 122.866 6.34505C124.393 6.34505 125.623 6.81206 126.557 7.74506Z" fill="#1F2023"/>
|
8 |
+
<path d="M130.49 21.1731C130.422 21.1071 130.388 21.0271 130.388 20.9311V6.88807C130.388 6.79207 130.421 6.71207 130.49 6.64607C130.556 6.58007 130.636 6.54407 130.732 6.54407H134.078C134.174 6.54407 134.256 6.57907 134.322 6.64607C134.388 6.71307 134.422 6.79207 134.422 6.88807V20.9311C134.422 21.0271 134.389 21.1071 134.322 21.1731C134.256 21.2411 134.174 21.2751 134.078 21.2751H130.732C130.637 21.2741 130.557 21.2411 130.49 21.1731Z" fill="#1F2023"/>
|
9 |
+
<path d="M130.49 4.44106C130.422 4.37506 130.388 4.29505 130.388 4.19905V1.42506C130.388 1.32906 130.421 1.24905 130.49 1.18305C130.556 1.11705 130.636 1.08105 130.732 1.08105H134.078C134.174 1.08105 134.256 1.11605 134.322 1.18305C134.388 1.25005 134.422 1.32906 134.422 1.42506V4.19905C134.422 4.29505 134.389 4.37506 134.322 4.44106C134.256 4.50906 134.174 4.54305 134.078 4.54305H130.732C130.637 4.54305 130.557 4.51006 130.49 4.44106Z" fill="#1F2023"/>
|
10 |
+
<path d="M146.076 6.67307C146.142 6.60707 146.224 6.57307 146.32 6.57307H149.666C149.76 6.57307 149.842 6.60607 149.908 6.67307C149.974 6.74107 150.008 6.82107 150.008 6.91707V19.9581C150.008 22.4561 149.289 24.2371 147.85 25.3061C146.411 26.3751 144.555 26.9081 142.287 26.9081C141.619 26.9081 140.875 26.8611 140.057 26.7651C139.866 26.7451 139.77 26.6221 139.77 26.3941L139.885 23.4491C139.885 23.2011 140.018 23.0951 140.285 23.1331C140.971 23.2481 141.599 23.3051 142.172 23.3051C143.393 23.3051 144.332 23.0371 144.99 22.5041C145.646 21.9711 145.976 21.1131 145.976 19.9301C145.976 19.8731 145.956 19.8401 145.917 19.8301C145.88 19.8201 145.841 19.8361 145.804 19.8731C145.079 20.6561 144.021 21.0451 142.63 21.0451C141.39 21.0451 140.251 20.7461 139.212 20.1451C138.171 19.5451 137.433 18.5771 136.995 17.2431C136.708 16.3661 136.565 15.2311 136.565 13.8391C136.565 12.3531 136.737 11.1421 137.081 10.2081C137.481 9.04407 138.157 8.11007 139.11 7.40507C140.063 6.70007 141.171 6.34607 142.428 6.34607C143.897 6.34607 145.022 6.78507 145.803 7.66007C145.84 7.69907 145.879 7.71307 145.916 7.70307C145.955 7.69507 145.975 7.66007 145.975 7.60307V6.91707C145.977 6.82107 146.01 6.74107 146.076 6.67307ZM145.977 13.8101C145.977 13.2181 145.957 12.7611 145.918 12.4371C145.881 12.1131 145.814 11.8081 145.719 11.5211C145.547 11.0071 145.262 10.5911 144.862 10.2771C144.462 9.96307 143.966 9.80607 143.374 9.80607C142.802 9.80607 142.315 9.96207 141.915 10.2771C141.515 10.5921 141.22 11.0071 141.03 11.5211C140.762 12.0931 140.63 12.8671 140.63 13.8371C140.63 14.9051 140.743 15.6691 140.972 16.1261C141.144 16.6401 141.445 17.0561 141.872 17.3701C142.302 17.6841 142.811 17.8411 143.403 17.8411C144.012 17.8411 144.518 17.6851 144.919 17.3701C145.32 17.0551 145.595 16.6491 145.749 16.1531C145.9 15.5831 145.977 14.8001 145.977 13.8101Z" fill="#1F2023"/>
|
11 |
+
<path d="M163.68 7.74506C164.614 8.68106 165.08 9.94806 165.08 11.5501V20.9311C165.08 21.0271 165.047 21.1071 164.98 21.1731C164.914 21.2411 164.832 21.275 164.738 21.275H161.39C161.296 21.275 161.214 21.2421 161.148 21.1731C161.082 21.1071 161.048 21.0271 161.048 20.9311V12.3801C161.048 11.6161 160.833 10.9971 160.403 10.5211C159.975 10.0441 159.407 9.80605 158.702 9.80605C157.997 9.80605 157.429 10.0441 157.001 10.5211C156.571 10.9981 156.356 11.6171 156.356 12.3801V20.9311C156.356 21.0271 156.323 21.1071 156.256 21.1731C156.19 21.2411 156.108 21.275 156.014 21.275H152.666C152.57 21.275 152.49 21.2421 152.424 21.1731C152.358 21.1071 152.324 21.0271 152.324 20.9311V1.59705C152.324 1.50105 152.357 1.42106 152.424 1.35506C152.491 1.28906 152.57 1.25305 152.666 1.25305H156.014C156.108 1.25305 156.19 1.28806 156.256 1.35506C156.322 1.42206 156.356 1.50105 156.356 1.59705V7.91705C156.356 7.97605 156.376 8.01305 156.415 8.03205C156.452 8.05205 156.481 8.04205 156.499 8.00305C157.282 6.89805 158.444 6.34505 159.989 6.34505C161.516 6.34505 162.746 6.81206 163.68 7.74506Z" fill="#1F2023"/>
|
12 |
+
<path d="M18.088 0.366943H0.0150146V5.60194H18.088V0.366943Z" fill="#EF4C85"/>
|
13 |
+
<path d="M27.3671 8.4939H5.87805V13.7289H27.3671V8.4939Z" fill="#AC3092"/>
|
14 |
+
<path d="M27.368 16.621H21.02V21.856H27.368V16.621Z" fill="#AC3092"/>
|
15 |
+
<path d="M18.088 16.621H11.741V21.856H18.088V16.621Z" fill="#AC3092"/>
|
16 |
+
<path d="M27.368 0.366943H21.02V5.60194H27.368V0.366943Z" fill="#AC3092"/>
|
17 |
+
</svg>
|
admin/assets/css/thwcfd-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.align-center{text-align:center!important}.woocommerce-message{margin-top:10px}.err_msgs{color:red}.empty-msg-row{padding:20px 0!important;text-align:center}.color-red{color:red!important}.status-active{font-size:15px;color:green}.status-deactive{font-size:15px;color:red}.thpladmin-subtitle{font-size:11px;color:#666}.thpladmin-notice a.button-primary{font-size:14px;color:#fff;background-color:#d9534f;border-color:#d43f3a;line-height:38px;height:40px;padding-left:20px;padding-right:20px}.thpladmin-notice a.button-primary:hover{background-color:#d2322d;border-color:#ac2925}table.thpladmin_fields_table td.sort{cursor:move;font-size:15px;text-align:center}table.thpladmin_fields_table td.sort::before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}.thpladmin-tab{width:100%;border:0 solid #d4d4d1;border-top:0;background-color:#fff;float:left}.thpladmin-tabs-menu{width:100%;margin:0;margin-top:10px;float:left;clear:both;border-bottom:1px solid #bcd4e6}.thpladmin-tabs-menu li{float:left;margin-right:5px;margin-bottom:-1px;border:1px solid #bcd4e6;outline:1px solid transparent;border-radius:4px 4px 0 0;background:#e1ecf4}.thpladmin-tabs-menu li.current{color:#555;position:relative;background-color:#fff;border-bottom:1px solid #fff;box-shadow:none}.thpladmin-tabs-menu li.first{margin-left:20px}.thpladmin-tabs-menu li a{font-size:18px;display:block;padding:12px 20px;text-decoration:none;color:#9fc2db;-webkit-transition:color .2s;transition:color .2s}.thpladmin-tabs-menu li a:focus{outline:0;box-shadow:none}.thpladmin-tabs-menu .current a{color:#2e7da3}.thpladmin-tab-content{padding:0;display:none;min-height:200px;max-height:485px;color:#000}.thpladmin-sections{list-style:outside none none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.thpladmin-sections li{display:inline-block;margin:0;padding:0;white-space:nowrap}.thpladmin-sections a.current{font-weight:600;border:medium none;color:#000}.thpladmin-sections a{line-height:2;padding:.2em;text-decoration:none}.thpladmin-sections .delete_section img,.thpladmin-sections a.edit_section img{width:12px;height:12px}.thpladmin-sections a.add_link{margin-left:30px;background-color:#00a0d2;border:1px solid #0073aa;color:#fff;padding:2px 5px;border-radius:3px}.thpladmin-sections a.add_link:hover{background-color:#0073aa}.thpladmin-form-table td{padding:5px 0}.thpladmin-form-table td.thpladmin-form-section-title{font-weight:700;border-bottom:1px dashed #cecece}.thpladmin_fields_table tr.strikeout td{background:rgba(255,0,0,.4)!important;opacity:.6;text-decoration:line-through}.thpladmin_fields_table tr.thpladmin-disabled td{opacity:.4}.thpladmin_fields_table tr.thpladmin-disabled td.td_select{opacity:1}.thpladmin_fields_table .td_actions{width:90px}.thpladmin_fields_table .td_enabled{width:80px}.thpladmin_fields_table .td_clear{width:65px}.thpladmin_fields_table .td_required{width:85px}.thpladmin_fields_table .td_select{width:45px}.thpladmin_fields_table .td_type{width:150px}.thpladmin_fields_table .td_validate{text-transform:capitalize}.thpladmin_fields_table th.status{white-space:nowrap}.thpladmin_fields_table .dashicons{line-height:inherit}.thpladmin_fields_table .td_actions .dashicons{background-color:#f7f7f7;border:1px solid #ccc;border-radius:3px;padding:0 2px 2px 2px;box-shadow:0 1px 0 #ccc;webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.thpladmin_fields_table .td_actions .dashicons.disabled{color:#ccc;border:1px solid #e9e9e9;cursor:default}.thpladmin_fields_table .td_actions .dashicons-edit{cursor:pointer}.thpladmin_fields_table .td_actions .dashicons-admin-page{cursor:pointer}.thpladmin-sections .dashicons{cursor:pointer}.thpladmin-sections .dashicons-no{color:#ff4c4c}.thpladmin-notice a{display:block;padding:0;height:63px}.thpladmin-notice p{margin-bottom:0}.thpladmin-notice ul{list-style-type:none;margin:0}.thpladmin-notice ul li{background:url("tick.png") no-repeat 0 50%;padding-left:20px}:root{--primary-bg-color:#007cba;--primary-text-color:#0071a1;--primary-border-color:#0071a1;--primary-alt-bg-color:#f3f5f6;--primary-alt-text-color:#0071a1;--primary-alt-border-color:#0071a1}*{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}ol,ul{margin-top:0;margin-bottom:10px}:after,:before{box-sizing:border-box}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{cursor:pointer;color:#337ab7;text-decoration:none;background-color:transparent}.btn-link,a{color:#528ff0}.wp-core-ui select{line-height:2;border-color:#e2e2e2}.pull-right{float:right!important}.ml-30{margin-left:30px!important}.mt-10{margin-top:10px!important}.mt-20{margin-top:20px!important}.p-0{padding:0!important}.ph-5{padding-left:5px!important;padding-right:5px!important}.pv-2{padding-top:2px!important;padding-bottom:2px!important}.thwcfd-wrap div.thwcfd-notice{margin:10px 20px 0 2px}.thwcfd-wrap input[type=number],.thwcfd-wrap input[type=text],.thwcfd-wrap select,.thwcfd-wrap textarea{color:#32373c;line-height:1;min-height:30px;height:36px;width:auto;background-color:#fff;border:1px solid #e2e2e2;border-radius:2px;overflow:hidden;font-size:14px;padding:0 12px;box-shadow:0 0 0 transparent}.thwcfd-wrap textarea{height:auto;overflow:auto;padding:2px 6px;line-height:1.5;resize:vertical}.thwcfd-wrap input[type=number]:disabled,.thwcfd-wrap input[type=text]:disabled,.thwcfd-wrap select:disabled,.thwcfd-wrap textarea:disabled{color:#a0a5aa;border-color:#ddd;background-color:#f7f7f7}.thwcfd-wrap input[type=number]:disabled::placeholder,.thwcfd-wrap input[type=text]:disabled::placeholder,.thwcfd-wrap select:disabled::placeholder,.thwcfd-wrap textarea:disabled::placeholder{color:#a0a5aa}.thwcfd-wrap .btn{display:inline-block;background-image:none;font-size:14px;font-weight:400;text-align:center;vertical-align:middle;white-space:nowrap;cursor:pointer;touch-action:manipulation;line-height:1;border-width:1px;border-style:solid;border-radius:2px;outline:0;margin:0;padding:12px 20px;box-sizing:border-box;-webkit-appearance:none;-webkit-box-sizing:border-box;transition:.1s;-webkit-transition:.1s;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;color:var(--primary-alt-text-color);background-color:var(--primary-alt-bg-color);border-color:var(--primary-alt-border-color)}.thwcfd-wrap .btn:hover{opacity:.9}.thwcfd-wrap .btn-small{font-size:13px;padding:8px 10px;border-radius:2px}.thwcfd-wrap .btn-tiny{font-size:13px;padding:5px 5px;border-radius:2px}.thwcfd-wrap .btn-primary{color:#fff;background-color:var(--primary-bg-color);border-color:var(--primary-border-color)}.thwcfd-wrap .btn-primary-alt{color:var(--primary-alt-text-color);background-color:var(--primary-alt-bg-color);border-color:var(--primary-alt-border-color)}.thwcfd-wrap .btn-danger{color:#fff;background-color:#f44336;border-color:#c3352b}.thwcfd-wrap .btn:disabled,.thwcfd-wrap .btn[disabled]{color:#cbcbcb;border-color:#cbcbcb;background-color:#fcfcfc;cursor:default}.thwcfd-checkbox{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.thwcfd-checkbox .cb-input,.thwcfd-radio .rb-input{display:block;height:0;margin:0;opacity:0;line-height:normal;box-sizing:border-box;overflow:hidden}.thwcfd-checkbox .cb-el{width:16px;margin-top:2px;margin-right:8px;height:16px;background:#fff;border-radius:2px;float:left;transition:.3s;cursor:pointer;border:1px solid #ccc}.thwcfd-checkbox .cb-el::after{content:'';display:block;width:6px;height:11px;opacity:0;transition:.2s;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) scale(1.5);margin:0 0 0 4px}.thwcfd-checkbox .cb-label{font-size:14px;cursor:pointer;white-space:normal;display:inline-block;font-weight:400;vertical-align:middle}.thwcfd-checkbox :checked+.cb-el{background:#528ff0;border-color:#528ff0}.thwcfd-checkbox :checked+.cb-el::after{opacity:1;transform:rotate(45deg)}.thwcfd-input-wrap{font-weight:400;display:block;margin:24px 0 8px;position:relative}.thwcfd-input-wrap .label{float:left;width:172px;text-align:right;margin-bottom:4px;font-weight:700;position:relative}.thwcfd-input-wrap.required .label::after{content:'*';font-size:12px;position:absolute;margin-left:1px;top:0;color:#f05050}.thwcfd-input-wrap .content{margin-left:190px;position:relative}.thwcfd-input-wrap.small .iel-wrapper{width:260px}.thwcfd-input-wrap .thwcfd-inputtext,.thwcfd-input-wrap .thwcfd-select{width:100%}.thpladmin-modal-mask{position:fixed;background-color:rgba(17,30,60,.6);top:0;left:0;width:100%;height:100%;z-index:9999;overflow:scroll;transition:opacity 250ms ease-in-out}.thpladmin-modal-mask{display:none}.thpladmin-modal .modal-container{position:absolute;background:#fff;border-radius:2px;overflow:hidden;left:50%;top:50%;transform:translate(-50%,-50%);width:90%;max-width:960px;min-height:560px;height:80vh;max-height:640px;animation:appear-down 250ms ease-in-out}.thpladmin-modal .modal-close{position:absolute;color:#58666e;font-size:30px;padding:9px 12px 11px;right:8px;top:8px;line-height:20px;cursor:pointer;z-index:10;user-select:none}.thpladmin-modal .form-wizard{max-width:1024px;height:80vh;max-height:640px;min-height:560px;background:#fafafa;position:relative}.thpladmin-modal .wizard aside{padding:24px 0;width:240px;background:#fff;position:absolute;height:100%;border-right:1px solid #eee}.thpladmin-modal .wizard aside p,.thpladmin-modal .wizard aside side-title{padding:0 24px}.thpladmin-modal .wizard aside side-title{font-size:18px;font-weight:700;display:block;margin-bottom:16px}.thpladmin-modal .wizard aside ul{margin:30px 0;padding:0}.thpladmin-modal .wizard aside li{cursor:pointer;list-style:none;padding:10px 24px;margin:4px 0;color:var(--primary-text-color);position:relative}.thpladmin-modal .wizard aside li.text-primary{color:var(--primary-text-color)}.thpladmin-modal .wizard aside li.active{background:var(--primary-bg-color);color:#fff}.thpladmin-modal .wizard aside li.disabled{display:none}.thpladmin-modal .wizard aside li .dashicons{margin-right:6px;line-height:18px;vertical-align:middle}.thpladmin-modal .wizard aside li.active .dashicons::before{color:#fff}.thpladmin-modal .wizard aside li i.i-chevron-right{font-style:normal;color:#fff;position:absolute;right:8px;font-family:dashicons;opacity:0;top:50%;transform:translate(-4px,-50%);transition:.35s}.thpladmin-modal .wizard aside li.active i.i-chevron-right{opacity:1}.thpladmin-modal .form-wizard main{left:0;right:0;padding:30px;position:absolute;bottom:80px;top:0;overflow:auto}.thpladmin-modal .wizard aside~footer,.thpladmin-modal .wizard aside~main{left:240px}.thpladmin-modal .form-wizard main.main-full{bottom:0}.thpladmin-modal .form-wizard main-title{text-transform:uppercase;display:block;font-weight:600;margin-bottom:12px;font-size:14px!important}.thpladmin-modal .form-wizard .sub-title{text-transform:uppercase;font-weight:600;font-size:14px!important}.thpladmin-modal .form-wizard .device-mobile{display:none}.thpladmin-modal .form-wizard .device-desktop{display:inline}.thpladmin-modal .form-wizard footer{left:0;padding:10px 20px;right:0;background:#f6f6f6;border-top:1px solid #e0e0e0;bottom:0;position:absolute;text-align:right;z-index:99999999}.thpladmin-modal .form-wizard footer .Loader{float:left;opacity:0;transition:1s opacity;margin-top:4px;line-height:27px}.thpladmin-modal .form-wizard footer .btn-toolbar>.btn{margin-left:5px}.thpladmin-modal .form-wizard .form{margin-top:0;padding-bottom:0}.thpladmin-modal .form-wizard .data-panel-content{margin-top:30px;padding-bottom:90px}.thwcfd_pp_table{width:100%}.thwcfd_pp_table tr.disabled td.label,.thwcfd_pp_table tr.disabled td.tip{opacity:.5}.thwcfd_pp_table tr.disabled.hide{display:none}.thwcfd_pp_table td{padding:5px 10px}.thwcfd_pp_table.compact td{padding:3px 10px}.thwcfd_pp_table td.h-separator{padding:20px 0!important}.thwcfd_pp_table td.h-separator span{display:block;height:2px;border-top:1px dashed #e6e6e6}.thwcfd_pp_table td.label{width:25%;text-align:right;padding-right:0;font-weight:700}.thwcfd_pp_table td.tip{width:16px;text-align:center;padding:0}.thwcfd_pp_table td.field{padding-left:0}.thwcfd_pp_table input[type=number],.thwcfd_pp_table input[type=text],.thwcfd_pp_table select{width:260px}.thwcfd_pp_table input[type=text].thwcfd-color{width:223px;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.thwcfd_pp_table .thpladmin-colorpickpreview{padding:9.5px 15px 8.5px 20px;border:1px solid #e2e2e2;border-radius:2px 0 0 2px;border-right:1;background-color:#fff}.product_page_th_extra_product_options_pro .select2-container .select2-selection{border-radius:2px;border:1px solid #e2e2e2;min-height:36px;padding:0 4px}.thpladmin-options-table{width:100%;margin-bottom:30px}.thpladmin-options-table input[type=text],.thpladmin-options-table select{width:100%;padding:0 6px}.thpladmin-options-table td{padding:2px 0 2px 4px}.thpladmin-options-table td.price{width:70px}.thpladmin-options-table td.price-type{width:110px}.thpladmin-options-table td.action-cell{width:100px}.thpladmin-options-table td.action-cell .btn{margin-left:6px;padding:1px 5px 2px 5px;font-size:18px;line-height:1}.thpladmin-options-table td.action-cell span.sort{cursor:move;font-size:18px;padding:0 1px 1px 1px;border-color:#999}.thpladmin-options-table td.action-cell span.sort::before{content:'\f333';content:'\f228';font-family:Dashicons;text-align:center;vertical-align:middle;line-height:1;color:#999}.thwcfd_tooltip{float:right;display:inline;position:relative;font-size:12px;height:100%;z-index:99999999}.thwcfd_tooltip img{padding:0;vertical-align:middle;cursor:help;border:medium none;height:16px;width:16px}.thwcfd_tooltip:hover:after{background:#333;background:#000;border-radius:5px;bottom:26px;color:#fff;content:attr(title);left:-100px;padding:10px 15px;position:absolute;z-index:9998;width:350px}.thwcfd_tooltip:hover:before{border:solid;border-color:#000 transparent;border-width:6px 6px 0 6px;bottom:20px;content:"";left:50%;position:absolute;z-index:9999}.thwcfd-settings-table{width:100%}.thwcfd-settings-table td{padding:5px 0}.thwcfd-settings-table td.section-title{padding:30px 0 5px 0;text-align:left;font-weight:700;text-transform:capitalize;border-bottom:1px dashed #cecece}.thwcfd-settings-table td.label{width:22%;text-align:left;padding-right:0;font-weight:400}.thwcfd-settings-table td.label span{display:block}.thwcfd-settings-table td.label .description{font-size:.9em}.thwcfd-settings-table td.tip{width:16px;text-align:center;padding:0}.thwcfd-settings-table td.field{padding-left:0}.thwcfd-settings-table textarea{width:90%;font-size:.9em}.iris-picker{z-index:100;display:none;position:absolute!important;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.2)}.iris-picker .ui-slider{border:0!important;margin:0!important;width:auto!important;height:auto!important;background:0 0!important}.iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.thpladmin-colorpickpreview{padding:7px 10px 7px 20px;border:1px solid #7e8993;border-radius:4px;border-right:1;background-color:#fff;border-top-right-radius:0;border-bottom-right-radius:0}.thwcfd-wrap .thpladmin-colorpick{border-left:0!important;margin-left:0!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.select2-drop-mask{z-index:99999998!important}.select2-drop{z-index:99999999!important}.select2-container{z-index:99999999!important}.select2-container .select2-search--inline .select2-search__field{margin-top:0!important;margin-bottom:0!important;border:0!important}.select2-container .select2-search__field{min-width:0!important;background-image:none!important}.select2-results .select2-results__group{margin:0!important;padding:4px!important}.select2-results .select2-results__option{margin:0!important;padding:4px 4px 4px 8px!important;font-size:.9em}.thwcfd-wrap .select2-container .select2-selection{border-radius:2px!important;border:1px solid #e2e2e2!important;min-height:36px!important;padding:0 4px!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding:0 0!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered li{font-size:.8em!important;margin:4px 4px 0 0!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered li.select2-search{margin:0!important;height:26px!important;width:auto!important}
|
1 |
+
.align-center{text-align:center!important}.woocommerce-message{margin-top:10px}.err_msgs{color:red}.empty-msg-row{padding:20px 0!important;text-align:center}.color-red{color:red!important}.status-active{font-size:15px;color:green}.status-deactive{font-size:15px;color:red}.thpladmin-subtitle{font-size:11px;color:#666}a.button.big-button{font-size:1.1rem;background-color:#fff;border:1px solid #42af42;color:#42af42}a.button.big-button:focus,a.button.big-button:hover{background-color:#42af42;border:1px solid #42af42;box-shadow:0 0 0 1px #42af42;color:#fff}table.thpladmin_fields_table td.sort{cursor:move;font-size:15px;text-align:center}table.thpladmin_fields_table td.sort::before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}.thpladmin-tab{width:100%;border:0 solid #d4d4d1;border-top:0;background-color:#fff;float:left}.thpladmin-tabs-menu{width:100%;margin:0;margin-top:10px;float:left;clear:both;border-bottom:1px solid #bcd4e6}.thpladmin-tabs-menu li{float:left;margin-right:5px;margin-bottom:-1px;border:1px solid #bcd4e6;outline:1px solid transparent;border-radius:4px 4px 0 0;background:#e1ecf4}.thpladmin-tabs-menu li.current{color:#555;position:relative;background-color:#fff;border-bottom:1px solid #fff;box-shadow:none}.thpladmin-tabs-menu li.first{margin-left:20px}.thpladmin-tabs-menu li a{font-size:18px;display:block;padding:12px 20px;text-decoration:none;color:#9fc2db;-webkit-transition:color .2s;transition:color .2s}.thpladmin-tabs-menu li a:focus{outline:0;box-shadow:none}.thpladmin-tabs-menu .current a{color:#2e7da3}.thpladmin-tab-content{padding:0;display:none;min-height:200px;max-height:485px;color:#000}.thpladmin-sections{list-style:outside none none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.thpladmin-sections li{display:inline-block;margin:0;padding:0;white-space:nowrap}.thpladmin-sections a.current{font-weight:600;border:medium none;color:#000}.thpladmin-sections a{line-height:2;padding:.2em;text-decoration:none}.thpladmin-sections .delete_section img,.thpladmin-sections a.edit_section img{width:12px;height:12px}.thpladmin-sections a.add_link{margin-left:30px;background-color:#00a0d2;border:1px solid #0073aa;color:#fff;padding:2px 5px;border-radius:3px}.thpladmin-sections a.add_link:hover{background-color:#0073aa}.thpladmin-form-table td{padding:5px 0}.thpladmin-form-table td.thpladmin-form-section-title{font-weight:700;border-bottom:1px dashed #cecece}.thpladmin_fields_table tr.strikeout td{background:rgba(255,0,0,.4)!important;opacity:.6;text-decoration:line-through}.thpladmin_fields_table tr.thpladmin-disabled td{opacity:.4}.thpladmin_fields_table tr.thpladmin-disabled td.td_select{opacity:1}.thpladmin_fields_table .td_actions{width:90px}.thpladmin_fields_table .td_enabled{width:80px}.thpladmin_fields_table .td_clear{width:65px}.thpladmin_fields_table .td_required{width:85px}.thpladmin_fields_table .td_select{width:45px}.thpladmin_fields_table .td_type{width:150px}.thpladmin_fields_table .td_validate{text-transform:capitalize}.thpladmin_fields_table th.status{white-space:nowrap}.thpladmin_fields_table .dashicons{line-height:inherit}.thpladmin_fields_table .td_actions .dashicons{background-color:#f7f7f7;border:1px solid #ccc;border-radius:3px;padding:0 2px 2px 2px;box-shadow:0 1px 0 #ccc;webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.thpladmin_fields_table .td_actions .dashicons.disabled{color:#ccc;border:1px solid #e9e9e9;cursor:default}.thpladmin_fields_table .td_actions .dashicons-edit{cursor:pointer}.thpladmin_fields_table .td_actions .dashicons-admin-page{cursor:pointer}.thpladmin-sections .dashicons{cursor:pointer}.thpladmin-sections .dashicons-no{color:#ff4c4c}.thpladmin-notice .logo{float:right}.thpladmin-notice .logo img{height:18px;margin-top:12px}@media only screen and (min-width:45em){ul.feature-list{-webkit-column-count:2;-moz-column-count:2;column-count:2}}.th-nice-box{border:1px solid #c3c4c7;box-shadow:0 2px 2px rgb(0 0 0 / 4%),0 4px 4px rgb(0 0 0 / 4%),0 8px 8px rgb(0 0 0 / 4%),0 16px 16px rgb(0 0 0 / 4%);background:#fff;margin:1.5rem 0 .75rem 0;padding:2rem}ul.feature-list li:before{content:"\f147";display:inline-block;-webkit-font-smoothing:antialiased;color:#2271b1;margin-right:10px;word-wrap:break-word;font-family:dashicons;font-weight:700}ul.star-list li:before{content:"\f155";color:#f90}.th-flexbox{display:flex;flex-wrap:wrap;justify-content:space-between}.th-flexbox-child{width:100%;height:auto;box-sizing:border-box}@media only screen and (min-width:45em){.th-flexbox-child{width:49%}}:root{--primary-bg-color:#007cba;--primary-text-color:#0071a1;--primary-border-color:#0071a1;--primary-alt-bg-color:#f3f5f6;--primary-alt-text-color:#0071a1;--primary-alt-border-color:#0071a1}*{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}ol,ul{margin-top:0;margin-bottom:10px}:after,:before{box-sizing:border-box}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{cursor:pointer;color:#337ab7;text-decoration:none;background-color:transparent}.btn-link,a{color:#528ff0}.wp-core-ui select{line-height:2;border-color:#e2e2e2}.pull-right{float:right!important}.ml-30{margin-left:30px!important}.mt-10{margin-top:10px!important}.mt-20{margin-top:20px!important}.p-0{padding:0!important}.ph-5{padding-left:5px!important;padding-right:5px!important}.pv-2{padding-top:2px!important;padding-bottom:2px!important}.thwcfd-wrap div.thwcfd-notice{margin:10px 20px 0 2px}.thwcfd-wrap input[type=number],.thwcfd-wrap input[type=text],.thwcfd-wrap select,.thwcfd-wrap textarea{color:#32373c;line-height:1;min-height:30px;height:36px;width:auto;background-color:#fff;border:1px solid #e2e2e2;border-radius:2px;overflow:hidden;font-size:14px;padding:0 12px;box-shadow:0 0 0 transparent}.thwcfd-wrap textarea{height:auto;overflow:auto;padding:2px 6px;line-height:1.5;resize:vertical}.thwcfd-wrap input[type=number]:disabled,.thwcfd-wrap input[type=text]:disabled,.thwcfd-wrap select:disabled,.thwcfd-wrap textarea:disabled{color:#a0a5aa;border-color:#ddd;background-color:#f7f7f7}.thwcfd-wrap input[type=number]:disabled::placeholder,.thwcfd-wrap input[type=text]:disabled::placeholder,.thwcfd-wrap select:disabled::placeholder,.thwcfd-wrap textarea:disabled::placeholder{color:#a0a5aa}.thwcfd-wrap .btn{display:inline-block;background-image:none;font-size:14px;font-weight:400;text-align:center;vertical-align:middle;white-space:nowrap;cursor:pointer;touch-action:manipulation;line-height:1;border-width:1px;border-style:solid;border-radius:2px;outline:0;margin:0;padding:12px 20px;box-sizing:border-box;-webkit-appearance:none;-webkit-box-sizing:border-box;transition:.1s;-webkit-transition:.1s;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;color:var(--primary-alt-text-color);background-color:var(--primary-alt-bg-color);border-color:var(--primary-alt-border-color)}.thwcfd-wrap .btn:hover{opacity:.9}.thwcfd-wrap .btn-small{font-size:13px;padding:8px 10px;border-radius:2px}.thwcfd-wrap .btn-tiny{font-size:13px;padding:5px 5px;border-radius:2px}.thwcfd-wrap .btn-primary{color:#fff;background-color:var(--primary-bg-color);border-color:var(--primary-border-color)}.thwcfd-wrap .btn-primary-alt{color:var(--primary-alt-text-color);background-color:var(--primary-alt-bg-color);border-color:var(--primary-alt-border-color)}.thwcfd-wrap .btn-danger{color:#fff;background-color:#f44336;border-color:#c3352b}.thwcfd-wrap .btn:disabled,.thwcfd-wrap .btn[disabled]{color:#cbcbcb;border-color:#cbcbcb;background-color:#fcfcfc;cursor:default}.thwcfd-checkbox{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.thwcfd-checkbox .cb-input,.thwcfd-radio .rb-input{display:block;height:0;margin:0;opacity:0;line-height:normal;box-sizing:border-box;overflow:hidden}.thwcfd-checkbox .cb-el{width:16px;margin-top:2px;margin-right:8px;height:16px;background:#fff;border-radius:2px;float:left;transition:.3s;cursor:pointer;border:1px solid #ccc}.thwcfd-checkbox .cb-el::after{content:'';display:block;width:6px;height:11px;opacity:0;transition:.2s;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) scale(1.5);margin:0 0 0 4px}.thwcfd-checkbox .cb-label{font-size:14px;cursor:pointer;white-space:normal;display:inline-block;font-weight:400;vertical-align:middle}.thwcfd-checkbox :checked+.cb-el{background:#528ff0;border-color:#528ff0}.thwcfd-checkbox :checked+.cb-el::after{opacity:1;transform:rotate(45deg)}.thwcfd-input-wrap{font-weight:400;display:block;margin:24px 0 8px;position:relative}.thwcfd-input-wrap .label{float:left;width:172px;text-align:right;margin-bottom:4px;font-weight:700;position:relative}.thwcfd-input-wrap.required .label::after{content:'*';font-size:12px;position:absolute;margin-left:1px;top:0;color:#f05050}.thwcfd-input-wrap .content{margin-left:190px;position:relative}.thwcfd-input-wrap.small .iel-wrapper{width:260px}.thwcfd-input-wrap .thwcfd-inputtext,.thwcfd-input-wrap .thwcfd-select{width:100%}.thpladmin-modal-mask{position:fixed;background-color:rgba(17,30,60,.6);top:0;left:0;width:100%;height:100%;z-index:9999;overflow:scroll;transition:opacity 250ms ease-in-out}.thpladmin-modal-mask{display:none}.thpladmin-modal .modal-container{position:absolute;background:#fff;border-radius:2px;overflow:hidden;left:50%;top:50%;transform:translate(-50%,-50%);width:90%;max-width:960px;min-height:560px;height:80vh;max-height:640px;animation:appear-down 250ms ease-in-out}.thpladmin-modal .modal-close{position:absolute;color:#58666e;font-size:30px;padding:9px 12px 11px;right:8px;top:8px;line-height:20px;cursor:pointer;z-index:10;user-select:none}.thpladmin-modal .form-wizard{max-width:1024px;height:80vh;max-height:640px;min-height:560px;background:#fafafa;position:relative}.thpladmin-modal .wizard aside{padding:24px 0;width:240px;background:#fff;position:absolute;height:100%;border-right:1px solid #eee}.thpladmin-modal .wizard aside p,.thpladmin-modal .wizard aside side-title{padding:0 24px}.thpladmin-modal .wizard aside side-title{font-size:18px;font-weight:700;display:block;margin-bottom:16px}.thpladmin-modal .wizard aside ul{margin:30px 0;padding:0}.thpladmin-modal .wizard aside li{cursor:pointer;list-style:none;padding:10px 24px;margin:4px 0;color:var(--primary-text-color);position:relative}.thpladmin-modal .wizard aside li.text-primary{color:var(--primary-text-color)}.thpladmin-modal .wizard aside li.active{background:var(--primary-bg-color);color:#fff}.thpladmin-modal .wizard aside li.disabled{display:none}.thpladmin-modal .wizard aside li .dashicons{margin-right:6px;line-height:18px;vertical-align:middle}.thpladmin-modal .wizard aside li.active .dashicons::before{color:#fff}.thpladmin-modal .wizard aside li i.i-chevron-right{font-style:normal;color:#fff;position:absolute;right:8px;font-family:dashicons;opacity:0;top:50%;transform:translate(-4px,-50%);transition:.35s}.thpladmin-modal .wizard aside li.active i.i-chevron-right{opacity:1}.thpladmin-modal .form-wizard main{left:0;right:0;padding:30px;position:absolute;bottom:80px;top:0;overflow:auto}.thpladmin-modal .wizard aside~footer,.thpladmin-modal .wizard aside~main{left:240px}.thpladmin-modal .form-wizard main.main-full{bottom:0}.thpladmin-modal .form-wizard main-title{text-transform:uppercase;display:block;font-weight:600;margin-bottom:12px;font-size:14px!important}.thpladmin-modal .form-wizard .sub-title{text-transform:uppercase;font-weight:600;font-size:14px!important}.thpladmin-modal .form-wizard .device-mobile{display:none}.thpladmin-modal .form-wizard .device-desktop{display:inline}.thpladmin-modal .form-wizard footer{left:0;padding:10px 20px;right:0;background:#f6f6f6;border-top:1px solid #e0e0e0;bottom:0;position:absolute;text-align:right;z-index:99999999}.thpladmin-modal .form-wizard footer .Loader{float:left;opacity:0;transition:1s opacity;margin-top:4px;line-height:27px}.thpladmin-modal .form-wizard footer .btn-toolbar>.btn{margin-left:5px}.thpladmin-modal .form-wizard .form{margin-top:0;padding-bottom:0}.thpladmin-modal .form-wizard .data-panel-content{margin-top:30px;padding-bottom:90px}.thwcfd_pp_table{width:100%}.thwcfd_pp_table tr.disabled td.label,.thwcfd_pp_table tr.disabled td.tip{opacity:.5}.thwcfd_pp_table tr.disabled.hide{display:none}.thwcfd_pp_table td{padding:5px 10px}.thwcfd_pp_table.compact td{padding:3px 10px}.thwcfd_pp_table td.h-separator{padding:20px 0!important}.thwcfd_pp_table td.h-separator span{display:block;height:2px;border-top:1px dashed #e6e6e6}.thwcfd_pp_table td.label{width:25%;text-align:right;padding-right:0;font-weight:700}.thwcfd_pp_table td.tip{width:16px;text-align:center;padding:0}.thwcfd_pp_table td.field{padding-left:0}.thwcfd_pp_table input[type=number],.thwcfd_pp_table input[type=text],.thwcfd_pp_table select{width:260px}.thwcfd_pp_table input[type=text].thwcfd-color{width:223px;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.thwcfd_pp_table .thpladmin-colorpickpreview{padding:9.5px 15px 8.5px 20px;border:1px solid #e2e2e2;border-radius:2px 0 0 2px;border-right:1;background-color:#fff}.product_page_th_extra_product_options_pro .select2-container .select2-selection{border-radius:2px;border:1px solid #e2e2e2;min-height:36px;padding:0 4px}.thpladmin-options-table{width:100%;margin-bottom:30px}.thpladmin-options-table input[type=text],.thpladmin-options-table select{width:100%;padding:0 6px}.thpladmin-options-table td{padding:2px 0 2px 4px}.thpladmin-options-table td.price{width:70px}.thpladmin-options-table td.price-type{width:110px}.thpladmin-options-table td.action-cell{width:100px}.thpladmin-options-table td.action-cell .btn{margin-left:6px;padding:1px 5px 2px 5px;font-size:18px;line-height:1}.thpladmin-options-table td.action-cell span.sort{cursor:move;font-size:18px;padding:0 1px 1px 1px;border-color:#999}.thpladmin-options-table td.action-cell span.sort::before{content:'\f333';content:'\f228';font-family:Dashicons;text-align:center;vertical-align:middle;line-height:1;color:#999}.thwcfd_tooltip{float:right;display:inline;position:relative;font-size:12px;height:100%;z-index:99999999}.thwcfd_tooltip img{padding:0;vertical-align:middle;cursor:help;border:medium none;height:16px;width:16px}.thwcfd_tooltip:hover:after{background:#333;background:#000;border-radius:5px;bottom:26px;color:#fff;content:attr(title);left:-100px;padding:10px 15px;position:absolute;z-index:9998;width:350px}.thwcfd_tooltip:hover:before{border:solid;border-color:#000 transparent;border-width:6px 6px 0 6px;bottom:20px;content:"";left:50%;position:absolute;z-index:9999}.thwcfd-settings-table{width:100%}.thwcfd-settings-table td{padding:5px 0}.thwcfd-settings-table td.section-title{padding:30px 0 5px 0;text-align:left;font-weight:700;text-transform:capitalize;border-bottom:1px dashed #cecece}.thwcfd-settings-table td.label{width:22%;text-align:left;padding-right:0;font-weight:400}.thwcfd-settings-table td.label span{display:block}.thwcfd-settings-table td.label .description{font-size:.9em}.thwcfd-settings-table td.tip{width:16px;text-align:center;padding:0}.thwcfd-settings-table td.field{padding-left:0}.thwcfd-settings-table textarea{width:90%;font-size:.9em}.iris-picker{z-index:100;display:none;position:absolute!important;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.2)}.iris-picker .ui-slider{border:0!important;margin:0!important;width:auto!important;height:auto!important;background:0 0!important}.iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.thpladmin-colorpickpreview{padding:7px 10px 7px 20px;border:1px solid #7e8993;border-radius:4px;border-right:1;background-color:#fff;border-top-right-radius:0;border-bottom-right-radius:0}.thwcfd-wrap .thpladmin-colorpick{border-left:0!important;margin-left:0!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.select2-drop-mask{z-index:99999998!important}.select2-drop{z-index:99999999!important}.select2-container{z-index:99999999!important}.select2-container .select2-search--inline .select2-search__field{margin-top:0!important;margin-bottom:0!important;border:0!important}.select2-container .select2-search__field{min-width:0!important;background-image:none!important}.select2-results .select2-results__group{margin:0!important;padding:4px!important}.select2-results .select2-results__option{margin:0!important;padding:4px 4px 4px 8px!important;font-size:.9em}.thwcfd-wrap .select2-container .select2-selection{border-radius:2px!important;border:1px solid #e2e2e2!important;min-height:36px!important;padding:0 4px!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding:0 0!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered li{font-size:.8em!important;margin:4px 4px 0 0!important}.thwcfd-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered li.select2-search{margin:0!important;height:26px!important;width:auto!important}
|
admin/assets/js/thwcfd-admin.js
CHANGED
@@ -853,15 +853,21 @@ var thwcfd_settings = (function($, window, document) {
|
|
853 |
$( document ).on( 'click', '.thpladmin-notice .notice-dismiss', function() {
|
854 |
var wrapper = $(this).closest('div.thpladmin-notice');
|
855 |
var nonce = wrapper.data("nonce");
|
|
|
856 |
var data = {
|
857 |
security: nonce,
|
858 |
-
action:
|
859 |
};
|
860 |
-
|
861 |
$.post( ajaxurl, data, function() {
|
862 |
-
|
863 |
});
|
864 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
|
866 |
function select_all_fields(elm){
|
867 |
var checkAll = $(elm).prop('checked');
|
@@ -877,7 +883,7 @@ var thwcfd_settings = (function($, window, document) {
|
|
877 |
}
|
878 |
row.find(".f_deleted").val(1);
|
879 |
//row.find(".f_edit_btn").prop('disabled', true);
|
880 |
-
});
|
881 |
}
|
882 |
|
883 |
function enable_disable_selected_fields(enabled){
|
@@ -896,11 +902,25 @@ var thwcfd_settings = (function($, window, document) {
|
|
896 |
row.find(".f_enabled").val(enabled);
|
897 |
});
|
898 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
|
900 |
return {
|
901 |
selectAllFields : select_all_fields,
|
902 |
removeSelectedFields : remove_selected_fields,
|
903 |
enableDisableSelectedFields : enable_disable_selected_fields,
|
|
|
904 |
};
|
905 |
}(window.jQuery, window, document));
|
906 |
|
@@ -918,4 +938,8 @@ function thwcfdEnableSelectedFields(){
|
|
918 |
|
919 |
function thwcfdDisableSelectedFields(){
|
920 |
thwcfd_settings.enableDisableSelectedFields(0);
|
921 |
-
}
|
|
|
|
|
|
|
|
853 |
$( document ).on( 'click', '.thpladmin-notice .notice-dismiss', function() {
|
854 |
var wrapper = $(this).closest('div.thpladmin-notice');
|
855 |
var nonce = wrapper.data("nonce");
|
856 |
+
var action = wrapper.data("action");
|
857 |
var data = {
|
858 |
security: nonce,
|
859 |
+
action: action,
|
860 |
};
|
|
|
861 |
$.post( ajaxurl, data, function() {
|
862 |
+
|
863 |
});
|
864 |
+
})
|
865 |
+
|
866 |
+
$(document).ready(function(){
|
867 |
+
setTimeout(function(){
|
868 |
+
$("#thwcfd_review_request_notice").fadeIn(500);
|
869 |
+
}, 2000);
|
870 |
+
});
|
871 |
|
872 |
function select_all_fields(elm){
|
873 |
var checkAll = $(elm).prop('checked');
|
883 |
}
|
884 |
row.find(".f_deleted").val(1);
|
885 |
//row.find(".f_edit_btn").prop('disabled', true);
|
886 |
+
});
|
887 |
}
|
888 |
|
889 |
function enable_disable_selected_fields(enabled){
|
902 |
row.find(".f_enabled").val(enabled);
|
903 |
});
|
904 |
}
|
905 |
+
|
906 |
+
function hide_review_request_notice(elm){
|
907 |
+
var wrapper = $(elm).closest('div.thpladmin-notice');
|
908 |
+
var nonce = wrapper.data("nonce");
|
909 |
+
var data = {
|
910 |
+
security: nonce,
|
911 |
+
action: 'skip_thwcfd_review_request_notice',
|
912 |
+
};
|
913 |
+
$.post( ajaxurl, data, function() {
|
914 |
+
|
915 |
+
});
|
916 |
+
$(wrapper).hide(50);
|
917 |
+
}
|
918 |
|
919 |
return {
|
920 |
selectAllFields : select_all_fields,
|
921 |
removeSelectedFields : remove_selected_fields,
|
922 |
enableDisableSelectedFields : enable_disable_selected_fields,
|
923 |
+
hideReviewRequestNotice : hide_review_request_notice,
|
924 |
};
|
925 |
}(window.jQuery, window, document));
|
926 |
|
938 |
|
939 |
function thwcfdDisableSelectedFields(){
|
940 |
thwcfd_settings.enableDisableSelectedFields(0);
|
941 |
+
}
|
942 |
+
|
943 |
+
function thwcfdHideReviewRequestNotice(elm){
|
944 |
+
thwcfd_settings.hideReviewRequestNotice(elm);
|
945 |
+
}
|
admin/assets/js/thwcfd-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function thwcfdSetupEnhancedMultiSelectWithValue(elm){thwcfd_base.setupEnhancedMultiSelectWithValue(elm)}function thwcfdSetupSortableTable(parent,elm,left){thwcfd_base.setupSortableTable(parent,elm,left)}function thwcfdCloseModal(elm){thwcfd_base.form_wizard_close(elm)}function thwcfdWizardNext(elm){thwcfd_base.form_wizard_next(elm)}function thwcfdWizardPrevious(elm){thwcfd_base.form_wizard_previous(elm)}function thwcfdOpenNewFieldForm(sectionName){thwcfd_settings_field.openNewFieldForm(sectionName)}function thwcfdOpenEditFieldForm(elm,rowId){thwcfd_settings_field.openEditFieldForm(elm,rowId)}function thwcfdOpenCopyFieldForm(elm,rowId){thwcfd_settings_field.openCopyFieldForm(elm,rowId)}function thwcfdFieldTypeChangeListner(elm){thwcfd_settings_field.fieldTypeChangeListner(elm)}function thwcfdAddNewOptionRow(elm){thwcfd_settings_field.addNewOptionRow(elm)}function thwcfdRemoveOptionRow(elm){thwcfd_settings_field.removeOptionRow(elm)}function thwcfdSaveField(elm){thwcfd_settings_field.save_field(elm)}function thwcfdSelectAllCheckoutFields(elm){thwcfd_settings.selectAllFields(elm)}function thwcfdRemoveSelectedFields(){thwcfd_settings.removeSelectedFields()}function thwcfdEnableSelectedFields(){thwcfd_settings.enableDisableSelectedFields(1)}function thwcfdDisableSelectedFields(){thwcfd_settings.enableDisableSelectedFields(0)}var thwcfd_base=function($,window,document){"use strict";function escapeHTML(html){var fn=function(tag){return{"&":"&","<":"<",">":">",'"':"""}[tag]||tag};return html.replace(/[&<>"]/g,fn)}function decodeHtml(str){if(str&&"string"==typeof str){var map={"&":"&","<":"<",">":">",""":'"',"'":"'"};return str.replace(/&|<|>|"|'/g,function(m){return map[m]})}return str}function isHtmlIdValid(id){return/^[a-z\_]+[a-z0-9\_]*$/.test(id.trim())}function isValidHexColor(value){return!!preg_match("/^#[a-f0-9]{6}$/i",value)}function is_option_field(type){var result=!1;return"select"!=type&&"multiselect"!=type&&"radio"!=type&&"checkboxgroup"!=type||(result=!0),result}function setup_tiptip_tooltips(){var tiptip_args={attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200};$(".tips").tipTip(tiptip_args)}function setup_enhanced_multi_select(parent){parent.find("select.thwcfd-enhanced-multi-select").each(function(){$(this).hasClass("enhanced")||$(this).selectWoo({allowClear:!0,placeholder:$(this).data("placeholder")}).addClass("enhanced")})}function setup_enhanced_multi_select_with_value(parent){parent.find("select.thwcfd-enhanced-multi-select").each(function(){if(!$(this).hasClass("enhanced")){$(this).selectWoo({allowClear:!0,placeholder:$(this).data("placeholder")}).addClass("enhanced");var value=$(this).data("value");value=value.split(","),$(this).val(value),$(this).trigger("change")}})}function setup_color_picker(form){form.find(".thpladmin-colorpick").iris({change:function(event,ui){$(this).parent().find(".thpladmin-colorpickpreview").css({backgroundColor:ui.color.toString()})},hide:!0,border:!0}).click(function(){$(".iris-picker").hide(),$(this).closest("td").find(".iris-picker").show()}),$("body").click(function(){$(".iris-picker").hide()}),$(".thpladmin-colorpick").click(function(event){event.stopPropagation()})}function setup_color_pick_preview(form){form.find(".thpladmin-colorpick").each(function(){$(this).parent().find(".thpladmin-colorpickpreview").css({backgroundColor:this.value})})}function prepare_field_order_indexes(elm){$(elm+" tbody tr").each(function(index,el){$("input.f_order",el).val(parseInt($(el).index(elm+" tbody tr")))})}function setup_sortable_table(parent,elm,left){parent.find(elm+" tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:".sort",scrollSensitivity:40,helper:function(e,ui){return ui.children().each(function(){$(this).width($(this).width())}),ui.css("left",left),ui}}),$(elm+" tbody").on("sortstart",function(event,ui){ui.item.css("background-color","#f6f6f6")}),$(elm+" tbody").on("sortstop",function(event,ui){ui.item.removeAttr("style"),prepare_field_order_indexes(elm)})}function get_property_field_value(form,type,name){var value="";switch(type){case"select":value=form.find("select[name=i_"+name+"]").val(),value=null==value?"":value;break;case"checkbox":value=form.find("input[name=i_"+name+"]").prop("checked"),value=value?1:0;break;case"textarea":value=form.find("textarea[name=i_"+name+"]").val(),value=null==value?"":value;break;default:value=form.find("input[name=i_"+name+"]").val(),value=null==value?"":value}return value}function set_property_field_value(form,type,name,value,multiple){switch(type){case"select":1==multiple?(value="string"==typeof value?value.split(","):value,name+="[]",form.find('select[name="i_'+name+'"]').val(value).trigger("change")):form.find('select[name="i_'+name+'"]').val(value);break;case"checkbox":value=1==value||"yes"==value,form.find("input[name=i_"+name+"]").prop("checked",value);break;case"textarea":value=value?decodeHtml(value):value,form.find("textarea[name=i_"+name+"]").val(value);break;case"colorpicker":var bg_color=value?{backgroundColor:value}:{};form.find("input[name=i_"+name+"]").val(value),form.find("."+name+"_preview").css(bg_color);break;default:value=value?decodeHtml(value):value,form.find("input[name=i_"+name+"]").val(value)}}function setup_form_wizard(){$(".pp_nav_links > li").click(function(){var index=$(this).data("index");open_tab($(this).closest(".thpladmin-modal-mask"),$(this),index),active_tab=index})}function get_popup(elm){return $(elm).closest(".thpladmin-modal-mask")}function get_active_tab(popup){return popup.find("ul.pp_nav_links").find("li.active")}function get_next_tab_index(elm){var popup=get_popup(elm),active=get_active_tab(popup),link=active.nextAll("li").not(".disabled").first();return link.length?link.data("index"):active_tab}function get_prev_tab_index(elm){var popup=get_popup(elm),active=get_active_tab(popup),link=active.prevAll("li").not(".disabled").first();return link.length?link.data("index"):active_tab}function form_wizard_open(popup){active_tab=0,popup.find("ul.pp_nav_links li").first().click(),popup.css("display","block")}function form_wizard_close(elm){get_popup(elm).css("display","none"),active_tab=0}function form_wizard_next(elm){active_tab=get_next_tab_index(elm),move_to(elm,active_tab)}function form_wizard_previous(elm){active_tab=get_prev_tab_index(elm),move_to(elm,active_tab)}function form_wizard_start(elm){active_tab=0,move_to(elm,active_tab)}function move_to(elm,index){var popup=get_popup(elm);open_tab(popup,popup.find('*[data-index="'+index+'"]'),index)}function open_tab(popup,link,index){var panel=popup.find(".data_panel_"+index);close_all_data_panel(popup),link.addClass("active"),panel.css("display","block"),enable_disable_btns(popup,link)}function close_all_data_panel(popup){popup.find(".pp_nav_links > li").removeClass("active"),popup.find(".data-panel").css("display","none")}function enable_disable_tab(popup,index,disable){var link=popup.find('*[data-index="'+index+'"]'),panel=popup.find(".data_panel_"+index);disable?(link.addClass("disabled"),panel.find(":input").attr("disabled",!0)):(link.removeClass("disabled"),panel.find(":input").attr("disabled",!1))}function form_wizard_enable_tab(popup,index){enable_disable_tab(popup,index,0)}function form_wizard_disable_tab(popup,index){enable_disable_tab(popup,index,1)}function form_wizard_enable_all_tabs(popup){popup.find(".pp_nav_links > li").removeClass("disabled")}function enable_disable_btns(popup,link){var nextBtn=popup.find(".next-btn"),prevBtn=popup.find(".prev-btn");link.hasClass("first")?(nextBtn.prop("disabled",!1),prevBtn.prop("disabled",!0)):link.hasClass("last")?(nextBtn.prop("disabled",!0),prevBtn.prop("disabled",!1)):(nextBtn.prop("disabled",!1),prevBtn.prop("disabled",!1))}var active_tab=0;return{escapeHTML:escapeHTML,decodeHtml:decodeHtml,isHtmlIdValid:isHtmlIdValid,isValidHexColor:isValidHexColor,is_option_field:is_option_field,setup_tiptip_tooltips:setup_tiptip_tooltips,setupEnhancedMultiSelect:setup_enhanced_multi_select,setupEnhancedMultiSelectWithValue:setup_enhanced_multi_select_with_value,setupColorPicker:setup_color_picker,setup_color_pick_preview:setup_color_pick_preview,setupSortableTable:setup_sortable_table,get_property_field_value:get_property_field_value,set_property_field_value:set_property_field_value,setup_form_wizard:setup_form_wizard,form_wizard_open:form_wizard_open,form_wizard_close:form_wizard_close,form_wizard_next:form_wizard_next,form_wizard_previous:form_wizard_previous,form_wizard_start:form_wizard_start,form_wizard_enable_tab:form_wizard_enable_tab,form_wizard_disable_tab:form_wizard_disable_tab,form_wizard_enable_all_tabs:form_wizard_enable_all_tabs}}(window.jQuery,window,document),thwcfd_settings_field=function($,window,document){"use strict";function open_new_field_form(sname){open_field_form("new",!1,sname)}function open_edit_field_form(elm,rowId){open_field_form("edit",elm,!1)}function open_copy_field_form(elm,rowId){open_field_form("copy",elm,!1)}function open_field_form(type,elm,sname){var popup=$("#thwcfd_field_form_pp");populate_field_form(popup,$("#thwcfd_field_form"),type,elm,sname),thwcfd_base.form_wizard_open(popup)}function populate_field_form(popup,form,action,elm,sname){var title="edit"===action?"Edit Field":"New Field";if(popup.find(".wizard-title").text(title),form.find(".err_msgs").html(""),form.find("input[name=f_action]").val(action),"new"===action)"billing"!=sname&&"shipping"!=sname&&"additional"!=sname||(sname+="_"),clear_field_form_general(form),form.find("select[name=i_type]").change(),thwcfd_base.set_property_field_value(form,"text","name",sname,0),thwcfd_base.set_property_field_value(form,"text","class","form-row-wide",0);else{var row=$(elm).closest("tr"),props_json=row.find(".f_props").val(),props=JSON.parse(props_json);populate_field_form_general(action,form,props),form.find("select[name=i_type]").change(),populate_field_form_props(form,row,props)}}function clear_field_form_general(form){thwcfd_base.set_property_field_value(form,"hidden","autocomplete","",0),thwcfd_base.set_property_field_value(form,"hidden","priority","",0),thwcfd_base.set_property_field_value(form,"hidden","custom","",0),thwcfd_base.set_property_field_value(form,"hidden","oname","",0),thwcfd_base.set_property_field_value(form,"hidden","otype","",0),thwcfd_base.set_property_field_value(form,"select","type","text",0),thwcfd_base.set_property_field_value(form,"text","name","",0)}function populate_field_form_general(action,form,props){var autocomplete=props.autocomplete?props.autocomplete:"",priority=props.priority?props.priority:"",custom=props.custom?props.custom:"",type=props.type?props.type:"text",name=props.name?props.name:"";"copy"===action&&(name=""),thwcfd_base.set_property_field_value(form,"hidden","autocomplete",autocomplete,0),thwcfd_base.set_property_field_value(form,"hidden","priority",priority,0),thwcfd_base.set_property_field_value(form,"hidden","custom",custom,0),thwcfd_base.set_property_field_value(form,"hidden","oname",name,0),thwcfd_base.set_property_field_value(form,"hidden","otype",type,0),thwcfd_base.set_property_field_value(form,"select","type",type,0),thwcfd_base.set_property_field_value(form,"text","name",name,0)}function populate_field_form_props(form,row,props){var ftype=props.type,custom=props.custom?props.custom:"";$.each(FIELD_FORM_PROPS,function(name,field){if("name"==name||"type"==name)return!0;var type=field.type,value=props&&props[name]?props[name]:"";"textarea"==ftype&&"value"==name&&(type="textarea"),thwcfd_base.set_property_field_value(form,type,name,value,field.multiple),"select"==type?(name=1==field.multiple?name+"[]":name,1!=field.multiple&&1!=field.change||form.find('select[name="i_'+name+'"]').trigger("change")):"checkbox"==type&&1==field.change&&form.find('input[name="i_'+name+'"]').trigger("change")});var optionsJson=row.find(".f_options").val();populate_options_list(form,optionsJson),1==custom?(form.find("input[name=i_name]").prop("disabled",!1),form.find("select[name=i_type]").prop("disabled",!1),form.find("input[name=i_show_in_email]").prop("disabled",!1),form.find("input[name=i_show_in_order]").prop("disabled",!1)):(thwcfd_base.set_property_field_value(form,"checkbox","show_in_email",!0,0),thwcfd_base.set_property_field_value(form,"checkbox","show_in_order",!0,0),form.find("input[name=i_name]").prop("disabled",!0),form.find("select[name=i_type]").prop("disabled",!0),form.find("input[name=i_show_in_email]").prop("disabled",!0),form.find("input[name=i_show_in_order]").prop("disabled",!0),form.find("input[name=i_label]").focus())}function field_type_change_listner(elm){var popup=$("#thwcfd_field_form_pp"),form=$(elm).closest("form"),type=$(elm).val();type=null==type?"text":type,form.find(".thwcfd_field_form_tab_general_placeholder").html($("#thwcfd_field_form_id_"+type).html()),enable_all_tabs_and_fields(popup,form),type in FIELDS_TO_HIDE&&$.each(FIELDS_TO_HIDE[type],function(index,name){if(FIELD_FORM_PROPS[name]){var f_props=FIELD_FORM_PROPS[name];disable_hide_field(form,f_props.type,name)}}),thwcfd_base.setupEnhancedMultiSelect(form),thwcfd_base.setupColorPicker(form),thwcfd_base.setupSortableTable(form,".thwcfd-option-list","100")}function enable_all_tabs_and_fields(popup,form){thwcfd_base.form_wizard_enable_all_tabs(popup),form.find(":input").attr("disabled",!1),form.find("tr").removeClass("disabled hide")}function enable_disable_field(form,type,name,enabled,hide){var elm=null;switch(type){case"select":elm=form.find('select[name="i_'+name+'"]'),0==elm.length&&(elm=form.find('select[name="i_'+name+'[]"]'));break;case"textarea":elm=form.find("textarea[name=i_"+name+"]"),0==elm.length&&(elm=form.find('textarea[name="i_'+name+'[]"]'));break;default:elm=form.find("input[name=i_"+name+"]"),0==elm.length&&(elm=form.find('input[name="i_'+name+'[]"]'))}if(elm&&elm.length){var rowClass=hide?"disabled hide":"disabled";enabled?(elm.attr("disabled",!1),elm.closest("tr.form_field_"+name).removeClass("disabled hide")):(elm.attr("disabled",!0),elm.closest("tr.form_field_"+name).addClass(rowClass))}}function disable_hide_field(form,type,name){enable_disable_field(form,type,name,!1,!0)}function save_field(elm){var popup=$("#thwcfd_field_form_pp"),form=$("#thwcfd_field_form");validate_field_form(form,popup)&&(prepare_field_form(form),form.submit())}function validate_field_form(form,popup){var err_msgs="",fname=thwcfd_base.get_property_field_value(form,"text","name"),ftype=thwcfd_base.get_property_field_value(form,"select","type"),fotype=(thwcfd_base.get_property_field_value(form,"text","label"),thwcfd_base.get_property_field_value(form,"hidden","otype"));return""==ftype&&-1==$.inArray(fotype,SPECIAL_FIELD_TYPES)?err_msgs="Type is required":""==fname?err_msgs="Name is required":thwcfd_base.isHtmlIdValid(fname)||(err_msgs=MSG_INVALID_NAME),""==err_msgs||(form.find(".err_msgs").html(err_msgs),thwcfd_base.form_wizard_start(popup),!1)}function prepare_field_form(form){var options_json=get_options(form);thwcfd_base.set_property_field_value(form,"hidden","options_json",options_json,0)}function get_options(form){for(var optionsKey=form.find("input[name='i_options_key[]']").map(function(){return $(this).val()}).get(),optionsText=form.find("input[name='i_options_text[]']").map(function(){return $(this).val()}).get(),optionsSize=optionsText.length,optionsArr=[],i=0;i<optionsSize;i++){var optionDetails={};optionDetails.key=optionsKey[i],optionDetails.text=optionsText[i],optionsArr.push(optionDetails)}var optionsJson=optionsArr.length>0?JSON.stringify(optionsArr):"";return optionsJson=encodeURIComponent(optionsJson)}function populate_options_list(form,optionsJson){var optionsHtml="";if(optionsJson)try{optionsJson=decodeURIComponent(optionsJson);var optionsList=$.parseJSON(optionsJson);optionsList&&jQuery.each(optionsList,function(){optionsHtml+=prepare_option_row_html(this)})}catch(err){console.log(err)}var optionsTable=form.find(".thwcfd-option-list tbody");optionsHtml?optionsTable.html(optionsHtml):optionsTable.html(prepare_option_row_html(null))}function prepare_option_row_html(option){var key="",text="";option&&(key=option.key?option.key:"",text=option.text?option.text:"");var html="<tr>";return html+='<td class="key"><input type="text" name="i_options_key[]" value="'+key+'" placeholder="Option Value"></td>',html+='<td class="value"><input type="text" name="i_options_text[]" value="'+text+'" placeholder="Option Text"></td>',html+='<td class="action-cell">',html+='<a href="javascript:void(0)" onclick="thwcfdAddNewOptionRow(this)" class="btn btn-tiny btn-primary" title="Add new option">+</a>',html+='<a href="javascript:void(0)" onclick="thwcfdRemoveOptionRow(this)" class="btn btn-tiny btn-danger" title="Remove option">x</a>',html+='<span class="btn btn-tiny sort ui-sortable-handle"></span></td>',html+="</tr>"}function add_new_option_row(elm){var ptable=$(elm).closest("table");ptable.find("tbody tr").size()>0?ptable.find("tbody tr:last").after(prepare_option_row_html(null)):ptable.find("tbody").append(prepare_option_row_html(null))}function remove_option_row(elm){var ptable=$(elm).closest("table");$(elm).closest("tr").remove(),0==ptable.find("tbody tr").size()&&ptable.find("tbody").append(prepare_option_row_html(null))}var MSG_INVALID_NAME='NAME/ID must begin with a lowercase letter ([a-z]) or underscores ("_") and may be followed by any number of lowercase letters, digits ([0-9]) and underscores ("_")',SPECIAL_FIELD_TYPES=["country","state","city"],FIELD_FORM_PROPS={name:{name:"name",type:"text"},type:{name:"type",type:"select"},label:{name:"label",type:"text"},default:{name:"default",type:"text"},placeholder:{name:"placeholder",type:"text"},class:{name:"class",type:"text"},validate:{name:"validate",type:"select",multiple:1},required:{name:"required",type:"checkbox"},enabled:{name:"enabled",type:"checkbox"},show_in_email:{name:"show_in_email",type:"checkbox"},show_in_order:{name:"show_in_order",type:"checkbox"}},FIELDS_TO_HIDE={radio:["placeholder","validate"],select:["validate"]};return{openNewFieldForm:open_new_field_form,openEditFieldForm:open_edit_field_form,openCopyFieldForm:open_copy_field_form,fieldTypeChangeListner:field_type_change_listner,addNewOptionRow:add_new_option_row,removeOptionRow:remove_option_row,save_field:save_field}}(window.jQuery,window,document),thwcfd_settings=function($,window,document){"use strict";function select_all_fields(elm){var checkAll=$(elm).prop("checked");$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]").prop("checked",checkAll)}function remove_selected_fields(){$("#thwcfd_checkout_fields tbody tr").removeClass("strikeout"),$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]:checked").each(function(){var row=$(this).closest("tr");row.hasClass("strikeout")||row.addClass("strikeout"),row.find(".f_deleted").val(1)})}function enable_disable_selected_fields(enabled){$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]:checked").each(function(){var row=$(this).closest("tr");0==enabled?row.hasClass("thpladmin-disabled")||row.addClass("thpladmin-disabled"):row.removeClass("thpladmin-disabled"),row.find(".td_enabled").html(1==enabled?'<span class="dashicons dashicons-yes tips" data-tip="Yes"></span>':"-"),row.find(".f_enabled").val(enabled)})}return $(function(){var settings_form=$("#thwcfd_checkout_fields_form");thwcfd_base.setupSortableTable(settings_form,"#thwcfd_checkout_fields","0"),thwcfd_base.setup_tiptip_tooltips(),thwcfd_base.setup_form_wizard()}),$(document).on("click",".thpladmin-notice .notice-dismiss",function(){var wrapper=$(this).closest("div.thpladmin-notice"),nonce=wrapper.data("nonce"),data={security:nonce,action:"dismiss_thwcfd_upgrade_notice"};$.post(ajaxurl,data,function(){})}),{selectAllFields:select_all_fields,removeSelectedFields:remove_selected_fields,enableDisableSelectedFields:enable_disable_selected_fields}}(window.jQuery,window,document);
|
1 |
+
function thwcfdSetupEnhancedMultiSelectWithValue(elm){thwcfd_base.setupEnhancedMultiSelectWithValue(elm)}function thwcfdSetupSortableTable(parent,elm,left){thwcfd_base.setupSortableTable(parent,elm,left)}function thwcfdCloseModal(elm){thwcfd_base.form_wizard_close(elm)}function thwcfdWizardNext(elm){thwcfd_base.form_wizard_next(elm)}function thwcfdWizardPrevious(elm){thwcfd_base.form_wizard_previous(elm)}function thwcfdOpenNewFieldForm(sectionName){thwcfd_settings_field.openNewFieldForm(sectionName)}function thwcfdOpenEditFieldForm(elm,rowId){thwcfd_settings_field.openEditFieldForm(elm,rowId)}function thwcfdOpenCopyFieldForm(elm,rowId){thwcfd_settings_field.openCopyFieldForm(elm,rowId)}function thwcfdFieldTypeChangeListner(elm){thwcfd_settings_field.fieldTypeChangeListner(elm)}function thwcfdAddNewOptionRow(elm){thwcfd_settings_field.addNewOptionRow(elm)}function thwcfdRemoveOptionRow(elm){thwcfd_settings_field.removeOptionRow(elm)}function thwcfdSaveField(elm){thwcfd_settings_field.save_field(elm)}function thwcfdSelectAllCheckoutFields(elm){thwcfd_settings.selectAllFields(elm)}function thwcfdRemoveSelectedFields(){thwcfd_settings.removeSelectedFields()}function thwcfdEnableSelectedFields(){thwcfd_settings.enableDisableSelectedFields(1)}function thwcfdDisableSelectedFields(){thwcfd_settings.enableDisableSelectedFields(0)}function thwcfdHideReviewRequestNotice(elm){thwcfd_settings.hideReviewRequestNotice(elm)}var thwcfd_base=function($,window,document){"use strict";function escapeHTML(html){var fn=function(tag){return{"&":"&","<":"<",">":">",'"':"""}[tag]||tag};return html.replace(/[&<>"]/g,fn)}function decodeHtml(str){if(str&&"string"==typeof str){var map={"&":"&","<":"<",">":">",""":'"',"'":"'"};return str.replace(/&|<|>|"|'/g,function(m){return map[m]})}return str}function isHtmlIdValid(id){return/^[a-z\_]+[a-z0-9\_]*$/.test(id.trim())}function isValidHexColor(value){return!!preg_match("/^#[a-f0-9]{6}$/i",value)}function is_option_field(type){var result=!1;return"select"!=type&&"multiselect"!=type&&"radio"!=type&&"checkboxgroup"!=type||(result=!0),result}function setup_tiptip_tooltips(){var tiptip_args={attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200};$(".tips").tipTip(tiptip_args)}function setup_enhanced_multi_select(parent){parent.find("select.thwcfd-enhanced-multi-select").each(function(){$(this).hasClass("enhanced")||$(this).selectWoo({allowClear:!0,placeholder:$(this).data("placeholder")}).addClass("enhanced")})}function setup_enhanced_multi_select_with_value(parent){parent.find("select.thwcfd-enhanced-multi-select").each(function(){if(!$(this).hasClass("enhanced")){$(this).selectWoo({allowClear:!0,placeholder:$(this).data("placeholder")}).addClass("enhanced");var value=$(this).data("value");value=value.split(","),$(this).val(value),$(this).trigger("change")}})}function setup_color_picker(form){form.find(".thpladmin-colorpick").iris({change:function(event,ui){$(this).parent().find(".thpladmin-colorpickpreview").css({backgroundColor:ui.color.toString()})},hide:!0,border:!0}).click(function(){$(".iris-picker").hide(),$(this).closest("td").find(".iris-picker").show()}),$("body").click(function(){$(".iris-picker").hide()}),$(".thpladmin-colorpick").click(function(event){event.stopPropagation()})}function setup_color_pick_preview(form){form.find(".thpladmin-colorpick").each(function(){$(this).parent().find(".thpladmin-colorpickpreview").css({backgroundColor:this.value})})}function prepare_field_order_indexes(elm){$(elm+" tbody tr").each(function(index,el){$("input.f_order",el).val(parseInt($(el).index(elm+" tbody tr")))})}function setup_sortable_table(parent,elm,left){parent.find(elm+" tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:".sort",scrollSensitivity:40,helper:function(e,ui){return ui.children().each(function(){$(this).width($(this).width())}),ui.css("left",left),ui}}),$(elm+" tbody").on("sortstart",function(event,ui){ui.item.css("background-color","#f6f6f6")}),$(elm+" tbody").on("sortstop",function(event,ui){ui.item.removeAttr("style"),prepare_field_order_indexes(elm)})}function get_property_field_value(form,type,name){var value="";switch(type){case"select":value=form.find("select[name=i_"+name+"]").val(),value=null==value?"":value;break;case"checkbox":value=form.find("input[name=i_"+name+"]").prop("checked"),value=value?1:0;break;case"textarea":value=form.find("textarea[name=i_"+name+"]").val(),value=null==value?"":value;break;default:value=form.find("input[name=i_"+name+"]").val(),value=null==value?"":value}return value}function set_property_field_value(form,type,name,value,multiple){switch(type){case"select":1==multiple?(value="string"==typeof value?value.split(","):value,name+="[]",form.find('select[name="i_'+name+'"]').val(value).trigger("change")):form.find('select[name="i_'+name+'"]').val(value);break;case"checkbox":value=1==value||"yes"==value,form.find("input[name=i_"+name+"]").prop("checked",value);break;case"textarea":value=value?decodeHtml(value):value,form.find("textarea[name=i_"+name+"]").val(value);break;case"colorpicker":var bg_color=value?{backgroundColor:value}:{};form.find("input[name=i_"+name+"]").val(value),form.find("."+name+"_preview").css(bg_color);break;default:value=value?decodeHtml(value):value,form.find("input[name=i_"+name+"]").val(value)}}function setup_form_wizard(){$(".pp_nav_links > li").click(function(){var index=$(this).data("index");open_tab($(this).closest(".thpladmin-modal-mask"),$(this),index),active_tab=index})}function get_popup(elm){return $(elm).closest(".thpladmin-modal-mask")}function get_active_tab(popup){return popup.find("ul.pp_nav_links").find("li.active")}function get_next_tab_index(elm){var popup=get_popup(elm),active=get_active_tab(popup),link=active.nextAll("li").not(".disabled").first();return link.length?link.data("index"):active_tab}function get_prev_tab_index(elm){var popup=get_popup(elm),active=get_active_tab(popup),link=active.prevAll("li").not(".disabled").first();return link.length?link.data("index"):active_tab}function form_wizard_open(popup){active_tab=0,popup.find("ul.pp_nav_links li").first().click(),popup.css("display","block")}function form_wizard_close(elm){get_popup(elm).css("display","none"),active_tab=0}function form_wizard_next(elm){active_tab=get_next_tab_index(elm),move_to(elm,active_tab)}function form_wizard_previous(elm){active_tab=get_prev_tab_index(elm),move_to(elm,active_tab)}function form_wizard_start(elm){active_tab=0,move_to(elm,active_tab)}function move_to(elm,index){var popup=get_popup(elm);open_tab(popup,popup.find('*[data-index="'+index+'"]'),index)}function open_tab(popup,link,index){var panel=popup.find(".data_panel_"+index);close_all_data_panel(popup),link.addClass("active"),panel.css("display","block"),enable_disable_btns(popup,link)}function close_all_data_panel(popup){popup.find(".pp_nav_links > li").removeClass("active"),popup.find(".data-panel").css("display","none")}function enable_disable_tab(popup,index,disable){var link=popup.find('*[data-index="'+index+'"]'),panel=popup.find(".data_panel_"+index);disable?(link.addClass("disabled"),panel.find(":input").attr("disabled",!0)):(link.removeClass("disabled"),panel.find(":input").attr("disabled",!1))}function form_wizard_enable_tab(popup,index){enable_disable_tab(popup,index,0)}function form_wizard_disable_tab(popup,index){enable_disable_tab(popup,index,1)}function form_wizard_enable_all_tabs(popup){popup.find(".pp_nav_links > li").removeClass("disabled")}function enable_disable_btns(popup,link){var nextBtn=popup.find(".next-btn"),prevBtn=popup.find(".prev-btn");link.hasClass("first")?(nextBtn.prop("disabled",!1),prevBtn.prop("disabled",!0)):link.hasClass("last")?(nextBtn.prop("disabled",!0),prevBtn.prop("disabled",!1)):(nextBtn.prop("disabled",!1),prevBtn.prop("disabled",!1))}var active_tab=0;return{escapeHTML:escapeHTML,decodeHtml:decodeHtml,isHtmlIdValid:isHtmlIdValid,isValidHexColor:isValidHexColor,is_option_field:is_option_field,setup_tiptip_tooltips:setup_tiptip_tooltips,setupEnhancedMultiSelect:setup_enhanced_multi_select,setupEnhancedMultiSelectWithValue:setup_enhanced_multi_select_with_value,setupColorPicker:setup_color_picker,setup_color_pick_preview:setup_color_pick_preview,setupSortableTable:setup_sortable_table,get_property_field_value:get_property_field_value,set_property_field_value:set_property_field_value,setup_form_wizard:setup_form_wizard,form_wizard_open:form_wizard_open,form_wizard_close:form_wizard_close,form_wizard_next:form_wizard_next,form_wizard_previous:form_wizard_previous,form_wizard_start:form_wizard_start,form_wizard_enable_tab:form_wizard_enable_tab,form_wizard_disable_tab:form_wizard_disable_tab,form_wizard_enable_all_tabs:form_wizard_enable_all_tabs}}(window.jQuery,window,document),thwcfd_settings_field=function($,window,document){"use strict";function open_new_field_form(sname){open_field_form("new",!1,sname)}function open_edit_field_form(elm,rowId){open_field_form("edit",elm,!1)}function open_copy_field_form(elm,rowId){open_field_form("copy",elm,!1)}function open_field_form(type,elm,sname){var popup=$("#thwcfd_field_form_pp");populate_field_form(popup,$("#thwcfd_field_form"),type,elm,sname),thwcfd_base.form_wizard_open(popup)}function populate_field_form(popup,form,action,elm,sname){var title="edit"===action?"Edit Field":"New Field";if(popup.find(".wizard-title").text(title),form.find(".err_msgs").html(""),form.find("input[name=f_action]").val(action),"new"===action)"billing"!=sname&&"shipping"!=sname&&"additional"!=sname||(sname+="_"),clear_field_form_general(form),form.find("select[name=i_type]").change(),thwcfd_base.set_property_field_value(form,"text","name",sname,0),thwcfd_base.set_property_field_value(form,"text","class","form-row-wide",0);else{var row=$(elm).closest("tr"),props_json=row.find(".f_props").val(),props=JSON.parse(props_json);populate_field_form_general(action,form,props),form.find("select[name=i_type]").change(),populate_field_form_props(form,row,props)}}function clear_field_form_general(form){thwcfd_base.set_property_field_value(form,"hidden","autocomplete","",0),thwcfd_base.set_property_field_value(form,"hidden","priority","",0),thwcfd_base.set_property_field_value(form,"hidden","custom","",0),thwcfd_base.set_property_field_value(form,"hidden","oname","",0),thwcfd_base.set_property_field_value(form,"hidden","otype","",0),thwcfd_base.set_property_field_value(form,"select","type","text",0),thwcfd_base.set_property_field_value(form,"text","name","",0)}function populate_field_form_general(action,form,props){var autocomplete=props.autocomplete?props.autocomplete:"",priority=props.priority?props.priority:"",custom=props.custom?props.custom:"",type=props.type?props.type:"text",name=props.name?props.name:"";"copy"===action&&(name=""),thwcfd_base.set_property_field_value(form,"hidden","autocomplete",autocomplete,0),thwcfd_base.set_property_field_value(form,"hidden","priority",priority,0),thwcfd_base.set_property_field_value(form,"hidden","custom",custom,0),thwcfd_base.set_property_field_value(form,"hidden","oname",name,0),thwcfd_base.set_property_field_value(form,"hidden","otype",type,0),thwcfd_base.set_property_field_value(form,"select","type",type,0),thwcfd_base.set_property_field_value(form,"text","name",name,0)}function populate_field_form_props(form,row,props){var ftype=props.type,custom=props.custom?props.custom:"";$.each(FIELD_FORM_PROPS,function(name,field){if("name"==name||"type"==name)return!0;var type=field.type,value=props&&props[name]?props[name]:"";"textarea"==ftype&&"value"==name&&(type="textarea"),thwcfd_base.set_property_field_value(form,type,name,value,field.multiple),"select"==type?(name=1==field.multiple?name+"[]":name,1!=field.multiple&&1!=field.change||form.find('select[name="i_'+name+'"]').trigger("change")):"checkbox"==type&&1==field.change&&form.find('input[name="i_'+name+'"]').trigger("change")});var optionsJson=row.find(".f_options").val();populate_options_list(form,optionsJson),1==custom?(form.find("input[name=i_name]").prop("disabled",!1),form.find("select[name=i_type]").prop("disabled",!1),form.find("input[name=i_show_in_email]").prop("disabled",!1),form.find("input[name=i_show_in_order]").prop("disabled",!1)):(thwcfd_base.set_property_field_value(form,"checkbox","show_in_email",!0,0),thwcfd_base.set_property_field_value(form,"checkbox","show_in_order",!0,0),form.find("input[name=i_name]").prop("disabled",!0),form.find("select[name=i_type]").prop("disabled",!0),form.find("input[name=i_show_in_email]").prop("disabled",!0),form.find("input[name=i_show_in_order]").prop("disabled",!0),form.find("input[name=i_label]").focus())}function field_type_change_listner(elm){var popup=$("#thwcfd_field_form_pp"),form=$(elm).closest("form"),type=$(elm).val();type=null==type?"text":type,form.find(".thwcfd_field_form_tab_general_placeholder").html($("#thwcfd_field_form_id_"+type).html()),enable_all_tabs_and_fields(popup,form),type in FIELDS_TO_HIDE&&$.each(FIELDS_TO_HIDE[type],function(index,name){if(FIELD_FORM_PROPS[name]){var f_props=FIELD_FORM_PROPS[name];disable_hide_field(form,f_props.type,name)}}),thwcfd_base.setupEnhancedMultiSelect(form),thwcfd_base.setupColorPicker(form),thwcfd_base.setupSortableTable(form,".thwcfd-option-list","100")}function enable_all_tabs_and_fields(popup,form){thwcfd_base.form_wizard_enable_all_tabs(popup),form.find(":input").attr("disabled",!1),form.find("tr").removeClass("disabled hide")}function enable_disable_field(form,type,name,enabled,hide){var elm=null;switch(type){case"select":elm=form.find('select[name="i_'+name+'"]'),0==elm.length&&(elm=form.find('select[name="i_'+name+'[]"]'));break;case"textarea":elm=form.find("textarea[name=i_"+name+"]"),0==elm.length&&(elm=form.find('textarea[name="i_'+name+'[]"]'));break;default:elm=form.find("input[name=i_"+name+"]"),0==elm.length&&(elm=form.find('input[name="i_'+name+'[]"]'))}if(elm&&elm.length){var rowClass=hide?"disabled hide":"disabled";enabled?(elm.attr("disabled",!1),elm.closest("tr.form_field_"+name).removeClass("disabled hide")):(elm.attr("disabled",!0),elm.closest("tr.form_field_"+name).addClass(rowClass))}}function disable_hide_field(form,type,name){enable_disable_field(form,type,name,!1,!0)}function save_field(elm){var popup=$("#thwcfd_field_form_pp"),form=$("#thwcfd_field_form");validate_field_form(form,popup)&&(prepare_field_form(form),form.submit())}function validate_field_form(form,popup){var err_msgs="",fname=thwcfd_base.get_property_field_value(form,"text","name"),ftype=thwcfd_base.get_property_field_value(form,"select","type"),fotype=(thwcfd_base.get_property_field_value(form,"text","label"),thwcfd_base.get_property_field_value(form,"hidden","otype"));return""==ftype&&-1==$.inArray(fotype,SPECIAL_FIELD_TYPES)?err_msgs="Type is required":""==fname?err_msgs="Name is required":thwcfd_base.isHtmlIdValid(fname)||(err_msgs=MSG_INVALID_NAME),""==err_msgs||(form.find(".err_msgs").html(err_msgs),thwcfd_base.form_wizard_start(popup),!1)}function prepare_field_form(form){var options_json=get_options(form);thwcfd_base.set_property_field_value(form,"hidden","options_json",options_json,0)}function get_options(form){for(var optionsKey=form.find("input[name='i_options_key[]']").map(function(){return $(this).val()}).get(),optionsText=form.find("input[name='i_options_text[]']").map(function(){return $(this).val()}).get(),optionsSize=optionsText.length,optionsArr=[],i=0;i<optionsSize;i++){var optionDetails={};optionDetails.key=optionsKey[i],optionDetails.text=optionsText[i],optionsArr.push(optionDetails)}var optionsJson=optionsArr.length>0?JSON.stringify(optionsArr):"";return optionsJson=encodeURIComponent(optionsJson)}function populate_options_list(form,optionsJson){var optionsHtml="";if(optionsJson)try{optionsJson=decodeURIComponent(optionsJson);var optionsList=$.parseJSON(optionsJson);optionsList&&jQuery.each(optionsList,function(){optionsHtml+=prepare_option_row_html(this)})}catch(err){console.log(err)}var optionsTable=form.find(".thwcfd-option-list tbody");optionsHtml?optionsTable.html(optionsHtml):optionsTable.html(prepare_option_row_html(null))}function prepare_option_row_html(option){var key="",text="";option&&(key=option.key?option.key:"",text=option.text?option.text:"");var html="<tr>";return html+='<td class="key"><input type="text" name="i_options_key[]" value="'+key+'" placeholder="Option Value"></td>',html+='<td class="value"><input type="text" name="i_options_text[]" value="'+text+'" placeholder="Option Text"></td>',html+='<td class="action-cell">',html+='<a href="javascript:void(0)" onclick="thwcfdAddNewOptionRow(this)" class="btn btn-tiny btn-primary" title="Add new option">+</a>',html+='<a href="javascript:void(0)" onclick="thwcfdRemoveOptionRow(this)" class="btn btn-tiny btn-danger" title="Remove option">x</a>',html+='<span class="btn btn-tiny sort ui-sortable-handle"></span></td>',html+="</tr>"}function add_new_option_row(elm){var ptable=$(elm).closest("table");ptable.find("tbody tr").size()>0?ptable.find("tbody tr:last").after(prepare_option_row_html(null)):ptable.find("tbody").append(prepare_option_row_html(null))}function remove_option_row(elm){var ptable=$(elm).closest("table");$(elm).closest("tr").remove(),0==ptable.find("tbody tr").size()&&ptable.find("tbody").append(prepare_option_row_html(null))}var MSG_INVALID_NAME='NAME/ID must begin with a lowercase letter ([a-z]) or underscores ("_") and may be followed by any number of lowercase letters, digits ([0-9]) and underscores ("_")',SPECIAL_FIELD_TYPES=["country","state","city"],FIELD_FORM_PROPS={name:{name:"name",type:"text"},type:{name:"type",type:"select"},label:{name:"label",type:"text"},default:{name:"default",type:"text"},placeholder:{name:"placeholder",type:"text"},class:{name:"class",type:"text"},validate:{name:"validate",type:"select",multiple:1},required:{name:"required",type:"checkbox"},enabled:{name:"enabled",type:"checkbox"},show_in_email:{name:"show_in_email",type:"checkbox"},show_in_order:{name:"show_in_order",type:"checkbox"}},FIELDS_TO_HIDE={radio:["placeholder","validate"],select:["validate"]};return{openNewFieldForm:open_new_field_form,openEditFieldForm:open_edit_field_form,openCopyFieldForm:open_copy_field_form,fieldTypeChangeListner:field_type_change_listner,addNewOptionRow:add_new_option_row,removeOptionRow:remove_option_row,save_field:save_field}}(window.jQuery,window,document),thwcfd_settings=function($,window,document){"use strict";function select_all_fields(elm){var checkAll=$(elm).prop("checked");$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]").prop("checked",checkAll)}function remove_selected_fields(){$("#thwcfd_checkout_fields tbody tr").removeClass("strikeout"),$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]:checked").each(function(){var row=$(this).closest("tr");row.hasClass("strikeout")||row.addClass("strikeout"),row.find(".f_deleted").val(1)})}function enable_disable_selected_fields(enabled){$("#thwcfd_checkout_fields tbody input:checkbox[name=select_field]:checked").each(function(){var row=$(this).closest("tr");0==enabled?row.hasClass("thpladmin-disabled")||row.addClass("thpladmin-disabled"):row.removeClass("thpladmin-disabled"),row.find(".td_enabled").html(1==enabled?'<span class="dashicons dashicons-yes tips" data-tip="Yes"></span>':"-"),row.find(".f_enabled").val(enabled)})}function hide_review_request_notice(elm){var wrapper=$(elm).closest("div.thpladmin-notice"),nonce=wrapper.data("nonce"),data={security:nonce,action:"skip_thwcfd_review_request_notice"};$.post(ajaxurl,data,function(){}),$(wrapper).hide(50)}return $(function(){var settings_form=$("#thwcfd_checkout_fields_form");thwcfd_base.setupSortableTable(settings_form,"#thwcfd_checkout_fields","0"),thwcfd_base.setup_tiptip_tooltips(),thwcfd_base.setup_form_wizard()}),$(document).on("click",".thpladmin-notice .notice-dismiss",function(){var wrapper=$(this).closest("div.thpladmin-notice"),nonce=wrapper.data("nonce"),action=wrapper.data("action"),data={security:nonce,action:action};$.post(ajaxurl,data,function(){})}),$(document).ready(function(){setTimeout(function(){$("#thwcfd_review_request_notice").fadeIn(500)},2e3)}),{selectAllFields:select_all_fields,removeSelectedFields:remove_selected_fields,enableDisableSelectedFields:enable_disable_selected_fields,hideReviewRequestNotice:hide_review_request_notice}}(window.jQuery,window,document);
|
admin/class-thwcfd-admin-settings-general.php
CHANGED
@@ -27,7 +27,7 @@ class THWCFD_Admin_Settings_General extends THWCFD_Admin_Settings{
|
|
27 |
$this->page_id = 'fields';
|
28 |
$this->section_id = 'billing';
|
29 |
|
30 |
-
$this->tabs = array( 'fields' => 'Checkout Fields', 'advanced_settings' => 'Advanced Settings');
|
31 |
$this->sections = array('billing' => 'Billing Fields', 'shipping' => 'Shipping Fields', 'additional' => 'Additional Fields');
|
32 |
}
|
33 |
|
27 |
$this->page_id = 'fields';
|
28 |
$this->section_id = 'billing';
|
29 |
|
30 |
+
$this->tabs = array( 'fields' => 'Checkout Fields', 'advanced_settings' => 'Advanced Settings', 'pro' => 'Premium Features');
|
31 |
$this->sections = array('billing' => 'Billing Fields', 'shipping' => 'Shipping Fields', 'additional' => 'Additional Fields');
|
32 |
}
|
33 |
|
admin/class-thwcfd-admin-settings-pro.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin advanced settings page functionality of the plugin.
|
4 |
+
*
|
5 |
+
* @link https://themehigh.com
|
6 |
+
* @since 1.4.4
|
7 |
+
*
|
8 |
+
* @package woo-checkout-field-editor-pro
|
9 |
+
* @subpackage woo-checkout-field-editor-pro/admin
|
10 |
+
*/
|
11 |
+
|
12 |
+
if(!defined('WPINC')){ die; }
|
13 |
+
|
14 |
+
if(!class_exists('THWCFD_Admin_Settings_Pro')):
|
15 |
+
|
16 |
+
class THWCFD_Admin_Settings_Pro extends THWCFD_Admin_Settings{
|
17 |
+
protected static $_instance = null;
|
18 |
+
protected $tabs = '';
|
19 |
+
|
20 |
+
private $settings_fields = NULL;
|
21 |
+
private $cell_props = array();
|
22 |
+
private $cell_props_CB = array();
|
23 |
+
|
24 |
+
public function __construct() {
|
25 |
+
parent::__construct();
|
26 |
+
$this->page_id = 'pro';
|
27 |
+
}
|
28 |
+
|
29 |
+
public static function instance() {
|
30 |
+
if(is_null(self::$_instance)){
|
31 |
+
self::$_instance = new self();
|
32 |
+
}
|
33 |
+
return self::$_instance;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function render_page(){
|
37 |
+
$this->render_tabs();
|
38 |
+
$this->render_content();
|
39 |
+
}
|
40 |
+
|
41 |
+
private function render_content(){
|
42 |
+
?>
|
43 |
+
<div class="th-nice-box">
|
44 |
+
<h2>Key Features of WooCommerce Checkout Field Editor Pro</h2>
|
45 |
+
<p><b>Checkout Field Editor For WooCommerce</b> plugin comes with several advanced features that let you create an organized checkout page. With these premium features, bring your checkout page to its next level.</p>
|
46 |
+
<ul class="feature-list star-list">
|
47 |
+
<li>17 Custom Checkout Field Types</li>
|
48 |
+
<li>Custom section which can be placed at 15 different positions on the checkout page</li>
|
49 |
+
<li>Display fields conditionally</li>
|
50 |
+
<li>Display sections conditionally</li>
|
51 |
+
<li>Price fields with a set of price types</li>
|
52 |
+
<li>Custom validations</li>
|
53 |
+
<li>Change address display format</li>
|
54 |
+
<li>Display fields based on Shipping option or Payment method</li>
|
55 |
+
<li>Compatibility with other plugins</li>
|
56 |
+
<li>Zapier support</li>
|
57 |
+
<li>WPML Compatibility</li>
|
58 |
+
<li>Reset all settings on a single click</li>
|
59 |
+
<li>Manage field display in emails and order details pages</li>
|
60 |
+
<li>Display custom fields optionally at My Account page</li>
|
61 |
+
<li>Customise, Disable or delete default WooCommerce fields</li>
|
62 |
+
<li>Developer friendly with custom hooks</li>
|
63 |
+
<li>Rearrange all fields and sections as per convenience</li>
|
64 |
+
<li>Create your own custom classes for styling the field</li>
|
65 |
+
</ul>
|
66 |
+
<p>
|
67 |
+
<a class="button big-button" target="_blank" href="https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=free&utm_medium=banner&utm_campaign=upgrade_button">Upgrade to Premium Version</a>
|
68 |
+
<a class="button big-button" target="_blank" href="https://flydemos.com/wcfe/?utm_source=free&utm_medium=banner&utm_campaign=trydemo" style="margin-left: 20px">Try Demo</a>
|
69 |
+
</p>
|
70 |
+
</div>
|
71 |
+
<div class="th-flexbox">
|
72 |
+
<div class="th-flexbox-child th-nice-box">
|
73 |
+
<h2>Available Field types</h2>
|
74 |
+
<p>Following are the custom checkout field types available in the Checkout Field Editor plugin.</p>
|
75 |
+
<ul class="feature-list">
|
76 |
+
<li>Text</li>
|
77 |
+
<li>Hidden</li>
|
78 |
+
<li>Password</li>
|
79 |
+
<li>Telephone</li>
|
80 |
+
<li>Email</li>
|
81 |
+
<li>Number</li>
|
82 |
+
<li>Textarea</li>
|
83 |
+
<li>Select</li>
|
84 |
+
<li>Multi Select</li>
|
85 |
+
<li>Radio</li>
|
86 |
+
<li>Checkbox</li>
|
87 |
+
<li>Checkbox Group</li>
|
88 |
+
<li>Date picker</li>
|
89 |
+
<li>Time picker</li>
|
90 |
+
<li>File Upload</li>
|
91 |
+
<li>Heading</li>
|
92 |
+
<li>Label</li>
|
93 |
+
</ul>
|
94 |
+
</div>
|
95 |
+
<div class="th-flexbox-child th-nice-box">
|
96 |
+
<h2>Display Sections Conditionally</h2>
|
97 |
+
<p>Display the custom sections on your checkout page based on the conditions you set. Following are the positions where these checkout sections can be displayed:</p>
|
98 |
+
<ul class="feature-list">
|
99 |
+
<li>Before customer details</li>
|
100 |
+
<li>After customer details</li>
|
101 |
+
<li>Before billing form</li>
|
102 |
+
<li>After billing form</li>
|
103 |
+
<li>Before shipping form</li>
|
104 |
+
<li>After shipping form</li>
|
105 |
+
<li>Before registration form</li>
|
106 |
+
<li>After registration form</li>
|
107 |
+
<li>Before order notes</li>
|
108 |
+
<li>After order notes</li>
|
109 |
+
<li>Before terms and conditions</li>
|
110 |
+
<li>After terms and conditions</li>
|
111 |
+
<li>Before submit button</li>
|
112 |
+
<li>After submit button</li>
|
113 |
+
<li>Inside a custom step created using WooCommerce MultiStep Checkout</li>
|
114 |
+
</ul>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
<div class="th-flexbox">
|
118 |
+
<div class="th-flexbox-child th-nice-box">
|
119 |
+
<h2>Display Fields conditionally</h2>
|
120 |
+
<p>Display the custom and default checkout fields based on the conditions you provide. Conditions on which the fields can be displayed are:</p>
|
121 |
+
<ul class="feature-list">
|
122 |
+
<li>Cart Contents</li>
|
123 |
+
<li>Cart Subtotal</li>
|
124 |
+
<li>Cart Total</li>
|
125 |
+
<li>User Roles</li>
|
126 |
+
<li>Product</li>
|
127 |
+
<li>Product Variation</li>
|
128 |
+
<li>Product Category</li>
|
129 |
+
<li>Based on other field values</li>
|
130 |
+
</ul>
|
131 |
+
</div>
|
132 |
+
<div class="th-flexbox-child th-nice-box">
|
133 |
+
<h2>Add price fields and choose the price type</h2>
|
134 |
+
<p>With the premium version of the Checkout Page Editor plugin, add an extra price value to the total price by creating a field with price into the checkout form.The available price types that can be added to WooCommerce checkout fields are:</p>
|
135 |
+
<ul class="feature-list">
|
136 |
+
<li>Fixed Price</li>
|
137 |
+
<li>Custom Price</li>
|
138 |
+
<li>Percentage of Cart Total</li>
|
139 |
+
<li>Percentage of Subtotal</li>
|
140 |
+
<li>Percent of Subtotal excluding tax</li>
|
141 |
+
<li>Dynamic Price</li>
|
142 |
+
</ul>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
<?php
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
endif;
|
admin/class-thwcfd-admin-settings.php
CHANGED
@@ -20,7 +20,7 @@ abstract class THWCFD_Admin_Settings{
|
|
20 |
protected $sections = '';
|
21 |
|
22 |
public function __construct() {
|
23 |
-
$this->tabs = array( 'fields' => 'Checkout Fields', 'advanced_settings' => 'Advanced Settings');
|
24 |
}
|
25 |
|
26 |
public function get_tabs(){
|
20 |
protected $sections = '';
|
21 |
|
22 |
public function __construct() {
|
23 |
+
$this->tabs = array( 'fields' => 'Checkout Fields', 'advanced_settings' => 'Advanced Settings', 'pro' => 'Premium Features');
|
24 |
}
|
25 |
|
26 |
public function get_tabs(){
|
admin/class-thwcfd-admin.php
CHANGED
@@ -16,6 +16,10 @@ class THWCFD_Admin {
|
|
16 |
private $plugin_name;
|
17 |
private $version;
|
18 |
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* Initialize the class and set its properties.
|
21 |
*
|
@@ -26,8 +30,6 @@ class THWCFD_Admin {
|
|
26 |
public function __construct( $plugin_name, $version ) {
|
27 |
$this->plugin_name = $plugin_name;
|
28 |
$this->version = $version;
|
29 |
-
|
30 |
-
//add_action('admin_notices', array($this, 'output_premium_version_notice'));
|
31 |
}
|
32 |
|
33 |
public function enqueue_styles_and_scripts($hook) {
|
@@ -76,47 +78,54 @@ class THWCFD_Admin {
|
|
76 |
public function plugin_action_links($links) {
|
77 |
$settings_link = '<a href="'.admin_url('admin.php?page=checkout_form_designer').'">'. __('Settings', 'woo-checkout-field-editor-pro') .'</a>';
|
78 |
array_unshift($links, $settings_link);
|
|
|
|
|
79 |
return $links;
|
80 |
}
|
81 |
-
|
82 |
-
|
83 |
-
$is_dismissed = get_transient('
|
84 |
if($is_dismissed){
|
85 |
return;
|
86 |
}
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
</td>
|
107 |
-
</tr>
|
108 |
-
</table>
|
109 |
-
</div>
|
110 |
-
</div>
|
111 |
-
<?php
|
112 |
}
|
113 |
|
114 |
-
private function
|
115 |
?>
|
116 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
<?php
|
118 |
-
|
119 |
-
//If you find this plugin useful please show your support and rate it ★★★★★ on WordPress.org - much appreciated! :)
|
120 |
}
|
121 |
|
122 |
public function get_current_tab(){
|
@@ -124,7 +133,8 @@ class THWCFD_Admin {
|
|
124 |
}
|
125 |
|
126 |
public function output_settings(){
|
127 |
-
|
|
|
128 |
$this->output_review_request_link();
|
129 |
|
130 |
$tab = $this->get_current_tab();
|
@@ -132,20 +142,32 @@ class THWCFD_Admin {
|
|
132 |
echo '<div class="thwcfd-wrap">';
|
133 |
if($tab === 'advanced_settings'){
|
134 |
$advanced_settings = THWCFD_Admin_Settings_Advanced::instance();
|
135 |
-
$advanced_settings->render_page();
|
|
|
|
|
|
|
136 |
}else{
|
137 |
$general_settings = THWCFD_Admin_Settings_General::instance();
|
138 |
$general_settings->init();
|
139 |
}
|
140 |
-
echo '</div
|
|
|
141 |
}
|
142 |
|
143 |
-
public function
|
144 |
-
if(! check_ajax_referer( '
|
145 |
die();
|
146 |
}
|
147 |
-
set_transient('
|
148 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
|
151 |
endif;
|
16 |
private $plugin_name;
|
17 |
private $version;
|
18 |
|
19 |
+
private const SHOW_REVIEW_REQUEST_NOTICE_AFTER = 10 * DAY_IN_SECONDS;
|
20 |
+
private const DISMISSED_REVIEW_REQUEST_NOTICE_LIFESPAN = 1 * YEAR_IN_SECONDS;
|
21 |
+
private const SKIP_REVIEW_REQUEST_NOTICE_LIFESPAN = 1 * DAY_IN_SECONDS;
|
22 |
+
|
23 |
/**
|
24 |
* Initialize the class and set its properties.
|
25 |
*
|
30 |
public function __construct( $plugin_name, $version ) {
|
31 |
$this->plugin_name = $plugin_name;
|
32 |
$this->version = $version;
|
|
|
|
|
33 |
}
|
34 |
|
35 |
public function enqueue_styles_and_scripts($hook) {
|
78 |
public function plugin_action_links($links) {
|
79 |
$settings_link = '<a href="'.admin_url('admin.php?page=checkout_form_designer').'">'. __('Settings', 'woo-checkout-field-editor-pro') .'</a>';
|
80 |
array_unshift($links, $settings_link);
|
81 |
+
$pro_link = '<a style="color:green; font-weight:bold" target="_blank" href="https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wordpress&utm_medium=referral&utm_content=tracking">'. __('Get Pro', 'woo-checkout-field-editor-pro') .'</a>';
|
82 |
+
array_push($links,$pro_link);
|
83 |
return $links;
|
84 |
}
|
85 |
+
|
86 |
+
private function output_review_request_link(){
|
87 |
+
$is_dismissed = get_transient('thwcfd_review_request_notice_dismissed');
|
88 |
if($is_dismissed){
|
89 |
return;
|
90 |
}
|
91 |
+
|
92 |
+
$is_skipped = get_transient('thwcfd_skip_review_request_notice');
|
93 |
+
if($is_skipped){
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
$thwcfd_since = get_option('thwcfd_since');
|
98 |
+
if(!$thwcfd_since){
|
99 |
+
$now = time();
|
100 |
+
update_option('thwcfd_since', $now, 'no' );
|
101 |
+
}else{
|
102 |
+
$now = time();
|
103 |
+
$diff_seconds = $now - $thwcfd_since;
|
104 |
+
|
105 |
+
if($diff_seconds > apply_filters('thwcfd_show_review_request_notice_after', self::SHOW_REVIEW_REQUEST_NOTICE_AFTER)){
|
106 |
+
$this->render_review_request_notice();
|
107 |
+
}
|
108 |
+
}
|
109 |
+
//If you find this plugin useful please show your support and rate it ★★★★★ on WordPress.org - much appreciated! :)
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
+
private function render_review_request_notice(){
|
113 |
?>
|
114 |
+
<div id="thwcfd_review_request_notice" class="notice notice-info is-dismissible thpladmin-notice" data-nonce="<?php echo wp_create_nonce( 'thwcfd_review_request_notice'); ?>" data-action="dismiss_thwcfd_review_request_notice" style="display:none">
|
115 |
+
<h3>
|
116 |
+
Just wanted to say thank you for using Checkout Field Editor plugin in your store.
|
117 |
+
</h3>
|
118 |
+
<p>We hope you had a great experience. Please leave us with your feedback to serve best to you and others. Cheers!</p>
|
119 |
+
<p class="action-row">
|
120 |
+
<button type="button" class="button button-primary" onclick="window.open('https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/reviews?rate=5#new-post', '_blank')">Review Now</button>
|
121 |
+
<button type="button" class="button" onclick="thwcfdHideReviewRequestNotice(this)">Remind Me Later</button>
|
122 |
+
<span class="logo"><a target="_blank" href="https://www.themehigh.com">
|
123 |
+
<img src="<?php echo THWCFD_ASSETS_URL_ADMIN ?>css/logo.svg" />
|
124 |
+
</a></span>
|
125 |
+
|
126 |
+
</p>
|
127 |
+
</div>
|
128 |
<?php
|
|
|
|
|
129 |
}
|
130 |
|
131 |
public function get_current_tab(){
|
133 |
}
|
134 |
|
135 |
public function output_settings(){
|
136 |
+
echo '<div class="wrap">';
|
137 |
+
echo '<h2></h2>';
|
138 |
$this->output_review_request_link();
|
139 |
|
140 |
$tab = $this->get_current_tab();
|
142 |
echo '<div class="thwcfd-wrap">';
|
143 |
if($tab === 'advanced_settings'){
|
144 |
$advanced_settings = THWCFD_Admin_Settings_Advanced::instance();
|
145 |
+
$advanced_settings->render_page();
|
146 |
+
}elseif($tab === 'pro'){
|
147 |
+
$pro_details = THWCFD_Admin_Settings_Pro::instance();
|
148 |
+
$pro_details->render_page();
|
149 |
}else{
|
150 |
$general_settings = THWCFD_Admin_Settings_General::instance();
|
151 |
$general_settings->init();
|
152 |
}
|
153 |
+
echo '</div>';
|
154 |
+
echo '</div>';
|
155 |
}
|
156 |
|
157 |
+
public function dismiss_thwcfd_review_request_notice(){
|
158 |
+
if(! check_ajax_referer( 'thwcfd_review_request_notice', 'security' )){
|
159 |
die();
|
160 |
}
|
161 |
+
set_transient('thwcfd_review_request_notice_dismissed', true, apply_filters('thwcfd_dismissed_review_request_notice_lifespan', self::DISMISSED_REVIEW_REQUEST_NOTICE_LIFESPAN));
|
162 |
}
|
163 |
+
|
164 |
+
public function skip_thwcfd_review_request_notice(){
|
165 |
+
if(! check_ajax_referer( 'thwcfd_review_request_notice', 'security' )){
|
166 |
+
die();
|
167 |
+
}
|
168 |
+
set_transient('thwcfd_skip_review_request_notice', true, apply_filters('thwcfd_skip_review_request_notice_lifespan', self::SKIP_REVIEW_REQUEST_NOTICE_LIFESPAN));
|
169 |
+
}
|
170 |
+
|
171 |
}
|
172 |
|
173 |
endif;
|
checkout-form-designer.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: Checkout Field Editor for WooCommerce
|
4 |
* Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
|
5 |
* Author: ThemeHigh
|
6 |
-
* Version: 1.4.
|
7 |
* Author URI: https://www.themehigh.com
|
8 |
* Plugin URI: https://www.themehigh.com
|
9 |
* Text Domain: woo-checkout-field-editor-pro
|
10 |
* Domain Path: /languages
|
11 |
* WC requires at least: 3.0.0
|
12 |
-
* WC tested up to: 5.
|
13 |
*/
|
14 |
|
15 |
if(!defined( 'ABSPATH' )) exit;
|
@@ -25,7 +25,7 @@ if (!function_exists('is_woocommerce_active')){
|
|
25 |
}
|
26 |
|
27 |
if(is_woocommerce_active()) {
|
28 |
-
define('THWCFD_VERSION', '1.4.
|
29 |
!defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
|
30 |
!defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
|
31 |
!defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
|
3 |
* Plugin Name: Checkout Field Editor for WooCommerce
|
4 |
* Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
|
5 |
* Author: ThemeHigh
|
6 |
+
* Version: 1.4.7
|
7 |
* Author URI: https://www.themehigh.com
|
8 |
* Plugin URI: https://www.themehigh.com
|
9 |
* Text Domain: woo-checkout-field-editor-pro
|
10 |
* Domain Path: /languages
|
11 |
* WC requires at least: 3.0.0
|
12 |
+
* WC tested up to: 5.2.2
|
13 |
*/
|
14 |
|
15 |
if(!defined( 'ABSPATH' )) exit;
|
25 |
}
|
26 |
|
27 |
if(is_woocommerce_active()) {
|
28 |
+
define('THWCFD_VERSION', '1.4.7');
|
29 |
!defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
|
30 |
!defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
|
31 |
!defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
|
includes/class-thwcfd.php
CHANGED
@@ -68,7 +68,8 @@ class THWCFD {
|
|
68 |
add_filter('woocommerce_screen_ids', array($plugin_admin, 'add_screen_id'));
|
69 |
add_filter('plugin_action_links_'.THWCFD_BASE_NAME, array($plugin_admin, 'plugin_action_links'));
|
70 |
//add_filter('plugin_row_meta', array($plugin_admin, 'plugin_row_meta'), 10, 2);
|
71 |
-
add_action('
|
|
|
72 |
|
73 |
$general_settings = new THWCFD_Admin_Settings_General();
|
74 |
add_action('after_setup_theme', array($general_settings, 'define_admin_hooks'));
|
68 |
add_filter('woocommerce_screen_ids', array($plugin_admin, 'add_screen_id'));
|
69 |
add_filter('plugin_action_links_'.THWCFD_BASE_NAME, array($plugin_admin, 'plugin_action_links'));
|
70 |
//add_filter('plugin_row_meta', array($plugin_admin, 'plugin_row_meta'), 10, 2);
|
71 |
+
add_action('wp_ajax_dismiss_thwcfd_review_request_notice', array($plugin_admin, 'dismiss_thwcfd_review_request_notice'));
|
72 |
+
add_action('wp_ajax_skip_thwcfd_review_request_notice', array($plugin_admin, 'skip_thwcfd_review_request_notice'));
|
73 |
|
74 |
$general_settings = new THWCFD_Admin_Settings_General();
|
75 |
add_action('after_setup_theme', array($general_settings, 'define_admin_hooks'));
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: checkout field editor, woocommerce checkout field editor, checkout manager
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 1.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -207,6 +207,10 @@ Yes. There is a button 'reset to default fields' to go back to the WooCommerce d
|
|
207 |
8. Save changes.
|
208 |
|
209 |
== Changelog ==
|
|
|
|
|
|
|
|
|
210 |
= 1.4.6 =
|
211 |
* Settings screen UI improved.
|
212 |
* WordPress and WooCommerce compatible version updated.
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.4.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
207 |
8. Save changes.
|
208 |
|
209 |
== Changelog ==
|
210 |
+
= 1.4.7 =
|
211 |
+
* Dismissable review request notice added to the admin screens.
|
212 |
+
* Added Woocommerce version - 5.2.2 compatibility.
|
213 |
+
|
214 |
= 1.4.6 =
|
215 |
* Settings screen UI improved.
|
216 |
* WordPress and WooCommerce compatible version updated.
|