| @@ -462,8 +462,15 @@ | ||
| 462 | 462 | action: 'king_addons_pb_save_template_conditions', |
| 463 | 463 | nonce: KingAddonsPopupBuilderOptions.nonce, |
| 464 | 464 | template: template |
| 465 | 465 | }; |
| 466 | + | |
| 467 | + // Secondary nonce printed by wp_nonce_field() in the form. | |
| 468 | + // Required by PHP handler before it persists options. | |
| 469 | + const popupSettingsNonce = $('#king_addons_popup_nonce').val() || $('input[name="king_addons_popup_nonce"]').val(); | |
| 470 | + if (popupSettingsNonce) { | |
| 471 | + data.king_addons_popup_nonce = popupSettingsNonce; | |
| 472 | + } | |
| 466 | 473 | data['king_addons_pb_' + currentTab + '_conditions'] = JSON.stringify(conditions); |
| 467 | 474 | |
| 468 | 475 | let showOnCanvas = $('#king-addons-pb-show-on-canvas'); |
| 469 | 476 | |