wcpbc_manual_country_script

The WooCommerce Product Price Based on Countries wcpbc manual country script function.

Description

wcpbc_manual_country_script(); 

Usage

  1. if ( !function_exists( 'wcpbc_manual_country_script' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-product-price-based-on-countries/templates/country-selector.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wcpbc_manual_country_script(); 
  7.  

Defined (1)

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

/templates/country-selector.php  
  1. function wcpbc_manual_country_script() { 
  2. ?> 
  3. <script type="text/javascript"> 
  4. jQuery( document ).ready( function( $ ) { 
  5. $('.wcpbc-widget-country-selecting').on('change', 'select.country', function() { 
  6. $(this).closest('form').submit(); 
  7. } ); 
  8. } );  
  9. </script> 
  10. <?php