Advertisement
Guest User

add-ajax-confirmation

a guest
Aug 29th, 2015
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // AJAX
  2. // =============================================================================
  3.  
  4. if ( ! function_exists( 'x_woocommerce_navbar_cart_ajax_notification' ) ) :
  5. function x_woocommerce_navbar_cart_ajax_notification() {
  6.  
  7. if ( get_option( 'woocommerce_enable_ajax_add_to_cart' ) == 'yes' ) {
  8. $notification = '<div class="x-cart-notification">'
  9. . '<div class="x-cart-notification-icon loading">'
  10. . '<i class="x-icon-cart-arrow-down" data-x-icon="&#xf218;"></i>'
  11. . '</div>'
  12. . '<div class="x-cart-notification-icon added">'
  13. . '<i class="x-icon-check" data-x-icon="&#xf00c;"></i>'
  14. . '</div>'
  15. . '</div>';
  16. } else {
  17. $notification = '';
  18. }
  19.  
  20. echo $notification;
  21.  
  22. }
  23. add_action( 'x_before_site_end', 'x_woocommerce_navbar_cart_ajax_notification' );
  24. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement