Skip to content
Snippets Groups Projects
Commit 1bfbe7de authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Add ZIPnumeric and ZIPalphanum variables (forward-ported from master)

parent 7e4aefbc
No related branches found
No related tags found
No related merge requests found
...@@ -296,6 +296,8 @@ class RulesShippingFrameworkWooCommerce extends RulesShippingFramework { ...@@ -296,6 +296,8 @@ class RulesShippingFrameworkWooCommerce extends RulesShippingFramework {
'zip4' => substr($zip,0,4), 'zip4' => substr($zip,0,4),
'zip5' => substr($zip,0,5), 'zip5' => substr($zip,0,5),
'zip6' => substr($zip,0,6), 'zip6' => substr($zip,0,6),
'zipnumeric' => preg_replace('/[^0-9]/', '', $zip),
'zipalphanum' => preg_replace('/[^a-zA-Z0-9]/', '', $zip),
'city' => trim($address['city']), 'city' => trim($address['city']),
'country' => trim($address['country']), 'country' => trim($address['country']),
'state' => trim($address['state']), 'state' => trim($address['state']),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment