Skip to content

Commit

Permalink
Process shortcodes in the protected resposne
Browse files Browse the repository at this point in the history
otherwise the shortcode would actually be shown (e.g. `[test]`)
  • Loading branch information
bumi authored Dec 31, 2022
1 parent d3336f9 commit ea39a42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/rest-api/controllers/class-rest-paywall.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public function process_paywall_verify_request( $request )
// this adds the "shortcode" to the content if the Gutenberg block is used
// the shortcode is then parsed in BLN_Publisher_Paywall with a regex
$content = do_blocks($post->post_content);
$content = do_shortcode($content);
$paywall = new BLN_Publisher_Paywall($plugin, ['content' => $content, 'post_id' => $post_id]);
$protected = $paywall->get_protected_content();

Expand Down

0 comments on commit ea39a42

Please sign in to comment.