do_action pass array argument as reference not copy [duplicate] May 15, 2022 by Tarik Billa The way to pass by reference to a WP action is with: do_action_ref_array('action_hook', array(&$data) );