Allow more readable flat rate options to be entered #950

Merged
merged 1 commit into from Apr 19, 2012
View
2 classes/shipping/class-wc-flat-rate.php
@@ -181,7 +181,7 @@ function calculate_shipping( $package = array() ) {
// Add any extra rates
if ( sizeof( $this->options ) > 0) foreach ( $this->options as $option ) {
- $this_option = explode('|', $option);
+ $this_option = preg_split( '~\s*\|\s*~', trim( $option ) );
if (sizeof($this_option)!==3) continue;