adding multiple hooks
-
I am using Arum theme (Aurum Child) and have a Hook In in the child themes functions.php file
this is the current file code
<?php /** * Aurum WordPress Theme * * Laborator.co * www.laborator.co */ add_action('wp_enqueue_scripts', 'enqueue_childtheme_scripts', 1000); function enqueue_childtheme_scripts() { wp_enqueue_style('aurum-child', get_stylesheet_directory_uri() . '/style.css'); } function wc_remove_related_products( $args ) { return array(); } add_filter('woocommerce_related_products_args','wc_remove_related_products', 10); // Hook in add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); // Our hooked in function - $fields is passed via the filter! function custom_override_checkout_fields( $fields ) { $fields['shipping']['shipping_phone'] = array( 'label' => __('Phone', 'woocommerce'), 'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), 'required' => false, 'class' => array('form-row-wide'), 'clear' => true ); return $fields; }
I want to change the placeholder in the Order Notes and from my research I need to add the following
// Hook in add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ ); // Our hooked in function – $fields is passed via the filter! function custom_override_checkout_fields( $fields ) { $fields[‘order’][‘order_comments’][‘placeholder’] = ‘Add gift tag message here'; return $fields; }
I am unsure of how to combine the two
I have tried several ways and keep getting php errors
any tips ??
- The topic ‘adding multiple hooks’ is closed to new replies.