Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('angelleye_paypal_plus_shipping_line1', 'th_angelleye_paypal_plus_shipping_line1', 10, 2);
- function th_angelleye_paypal_plus_shipping_line1($shipping_address_1, $order_id) {
- $house_no = get_post_meta($order_id, 'shipping_haus_nummer', true);
- if( !empty($house_no)) {
- $shipping_address_1 = th_limit_length($shipping_address_1 . ' ' . $house_no, 100);
- }
- return $shipping_address_1;
- }
- function th_limit_length($string, $limit = 127) {
- if (strlen($string) > $limit) {
- $string = substr($string, 0, $limit - 3) . '...';
- }
- return $string;
- }
Add Comment
Please, Sign In to add comment