Hello. How to correctly add new ones to the existing three types (Basic, Pro, VIP)?
I registered new types (added types numbered 4 and 5) in the files: functions.php:
// GET USER TYPE
function bpr_user_type($type) {
if($type == 1) {
echo __('Basic', 'business_profile');
} else if ($type == 2) {
echo __('Pro', 'business_profile');
} else if ($type == 3) {
echo __('VIP', 'business_profile');
} else if ($type == 4) {
echo __('Gold', 'business_profile');
} else if ($type == 5) {
echo __('Platinum', 'business_profile');
}
}
and admin/profiles.php:
<select id="type" name="type_<?php echo $p['pk_i_id']; ?>">
<option value="1" <?php if($p['i_type'] == 1) { ?>selected="selected"<?php } ?>><?php _e('Basic', 'business_profile'); ?></option>
<option value="2" <?php if($p['i_type'] == 2) { ?>selected="selected"<?php } ?>><?php _e('Pro', 'business_profile'); ?></option>
<option value="3" <?php if($p['i_type'] == 3) { ?>selected="selected"<?php } ?>><?php _e('VIP', 'business_profile'); ?></option>
<option value="4" <?php if($p['i_type'] == 4) { ?>selected="selected"<?php } ?>><?php _e('Gold', 'business_profile'); ?></option>
<option value="5" <?php if($p['i_type'] == 5) { ?>selected="selected"<?php } ?>><?php _e('Platinum', 'business_profile'); ?></option>
</select>
I also registered "attr" values from 1 to 5 in the user's subscriptions in the Osclass Pay Payment Plugin.
All Business profile types are manually changed in the site admin panel (3 old and 2 new). But when a user buys a subscription, the first three types (which were already in the business plugin) change automatically depending on the selected subscription, and the two new types do not change (the type is automatically set to number 1).
Can you please tell me where and what changes need to be made in order for the new types to work correctly in conjunction with subscriptions from the Osclass Pay Payment Plugin?
Thank you