• Resolved Nick S

    (@nicktoot)


    Hello, I have a problem on the site with this plugin – MailPoet 3.

    I have many dynamic subdomains (NO multisite environment) on my site (for different cities), and this problem is only with them, for the main domain everything works.

    To solve the problem of redirecting subdomains to the main site, I did this in wp-config.php:

    
    define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] );
    define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] );
    

    I display the subscription form on the site like this:

    
    $form_widget = new \MailPoet\Form\Widget();
    echo $form_widget->widget( array( 'form' => 1, 'form_type' => 'php' ) );
    

    And on subdomains I get the following error:

    
    PHP Fatal error:  Class 'MailPoet\Form\Widget' not found in /***/subscribe-form.php on line 36
    

    Also MailPoet shortcodes do not work on subdomains, it is output as plain text.

    My attempts:
    1. is_plugin_active() return TRUE (on main domain and on subdomains)
    2. I tried ‘use’ to adding MailPoet Class
    3. I tried ‘require_once’ mailpoet.php and mailpoet_initializer.php from plugin DIR
    I don’t know what to try anymore…

    Please tell me how this can be fixed, thank you in advance!!!

    PHP version: 7.4.8
    MailPoet Free version: 3.48.0
    WordPress version: 5.4.2
    Web server: Apache/2.4.10 (Unix)
    Multisite environment?: No
    Active Plugin names: akismet/akismet.php, all-in-one-seo-pack-pro/all_in_one_seo_pack.php, breadcrumb-navxt/breadcrumb-navxt.php, carbon-fields/carbon-fields-plugin.php, classic-editor/classic-editor.php, dco-comment-attachment/dco-comment-attachment.php, duplicate-post/duplicate-post.php, kirki/kirki.php, mailpoet/mailpoet.php, mtekk-Order-Bender-9147199/order-bender.php, simple-taxonomy-ordering/yikes-custom-taxonomy-order.php, tinymce-advanced/tinymce-advanced.php, woo-permalink-manager/premmerce-url-manager.php, woocommerce/woocommerce.php, wp-mail-logging/wp-mail-logging.php, wp-mail-smtp/wp_mail_smtp.php, wp-translitera/wp-translitera.php

Viewing 1 replies (of 1 total)
  • Hello,

    Thanks for writing. Sorry about the problem you’re having with your plugin installation. We’ll need to take a closer look at this issue. Please contact us via email so we can help you troubleshoot further.

    ?Thanks,

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal error: Class ‘MailPoet\Form\Widget’ not found’ is closed to new replies.