· Design My Website · Web Design  · 2 min read

How to remove activation notice from Elementor

Remove the licence activation notice from Elementor by installing Pro Elements and editing the admin_license_details function in the plugin licence file.

Install Elementor Free.

Download and install Pro Elements from https://proelements.org

File Location: /wp-content/plugins/pro-elements/license/admin.php

Find the following function:

public function admin_license_details() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}

if ( $this->is_block_editor_page() ) {
    return;
}

$license_key = self::get_license_key();

/**
 * @var Admin_Notices $admin_notices
 */
$admin_notices = Plugin::elementor()->admin->get_component( 'admin-notices' );

if ( empty( $license_key ) ) {
    // Disabled Elementor Pro license activation notice.
    return;
}

$license_data = API::get_license_data();

if ( API::is_licence_pro_trial() ) {
    return;
}

$errors = self::get_errors_details();

if ( ! $license_data['success'] && isset( $license_data['error'], $errors[ $license_data['error'] ] ) ) {
    $error_data = $errors[ $license_data['error'] ];

    $admin_notices->print_admin_notice( [
        'title' => $error_data['title'],
        'description' => $error_data['description'],
        'button' => [
            'text' => $error_data['button_text'],
            'url' => $error_data['button_url'],
            'type' => isset( $error_data['button_type'] ) ? $error_data['button_type'] : '',
        ],
    ] );

    return;
}

if ( API::is_license_active() && API::is_license_about_to_expire() ) {
    $renew_url = API::RENEW_URL;

    $title = sprintf(
        esc_html__( 'Your License Will Expire in %s.', 'elementor-pro' ),
        human_time_diff(
            current_time( 'timestamp' ),
            strtotime( $license_data['expires'] )
        )
    );

    if ( isset( $license_data['renewal_discount'] ) && 0 < $license_data['renewal_discount'] ) {
        $description = sprintf(
            esc_html__( 'Renew your license today, and get an exclusive, time-limited %s discount.', 'elementor-pro' ),
            $license_data['renewal_discount'] . '%'
        );
    } else {
        $description = esc_html__( 'Renew your license today, to keep getting feature updates, premium support, Pro widgets & unlimited access to the template library.', 'elementor-pro' );
    }

    $admin_notices->print_admin_notice( [
        'title' => $title,
        'description' => $description,
        'type' => 'warning',
        'button' => [
            'text' => esc_html__( 'Renew now', 'elementor-pro' ),
            'url' => $renew_url,
            'type' => 'warning',
        ],
    ] );
}

}
    Share:

    About the author

    Tommy O'Shea

    Tommy owns and runs Design My Website, a web design studio in Kilcummin, Co. Kerry. He has built and maintained over 100 websites for businesses across Kerry, Cork and Ireland over the last 13 years.

    More about Design My Website →

    Back to Blog

    Related Posts

    View All Posts »