woocommerce_ajax_loader_url

The WooCommerce Compare Products LITE woocommerce ajax loader url hook.

Description

apply_filters( 'woocommerce_ajax_loader_url', (unknown) $str_replace ); 

Parameters (1)

0. $str_replace (unknown) => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/images/ajax-loader@2x.gif'
The str replace.

Usage

To run the hook, copy the example below.
  1. $str_replace = apply_filters( 'woocommerce_ajax_loader_url', $str_replace ); 
  2.  
  3. if ( !empty( $str_replace ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_ajax_loader_url callback 
  2. function filter_woocommerce_ajax_loader_url( $str_replace ) { 
  3. // make filter magic happen here... 
  4. return $str_replace
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_ajax_loader_url', 'filter_woocommerce_ajax_loader_url', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_ajax_loader_url', 'filter_woocommerce_ajax_loader_url', 10, 1 ); 

Defined (2)

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

/templates/product-compare.php  
  1. 'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/images/ajax-loader@2x.gif' ), 
/templates/product-compare-old.php  
  1. 'ajax_loader_url' => apply_filters( 'woocommerce_ajax_loader_url', str_replace( array( 'http:', 'https:' ), '', $woocommerce->plugin_url() ) . '/assets/images/ajax-loader@2x.gif' ),