: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$theme_request = wp_remote_post( 'https://www.elegantthemes.com/api/api.php', $options );
if ( is_wp_error( $theme_request ) ) {
$options['body']['failed_request'] = 'true';
$theme_request = wp_remote_post( 'https://cdn.elegantthemes.com/api/api.php', $options );
if ( ! is_wp_error( $theme_request ) && wp_remote_retrieve_response_code( $theme_request ) === 200 ){
$theme_response = unserialize( wp_remote_retrieve_body( $theme_request ) );
if ( ! empty( $theme_response ) ) {
$theme_response = $this->process_additional_response_settings( $theme_response );
$last_update->checked = $themes;
$last_update->response = $theme_response;
$last_update->last_checked = time();
$update_transient = $this->merge_et_products_response( $update_transient, $last_update );
set_site_transient( 'et_update_themes', $last_update );
$this->update_product_domains();
return $update_transient;
function maybe_show_account_notice() {
if ( empty( $this->options['username'] ) || empty( $this->options['api_key'] ) ) {
$account_api_key_status = get_site_option( 'et_account_api_key_status' );
$is_expired_account = 'expired' === $this->account_status;
$is_invalid_account = 'not_found' === $this->account_status;
&& empty( $account_api_key_status )
if ( $is_expired_account ) {
$messages[] = et_get_safe_localization( __( 'Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/" target="_blank">renew your account</a> to regain access to product updates and support. To ensure compatibility and security, it is important to always keep your themes and plugins updated.', 'et-core' ) );
} else if ( $is_invalid_account ) {
$messages[] = et_get_safe_localization( __( 'The Elegant Themes username you entered is invalid. Please enter a valid username to receive product updates. If you forgot your username you can <a href="https://www.elegantthemes.com/members-area/retrieve-username/" target="_blank">request it here</a>.', 'et-core' ) );
if ( ! empty( $account_api_key_status ) ) {
switch ( $account_api_key_status ) {
$messages[] = et_get_safe_localization( __(
sprintf( 'The Elegant Themes API key you entered is %1$s. Please make sure that your API has been entered correctly and that it is <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">enabled</a> in your account.', $status ),
foreach ( $messages as $message ) {
$output .= sprintf( '<p>%1$s</p>', $message );
if ( empty( $output ) ) {
$dashboard_url = add_query_arg( 'et_action', 'update_account_details', admin_url( 'update-core.php' ) );
'<div class="notice notice-warning">
<p><a href="%2$s">%3$s</a></p>
esc_url( wp_nonce_url( $dashboard_url, 'et_update_account_details', 'et_update_account_details_nonce' ) ),
esc_html__( 'Check Again', 'et-core' )
function change_plugin_changelog_url( $url, $path ) {
if ( 0 !== strpos( $path, 'plugin-install.php?tab=plugin-information&plugin=' ) ) {
$update_transient = get_site_transient( 'et_update_all_plugins' );
if ( ! is_object( $update_transient ) || empty( $update_transient->response ) ) {
$et_updated_plugins_data = get_transient( 'et_updated_plugins_data' );
$has_last_checked = ! empty( $update_transient->last_checked ) && ! empty( $et_updated_plugins_data->last_checked );
* Attempt to use a cached list of updated plugins.
* Re-save the list, whenever the update transient last checked time changes.
if ( false === $et_updated_plugins_data || ( $has_last_checked && $update_transient->last_checked !== $et_updated_plugins_data->last_checked ) ) {
$et_updated_plugins_data = new stdClass();
if ( ! empty( $update_transient->last_checked ) ) {
$et_updated_plugins_data->last_checked = $update_transient->last_checked;
foreach ( $update_transient->response as $response_plugin_settings ) {
$slug = sanitize_text_field( $response_plugin_settings->slug );
$et_updated_plugins_data->changelogs[ $slug ] = $response_plugin_settings->url . '?TB_iframe=true&width=1024&height=800';
set_transient( 'et_updated_plugins_data', $et_updated_plugins_data );
if ( empty( $et_updated_plugins_data->changelogs ) ) {
preg_match( '/plugin=([^&]*)/', $path, $matches );
$current_plugin_slug = $matches[1];
// Check if we're dealing with a product that has a custom changelog URL
if ( ! empty( $et_updated_plugins_data->changelogs[ $current_plugin_slug ] ) ) {
$url = esc_url_raw( $et_updated_plugins_data->changelogs[ $current_plugin_slug ] );
function force_update_requests() {
$update_transients = array(
foreach ( $update_transients as $update_transient ) {
if ( get_site_transient( $update_transient ) ) {
delete_site_transient( $update_transient );
function update_product_domains() {
$this->all_et_products_domains = $this->get_all_et_products();
$append_notification_action_name = 'maybe_append_custom_notification';
// update notifications for ET products if needed
foreach ( array( 'theme', 'plugin' ) as $product_type ) {
if ( empty( $this->all_et_products_domains[ $product_type] ) ) {
foreach ( $this->all_et_products_domains[ $product_type ] as $product_key ) {
$action_name = sanitize_text_field( sprintf(
'in_%1$s_update_message-%2$s',
if ( has_action( $action_name, array( $this, $append_notification_action_name ) ) ) {
add_action( $action_name, array( $this, $append_notification_action_name ), 10, 2 );
* Delete Elegant Themes update products transient, whenever default WordPress update transient gets removed
function maybe_reset_et_products_update_transient( $transient_name ) {
$update_transients_names = array(
'update_themes' => 'et_update_themes',
'update_plugins' => 'et_update_all_plugins',
if ( empty( $update_transients_names[ $transient_name ] ) ) {
delete_site_transient( $update_transients_names[ $transient_name ] );
if ( ! function_exists( 'et_core_enable_automatic_updates' ) ) :
function et_core_enable_automatic_updates( $deprecated, $version ) {
if ( isset( $GLOBALS['et_core_updates'] ) ) {
if ( defined( 'ET_CORE_URL' ) ) {
$url = trailingslashit( $deprecated ) . 'core/';
$GLOBALS['et_core_updates'] = new ET_Core_Updates( $url, $version );