Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions includes/class-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ public function admin_page_display() {
$account = false;

try {
$account = (object) constant_contact()->get_api()->get_account_info();
$account = constant_contact()->get_api()->get_account_info();
if ( $account ) {
$name = '';
if ( ! empty( $account->first_name ) ) {
$name .= $account->first_name;
if ( ! empty( $account['first_name'] ) ) {
$name .= $account['first_name'];
}
if ( ! empty( $account->last_name ) ) {
$name .= $account->last_name;
if ( ! empty( $account['last_name'] ) ) {
$name .= $account['last_name'];
}
echo esc_html( $name );
}
Expand All @@ -201,7 +201,7 @@ public function admin_page_display() {
<p>
<?php
if ( $account ) {
echo '<a href="mailto:' . esc_html( $account->contact_email ) . '">' . esc_html( $account->contact_email ) . '</a>';
echo '<a href="mailto:' . esc_html( $account['contact_email'] ) . '">' . esc_html( $account['contact_email'] ) . '</a>';
}
?>
</p>
Expand Down