Advertisement
verygoodplugins

Untitled

Mar 25th, 2022
926
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // LifterLMS
  2.  
  3.     $( '.llms-checkout input' ).blur(function() {
  4.  
  5.         // Validate email
  6.         var email = $('input#email_address').val();
  7.  
  8.         if( didSend == false && regex.test( email ) == true && $('input#first_name').val() && $('input#last_name').val() ) {
  9.             didSend = true; // prevent it from sending twice.
  10.  
  11.             var data = {
  12.                 'action'     : 'wpf_abandoned_cart',
  13.                 'first_name' : $('input#first_name').val(),
  14.                 'last_name'  : $('input#last_name').val(),
  15.                 'user_email' : $('input#email_address').val(),
  16.                 'source'     : 'lifterlms',
  17.             }
  18.  
  19.             $.post(wpf_ac_data.ajaxurl, data);
  20.  
  21.         }
  22.  
  23.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement