| @@ -157,9 +157,8 @@ | ||
| 157 | 157 | $template = new Model_E2pdf_Template(); |
| 158 | 158 | if ($template->load($template_id)) { |
| 159 | 159 | |
| 160 | 160 | $entry = new Model_E2pdf_Entry(); |
| 161 | - | |
| 162 | 161 | $entry->set_data('template_id', $template_id); |
| 163 | 162 | $template->extension()->set('template_id', $template_id); |
| 164 | 163 | |
| 165 | 164 | if ($dataset) { |
| @@ -205,9 +204,9 @@ | ||
| 205 | 204 | $template->extension()->set('storing_engine', $template->extension()->get_storing_engine()); |
| 206 | 205 | } |
| 207 | 206 | |
| 208 | 207 | if ($template->extension()->verify()) { |
| 209 | - | |
| 208 | + add_filter('acf/shortcode/prevent_access_to_fields_on_non_public_posts', [$this->helper, '__return_false'], 999); | |
| 210 | 209 | if (array_key_exists('inline', $atts)) { |
| 211 | 210 | $inline = $atts['inline']; |
| 212 | 211 | if ($template->get('inline') !== $inline) { |
| 213 | 212 | $entry->set_data('inline', $inline); |
| @@ -339,8 +338,9 @@ | ||
| 339 | 338 | do_action('e2pdf_controller_e2pdf_export_completed', $request['file'], $template); |
| 340 | 339 | $this->download_response($template->get('format'), $request['file'], $template->get_name(), $disposition, false, true); |
| 341 | 340 | exit; |
| 342 | 341 | } |
| 342 | + remove_filter('acf/shortcode/prevent_access_to_fields_on_non_public_posts', [$this->helper, '__return_false'], 999); | |
| 343 | 343 | } else { |
| 344 | 344 | $this->add_notification('error', __('Incorrect Dataset', 'e2pdf')); |
| 345 | 345 | $this->render('blocks', 'notifications'); |
| 346 | 346 | } |