plugin = $plugin; $this->user_meta = $user_meta; } /** * Hooks. */ public function hooks() { add_filter( 'woocommerce_checkout_update_user_meta', array( $this, 'update_customer_meta_fields_on_checkout' ), 10, 2 ); } /** * Update customer meta data on checkout. * * @param int $customer_id Customer ID. * @param array $data Posted checkout data. */ public function update_customer_meta_fields_on_checkout( $customer_id, $data ) { $this->user_meta->update_customer_meta_fields( $customer_id, $data ); } }