Skip to content

Commit

Permalink
Merge pull request #2921 from dparker1005/fix-discount-code-outdated-…
Browse files Browse the repository at this point in the history
…templates

Fix applying discount codes for outdated checkout templates
  • Loading branch information
ideadude authored Mar 27, 2024
2 parents b81130d + f341fe1 commit 1e32116
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/pmpro-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jQuery(document).ready(function(){
jQuery('#other_discount_code_button').click(function() {
var code = jQuery('#pmpro_other_discount_code').val();
var level_id = jQuery('#pmpro_level').val();
if ( ! level_id ) {
// If the level ID is not set, try to get it from the #level field for outdated checkout templates.
level_id = jQuery('#level').val();
}

if(code)
{
Expand Down

0 comments on commit 1e32116

Please sign in to comment.