diff --git a/src/render.php b/src/render.php index fe508e3..80a69ac 100644 --- a/src/render.php +++ b/src/render.php @@ -80,6 +80,10 @@ ], ]; +wp_interactivity_state( 'booking-form', [ + 'title' => __( 'Booking Form Submission', 'booking-form' ); +]); + ?>
${ field.label }: ${ field.value }
`; }, '' ); @@ -62,7 +58,7 @@ const { actions } = store( 'booking-form', { path: '/booking-form/v1/booking', method: 'POST', data: { - title, + title: state.title, content, }, } );