Skip to content

Commit

Permalink
Merge pull request #74 from dparker1005/fixing-casting-string-id-to-int
Browse files Browse the repository at this point in the history
Fix trying to cast ID like "L-4-P-1" to int
  • Loading branch information
dparker1005 authored Oct 24, 2024
2 parents e8fbee3 + e23de2c commit e23809b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pmpro-payment-plans.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit e23809b

Please sign in to comment.