| @@ -155,8 +155,9 @@ | ||
| 155 | 155 | const protection = $input.attr( 'data-protection' ) || ''; |
| 156 | 156 | const acf = $button.attr( 'data-acf' ) || ''; |
| 157 | 157 | const redirect = $button.attr( 'data-redirect' ) || ''; |
| 158 | 158 | const termId = parseInt( $button.attr( 'data-term-id' ) ) || 0; |
| 159 | + const postType = $button.attr( 'data-post-type' ) || ''; | |
| 159 | 160 | |
| 160 | 161 | // Get block ID from parent wrapper if exists. |
| 161 | 162 | const $wrapper = $form.closest( '.passster-protected-content' ); |
| 162 | 163 | const blockId = $wrapper.length ? $wrapper.attr( 'data-block-id' ) : ''; |
| @@ -179,8 +180,9 @@ | ||
| 179 | 180 | protection, |
| 180 | 181 | acf, |
| 181 | 182 | redirect, |
| 182 | 183 | term_id: termId, |
| 184 | + post_type: postType, | |
| 183 | 185 | } ), |
| 184 | 186 | } ); |
| 185 | 187 | |
| 186 | 188 | const data = await response.json(); |