display_notices_wooccm

The WooCommerce Checkout Manager display notices wooccm function.

Description

display_notices_wooccm(); 

Usage

  1. if ( !function_exists( 'display_notices_wooccm' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/includes/classes/main.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = display_notices_wooccm(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/classes/main.php  
  1. function display_notices_wooccm() { 
  2. echo '<form method="post" name="clickhere" action=""><div id="setting-error-settings_updated" class="updated settings-error click-here-wooccm"><p><strong>'.__('Almost done! Install latest settings.', 'woocommerce-checkout-manager').'</strong> | <input type="hidden" name="click-here-wooccm" value="y" /><input type="submit" class="button button-primary button-hero" value="Click Here" /></p></div></form>'; 
  3.  
  4. if( isset($_POST['click-here-wooccm']) && $_POST['click-here-wooccm'] == 'y') { ?> 
  5.  
  6. <!-- First Use --> 
  7. <script type="text/javascript"> 
  8. jQuery(document).ready(function($) { 
  9.  
  10. $( '#wpbody-content' ).block({message:null, overlayCSS:{background:"#fff url(<?php echo plugins_url('woocommerce/assets/images/ajax-loader.gif'); ?> ) no-repeat center", opacity:.6}}); 
  11.  
  12. var form = $('#frm1');  
  13. data = $('#frm1'); 
  14. forma = $('#frm2');  
  15. dataa = $('#frm2'); 
  16. formb = $('#frm3');  
  17. datab = $('#frm3'); 
  18.  
  19. $.ajax( { 
  20. type: "POST",  
  21. url: form.attr( 'action' ),  
  22. data: data.serialize(),  
  23. success: function( response ) {  
  24. $.ajax( { 
  25. type: "POST",  
  26. url: forma.attr( 'action' ),  
  27. data: dataa.serialize(),  
  28. success: function( response ) {  
  29. }); 
  30.  
  31. $.ajax( { 
  32. type: "POST",  
  33. url: formb.attr( 'action' ),  
  34. data: datab.serialize(),  
  35. success: function( response ) {  
  36. }); 
  37. $('.settings-error.click-here-wooccm').hide(); 
  38. $('#wpbody-content').unblock(); 
  39. }); 
  40. }); 
  41. </script> 
  42.  
  43. <?php 
  44. update_option('wooccm_update_notice', 'yep');