diff --git a/.distignore b/.distignore index afbd84d6c..c25edae79 100644 --- a/.distignore +++ b/.distignore @@ -12,3 +12,8 @@ *composer.lock *strauss.phar *strauss.md +templates/.github +templates/.distignore +templates/LICENSE +templates/README.md +templates/wpo-ips-default-templates.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..176ac1f3e --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +templates/.github +templates/.distignore +templates/LICENSE +templates/README.md +templates/wpo-ips-default-templates.php diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..73d06b884 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "templates"] + path = templates + url = https://github.com/wpovernight/templates.git diff --git a/assets/css/settings-styles.css b/assets/css/settings-styles.css index 7393c06da..a883b8c46 100644 --- a/assets/css/settings-styles.css +++ b/assets/css/settings-styles.css @@ -206,7 +206,8 @@ table.wcpdf_documents_settings_list td.title { cursor: pointer; padding: 1em 0.8em; margin: 0; - border: 1px solid #eaeaea; + border: 1px solid #c3c4c7; + background: #ffffff; } .wcpdf_document_settings_sections ul { @@ -220,8 +221,8 @@ table.wcpdf_documents_settings_list td.title { display: none; box-sizing: border-box; position: absolute; - border-left: 1px solid #eaeaea; - border-right: 1px solid #eaeaea; + border-left: 1px solid #c3c4c7; + border-right: 1px solid #c3c4c7; z-index: 1000; box-shadow: 0 35px 35px -8px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 0 35px 35px -8px rgba(0, 0, 0, 0.1); @@ -239,6 +240,10 @@ table.wcpdf_documents_settings_list td.title { font-size: 1.1em; } +.wcpdf_document_settings_sections ul li:last-child { + border-color: #c3c4c7; +} + .wcpdf_document_settings_sections ul li:hover { cursor: pointer; background: #51266b; @@ -304,7 +309,7 @@ table.wcpdf_documents_settings_list td.title { /* Preview */ body.woocommerce_page_wpo_wcpdf_options_page { - background: #fff; + background: #fdfdfd; } .wrap [class$="icon32"] + h2 { @@ -366,9 +371,6 @@ body.woocommerce_page_wpo_wcpdf_options_page { } #wpo-wcpdf-preview-wrapper .sidebar .form-table, -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr, -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > th, -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > th, @@ -378,29 +380,22 @@ body.woocommerce_page_wpo_wcpdf_options_page { padding: 0; } -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > th, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > th { padding-bottom: 0.6em; } -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td, -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td { +#wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr:not(:last-child) > td { padding-bottom: 2.4em; } -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td > p.description, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td p.description { font-size: 0.85em; padding-top: 0.7em; } -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td > input[type="text"], #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > input[type="text"], -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td > input[type="url"], #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > input[type="url"], -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td > select, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > select, -#wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td > textarea, #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td > textarea { max-width: none; width: 100%; @@ -416,44 +411,63 @@ body.woocommerce_page_wpo_wcpdf_options_page { width: auto !important; } -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table { - display: table; +#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr, +#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr, +#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr { + display: grid; + grid-template-columns: 1fr 2fr; + gap: 4em; +} + +#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2 { + border-bottom: 1px solid #c3c4c7; + padding: 1em 0 1em 5px; + margin: 0; + font-weight: normal; + color: #222; + font-family: sans-serif; + font-size: 1.3em; + letter-spacing: -0.01em; + position: relative; + transition: transform 0.3s; + cursor: pointer; } -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table tbody, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table tbody { - display: table-row-group; +#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2 ~ .form-table { + border-left: 1px solid #c3c4c7; + border-right: 1px solid #c3c4c7; + border-bottom: 1px solid #c3c4c7; + padding: 2em; + margin-top: -1px; + background: #ffffff; + margin-bottom: 20px; } -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table tr, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table tr, -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table tbody tr, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table tbody tr { - display: table-row; +#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2::after { + content: '\f347'; + font-family: 'dashicons'; + font-size: 16px; + color: #82878c; + position: absolute; + right: 5px; + top: 50%; + transform: translateY(-50%); + transition: transform 0.15s; } -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr > th, -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr > td, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > th, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > td, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > th, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > td { - display: table-cell; - padding: 15px 10px 15px 0px; - width: auto; +#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2:hover:after { + color: #222; } -#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr > th, -#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > th, -#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr > th { - width: 300px !important; +#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2.active::after { + transform: translateY(-50%) rotate(180deg); } +#wpo-wcpdf-preview-wrapper .my_account_buttons_custom { + margin-top: 1em; +} + + /* WPML */ #wpo-wcpdf-settings .form-table .ui-tabs-nav { @@ -580,8 +594,8 @@ body.woocommerce_page_wpo_wcpdf_options_page { width: auto!important; margin: 0 auto; background: white; - box-shadow: 0 0 35px -8px rgba(0, 0, 0, 0.12); - -webkit-box-shadow: 0 0 35px -8px rgba(0, 0, 0, 0.12); + box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.1), -8px -8px 8px rgba(0, 0, 0, 0.02); + -webkit-box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.1), -8px -8px 8px rgba(0, 0, 0, 0.02); } #wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas { @@ -980,9 +994,7 @@ sup.wcpdf_beta { .nav-tab-wrapper a.nav-tab.nav-tab-active { border: 3px solid #51266b; } -} -@media screen and (max-width: 960px) { .preview-document .preview > #preview-canvas { width: 80vw!important; } @@ -995,16 +1007,10 @@ sup.wcpdf_beta { width: 100%!important; } - #wpo-wcpdf-preview-wrapper .sidebar .form-table, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tr, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > th, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tr > td, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > th, - #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td { - display: block!important; - /*width: 100%!important;*/ + #wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr, + #wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr, + #wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr { + gap: 2em; } .preview-document .preview-data-wrapper { @@ -1044,6 +1050,15 @@ sup.wcpdf_beta { } } +@media screen and (max-width: 860px) { + #wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table > tbody > tr, + #wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state="closed"] .sidebar .form-table > tbody > tr, + #wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state="closed"] .sidebar .form-table > tbody > tr { + display: block; + } +} + + /* Upgrade tab */ div.upgrade-table-description { @@ -1271,16 +1286,22 @@ div.upgrade-table-description a, } } +@media screen and (max-width: 782px) { + #wpo-wcpdf-preview-wrapper .sidebar .form-table > tbody > tr > td:has( input[type="checkbox"] + input[type="text"] ) > input { + display: inline-block; + } +} + @media screen and (max-width: 767px) { #upgrade-table td.feature-label span.description { display: none; } - + #upgrade-table th:not(.last), #upgrade-table td:not(.last) { width: 20%; } - + #upgrade-table td.first { width: 40%; } @@ -1328,3 +1349,10 @@ div.upgrade-table-description a, justify-content: center; } } + +/* Override WordPress default form style */ +@media screen and (max-width: 782px) { + input[type="radio"], input[type="checkbox"] { + margin-bottom: 0.5em; + } +} diff --git a/assets/css/settings-styles.min.css b/assets/css/settings-styles.min.css index 749e50aa0..a28f7ba40 100644 --- a/assets/css/settings-styles.min.css +++ b/assets/css/settings-styles.min.css @@ -1 +1 @@ -span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad,.wcpdf-promo-ad{position:relative;min-height:90px;border:1px solid #6e1edc;background-color:#f1e9fc;padding:15px;padding-left:100px;margin-top:30px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3,.wcpdf-promo-ad h3{margin:0;padding:20px;font-weight:400;font-family:serif;letter-spacing:-1px;font-size:2.25em}.wcpdf-promo-ad p{margin:0;padding:0 20px;font-size:1.15em}.wcpdf-promo-ad p.upgrade-tab{margin-top:30px;font-style:italic;font-size:1em}.wcpdf-promo-ad p.expiration{font-size:.8em;padding-top:8px}.wcpdf-extensions-ad a,.wcpdf-promo-ad a{color:#6e1edc}.wcpdf-extensions-ad a.dismiss,.wcpdf-promo-ad a.dismiss{padding:10px 20px}.wcpdf-promo-ad p strong.code{font-size:1.3em;font-family:serif;padding:.1em .4em;background:#6e1edc;color:#fff;border-radius:5px;font-weight:400}.wcpdf-extensions-ad i{padding-left:20px}.wcpdf-extensions-ad ul,.wcpdf-promo-ad ul{margin:0;margin-left:40px}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{padding-right:1em}table.multiple-text-input td{padding:0}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #eaeaea}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.wcpdf_advanced_numbers_choose_table{margin-top:20px}.wcpdf_document_settings_document_output_formats{margin-bottom:30px}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fff}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:0 0!important;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=url],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=url],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size],#wpo-wcpdf-preview-wrapper input[type=url][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table{display:table}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody{display:table-row-group}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tr{display:table-row}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{display:table-cell;padding:15px 10px 15px 0;width:auto}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{width:300px!important}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-settings table#document-link-access-type{margin-top:-15px}#wpo-wcpdf-settings table#document-link-access-type td.option{padding-left:0}#wpo-wcpdf-settings table#document-link-access-type td{padding-top:0;padding-bottom:6px;font-size:12px}#wpo-wcpdf-settings .system-status-table{margin-top:2em}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-ubl{width:100%;height:100%;overflow-wrap:anywhere;background-color:#222;color:#fff;padding:2em}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:0 0 35px -8px rgba(0,0,0,.12);-webkit-box-shadow:0 0 35px -8px rgba(0,0,0,.12)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff;z-index:99}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}.wcpdf_ubl_settings_sections{margin-bottom:4em}#wpo-wcpdf-preview-wrapper input#due_date_days{text-align:right}#wpo-wcpdf-preview-wrapper input#due_date_days:disabled{background-color:#eaeaea;color:#999}sup.wcpdf_beta{background-color:#51266b;color:#fff;font-size:7pt;padding:1px 2px;border-radius:2px}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}}@media screen and (max-width:960px){.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block!important}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(2),#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3){float:left;margin-bottom:10px}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after{padding:.5em .8em;font-size:1.2em;line-height:inherit}}div.upgrade-table-description{padding:0 0 3em 1em}div.upgrade-table-description h1{font-family:serif;letter-spacing:-1px;font-size:3em}div.upgrade-table-description p{font-size:1.1em}#upgrade-table{width:100%;border-collapse:collapse;font-size:1.2em;margin-bottom:3em}#upgrade-table td,#upgrade-table th{padding:.8em 2em;border-bottom:1px solid #ccc;text-align:center}#upgrade-table th{font-weight:400;font-size:1.1em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:200px}#upgrade-table tr:last-child td{border:none}#upgrade-table td.feature-label{text-align:left;padding-left:1em;font-weight:700;width:500px}#upgrade-table td.feature-label span.description{display:inline-block;padding-top:10px;font-size:.8em;line-height:1.4em;font-weight:400;color:#555}#upgrade-table td span.feature-available{display:inline-block;width:24px;height:24px;background-repeat:no-repeat;background-size:cover}#upgrade-table a,div.upgrade-table-description a{color:#6e1edc;white-space:nowrap}#upgrade-table .upgrade-links h4{margin:1em 0 .5em 0}#upgrade-table .upgrade-links p{margin:0;font-style:oblique;font-size:.8em}#plugin-recommendations a.upgrade_button,#upgrade-table .upgrade-links a.upgrade_button{display:inline-block;background:#fff;padding:1em 3em 1em 2em;border-radius:12px;border:1px solid #6e1edc;text-decoration:none;margin:2em 0;position:relative}#plugin-recommendations a.upgrade_button:after,#upgrade-table .upgrade-links a.upgrade_button:after{content:' \2192';display:block;position:absolute;right:1.8em;top:1.1em;transition:.5s}#plugin-recommendations a.upgrade_button:hover:after,#upgrade-table .upgrade-links a.upgrade_button:hover:after{right:1.1em;font-weight:700}#plugin-recommendations a.upgrade_button:focus,#plugin-recommendations a.upgrade_button:hover,#upgrade-table .upgrade-links a.upgrade_button:focus,#upgrade-table .upgrade-links a.upgrade_button:hover{background:#6e1edc;color:#fcfbf7}#plugin-recommendations{border-radius:8px;background-color:#f1e9fc;padding:4em 3em}#plugin-recommendations .card-container{max-width:1100px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:3em;padding:2em 0}#plugin-recommendations .recommendation-card{margin-top:0;border-radius:6px;background-color:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);box-sizing:border-box;font-size:15px;overflow:hidden;transition:.2s}#plugin-recommendations .recommendation-card:nth-child(n+4){display:none}#plugin-recommendations .recommendation-card:hover{scale:1.02}#plugin-recommendations .recommendation-card.currently-installed{opacity:.5}#plugin-recommendations .recommendation-card .card-content{padding:0 4em 3em 2em}#plugin-recommendations .recommendation-card img{width:100%}#plugin-recommendations .recommendation-card h5{text-align:left;font-size:1.4em;line-height:1.3em;font-weight:700;margin:1em 0}#plugin-recommendations .recommendation-card p{text-align:left;padding-bottom:10px}#plugin-recommendations .recommendation-card a.upgrade_button{margin:0}#plugin-recommendations .recommendation-card span.currently-installed{font-size:.7em;color:#fff;background-color:#6e1edc;padding:1em 2em;border-radius:12px;margin:0;display:inline-block}@media screen and (max-width:1100px){#upgrade-table{font-size:1em;line-height:1.2em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:25%;padding:.8em 1em}#upgrade-table td.last,#upgrade-table th.last{width:0;padding:0}#upgrade-table td.feature-label span.description{padding-top:6px}#plugin-recommendations .card-container{grid-gap:2em}}@media screen and (max-width:968px){#plugin-recommendations .card-container{grid-template-columns:repeat(1,1fr);padding-right:40%}}@media screen and (max-width:767px){#upgrade-table td.feature-label span.description{display:none}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:20%}#upgrade-table td.first{width:40%}#plugin-recommendations .card-container{padding-right:0}}@media screen and (max-width:649px){div.upgrade-table-description{padding-left:.8em}div.upgrade-table-description p{font-size:1em}#upgrade-table{font-size:.8em}#upgrade-table td,#upgrade-table th{padding:.5em .8em!important}#upgrade-table td span.feature-available{width:18px;height:18px}#upgrade-table .upgrade-links a{white-space:normal;padding:.6em .8em;border-radius:6px}#upgrade-table .upgrade-links a:after{display:none}#plugin-recommendations .card-container{justify-content:center}} \ No newline at end of file +span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad,.wcpdf-promo-ad{position:relative;min-height:90px;border:1px solid #6e1edc;background-color:#f1e9fc;padding:15px;padding-left:100px;margin-top:30px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3,.wcpdf-promo-ad h3{margin:0;padding:20px;font-weight:400;font-family:serif;letter-spacing:-1px;font-size:2.25em}.wcpdf-promo-ad p{margin:0;padding:0 20px;font-size:1.15em}.wcpdf-promo-ad p.upgrade-tab{margin-top:30px;font-style:italic;font-size:1em}.wcpdf-promo-ad p.expiration{font-size:.8em;padding-top:8px}.wcpdf-extensions-ad a,.wcpdf-promo-ad a{color:#6e1edc}.wcpdf-extensions-ad a.dismiss,.wcpdf-promo-ad a.dismiss{padding:10px 20px}.wcpdf-promo-ad p strong.code{font-size:1.3em;font-family:serif;padding:.1em .4em;background:#6e1edc;color:#fff;border-radius:5px;font-weight:400}.wcpdf-extensions-ad i{padding-left:20px}.wcpdf-extensions-ad ul,.wcpdf-promo-ad ul{margin:0;margin-left:40px}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{padding-right:1em}table.multiple-text-input td{padding:0}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #c3c4c7;background:#fff}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:last-child{border-color:#c3c4c7}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.wcpdf_advanced_numbers_choose_table{margin-top:20px}.wcpdf_document_settings_document_output_formats{margin-bottom:30px}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fdfdfd}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper:not(.wcpdf_debug_settings_sections>.nav-tab-wrapper) a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:0 0!important;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr:not(:last-child)>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=url],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size],#wpo-wcpdf-preview-wrapper input[type=url][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:grid;grid-template-columns:1fr 2fr;gap:4em}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2{border-bottom:1px solid #c3c4c7;padding:1em 0 1em 5px;margin:0;font-weight:400;color:#222;font-family:sans-serif;font-size:1.3em;letter-spacing:-.01em;position:relative;transition:transform .3s;cursor:pointer}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2~.form-table{border-left:1px solid #c3c4c7;border-right:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7;padding:2em;margin-top:-1px;background:#fff;margin-bottom:20px}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2::after{content:'\f347';font-family:dashicons;font-size:16px;color:#82878c;position:absolute;right:5px;top:50%;transform:translateY(-50%);transition:transform .15s}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2:hover:after{color:#222}#wpo-wcpdf-preview-wrapper .sidebar .settings_category h2.active::after{transform:translateY(-50%) rotate(180deg)}#wpo-wcpdf-preview-wrapper .my_account_buttons_custom{margin-top:1em}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-settings table#document-link-access-type{margin-top:-15px}#wpo-wcpdf-settings table#document-link-access-type td.option{padding-left:0}#wpo-wcpdf-settings table#document-link-access-type td{padding-top:0;padding-bottom:6px;font-size:12px}#wpo-wcpdf-settings .system-status-table{margin-top:2em}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-ubl{width:100%;height:100%;overflow-wrap:anywhere;background-color:#222;color:#fff;padding:2em}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02);-webkit-box-shadow:8px 8px 8px rgba(0,0,0,.1),-8px -8px 8px rgba(0,0,0,.02)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff;z-index:99}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}.wcpdf_ubl_settings_sections{margin-bottom:4em}#wpo-wcpdf-preview-wrapper input#due_date_days{text-align:right}#wpo-wcpdf-preview-wrapper input#due_date_days:disabled{background-color:#eaeaea;color:#999}sup.wcpdf_beta{background-color:#51266b;color:#fff;font-size:7pt;padding:1px 2px;border-radius:2px}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{gap:2em}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(2),#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3){float:left;margin-bottom:10px}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after{padding:.5em .8em;font-size:1.2em;line-height:inherit}}@media screen and (max-width:860px){#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr{display:block}}div.upgrade-table-description{padding:0 0 3em 1em}div.upgrade-table-description h1{font-family:serif;letter-spacing:-1px;font-size:3em}div.upgrade-table-description p{font-size:1.1em}#upgrade-table{width:100%;border-collapse:collapse;font-size:1.2em;margin-bottom:3em}#upgrade-table td,#upgrade-table th{padding:.8em 2em;border-bottom:1px solid #ccc;text-align:center}#upgrade-table th{font-weight:400;font-size:1.1em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:200px}#upgrade-table tr:last-child td{border:none}#upgrade-table td.feature-label{text-align:left;padding-left:1em;font-weight:700;width:500px}#upgrade-table td.feature-label span.description{display:inline-block;padding-top:10px;font-size:.8em;line-height:1.4em;font-weight:400;color:#555}#upgrade-table td span.feature-available{display:inline-block;width:24px;height:24px;background-repeat:no-repeat;background-size:cover}#upgrade-table a,div.upgrade-table-description a{color:#6e1edc;white-space:nowrap}#upgrade-table .upgrade-links h4{margin:1em 0 .5em 0}#upgrade-table .upgrade-links p{margin:0;font-style:oblique;font-size:.8em}#plugin-recommendations a.upgrade_button,#upgrade-table .upgrade-links a.upgrade_button{display:inline-block;background:#fff;padding:1em 3em 1em 2em;border-radius:12px;border:1px solid #6e1edc;text-decoration:none;margin:2em 0;position:relative}#plugin-recommendations a.upgrade_button:after,#upgrade-table .upgrade-links a.upgrade_button:after{content:' \2192';display:block;position:absolute;right:1.8em;top:1.1em;transition:.5s}#plugin-recommendations a.upgrade_button:hover:after,#upgrade-table .upgrade-links a.upgrade_button:hover:after{right:1.1em;font-weight:700}#plugin-recommendations a.upgrade_button:focus,#plugin-recommendations a.upgrade_button:hover,#upgrade-table .upgrade-links a.upgrade_button:focus,#upgrade-table .upgrade-links a.upgrade_button:hover{background:#6e1edc;color:#fcfbf7}#plugin-recommendations{border-radius:8px;background-color:#f1e9fc;padding:4em 3em}#plugin-recommendations .card-container{max-width:1100px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:3em;padding:2em 0}#plugin-recommendations .recommendation-card{margin-top:0;border-radius:6px;background-color:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);box-sizing:border-box;font-size:15px;overflow:hidden;transition:.2s}#plugin-recommendations .recommendation-card:nth-child(n+4){display:none}#plugin-recommendations .recommendation-card:hover{scale:1.02}#plugin-recommendations .recommendation-card.currently-installed{opacity:.5}#plugin-recommendations .recommendation-card .card-content{padding:0 4em 3em 2em}#plugin-recommendations .recommendation-card img{width:100%}#plugin-recommendations .recommendation-card h5{text-align:left;font-size:1.4em;line-height:1.3em;font-weight:700;margin:1em 0}#plugin-recommendations .recommendation-card p{text-align:left;padding-bottom:10px}#plugin-recommendations .recommendation-card a.upgrade_button{margin:0}#plugin-recommendations .recommendation-card span.currently-installed{font-size:.7em;color:#fff;background-color:#6e1edc;padding:1em 2em;border-radius:12px;margin:0;display:inline-block}@media screen and (max-width:1100px){#upgrade-table{font-size:1em;line-height:1.2em}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:25%;padding:.8em 1em}#upgrade-table td.last,#upgrade-table th.last{width:0;padding:0}#upgrade-table td.feature-label span.description{padding-top:6px}#plugin-recommendations .card-container{grid-gap:2em}}@media screen and (max-width:968px){#plugin-recommendations .card-container{grid-template-columns:repeat(1,1fr);padding-right:40%}}@media screen and (max-width:782px){#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td:has(input[type=checkbox]+input[type=text])>input{display:inline-block}}@media screen and (max-width:767px){#upgrade-table td.feature-label span.description{display:none}#upgrade-table td:not(.last),#upgrade-table th:not(.last){width:20%}#upgrade-table td.first{width:40%}#plugin-recommendations .card-container{padding-right:0}}@media screen and (max-width:649px){div.upgrade-table-description{padding-left:.8em}div.upgrade-table-description p{font-size:1em}#upgrade-table{font-size:.8em}#upgrade-table td,#upgrade-table th{padding:.5em .8em!important}#upgrade-table td span.feature-available{width:18px;height:18px}#upgrade-table .upgrade-links a{white-space:normal;padding:.6em .8em;border-radius:6px}#upgrade-table .upgrade-links a:after{display:none}#plugin-recommendations .card-container{justify-content:center}}@media screen and (max-width:782px){input[type=checkbox],input[type=radio]{margin-bottom:.5em}} \ No newline at end of file diff --git a/assets/js/admin-script.js b/assets/js/admin-script.js index 6b518a481..29ab0b02f 100644 --- a/assets/js/admin-script.js +++ b/assets/js/admin-script.js @@ -49,10 +49,10 @@ jQuery( function( $ ) { $( "[name='wpo_wcpdf_documents_settings_invoice[display_number]']" ).on( 'change', function( event ) { if ( $( this ).val() == 'order_number' ) { $( this ).closest( 'td' ).find( '.description' ).slideDown(); - $( this ).closest( 'tr' ).next( 'tr' ).hide(); + $( this ).closest( 'tr' ).nextAll( 'tr' ).has( 'input#next_invoice_number' ).first().hide(); } else { $( this ).closest( 'td' ).find( '.description' ).hide(); - $( this ).closest( 'tr' ).next( 'tr' ).show(); + $( this ).closest( 'tr' ).nextAll( 'tr' ).has( 'input#next_invoice_number' ).first().show(); } } ).trigger( 'change' ); @@ -596,4 +596,30 @@ jQuery( function( $ ) { //----------> /Preview <----------// + function settingsAccordion() { + // Default to expanded for '#general', collapsed for others. + $( '.settings_category' ).not( '#general' ).find( '.form-table' ).hide(); + $( '#general > h2' ).addClass( 'active' ); + + // Retrieve the state from localStorage + $( '.settings_category h2' ).each( function( index ) { + const state = localStorage.getItem( 'wcpdf_accordion_state_' + index ); + if ( 'true' === state ) { + $( this ).addClass( 'active' ).next( '.form-table' ).show(); + } + } ); + + $('.settings_category h2' ).on( 'click', function() { + const index = $( '.settings_category h2' ).index( this ); + + $( this ).toggleClass( 'active' ).next( '.form-table' ).slideToggle( 'fast', function() { + // Save the state in localStorage + const isVisible = $( this ).is( ':visible' ); + localStorage.setItem( 'wcpdf_accordion_state_' + index, isVisible ); + } ); + } ); + } + + settingsAccordion(); + } ); diff --git a/assets/js/admin-script.min.js b/assets/js/admin-script.min.js index 4887d2b0c..3b7f2d1de 100644 --- a/assets/js/admin-script.min.js +++ b/assets/js/admin-script.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){m=w.val(),n=x.val(),o=y.val(),p=z.val(),q=A.serialize()}function c(){w.val("").trigger("change")}function d(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function e(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function f(b,c){g();let d=a(b.target);if(!i(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}h(c)}}function g(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function h(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){j()},a)}function i(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function j(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:m,document_type:n,output_format:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),B=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=B&&B.abort()},success:function(d,e,f){if(d.data.error)a("#"+c).remove(),v.append("

