Skip to content

Commit

Permalink
fix: add esc_attr to session_id redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein authored and Jon Waldstein committed May 16, 2024
1 parent a97ce17 commit 0791d20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function maybeHandleRedirect()
// Make the id field from the Checkout Session creation API response
// available to this file, so you can provide it as parameter here
// instead of the {{CHECKOUT_SESSION_ID}} placeholder.
sessionId: '<?php echo $session_id; ?>'
sessionId: '<?php echo esc_attr($session_id); ?>'
}).then( ( result ) => {
console.log(result);
// If `redirectToCheckout` fails due to a browser or network
Expand Down

0 comments on commit 0791d20

Please sign in to comment.