wooccm_order_notes

The WooCommerce Checkout Manager wooccm order notes function.

Description

wooccm_order_notes( $fields ); 

Parameters (1)

0. $fields
The fields.

Usage

  1. if ( !function_exists( 'wooccm_order_notes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/includes/classes/main.php'; 
  3.  
  4. // The fields. 
  5. $fields = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wooccm_order_notes($fields); 
  9.  

Defined (1)

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

/includes/classes/main.php  
  1. function wooccm_order_notes( $fields ) { 
  2. $options = get_option( 'wccs_settings' ); 
  3.  
  4. if( !empty($options['checkness']['noteslabel']) ) { 
  5. $fields['order']['order_comments']['label'] = $options['checkness']['noteslabel']; 
  6.  
  7. if( !empty($options['checkness']['notesplaceholder']) ) { 
  8. $fields['order']['order_comments']['placeholder'] = $options['checkness']['notesplaceholder']; 
  9.  
  10. if( !empty($options['checkness']['notesenable']) ) { 
  11. unset($fields['order']['order_comments']); 
  12.  
  13. return $fields;