wcap_override_variable_template

The Woocommerce Coupon Selector wcap override variable template class.

Defined (1)

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

/includes/wcap_override_checkout_coupon_template.php  
  1. class wcap_override_variable_template { 
  2. /** 
  3. * Construct  
  4. */ 
  5. public function __construct() { 
  6.  
  7. add_action( 'woocommerce_locate_template', array(&$this, 'wcap_override_default_coupon_checkout_template'), 10, 3 ); 
  8.  
  9. /** 
  10. * Overrides core variables template 
  11. * since 1.0.0 
  12. */ 
  13. public function wcap_override_default_coupon_checkout_template( $template, $template_name, $template_path ) { 
  14.  
  15. if ( strstr($template, 'form-coupon.php') ) { 
  16. $template = wcap_plugin_path() . '/templates/checkout/form-coupon.php'; 
  17.  
  18.  
  19.  
  20. return $template; 
  21.  
  22.