billing_hide_required_wooccm

The WooCommerce Checkout Manager billing hide required wooccm function.

Description

billing_hide_required_wooccm(); 

Usage

  1. if ( !function_exists( 'billing_hide_required_wooccm' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/includes/templates/functions/billing_functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = billing_hide_required_wooccm(); 
  7.  

Defined (1)

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

/includes/templates/functions/billing_functions.php  
  1. function billing_hide_required_wooccm() { 
  2. global $woocommerce; 
  3. $options3 = get_option( 'wccs_settings3' ); 
  4. $billing = array( 'address_1', 'address_2', 'city', 'state', 'postcode' ); 
  5.  
  6. echo '<style>'; 
  7. foreach ( $options3['billing_buttons'] as $btn ) { 
  8. if(in_array($btn['cow'], $billing) && empty($btn['checkbox']) ) { 
  9. echo 'p#billing_'.$btn['cow'].'_field .required{display:none;}'; 
  10. echo '</style>';