Whenever I attempt to go into features to export anything, this error is thrown.
Here is the hunk of code in question... the error occurs in the last 4 lines before the closing }.
function uc_usps_default_rules_configuration_alter(&$configs) {
// Domestic areas include U.S., American Samoa, Guam, Puerto Rico, and the Virgin Islands
$countries = array(
16 => t('American Samoa'),
316 => t('Guam'),
630 => t('Puerto Rico'),
840 => t('United States'),
850 => t('Virgin Islands (US)'),
);
$domestic = rules_or();
$domestic->label = t('Order delivers to one of');
$domestic_env = clone $domestic;
$foreign = rules_or();
$foreign->negate();
$foreign->label = t('NOT Order delivers to one of');
$foreign_env = clone $foreign;
foreach ($countries as $country => $name) {
$condition = rules_condition('data_is', array('data:select' => 'order:delivery-address:country', 'value' => $country));
$condition->label = $name;
$domestic->condition(clone $condition);
$domestic_env->condition(clone $condition);
$foreign->condition(clone $condition);
$foreign_env->condition($condition);
}
$configs['get_quote_from_usps']->condition($domestic);
$configs['get_quote_from_usps_env']->condition($domestic_env);
$configs['get_quote_from_usps_intl']->condition($foreign);
$configs['get_quote_from_usps_intl_env']->condition($foreign_env);
}
Comments
Comment #1
longwavePlease test the attached patch.
Comment #2
rickmanelius commentedWorks!
Comment #3
tr commentedCommitted.