From e23de2cc33f0ba3a20e90c777beaa65b1a9cd097 Mon Sep 17 00:00:00 2001 From: David Parker Date: Wed, 23 Oct 2024 15:11:39 -0400 Subject: [PATCH] Fix trying to cast ID like "L-4-P-1" to int --- pmpro-payment-plans.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmpro-payment-plans.php b/pmpro-payment-plans.php index 7d49168..b6fa1ef 100644 --- a/pmpro-payment-plans.php +++ b/pmpro-payment-plans.php @@ -615,7 +615,7 @@ function pmpropp_render_plans( $template, $is_admin = false ) { */ function pmpropp_replace_template_values( $template, $values ) { - $template = str_replace( '!!plan_id!!', ( ! empty( $values->id ) ) ? (int) $values->id : '', $template ); + $template = str_replace( '!!plan_id!!', ( ! empty( $values->id ) ) ? esc_attr( $values->id ) : '', $template ); $template = str_replace( '!!plan_name!!', ( ! empty( $values->name ) ) ? esc_html( $values->name ) : '', $template ); $template = str_replace( '!!display_order!!', ( ! empty( $values->display_order ) ) ? esc_html( $values->display_order ) : '', $template );