@@ -144,7 +144,7 @@ public function form_shortcode( $atts ) {
144144 if ( $ show_form ) {
145145
146146 if ( 'yes ' === $ this ->meta ['useinventory ' ] && 0 >= $ this ->stock ) {
147- echo '<h1> ' . __ ( 'Out of Stock ' , 'pff-paystack ' ) . '</h1> ' ;
147+ $ html [] = '<h1> ' . esc_html__ ( 'Out of Stock ' , 'pff-paystack ' ) . '</h1> ' ;
148148 } else {
149149 // Form title
150150 if ( $ this ->meta ['hidetitle ' ] != 1 ) {
@@ -180,13 +180,13 @@ public function form_shortcode( $atts ) {
180180 }
181181
182182 } else {
183- $ html [] = '<h5> ' . __ ( 'You must be logged in to make a payment. ' , 'pff-paystack ' ) . '</h5> ' ;
183+ $ html [] = '<h5> ' . esc_html__ ( 'You must be logged in to make a payment. ' , 'pff-paystack ' ) . '</h5> ' ;
184184 }
185185 } else {
186- $ html [] = '<h5> ' . __ ( 'Invalid Paystack form ID or the form does not exist. ' , 'pff-paystack ' ) . '</h5> ' ;
186+ $ html [] = '<h5> ' . esc_html__ ( 'Invalid Paystack form ID or the form does not exist. ' , 'pff-paystack ' ) . '</h5> ' ;
187187 }
188188 } else {
189- $ html [] = '<h5> ' . __ ( 'No Paystack form ID provided. ' , 'pff-paystack ' ) . '</h5> ' ;
189+ $ html [] = '<h5> ' . esc_html__ ( 'No Paystack form ID provided. ' , 'pff-paystack ' ) . '</h5> ' ;
190190 }
191191
192192 $ html = implode ( '' , $ html );
@@ -242,7 +242,7 @@ public function set_meta_data( $obj ) {
242242 $ this ->meta ['paymentoptions ' ] = array_map ( 'sanitize_text_field ' , $ this ->meta ['paymentoptions ' ] );
243243 }
244244
245- $ this ->meta ['planerrorcode ' ] = __ ( 'Input Correct Recurring Plan Code ' , 'pff-paystack ' );
245+ $ this ->meta ['planerrorcode ' ] = esc_html__ ( 'Input Correct Recurring Plan Code ' , 'pff-paystack ' );
246246
247247 if ( 'plan ' === $ this ->meta ['recur ' ] ) {
248248 if ( '' === $ this ->meta ['recurplan ' ] ) {
@@ -307,9 +307,9 @@ public function get_hidden_fields() {
307307 */
308308 public function get_fullname_field () {
309309 $ html = '<div class="span12 unit">
310- <label class="label"> ' . __ ( 'Full Name ' , 'pff-paystack ' ) . ' <span>*</span></label>
310+ <label class="label"> ' . esc_html__ ( 'Full Name ' , 'pff-paystack ' ) . ' <span>*</span></label>
311311 <div class="input">
312- <input type="text" name="pf-fname" placeholder=" ' . __ ( 'First & Last Name ' , 'pff-paystack ' ) . '" value=" ' . esc_attr ( $ this ->user ['fullname ' ] ) . '" required>
312+ <input type="text" name="pf-fname" placeholder=" ' . esc_html__ ( 'First & Last Name ' , 'pff-paystack ' ) . '" value=" ' . esc_attr ( $ this ->user ['fullname ' ] ) . '" required>
313313 </div>
314314 </div> ' ;
315315 return $ html ;
@@ -322,9 +322,9 @@ public function get_fullname_field() {
322322 */
323323 public function get_email_field () {
324324 $ html = '<div class="span12 unit">
325- <label class="label"> ' . __ ( 'Email ' , 'pff-paystack ' ) . ' <span>*</span></label>
325+ <label class="label"> ' . esc_html__ ( 'Email ' , 'pff-paystack ' ) . ' <span>*</span></label>
326326 <div class="input">
327- <input type="email" name="pf-pemail" placeholder=" ' . __ ( 'Enter Email Address ' , 'pff-paystack ' ) . '" id="pf-email" value=" ' . esc_attr ( $ this ->user ['email ' ] ) . '" ' . ( $ this ->meta ['loggedin ' ] == 'yes ' ? 'readonly ' : '' ) . ' required>
327+ <input type="email" name="pf-pemail" placeholder=" ' . esc_html__ ( 'Enter Email Address ' , 'pff-paystack ' ) . '" id="pf-email" value=" ' . esc_attr ( $ this ->user ['email ' ] ) . '" ' . ( $ this ->meta ['loggedin ' ] == 'yes ' ? 'readonly ' : '' ) . ' required>
328328 </div>
329329 </div> ' ;
330330 return $ html ;
@@ -371,7 +371,7 @@ public function get_amount_field() {
371371 } else {
372372
373373 if ( '' === $ this ->meta ['variableamount ' ] || 0 === $ this ->meta ['variableamount ' ] || ! is_array ( $ this ->meta ['paymentoptions ' ] ) ) {
374- $ html [] = __ ( 'Form Error, set variable amount string ' , 'pff-paystack ' );
374+ $ html [] = esc_html__ ( 'Form Error, set variable amount string ' , 'pff-paystack ' );
375375 } else if ( count ( $ this ->meta ['paymentoptions ' ] ) > 0 ) {
376376 $ html [] = '<div class="select">
377377 <input type="hidden" id="pf-vname" name="pf-vname" />
@@ -538,44 +538,44 @@ public function get_retry_form( $code = '' ) {
538538
539539
540540 $ html [] = '<div class="divider-text gap-top-20 gap-bottom-45">
541- <span> ' . __ ( 'Payment Invoice ' , 'pff-paystack ' ) . '</span>
541+ <span> ' . esc_html__ ( 'Payment Invoice ' , 'pff-paystack ' ) . '</span>
542542 </div> ' ;
543543
544544 $ html [] = '<div class="j-row"> ' ;
545545
546546 $ html [] = '<div class="span12 unit">
547- <label class="label inline"> ' . __ ( 'Email: ' , 'pff-paystack ' ) . '</label>
547+ <label class="label inline"> ' . esc_html__ ( 'Email: ' , 'pff-paystack ' ) . '</label>
548548 <strong><a href="mailto: ' . esc_attr ( $ record ->email ) . '"> ' . esc_html ( $ record ->email ) . '</a></strong>
549549 </div> ' ;
550550
551551 $ html [] = '<div class="span12 unit">
552- <label class="label inline"> ' . __ ( 'Amount: ' , 'pff-paystack ' ) . '</label>
552+ <label class="label inline"> ' . esc_html__ ( 'Amount: ' , 'pff-paystack ' ) . '</label>
553553 <strong> ' . esc_html ( $ this ->meta ['currency ' ] . number_format ( $ record ->amount ) ) . '</strong>
554554 </div> ' ;
555555
556556
557557 $ html [] = $ this ->helpers ->format_meta_as_display_fields ( $ record ->metadata );
558558
559559 $ html [] = '<div class="span12 unit">
560- <label class="label inline"> ' . __ ( 'Date: ' , 'pff-paystack ' ) . '</label>
560+ <label class="label inline"> ' . esc_html__ ( 'Date: ' , 'pff-paystack ' ) . '</label>
561561 <strong> ' . esc_html ( $ record ->created_at ) . '</strong>
562562 </div> ' ;
563563
564564 if ( 1 === intval ( $ record ->paid ) ) {
565565 $ html [] = '<div class="span12 unit">
566- <label class="label inline"> ' . __ ( 'Payment Status: ' , 'pff-paystack ' ) . '</label>
567- <strong> ' . __ ( 'Successful ' , 'pff-paystack ' ) . '</strong>
566+ <label class="label inline"> ' . esc_html__ ( 'Payment Status: ' , 'pff-paystack ' ) . '</label>
567+ <strong> ' . esc_html__ ( 'Successful ' , 'pff-paystack ' ) . '</strong>
568568 </div> ' ;
569569 }
570570
571571 $ html [] = '</div> ' ;
572572 $ html [] = '</div> ' ;
573573
574574 $ html [] = '<div class="footer"> ' ;
575- $ html [] = '<small><span style="color: red;">*</span> ' . __ ( 'are compulsory ' , 'pff-paystack ' ) . '</small><br> ' ;
575+ $ html [] = '<small><span style="color: red;">*</span> ' . esc_html__ ( 'are compulsory ' , 'pff-paystack ' ) . '</small><br> ' ;
576576 $ html[] =
'<img class="paystack-cardlogos size-full wp-image-1096" alt="cardlogos" src=" ' .
esc_url (
PFF_PAYSTACK_PLUGIN_URL .
'/assets/images/[email protected] ' ) .
'"> ' ;
577577 if ( 0 === intval ( $ record ->paid ) ) {
578- $ html [] = '<button type="submit" class="primary-btn" id="submitbtn"> ' . __ ( 'Retry Payment ' , 'pff-paystack ' ) . '</button> ' ;
578+ $ html [] = '<button type="submit" class="primary-btn" id="submitbtn"> ' . esc_html__ ( 'Retry Payment ' , 'pff-paystack ' ) . '</button> ' ;
579579 }
580580
581581 $ html [] = ' </div> ' ;
0 commit comments