Updatedfetching the domain ID; order of email accounts in page-edit-campaign.php

This commit is contained in:
Ruben Ramirez 2025-03-28 13:11:04 -05:00
parent 6815886683
commit d5a9e5fe46

View file

@ -25,7 +25,13 @@ if (isset($_GET['edit'])) {
if (isset($_GET['Email_ID'])) {
$email_id = intval($_GET['Email_ID']);
$domain_id = get_field('domain', $email_id);
$domain = get_field('domain', $email_id);
if (is_object($domain)) {
$domain_id = $domain->ID;
} else {
$domain_id = $domain;
}
$email_accounts[] = $email_id;
$campaign_name = get_the_title($email_id);
} else {
@ -96,6 +102,8 @@ $domains = get_posts([
]
]);
log_to_file("page-edit-campaign.php - Domains: ", $domains);
// Get the list of default professions
$professions = rl_get_textarea_meta_as_array('option', 'default_profession_pool');
@ -182,6 +190,8 @@ get_header(); ?>
$user_email_accounts = get_posts([
'post_type' => 'email-account',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => [
[
'key' => 'owner_id',