currency ); } /** * Get the name of the currency. * * @return string */ protected function getNameAttribute() { return Currency::getName( $this->currency ); } /** * Get the currency symbol. * * @return string */ protected function getCurrencySymbolAttribute() { return html_entity_decode( Currency::getCurrencySymbol( $this->currency ) ); } /** * Is this the default store currency? * * @return boolean */ protected function getIsDefaultCurrencyAttribute() { return \SureCart::account()->currency === $this->currency; } /** * Get the flag URL. * * @return string */ protected function getFlagAttribute() { return file_exists( dirname( SURECART_PLUGIN_FILE ) . '/images/flags/' . strtolower( $this->currency ) . '.svg' ) ? plugins_url( 'images/flags/' . strtolower( $this->currency ) . '.svg', SURECART_PLUGIN_FILE ) : null; } }