Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jason Coleman

    (@strangerstudios)

    We have a pmpro_show_discount_code filter that you can set to false to hide the discount code.

    https://www.paidmembershipspro.com/hook/pmpro_show_discount_code/

    So if you wanted to hide it for free levels, it would look something like this:
    https://gist.github.com/strangerstudios/fc63e239a37f1dee673b

    I haven’t tested this. Let me know if it works for you or if you tweak it at all.

    Thanks.

    Thread Starter kellyalan

    (@kellyalan)

    Thanks for the reply

    I checked and have only one discount code and it’s not for the basic(free) level.

    I’m not very familiar with how I should insert this code into the checkout.php file. ( that is what you’re saying I should do? )

    I have checkout.php open in Notepad++
    Where do I insert the code from the link you provided?

    I’ve found this code in checkout.php where I see the verbiage for asking for a discount code.

    <?php if($pmpro_show_discount_code) { ?>
    
    					<?php if($discount_code && !$pmpro_review) { ?>
    						<p id="other_discount_code_p" class="pmpro_small"><a id="other_discount_code_a" href="#discount_code"><?php _e('Click here to change your discount code', 'pmpro');?></a>.</p>
    					<?php } elseif(!$pmpro_review) { ?>
    						<p id="other_discount_code_p" class="pmpro_small"><?php _e('Do you have a discount code?', 'pmpro');?> <a id="other_discount_code_a" href="#discount_code"><?php _e('Click here to enter your discount code', 'pmpro');?></a>.</p>
    					<?php } elseif($pmpro_review && $discount_code) { ?>
    						<p><strong><?php _e('Discount Code', 'pmpro');?>:</strong> <?php echo $discount_code?></p>
    					<?php } ?>
    
    				<?php } ?>
    Thread Starter kellyalan

    (@kellyalan)

    actually — I think I may have figured it out

    I saw in the plugin’s functions.php file a link for https://www.paidmembershipspro.com/2012/08/create-a-plugin-for-pmpro-customizations/

    I did what it said

    added the code you gave me the link to

    and now that discount code content for the Free level is gone.

    Thanks!

    Hello my friends!
    First of all, thank you for your amazing plugin!! ??

    Now, I have a question regarding the discount code field…
    I have set up a discount code and in the checkout page it shows the following: “Do you have a discount code? Click here to enter your discount code.” and you have to click on the link to see the discount field….

    My question is, if there is a way to show the discount field directly without having to click on the link?

    Im looking but i dont find where this would be…

    Thank you very much!
    Roberto.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Discount Code / Free Account’ is closed to new replies.