Skip to content

Instantly share code, notes, and snippets.

@sushat4692
Created June 27, 2019 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sushat4692/441f20d5b29a40629004ef12325f26e5 to your computer and use it in GitHub Desktop.
Save sushat4692/441f20d5b29a40629004ef12325f26e5 to your computer and use it in GitHub Desktop.
<?php
/**
* Zip code
*/
add_filter('usces_filter_after_zipcode', 'my_usces_filter_after_zipcode', 10, 2);
function my_usces_filter_after_zipcode($zip, $applyform) {
if ($applyform === 'JP') {
$zip = '000-0000';
}
return $zip;
}
/**
* Address 1
*/
add_filter('usces_filter_after_address1', 'my_usces_filter_after_address1', 10, 2);
function my_usces_filter_after_address1($address, $applyform) {
if ($applyform === 'JP') {
$address = '市区町村';
}
return $address;
}
/**
* Address 2
*/
add_filter('usces_filter_after_address2', 'my_usces_filter_after_address2', 10, 2);
function my_usces_filter_after_address2($address, $applyform) {
if ($applyform === 'JP') {
$address = '番地';
}
return $address;
}
/**
* Address 3
*/
add_filter('usces_filter_after_address3', 'my_usces_filter_after_address3', 10, 2);
function my_usces_filter_after_address3($address, $applyform) {
if ($applyform === 'JP') {
$address = '建物名';
}
return $address;
}
/**
* TEL
*/
add_filter('usces_filter_after_tel', 'my_usces_filter_after_tel', 10, 2);
function my_usces_filter_after_tel($tel, $applyform) {
if ($applyform === 'JP') {
$tel = '000-000-0000';
}
return $tel;
}
/**
* FAX
*/
add_filter('usces_filter_after_fax', 'my_usces_filter_after_fax', 10, 2);
function my_usces_filter_after_fax($fax, $applyform) {
if ($applyform === 'JP') {
$fax = '000-000-0000';
}
return $fax;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment