| @@ -34,18 +34,18 @@ | ||
| 34 | 34 | <table id="fs_billing_address"<?php if ( $has_billing ) { |
| 35 | 35 | echo ' class="fs-read-mode"'; |
| 36 | 36 | } ?>> |
| 37 | 37 | <tr> |
| 38 | - <td><label><span><?php fs_esc_html_echo_inline( 'Business name', 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo $billing->business_name ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Business name', 'business-name', $slug ) ?>"></label></td> | |
| 39 | - <td><label><span><?php fs_esc_html_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo $billing->tax_id ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>"></label></td> | |
| 38 | + <td><label><span><?php fs_esc_html_echo_inline( 'Business name', 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo esc_attr( $billing->business_name ) ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Business name', 'business-name', $slug ) ?>"></label></td> | |
| 39 | + <td><label><span><?php fs_esc_html_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo esc_attr( $billing->tax_id ) ?>" placeholder="<?php fs_esc_attr_echo_inline( 'Tax / VAT ID', 'tax-vat-id', $slug ) ?>"></label></td> | |
| 40 | 40 | </tr> |
| 41 | 41 | <tr> |
| 42 | - <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo $billing->address_street ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>"></label></td> | |
| 43 | - <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo $billing->address_apt ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>"></label></td> | |
| 42 | + <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo esc_attr( $billing->address_street ) ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 1 ) ?>"></label></td> | |
| 43 | + <td><label><span><?php printf( fs_esc_html_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo esc_attr( $billing->address_apt ) ?>" placeholder="<?php printf( fs_esc_attr_inline( 'Address Line %d', 'address-line-n', $slug ), 2 ) ?>"></label></td> | |
| 44 | 44 | </tr> |
| 45 | 45 | <tr> |
| 46 | - <td><label><span><?php fs_esc_html_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Town', 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo $billing->address_city ?>" placeholder="<?php fs_esc_attr_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_attr_echo_inline( 'Town', 'town', $slug ) ?>"></label></td> | |
| 47 | - <td><label><span><?php fs_esc_html_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo $billing->address_zip ?>" placeholder="<?php fs_esc_attr_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>"></label></td> | |
| 46 | + <td><label><span><?php fs_esc_html_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Town', 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo esc_attr( $billing->address_city ) ?>" placeholder="<?php fs_esc_attr_echo_inline( 'City', 'city', $slug ) ?> / <?php fs_esc_attr_echo_inline( 'Town', 'town', $slug ) ?>"></label></td> | |
| 47 | + <td><label><span><?php fs_esc_html_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo esc_attr( $billing->address_zip ) ?>" placeholder="<?php fs_esc_attr_echo_inline( 'ZIP / Postal Code', 'zip-postal-code', $slug ) ?>"></label></td> | |
| 48 | 48 | </tr> |
| 49 | 49 | <tr> |
| 50 | 50 | <?php $countries = array( |
| 51 | 51 | 'AF' => 'Afghanistan', |
| @@ -304,13 +304,13 @@ | ||
| 304 | 304 | <option value="" selected><?php fs_esc_html_echo_inline( 'Select Country', 'select-country', $slug ) ?></option> |
| 305 | 305 | <?php endif ?> |
| 306 | 306 | <?php foreach ( $countries as $code => $country ) : ?> |
| 307 | 307 | <option |
| 308 | - value="<?php echo $code ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo $country ?></option> | |
| 308 | + value="<?php echo esc_attr( $code ) ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo esc_html( $country ) ?></option> | |
| 309 | 309 | <?php endforeach ?> |
| 310 | 310 | </select></label></td> |
| 311 | 311 | <td><label><span><?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>:</span> |
| 312 | - <input id="address_state" value="<?php echo $billing->address_state ?>" placeholder="<?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>"></label></td> | |
| 312 | + <input id="address_state" value="<?php echo esc_attr( $billing->address_state ) ?>" placeholder="<?php fs_esc_html_echo_inline( 'State', 'state', $slug ) ?> / <?php fs_esc_html_echo_inline( 'Province', 'province', $slug ) ?>"></label></td> | |
| 313 | 313 | </tr> |
| 314 | 314 | <tr> |
| 315 | 315 | <td colspan="2"> |
| 316 | 316 | <button |
| @@ -379,11 +379,11 @@ | ||
| 379 | 379 | $.ajax({ |
| 380 | 380 | url : <?php echo Freemius::ajax_url() ?>, |
| 381 | 381 | method : 'POST', |
| 382 | 382 | data : { |
| 383 | - action : '<?php echo $fs->get_ajax_action( 'update_billing' ) ?>', | |
| 384 | - security : '<?php echo $fs->get_ajax_security( 'update_billing' ) ?>', | |
| 385 | - module_id: '<?php echo $fs->get_id() ?>', | |
| 383 | + action : <?php echo wp_json_encode( $fs->get_ajax_action( 'update_billing' ) ) ?>, | |
| 384 | + security : <?php echo wp_json_encode( $fs->get_ajax_security( 'update_billing' ) ) ?>, | |
| 385 | + module_id: <?php echo wp_json_encode( $fs->get_id() ) ?>, | |
| 386 | 386 | billing : billing |
| 387 | 387 | }, |
| 388 | 388 | success: function (resultObj) { |
| 389 | 389 | if (resultObj.success) { |