woocommerce_customer_allowed_session_meta_keys

woocommerce_customer_allowed_session_meta_keys

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.3.1

apply_filters('woocommerce_customer_allowed_session_meta_keys') is found 1 times:

  • /includes/data-stores/class-wc-customer-data-store-session.php line 97
    				 * @since 8.7.0
    				 * @param array $allowed_keys The allowed meta data keys.
    				 * @param WC_Customer $customer The customer object.
    				 */
    				$allowed_keys = apply_filters( 'woocommerce_customer_allowed_session_meta_keys', array(), $customer );
    
    				$session_value = array();
    				foreach ( $customer->get_meta_data() as $meta_data ) {
    					if ( in_array( $meta_data->key, $allowed_keys, true ) ) {
    						$session_value[] = array(
    							'key'   => $meta_data->key,
    

See this hook used in plugins: