Hi @d555555,
Thank you for the update, and we appreciate your efforts in trying to implement the custom coupon restriction. Regarding your concern about updating cart totals and discounts within the woocommerce_coupon_get_discount_amount
filter, it’s important to note that directly modifying cart totals and discounts within this filter might indeed interfere with the standard logic of other plugins using this filter, including Smart Coupon for WooCommerce. If the customization you have provided is the last one hooked and altered the previous calculations, then your calculations will take precedence and get reflected in the cart.
To provide a more effective solution, we recommend an alternative approach. Instead of directly updating cart totals and discounts within the woocommerce_coupon_get_discount_amount
filter, consider using this filter only to adjust the maximum discount amount based on user roles. For other customizations, you can explore additional WooCommerce hooks and filters that are more specific to the functionalities you want to modify.
Regarding freelance opportunities, we appreciate your inquiry. However, at the moment, we don’t engage in any freelance work and hence don’t have a dedicated email for such inquiries. We hope you understand.