Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter('woo_sl/html/max_instances_per_key', 'theme_html_max_instances_per_key', 10, 3);
- function theme_html_max_instances_per_key($instances, $order_item_id, $licence_group_id)
- {
- $order_id = WOO_SL_functions::get_order_by_item_id($order_item_id);
- $order_licence_details = WOO_SL_functions::get_order_licence_details($order_id);
- $product_licence_data = $order_licence_details[$order_item_id][$licence_group_id];
- $max_instances_per_key = $product_licence_data->license_data['max_instances_per_key'];
- $instances = ' - ' . sprintf(_n('1 seat', '%s seats', $max_instances_per_key, 'software-license') , $max_instances_per_key) . ' per key';
- return $instances;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement