Created
November 1, 2022 10:32
-
-
Save pramodjodhani/56f7b3fb991cf6c06a5665ad0ef221d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Flux - Add street number last in the billing address. | |
| * | |
| * @param string $new_billing_address Billing address with street number. | |
| * @param string $current_billing_address Billing Address without street number. | |
| * @param string $billing_street_no Billing street number. | |
| * @param WC_Order $order Order. | |
| * | |
| * @return string | |
| */ | |
| function iconic_add_street_no_last_billing( $new_billing_address, $current_billing_address, $billing_street_no, $order ) { | |
| return $current_billing_address . ' ' . $billing_street_no; | |
| } | |
| add_filter( 'checkout_billing_address_1_before_create_order', 'iconic_add_street_no_last_billing', 10, 4 ); | |
| /** | |
| * Flux - Add street number last in the shipping address. | |
| * | |
| * @param string $new_shipping_address Shipping address with street number. | |
| * @param string $current_shipping_address Shipping Address without street number. | |
| * @param string $shipping_street_no Shipping street number. | |
| * @param WC_Order $order Order. | |
| * | |
| * @return string | |
| */ | |
| function iconic_add_street_no_last_shipping( $new_shipping_address, $current_shipping_address, $shipping_street_no, $order ) { | |
| return $current_shipping_address . ' ' . $shipping_street_no; | |
| } | |
| add_filter( 'checkout_shipping_address_1_before_create_order', 'iconic_add_street_no_last_shipping', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment