appointments.js
1 day ago
attendees.js
1 month ago
colorManipulation.js
1 month ago
customer.js
1 month ago
date.js
1 month ago
defaultCustomize.js
1 month ago
employee.js
1 week ago
events.js
1 month ago
formFieldsTemplates.js
1 month ago
formatting.js
1 month ago
helper.js
1 week ago
image.js
1 month ago
integrationApple.js
1 month ago
integrationGoogle.js
1 month ago
integrationOutlook.js
1 month ago
integrationRazorpay.js
1 day ago
integrationStripe.js
1 month ago
integrationZoom.js
1 month ago
licence.js
1 month ago
liveAnnouncer.js
1 month ago
phone.js
1 month ago
pricing.js
1 month ago
recurring.js
1 week ago
responsive.js
1 month ago
scrollElements.js
1 month ago
settings.js
1 month ago
translationsElementPlus.js
1 day ago
utilHeaderHeight.js
1 month ago
whiteLabel.js
1 day ago
whiteLabel.js
22 lines
| 1 | import { settings } from '../../../plugins/settings.js' |
| 2 | |
| 3 | export const DEFAULT_SUPPORT_EMAIL = 'support@wpamelia.com' |
| 4 | |
| 5 | /** |
| 6 | * Support email shown in customize previews. |
| 7 | * When White Label is enabled and a plugin name is set, use support@{{pluginName}}.com. |
| 8 | * |
| 9 | * @param {Object} [amSettings] |
| 10 | * @returns {string} |
| 11 | */ |
| 12 | export function getSupportEmail(amSettings = settings) { |
| 13 | const whiteLabelEnabled = Boolean(amSettings?.featuresIntegrations?.whiteLabel?.enabled) |
| 14 | const pluginName = amSettings?.whiteLabel?.pluginName?.trim() |
| 15 | |
| 16 | if (whiteLabelEnabled && pluginName) { |
| 17 | return `support@${pluginName}.com` |
| 18 | } |
| 19 | |
| 20 | return DEFAULT_SUPPORT_EMAIL |
| 21 | } |
| 22 |