WooCommerce PDF Invoices & Packing Slips - Version 3.0.1

Version Description

(2022-08-02) = * New: admin pointer for document settings dropdown * Security: escape the tab and section parameters before outputting it back, leading to a Reflected Cross-Site Scripting. This bug was reintroduced on version 2.14.0 * Tweak: prevent requirements select to reload settings preview * Fix: allow remove requirement trigger secondary save button on settings pages * Marked tested up to WooCommerce 6.7

Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.1

assets/css/settings-styles.css CHANGED
@@ -226,6 +226,22 @@ table.wcpdf_documents_settings_list td.title {
226
  cursor:pointer;
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  /* Preview */
230
 
231
  body.woocommerce_page_wpo_wcpdf_options_page {
226
  cursor:pointer;
227
  }
228
 
229
+ /* Pointers */
230
+
231
+ .wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,
232
+ .wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner {
233
+ border-bottom-color: #51266b;
234
+ }
235
+
236
+ .wpo-wcpdf-pointer .wp-pointer-content h3 {
237
+ border-color: #51266b;
238
+ background: #51266b;
239
+ }
240
+
241
+ .wpo-wcpdf-pointer .wp-pointer-content h3:before {
242
+ color: #51266b;
243
+ }
244
+
245
  /* Preview */
246
 
247
  body.woocommerce_page_wpo_wcpdf_options_page {
assets/css/settings-styles.min.css CHANGED
@@ -1 +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{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.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{min-width:120px;display:inline-block}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{margin-bottom:40px;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}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}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 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 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:#fff;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>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>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][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-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-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}.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{content:'Preview';position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';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}@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}}
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{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.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{min-width:120px;display:inline-block}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{margin-bottom:40px;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}.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 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 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:#fff;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>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>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][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-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-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}.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{content:'Preview';position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';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}@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}}
assets/js/admin-script.js CHANGED
@@ -51,6 +51,41 @@ jQuery( function( $ ) {
51
  $( this ).parent().find( 'ul' ).toggleClass( 'active' );
52
  } );
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  //----------> Preview <----------//
56
 
@@ -272,7 +307,7 @@ jQuery( function( $ ) {
272
  });
273
  $( document ).on( 'select2:select select2:unselect', '#wpo-wcpdf-settings select.wc-enhanced-select', settingsChanged );
274
  $( document.body ).on( 'wpo-wcpdf-media-upload-setting-updated', settingsChanged );
275
- $( document ).on( 'click', '.wpo_remove_image_button', settingsChanged );
276
 
277
  function settingsChanged( event, previewDelay ) {
278
 
@@ -284,6 +319,10 @@ jQuery( function( $ ) {
284
 
285
  if ( ! settingIsExcludedForPreview( $element.attr('name') ) ) {
286
 
 
 
 
 
287
  if ( jQuery.inArray( event.type, ['keyup', 'paste'] ) !== -1 ) {
288
  if ( $element.is( 'input[type="checkbox"], select' ) ) {
289
  return;
51
  $( this ).parent().find( 'ul' ).toggleClass( 'active' );
52
  } );
53
 
54
+ // Add admin pointers
55
+ $.each( wpo_wcpdf_admin.pointers, function( key, pointer ) {
56
+
57
+ $( pointer.target ).pointer(
58
+ {
59
+ content: pointer.content,
60
+
61
+ position:
62
+ {
63
+ edge: pointer.position.edge,
64
+ align: pointer.position.align
65
+ },
66
+
67
+ pointerClass: pointer.pointer_class,
68
+
69
+ pointerWidth: pointer.pointer_width,
70
+
71
+ close: function() {
72
+ jQuery.post(
73
+ wpo_wcpdf_admin.ajaxurl,
74
+ {
75
+ pointer: key,
76
+ action: 'dismiss-wp-pointer',
77
+ }
78
+ );
79
+ },
80
+ }
81
+ );
82
+
83
+ // Check if pointer was dismissed
84
+ if ( $.inArray( key, wpo_wcpdf_admin.dismissed_pointers.split(',') ) === -1 ) {
85
+ $( pointer.target ).pointer('open');
86
+ }
87
+
88
+ });
89
 
90
  //----------> Preview <----------//
91
 
307
  });
308
  $( document ).on( 'select2:select select2:unselect', '#wpo-wcpdf-settings select.wc-enhanced-select', settingsChanged );
309
  $( document.body ).on( 'wpo-wcpdf-media-upload-setting-updated', settingsChanged );
310
+ $( document ).on( 'click', '.wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement', settingsChanged );
311
 
312
  function settingsChanged( event, previewDelay ) {
313
 
319
 
320
  if ( ! settingIsExcludedForPreview( $element.attr('name') ) ) {
321
 
322
+ if ( $element.hasClass( 'remove-requirement' ) || $element.attr('id') == 'disable_for' ) {
323
+ return;
324
+ }
325
+
326
  if ( jQuery.inArray( event.type, ['keyup', 'paste'] ) !== -1 ) {
327
  if ( $element.is( 'input[type="checkbox"], select' ) ) {
328
  return;
assets/js/admin-script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(){n=w.val(),o=x.val(),p=y.val(),q=z.serialize()}function c(){x.val(x.data("default")).trigger("change")}function d(){w.val("").trigger("change")}function e(){!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",2),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","")):(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",2),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","")):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 f(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function g(b,c){h();let d=a(b.target);if(!j(d.attr("name"))){if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}i(c)}}function h(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function i(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){k()},a)}function j(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 k(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:n,document_type:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),A=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=A&&A.abort()},success:function(d,e,f){d.data.error?(a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),v.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),l(b,c,d.data.pdf_data)),v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),v.unblock()}}})}function l(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.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 m(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:o};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("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";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={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:c,success:function(a){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(b){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")});let 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=\"nonce\"]"),z=a("#wpo-wcpdf-settings"),A=null;a(document).ready(function(){c(),d(),b(),t=a(window).width(),e()}),a(window).on("resize",e),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"),f(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"),f(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(),d(),i())}),a(document).ready(i()),a(document).on("wpo-wcpdf-settings-changed",function(a,b){h(),i(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){i(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")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),i()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",g),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||g(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",g),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",g),a(document).on("click",".wpo_remove_image_button",g),a(document).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").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()),i()}}).trigger("change"),w.on("change",function(){i()}).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(){m(d)},e)})});
1
+ jQuery(function(a){function b(){n=w.val(),o=x.val(),p=y.val(),q=z.serialize()}function c(){x.val(x.data("default")).trigger("change")}function d(){w.val("").trigger("change")}function e(){!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",2),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","")):(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",2),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","")):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 f(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function g(b,c){h();let d=a(b.target);if(!j(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}i(c)}}function h(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function i(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){k()},a)}function j(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 k(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:n,document_type:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),A=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=A&&A.abort()},success:function(d,e,f){d.data.error?(a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),v.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),l(b,c,d.data.pdf_data)),v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),v.unblock()}}})}function l(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.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 m(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:o};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("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";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={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:c,success:function(a){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(b){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > 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")});let 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=\"nonce\"]"),z=a("#wpo-wcpdf-settings"),A=null;a(document).ready(function(){c(),d(),b(),t=a(window).width(),e()}),a(window).on("resize",e),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"),f(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"),f(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(),d(),i())}),a(document).ready(i()),a(document).on("wpo-wcpdf-settings-changed",function(a,b){h(),i(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){i(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")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),i()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",g),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||g(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",g),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",g),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",g),a(document).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").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()),i()}}).trigger("change"),w.on("change",function(){i()}).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(){m(d)},e)})});
includes/class-wcpdf-assets.php CHANGED
@@ -148,6 +148,23 @@ class Assets {
148
  'disable_free',
149
  'use_latest_settings',
150
  ) ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  )
