summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php')
-rw-r--r--plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php b/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php
index b30d3045..3bdabbd2 100644
--- a/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php
+++ b/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php
@@ -50,7 +50,12 @@ function render_block( $attr, $content ) {
return $content;
}
- $simple_payments = Jetpack_Simple_Payments::getInstance();
+ $simple_payments = Jetpack_Simple_Payments::get_instance();
+
+ if ( ! $simple_payments->is_valid( $attr ) ) {
+ return '';
+ }
+
$simple_payments->enqueue_frontend_assets();
// For AMP requests, make sure the purchase link redirects to the non-AMP post URL.