ajax_add_to_cart_script

The Woocommerce Add to cart Ajax for variable products ajax add to cart script function.

Description

ajax_add_to_cart_script(); 

Usage

  1. if ( !function_exists( 'ajax_add_to_cart_script' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-add-to-cart-ajax-for-variable-products/woocommerce-ajax-add-to-cart-variable-products.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ajax_add_to_cart_script(); 
  7.  

Defined (1)

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

/woocommerce-ajax-add-to-cart-variable-products.php  
  1. function ajax_add_to_cart_script() { 
  2. wp_enqueue_script( 'add-to-cart-variation_ajax', plugins_url() . '/woocommerce-ajax-add-to-cart-for-variable-products/js/add-to-cart-variation.js', array('jquery'), '', true );