152
  );
153
 
@@ -159,6 +176,14 @@ class Assets {
159
  WPO_WCPDF_VERSION
160
  );
161
 
 
 
 
 
 
 
 
 
162
  }
163
  }
164
 
148
  'disable_free',
149
  'use_latest_settings',
150
  ) ),
151
+ 'pointers' => array(
152
+ 'wcpdf_document_settings_sections' => array(
153
+ 'target' => '.wcpdf_document_settings_sections',
154
+ 'content' => sprintf(
155
+ '<h3>%s</h3><p>%s</p>',
156
+ __( 'Document settings', 'woocommerce-pdf-invoices-packing-slips' ),
157
+ __( 'Select a document in the dropdown menu above to edit its settings.', 'woocommerce-pdf-invoices-packing-slips' )
158
+ ),
159
+ 'pointer_class' => 'wp-pointer arrow-top wpo-wcpdf-pointer',
160
+ 'pointer_width' => 300,
161
+ 'position' => array(
162
+ 'edge' => 'top',
163
+ 'align' => 'left',
164
+ ),
165
+ ),
166
+ ),
167
+ 'dismissed_pointers' => get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ),
168
  )
169
  );
170
 
176
  WPO_WCPDF_VERSION
177
  );
178
 
179
+ if ( wp_script_is( 'wp-pointer', 'enqueued' ) === false ) {
180
+ wp_enqueue_script( 'wp-pointer' );
181
+ }
182
+
183
+ if ( wp_style_is( 'wp-pointer', 'enqueued' ) === false ) {
184
+ wp_enqueue_style( 'wp-pointer' );
185
+ }
186
+
187
  }
188
  }
189
 
includes/views/wcpdf-settings-page.php CHANGED
@@ -47,7 +47,7 @@ $review_invitation = sprintf(
47
  <div id="wpo-wcpdf-preview-wrapper" data-preview-states="<?php echo $preview_states; ?>" data-preview-state="closed" data-from-preview-state="" data-preview-states-lock="<?php echo $preview_states_lock; ?>">
48
 
49
  <div class="sidebar">
50
- <form method="post" action="options.php" id="wpo-wcpdf-settings" class="<?php echo "{$active_tab} {$active_section}"; ?>">
51
  <?php
52
  do_action( 'wpo_wcpdf_before_settings', $active_tab, $active_section );
53
  if ( has_action( 'wpo_wcpdf_settings_output_'.$active_tab ) ) {
47
  <div id="wpo-wcpdf-preview-wrapper" data-preview-states="<?php echo $preview_states; ?>" data-preview-state="closed" data-from-preview-state="" data-preview-states-lock="<?php echo $preview_states_lock; ?>">
48
 
49
  <div class="sidebar">
50
+ <form method="post" action="options.php" id="wpo-wcpdf-settings" class="<?php echo esc_attr( "{$active_tab} {$active_section}" ); ?>">
51
  <?php
52
  do_action( 'wpo_wcpdf_before_settings', $active_tab, $active_section );
53
  if ( has_action( 'wpo_wcpdf_settings_output_'.$active_tab ) ) {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
5
  Requires at least: 3.5
6
  Tested up to: 6.0
7
  Requires PHP: 7.1
8
- Stable tag: 3.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,13 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
105
  = 3.0.0 =
106
  * Libraries: Updated dompdf to 2.0.0, addressing security vulnerabilities and introducing some changes that could possibly break high level customized setups ([more information](https://github.com/dompdf/dompdf/releases/tag/v2.0.0))
107
  * Fix: respect custom (filtered) woocommerce template paths
5
  Requires at least: 3.5
6
  Tested up to: 6.0
7
  Requires PHP: 7.1
8
+ Stable tag: 3.0.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 3.0.1 (2022-08-02) =
106
+ * New: admin pointer for document settings dropdown
107
+ * Security: escape the tab and section parameters before outputting it back, leading to a Reflected Cross-Site Scripting. This bug was reintroduced on version 2.14.0
108
+ * Tweak: prevent requirements select to reload settings preview
109
+ * Fix: allow remove requirement trigger secondary save button on settings pages
110
+ * Marked tested up to WooCommerce 6.7
111
+
112
  = 3.0.0 =
113
  * Libraries: Updated dompdf to 2.0.0, addressing security vulnerabilities and introducing some changes that could possibly break high level customized setups ([more information](https://github.com/dompdf/dompdf/releases/tag/v2.0.0))
114
  * Fix: respect custom (filtered) woocommerce template paths
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 3.0.0
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
- * WC tested up to: 6.6
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '3.0.0';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 3.0.1
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
+ * WC tested up to: 6.7
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '3.0.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;