I wish to add 2 features for
Configurable Features and Limits by Group / Packagecategories limit and categories allowed
Hi Martin,
Thank you for your feedback,
We will consider adding these in future updates,
If that can help, I can provide you with a PHP hook so you can set a categories limit programmatically (by vendor group ID).
Kind regards,
Stefan
Yes please provide PHP hook if I can processing. Thanks for help
You can add the following PHP code snippet to your site:
add_action('marketking_dashboard_head', function(){
$user_id = get_current_user_id();
$vendorgroup = intval(get_user_meta( $user_id, 'marketking_group', true ));
if ($vendorgroup === 123){
?>
<script>
jQuery(document).ready(function(){
jQuery("#marketking_select_categories").select2("destroy");
jQuery("#marketking_select_categories").select2({
maximumSelectionLength: 3
});
});
</script>
<?php
}
});
This sets a limit of 3 categories for vendors with the group with ID 123.
Because the categories data is large, difficult to setting include categories at vendor group section.
How can it code here PHP with include and exclude function? add up to the code of categories limit you provided. Thanks for help!
----------------------------------------------------
I put the code at SNIPPET works fine.
It not work at the Child Theme: functions.php, it can be ignored.
This message is private.
It is perfect solution PHP with include and exclude function!
Thank you very much Stefan!