It seems that when a user adds a Userpoints Discount line item to their shopping cart it appears in the footer as ‘Royalty’, which will be totally confusing to users.
On line #382 of commerce_userpoints_discount.module there is this code:
function commerce_userpoints_discount_commerce_price_component_type_info() { return array( 'userpoints' => array( 'title' => t('Royalties'), 'display_title' => t('Royalties'), 'weight' => 1000, ), ); }
Without hacking this module, is there a way I can change this description? In my case, we will be using -two- Userpoints currencies (depending on the type of product the user orders) and we would like the description in the footer to be that userpoints description.
What I’ve already tried is to create my own hook with a higher weight. My hope was that my hook would take precedence over the default, but apparently not. Perhaps I don’t understand ‘hooks’ well enough yet. If so, could someone tell me how to make -my- hook take precedence?
function my_module_commerce_price_component_type_info() { return array( 'userpoints' => array( 'title' => t('My Userpoints Currency'), 'display_title' => t('My Userpoints Currency'), 'weight' => 2000, ), ); }
In short, we want the Price Component title to match the currency type of Userpoints on the line item.
Sponsored by SupremePR