Remove/hide coupon form on Trial

Is it possible to hide/ not shown the coupon form when the membership have a free trial?

  • Nahid

    Hey Jing !
    Hope you are having a great day!

    This request has been escalated to our Second Level Support team. They'll be back to us with clues, workarounds, and fixes (if possible) for now in this ticket (or we'll be updating the ticket as soon as we hear back from them internally). Please note that the response time of the Second Level Support team might be a bit delayed than that of the general Support staff. We really appreciate your patience and consideration regarding this. Moreover, as this is a custom request, we cannot assure a workaround from our end just yet without investigation. This might get flagged as a feature request or you might need to consider custom development if this turns out to be undoable from our end. We really appreciate your patience and consideration regarding this.

    Kind regards,
    Nahid

  • Ari

    Hey Jing

    Hope you are well today!

    Please use the below function in your theme functions.php or as mu-plugin, it will hide the form.
    Please note that user need to apply coupon when he first time sign up regardless of paid or free trial.
    That means after trial get ended user will not able to apply coupon!

    Here's the code:

    add_action( 'ms_view_frontend_payment_after_total_row', function( $subscription ) {
    
    	if ( ! $subscription->membership->trial_period_enabled && $subscription->membership->trial_price != 0 ) return;
    
    	?>
    		<style>
    			.ms-invitation-code {
    				display: none;
    			}
    		</style>
    	<?php
    
    }, 5, 1);

    Best Regards,
    Ari

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.