function _commerce_map_rules_selector_tokens in Commerce Core 7
Maps old data selector values for event variables to new prefixed values.
1 call to _commerce_map_rules_selector_tokens()
- _commerce_update_rule_tokens in ./
commerce.install - Given a Rule configuration, iterates over its settings to update parameter names to use the new prefixed names and parameter values to use the new prefixed tokens that match the new event variable names.
File
- ./
commerce.install, line 251
Code
function _commerce_map_rules_selector_tokens() {
return array(
'order' => 'commerce-order',
'order-unchanged' => 'commerce-order-unchanged',
'product' => 'commerce-product',
'product-unchanged' => 'commerce-product-unchanged',
'line-item' => 'commerce-line-item',
'line-item-unchanged' => 'commerce-line-item-unchanged',
'customer' => 'commerce-customer-profile',
'customer-unchanged' => 'commerce-customer-unchanged',
'transaction' => 'commerce-payment-transaction',
'transaction-unchanged' => 'commerce-transaction-unchanged',
);
}