"+d.data.error+"

");else if(d.data.preview_data&&d.data.output_format)switch(a("#"+c).remove(),d.data.output_format){default:case"pdf":v.append(""),k(b,c,d.data.preview_data);break;case"ubl":let a=d.data.preview_data,e=a.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
");v.html("
"+e+"
")}v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("

"+d+"

"),v.unblock()}}})}function k(a,b,c){c=window.atob(c),pdfjsLib.GlobalWorkerOptions.workerSrc=a;let d=pdfjsLib.getDocument({data:c});d.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function l(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:n};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append(""+d.data.error+""),c.show()):a.each(d.data,function(a,b){let d="#"+b.order_number+" - "+b.billing_first_name+" "+b.billing_last_name;0"+b.date_created+""+b.total+"";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c=$input.val();if(0 h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")}),a(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),a("#wpo-wcpdf-preview-wrapper #due_date").on("change",function(){const b=a("#wpo-wcpdf-preview-wrapper #due_date"),c=a("#wpo-wcpdf-preview-wrapper #due_date_days");b.is(":checked")?c.prop("disabled",!1):c.prop("disabled",!0)}).trigger("change");let m,n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"output_format\"]"),z=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),A=a("#wpo-wcpdf-settings"),B=null;(function a(){x.val(x.data("default")).trigger("change")})(),c(),b(),t=a(window).width(),d(),a(window).on("resize",d),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),e(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),e(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),c(),h())}),h(),a(document).on("wpo-wcpdf-settings-changed",function(a,b){g(),h(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){h(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).trigger("change"),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),h()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",f),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||f(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",f),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",f),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",f),a(document.body).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").trigger("click")}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),h()}}).trigger("change"),w.on("change",function(){h()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){l(d)},e)})}); \ No newline at end of file +jQuery(function(a){function b(){m=w.val(),n=x.val(),o=y.val(),p=z.val(),q=A.serialize()}function c(){w.val("").trigger("change")}function d(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function e(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function f(b,c){g();let d=a(b.target);if(!i(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}h(c)}}function g(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function h(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){j()},a)}function i(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function j(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:m,document_type:n,output_format:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),B=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=B&&B.abort()},success:function(d,e,f){if(d.data.error)a("#"+c).remove(),v.append("

