/** * Makes sure the payment method is related to the specified payment method * * @param EE_Payment_Method $payment_method * @return EE_Payment_Method * @throws \EE_Error */ public function set_usable_currencies_on_payment_method($payment_method) { foreach ($payment_method->get_all_usable_currencies() as $currency_obj) { $payment_method->_add_relation_to($currency_obj, 'Currency'); } return $payment_method; }