"+d.data.error+"

");else if(d.data.preview_data&&d.data.output_format)switch(a("#"+c).remove(),d.data.output_format){default:case"pdf":v.append(""),k(b,c,d.data.preview_data);break;case"ubl":let a=d.data.preview_data,e=a.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
");v.html("
"+e+"
")}v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("

"+d+"

"),v.unblock()}}})}function k(a,b,c){c=window.atob(c),pdfjsLib.GlobalWorkerOptions.workerSrc=a;let d=pdfjsLib.getDocument({data:c});d.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function l(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:n};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append(""+d.data.error+""),c.show()):a.each(d.data,function(a,b){let d="#"+b.order_number+" - "+b.billing_first_name+" "+b.billing_last_name;0"+b.date_created+""+b.total+"";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c=$input.val();if(0 h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")}),a(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),a("#wpo-wcpdf-preview-wrapper #due_date").on("change",function(){const b=a("#wpo-wcpdf-preview-wrapper #due_date"),c=a("#wpo-wcpdf-preview-wrapper #due_date_days");b.is(":checked")?c.prop("disabled",!1):c.prop("disabled",!0)}).trigger("change");let m,n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"output_format\"]"),z=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),A=a("#wpo-wcpdf-settings"),B=null;(function a(){x.val(x.data("default")).trigger("change")})(),c(),b(),t=a(window).width(),d(),a(window).on("resize",d),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),e(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),e(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),c(),h())}),h(),a(document).on("wpo-wcpdf-settings-changed",function(a,b){g(),h(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){h(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).trigger("change"),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),h()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",f),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||f(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",f),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",f),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",f),a(document.body).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").trigger("click")}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),h()}}).trigger("change"),w.on("change",function(){h()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){l(d)},e)}),function b(){a(".settings_category").not("#general").find(".form-table").hide(),a("#general > h2").addClass("active"),a(".settings_category h2").each(function(b){const c=localStorage.getItem("wcpdf_accordion_state_"+b);"true"===c&&a(this).addClass("active").next(".form-table").show()}),a(".settings_category h2").on("click",function(){const b=a(".settings_category h2").index(this);a(this).toggleClass("active").next(".form-table").slideToggle("fast",function(){const c=a(this).is(":visible");localStorage.setItem("wcpdf_accordion_state_"+b,c)})})}()}); \ No newline at end of file diff --git a/changelog-archive.txt b/changelog-archive.txt index bfbfcc198..4e5f89a94 100644 --- a/changelog-archive.txt +++ b/changelog-archive.txt @@ -76,7 +76,7 @@ * Fix: Font sync on plugin update = 1.5.29 = -* Translations: Added Croation (Thanks Neven/Spine ICT!), updated French (Thanks Sabra!) +* Translations: Added Croatian (Thanks Neven/Spine ICT!), updated French (Thanks Sabra!) * Tweak: filter shop address before checking if it's empty * Dev: added $order to `wpo_wcpdf_template_file` filter diff --git a/composer.json b/composer.json index e868d95c7..0f3fb7265 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "dompdf/dompdf": "^3.0", "symfony/polyfill-mbstring": "^1.27", "symfony/polyfill-iconv": "^1.27", - "sabre/xml": "^2.2.5" + "sabre/xml": "^4.0" }, "extra": { "strauss": { @@ -35,7 +35,8 @@ "exclude_from_prefix": { "packages": [ "symfony/polyfill-mbstring", - "symfony/polyfill-iconv" + "symfony/polyfill-iconv", + "masterminds/html5" ], "namespaces": [], "file_patterns": [] diff --git a/composer.lock b/composer.lock index 7817dda4a..27f3ce20c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5e30e7e90c4071957ab0506a12f5f4fd", + "content-hash": "e7f1331ca433803f7616e9bc96dae955", "packages": [ { "name": "dompdf/dompdf", @@ -295,27 +295,27 @@ }, { "name": "sabre/uri", - "version": "2.3.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sabre-io/uri.git", - "reference": "7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b" + "reference": "38eeab6ed9eec435a2188db489d4649c56272c51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b", - "reference": "7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/38eeab6ed9eec435a2188db489d4649c56272c51", + "reference": "38eeab6ed9eec435a2188db489d4649c56272c51", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.17", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan": "^1.10", - "phpstan/phpstan-phpunit": "^1.3", - "phpstan/phpstan-strict-rules": "^1.5", + "friendsofphp/php-cs-fixer": "^3.64", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^1.12", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-strict-rules": "^1.6", "phpunit/phpunit": "^9.6" }, "type": "library", @@ -351,20 +351,20 @@ "issues": "https://github.com/sabre-io/uri/issues", "source": "https://github.com/fruux/sabre-uri" }, - "time": "2023-06-09T06:54:04+00:00" + "time": "2024-09-04T15:30:08+00:00" }, { "name": "sabre/xml", - "version": "2.2.9", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sabre-io/xml.git", - "reference": "88288712d45f694be3679a0db7dfb3770f08d4f0" + "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/88288712d45f694be3679a0db7dfb3770f08d4f0", - "reference": "88288712d45f694be3679a0db7dfb3770f08d4f0", + "url": "https://api.github.com/repos/sabre-io/xml/zipball/a89257fd188ce30e456b841b6915f27905dfdbe3", + "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3", "shasum": "" }, "require": { @@ -372,13 +372,13 @@ "ext-xmlreader": "*", "ext-xmlwriter": "*", "lib-libxml": ">=2.6.20", - "php": "^7.1 || ^8.0", - "sabre/uri": ">=1.0,<3.0.0" + "php": "^7.4 || ^8.0", + "sabre/uri": ">=2.0,<4.0.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.17.1", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + "friendsofphp/php-cs-fixer": "^3.64", + "phpstan/phpstan": "^1.12", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { @@ -420,24 +420,24 @@ "issues": "https://github.com/sabre-io/xml/issues", "source": "https://github.com/fruux/sabre-xml" }, - "time": "2024-07-26T12:32:40+00:00" + "time": "2024-09-06T08:00:55+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805" + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c027e6a3c6aee334663ec21f5852e89738abc805", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956", + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-iconv": "*" @@ -484,7 +484,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0" }, "funding": [ { @@ -500,24 +500,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -564,7 +564,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -580,7 +580,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" } ], "packages-dev": [], diff --git a/includes/Admin.php b/includes/Admin.php index 939daa7c9..687104441 100644 --- a/includes/Admin.php +++ b/includes/Admin.php @@ -253,7 +253,7 @@ public function add_listing_actions( $order ) { } break; case 'ubl': - if ( $document->is_enabled( $output_format ) ) { + if ( $document->is_enabled( $output_format ) && wcpdf_is_ubl_available() ) { $document_url = WPO_WCPDF()->endpoint->get_document_link( $order, $document->get_type(), array( 'output' => $output_format ) ); $document_title = is_callable( array( $document, 'get_title' ) ) ? $document->get_title() : $document_title; $document_exists = is_callable( array( $document, 'exists' ) ) ? $document->exists() : false; @@ -673,7 +673,7 @@ public function ubl_actions_meta_box( $post_or_order_object ) { } $meta_box_actions = apply_filters( 'wpo_wcpdf_ubl_meta_box_actions', $meta_box_actions, $order->get_id() ); - if ( empty( $meta_box_actions ) ) { + if ( empty( $meta_box_actions ) || ! wcpdf_is_ubl_available() ) { return; } ?> diff --git a/includes/Documents/Invoice.php b/includes/Documents/Invoice.php index 0782d0a9a..6f5726b12 100644 --- a/includes/Documents/Invoice.php +++ b/includes/Documents/Invoice.php @@ -116,7 +116,7 @@ public function exists() { /** * Legacy function < v3.8.0 * - * Still being used by thrid party plugins. + * Still being used by third party plugins. * * @return mixed */ @@ -619,6 +619,78 @@ public function get_ubl_settings_fields( $option_name ) { return apply_filters( "wpo_wcpdf_{$this->type}_ubl_settings_fields", $settings_fields, $option_name, $this ); } + /** + * Get the settings categories. + * + * @param string $output_format + * + * @return array + */ + public function get_settings_categories( string $output_format ): array { + if ( ! in_array( $output_format, $this->output_formats, true ) ) { + return array(); + } + + $settings_categories = array( + 'pdf' => array( + 'general' => array( + 'title' => __( 'General', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'enabled', + 'attach_to_email_ids', + 'disable_for_statuses', + 'my_account_buttons', + ), + ), + 'document_details' => array( + 'title' => __( 'Document details', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'display_email', + 'display_phone', + 'display_customer_notes', + 'display_shipping_address', + 'display_number', + 'next_invoice_number', // this should follow 'display_number' + 'number_format', + 'display_date', + 'due_date' + ) + ), + 'admin_display' => array( + 'title' => __( 'Admin', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'invoice_number_column', + 'invoice_date_column', + 'invoice_number_search', + ), + ), + 'advanced' => array( + 'title' => __( 'Advanced', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'next_invoice_number', + 'reset_number_yearly', + 'mark_printed', + 'unmark_printed', + 'disable_free', + 'use_latest_settings', + ) + ), + ), + 'ubl' => array( + 'general' => array( + 'title' => __( 'General', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'enabled', + 'attach_to_email_ids', + 'include_encrypted_pdf', + ), + ), + ) + ); + + return apply_filters( 'wpo_wcpdf_document_settings_categories', $settings_categories[ $output_format ], $output_format, $this ); + } + } endif; // class_exists diff --git a/includes/Documents/OrderDocument.php b/includes/Documents/OrderDocument.php index 738d02275..cabd24df9 100644 --- a/includes/Documents/OrderDocument.php +++ b/includes/Documents/OrderDocument.php @@ -1129,14 +1129,13 @@ public function header_logo(): void { $company = $this->get_shop_name(); $attachment_src = wp_get_attachment_image_url( $attachment_id, 'full' ); $attachment_path = wp_normalize_path( realpath( get_attached_file( $attachment_id ) ) ); - - if ( empty( $attachment_src ) || empty( $attachment_path ) ) { + $src = apply_filters( 'wpo_wcpdf_use_path', true ) ? $attachment_path : $attachment_src; + + if ( empty( $src ) ) { wcpdf_log_error( 'Header logo file not found.', 'critical' ); return; } - $src = apply_filters( 'wpo_wcpdf_use_path', true ) ? $attachment_path : $attachment_src; - // fix URLs using path if ( ! apply_filters( 'wpo_wcpdf_use_path', true ) && false !== strpos( $src, 'http' ) && false !== strpos( $src, WP_CONTENT_DIR ) ) { $path = preg_replace( '/^https?:\/\//', '', $src ); // removes http(s):// diff --git a/includes/Documents/PackingSlip.php b/includes/Documents/PackingSlip.php index 2f46ad98d..496272e9c 100644 --- a/includes/Documents/PackingSlip.php +++ b/includes/Documents/PackingSlip.php @@ -201,11 +201,50 @@ public function init_settings() { $settings_fields = WPO_WCPDF()->settings->move_setting_after_id( $settings_fields, $pro_notice, 'enabled' ); } - // allow plugins to alter settings fields + // Legacy filter to allow plugins to alter settings fields. $settings_fields = apply_filters( 'wpo_wcpdf_settings_fields_documents_packing_slip', $settings_fields, $page, $option_group, $option_name ); - WPO_WCPDF()->settings->add_settings_fields( $settings_fields, $page, $option_group, $option_name ); - return; + // Allow plugins to alter settings fields. + if ( ! empty( $settings_fields ) ) { + $settings_fields = apply_filters( "wpo_wcpdf_settings_fields_documents_{$this->type}_pdf", $settings_fields, $page, $option_group, $option_name, $this ); + WPO_WCPDF()->settings->add_settings_fields( $settings_fields, $page, $option_group, $option_name ); + } + } + + /** + * Get the settings categories. + * + * @param string $output_format + * + * @return array + */ + public function get_settings_categories( string $output_format ): array { + if ( ! in_array( $output_format, $this->output_formats, true ) ) { + return array(); + } + + $settings_categories = array( + 'pdf' => array( + 'general' => array( + 'title' => __( 'General', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'enabled', + 'attach_to_email_ids', + ), + ), + 'document_details' => array( + 'title' => __( 'Document details', 'woocommerce-pdf-invoices-packing-slips' ), + 'members' => array( + 'display_email', + 'display_phone', + 'display_customer_notes', + 'display_billing_address', + ), + ), + ), + ); + + return apply_filters( 'wpo_wcpdf_document_settings_categories', $settings_categories[ $output_format ], $output_format, $this ); } } diff --git a/includes/Install.php b/includes/Install.php index 1780810ab..2585c625e 100644 --- a/includes/Install.php +++ b/includes/Install.php @@ -82,7 +82,7 @@ public function do_install() { */ protected function install() { // only install when php version or higher - if ( version_compare( PHP_VERSION, '7.2', '<' ) ) { + if ( ! WPO_WCPDF()->is_dependency_version_supported( 'php' ) ) { return; } @@ -212,7 +212,7 @@ protected function install() { */ protected function upgrade( $installed_version ) { // only upgrade when php version or higher - if ( version_compare( PHP_VERSION, '7.2', '<' ) ) { + if ( ! WPO_WCPDF()->is_dependency_version_supported( 'php' ) ) { return; } @@ -521,9 +521,9 @@ protected function upgrade( $installed_version ) { // legacy ubl tax settings - $legacy_ubl_tax_setings = get_option( 'ubl_wc_taxes', [] ); - if ( ! empty( $legacy_ubl_tax_setings ) ) { - update_option( 'wpo_wcpdf_settings_ubl_taxes', $legacy_ubl_tax_setings ); + $legacy_ubl_tax_settings = get_option( 'ubl_wc_taxes', [] ); + if ( ! empty( $legacy_ubl_tax_settings ) ) { + update_option( 'wpo_wcpdf_settings_ubl_taxes', $legacy_ubl_tax_settings ); } // set transient to flush rewrite rules if pretty links are enabled diff --git a/includes/Main.php b/includes/Main.php index 0220db27d..423c2b055 100644 --- a/includes/Main.php +++ b/includes/Main.php @@ -952,7 +952,7 @@ private function tmp_folders_exist_and_writable() public function copy_fonts( $path = '', $merge_with_local = true ) { // only copy fonts if the bundled dompdf library is used! $default_pdf_maker = '\\WPO\\IPS\\Makers\\PDFMaker'; - + if ( $default_pdf_maker !== apply_filters( 'wpo_wcpdf_pdf_maker', $default_pdf_maker ) ) { return; } @@ -1247,7 +1247,7 @@ public function export_order_personal_data_meta( $meta_to_export ) { * Fixed in WP5.5 due to upgrade to newer PHPMailer */ public function set_phpmailer_validator( $mailArray ) { - if ( version_compare( PHP_VERSION, '7.3', '>=' ) && version_compare( get_bloginfo( 'version' ), '5.5-dev', '<' ) ) { + if ( version_compare( get_bloginfo( 'version' ), '5.5-dev', '<' ) ) { global $phpmailer; if ( ! ( $phpmailer instanceof \PHPMailer ) ) { require_once ABSPATH . WPINC . '/class-phpmailer.php'; @@ -1646,8 +1646,19 @@ function_exists( 'WPO_WCPDF_Templates' ) && return; } - $due_date = apply_filters( 'wpo_wcpdf_due_date_display', date_i18n( wcpdf_date_format( $this, 'due_date' ), $due_date_timestamp ), $due_date_timestamp, $document_type, $document ); - $due_date_title = is_callable( array( $document, 'get_due_date_title' ) ) ? $document->get_due_date_title() : __( 'Due Date:', 'woocommerce-pdf-invoices-packing-slips' ); + $due_date = apply_filters_deprecated( + 'wpo_wcpdf_due_date_display', + array( + date_i18n( wcpdf_date_format( $this, 'due_date' ), $due_date_timestamp ), + $due_date_timestamp, + $document_type, + $document + ), + '3.9.0', + 'wpo_wcpdf_document_due_date' + ); + $due_date_title = is_callable( array( $document, 'get_due_date_title' ) ) ? + $document->get_due_date_title() : __( 'Due Date:', 'woocommerce-pdf-invoices-packing-slips' ); if ( ! empty( $due_date ) ) { echo ' diff --git a/includes/Settings.php b/includes/Settings.php index bb9afac78..887c0f7eb 100644 --- a/includes/Settings.php +++ b/includes/Settings.php @@ -86,6 +86,9 @@ public function __construct() { // schedule yearly reset numbers add_action( 'wpo_wcpdf_schedule_yearly_reset_numbers', array( $this, 'yearly_reset_numbers' ) ); + + // Apply settings sections. + add_action( 'wpo_wcpdf_init_documents', array( $this, 'update_documents_settings_sections' ), 999 ); } public function menu() { @@ -178,12 +181,15 @@ public function settings_page() { 'title' => __( 'Documents', 'woocommerce-pdf-invoices-packing-slips' ), 'preview_states' => 3, ), - 'ubl' => array( + ) ); + + if ( wcpdf_is_ubl_available() ) { + $settings_tabs['ubl'] = array( 'title' => __( 'UBL', 'woocommerce-pdf-invoices-packing-slips' ), 'preview_states' => 1, 'beta' => true, - ), - ) ); + ); + } // add status and upgrade tabs last in row $settings_tabs['debug'] = array( @@ -476,7 +482,8 @@ public function add_settings_fields( $settings_fields, $page, $option_group, $op $settings_field['id'], $settings_field['title'], $callback, - $page + $page, + $settings_field['args'] ?? array() ); } else { add_settings_field( @@ -1005,6 +1012,227 @@ public function move_setting_after_id( $settings, $insert_settings, $after_setti return $new_settings; } + /** + * Applies categories to document settings. + * + * @return void + */ + public function update_documents_settings_sections(): void { + $documents = WPO_WCPDF()->documents->get_documents(); + + foreach ( $documents as $document ) { + foreach ( $document->output_formats as $output_format ) { + add_filter( "wpo_wcpdf_settings_fields_documents_{$document->get_type()}_{$output_format}", array( $this, 'apply_settings_categories' ), 999 ); + } + } + } + + /** + * Apply settings categories to the settings fields. + * + * @param array $settings_fields + * + * @return array + */ + public function apply_settings_categories( array $settings_fields ): array { + $current_filter = explode( '_', current_filter() ); + $output_format = end( $current_filter ); + $document_type = prev( $current_filter ); + $document = wcpdf_get_document( $document_type, null ); + + if ( ! $document ) { + return $settings_fields; + } + + $settings_categories = is_callable( array( $document, 'get_settings_categories' ) ) ? $document->get_settings_categories( $output_format ) : array(); + + // Return if no category found! + if ( empty( $settings_categories ) ) { + return $settings_fields; + } + + // Remove all sections first. + foreach ( $settings_fields as $key => $field ) { + if ( 'section' === $field['type'] ) { + unset( $settings_fields[ $key ] ); + } + } + + $modified_settings_fields = array(); + $settings_lookup = array(); + $processed_keys = array(); + + // Create a lookup array for settings fields by id. + // This allows for quick access to settings fields by their id, reducing the time complexity + // of finding a settings field from O(n*m) to O(n+m), where n is the number of category members + // and m is the number of settings fields. + foreach ( $settings_fields as $key => $settings_field ) { + $settings_lookup[ $settings_field['id'] ] = $key; + } + + // Update settings fields. + foreach ( $settings_categories as $category_name => $category_details ) { + // Add section for each category. + $modified_settings_fields[] = $this->create_section( $category_name, $category_details['title'] ); + + // Add settings fields based on the order in the members array. + foreach ( $category_details['members'] as $member ) { + if ( isset( $settings_lookup[ $member ] ) ) { + $key = $settings_lookup[ $member ]; + + // Skip if the key has already been processed. + if ( in_array( $key, $processed_keys, true ) ) { + continue; + } + + $settings_field = $settings_fields[ $key ]; + $settings_field['section'] = $category_name; + $modified_settings_fields[] = $settings_field; + $processed_keys[] = $key; + } + } + } + + // Check for any unprocessed settings fields. + $unprocessed_settings_fields = array_diff_key( $settings_fields, array_flip( $processed_keys ) ); + + // Create an "Additional settings" section for uncategorized settings fields. + if ( ! empty( $unprocessed_settings_fields ) ) { + $category_name = 'additional'; + + $modified_settings_fields[] = $this->create_section( + $category_name, + __( 'Additional settings', 'woocommerce-pdf-invoices-packing-slips' ) + ); + + // Add rest of settings to the $modified_settings_fields array under "More" category + foreach ( $unprocessed_settings_fields as $settings_field ) { + $settings_field['section'] = $category_name; + $modified_settings_fields[] = $settings_field; + } + } + + return $modified_settings_fields; + } + + /** + * Creates a section array for settings fields. + * + * @param string $category_name The ID of the category. + * @param string $category_title The title of the section. + * + * @return array The section configuration array. + */ + private function create_section( string $category_name, string $category_title ): array { + return array( + 'type' => 'section', + 'id' => $category_name, + 'title' => $category_title, + 'callback' => 'section', + 'args' => array( + 'before_section' => '
', + 'after_section' => '
', + ), + ); + } + + /** + * Helper method to add a single setting field to a category. + * + * @param array $settings_categories Array of existing settings categories, with category names as keys. + * @param string $new_setting_id The new setting ID to add to the specified category. + * @param string $category_name Name of the category to which the settings will be added. + * @param int|null $position Optional. The position at which to insert the new settings (starts from 1). Defaults to appending at the end. + * + * @return array + */ + public function add_single_setting_field_to_category( array $settings_categories, string $new_setting_id, string $category_name, ?int $position = null ): array { + return $this->add_setting_field_to_category( $settings_categories, array( $new_setting_id ), $category_name, $position ); + } + + /** + * Helper method to add multiple setting fields to a category. + * + * @param array $settings_categories Array of existing settings categories, with category names as keys. + * @param array $new_setting_ids Array of new setting IDs to add to the specified category. + * @param string $category_name Name of the category to which the settings will be added. + * @param int|null $position Optional. The position at which to insert the new settings (starts from 1). Defaults to appending at the end. + * + * @return array + */ + public function add_multiple_setting_fields_to_category( array $settings_categories, array $new_setting_ids, string $category_name, ?int $position = null ): array { + return $this->add_setting_field_to_category( $settings_categories, $new_setting_ids, $category_name, $position ); + } + + /** + * Internal method to handle adding setting fields to a category. + * + * @param array $settings_categories Array of existing settings categories, with category names as keys. + * @param array $new_setting_ids Array of new setting IDs to add to the specified category. + * @param string $category_name Name of the category to which the settings will be added. + * @param int|null $position Optional. The position at which to insert the new settings (1-based index). Defaults to appending at the end. + * + * @return array + */ + private function add_setting_field_to_category( array $settings_categories, array $new_setting_ids, string $category_name, ?int $position = null ): array { + if ( ! isset( $settings_categories[ $category_name ] ) ) { + return $settings_categories; + } + + $members = &$settings_categories[ $category_name ]['members']; + + if ( is_null( $position ) || 0 === $position ) { + $members = array_merge( $members, $new_setting_ids ); + } else { + array_splice( $members, $position - 1, 0, $new_setting_ids ); + } + + return $settings_categories; + } + + /** + * Get the position of a specific setting in the settings array. + * + * @param array $settings_categories Array of settings categories where the setting name is searched. + * @param string $category Name of the category to search in. + * @param string $setting_name Name of the setting to find in the settings array. + * + * @return int Position of the setting (1-based index) if found; otherwise, returns 0. + */ + public function get_setting_position( array $settings_categories, string $category, string $setting_name ): int { + if ( empty( $settings_categories[ $category ]['members'] ) ) { + return 0; + } + + $key = array_search( $setting_name, $settings_categories[ $category ]['members'], true ); + + return $key !== false ? absint( $key ) + 1: 0; + } + + /** + * Helper method to add a setting category. + * + * @param array $settings_categories + * @param string $category_name + * @param string $title + * @param array $members + * + * @return array + */ + public function add_settings_category( array $settings_categories, string $category_name, string $title, array $members ): array { + // Do not override if the category already exist. + if ( isset( $settings_categories[ $category_name ] ) ) { + return $settings_categories; + } + + $settings_categories[ $category_name ] = array( + 'title' => $title, + 'members' => $members, + ); + + return $settings_categories; + } + } endif; // class_exists diff --git a/includes/Settings/SettingsDebug.php b/includes/Settings/SettingsDebug.php index b54363e2e..cd1bf7052 100644 --- a/includes/Settings/SettingsDebug.php +++ b/includes/Settings/SettingsDebug.php @@ -245,7 +245,7 @@ private function clear_tmp( $data ) { } private function clear_released_semaphore_locks( $data ) { - \WPO\WC\PDF_Invoices\Updraft_Semaphore_3_0::cleanup_released_locks(); + \WPO\IPS\Semaphore::cleanup_released_locks(); $message = esc_html__( 'Released semaphore locks have been cleaned up!', 'woocommerce-pdf-invoices-packing-slips' ); wcpdf_log_error( $message, 'info' ); @@ -253,7 +253,7 @@ private function clear_released_semaphore_locks( $data ) { } private function clear_released_legacy_semaphore_locks( $data ) { - \WPO\WC\PDF_Invoices\Updraft_Semaphore_3_0::cleanup_released_locks( true ); + \WPO\IPS\Semaphore::cleanup_released_locks( true ); $message = esc_html__( 'Released legacy semaphore locks have been cleaned up!', 'woocommerce-pdf-invoices-packing-slips' ); wcpdf_log_error( $message, 'info' ); diff --git a/includes/Settings/SettingsDocuments.php b/includes/Settings/SettingsDocuments.php index a79a95daa..7e324b3b0 100644 --- a/includes/Settings/SettingsDocuments.php +++ b/includes/Settings/SettingsDocuments.php @@ -77,6 +77,10 @@ public function output( $section ) {