• Resolved Mohammad Ali

    (@mansourikhah)


    Hi, this plugin causes these two errors.

    [01-Aug-2025 11:17:44 UTC] PHP Notice: Function is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/X/public_html/X/wp-includes/functions.php on line 6121


    [01-Aug-2025 11:17:44 UTC] PHP Notice: Function is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/X/public_html/X/wp-includes/functions.php on line 6121

    • This topic was modified 10 months, 1 week ago by Mohammad Ali.
    • This topic was modified 10 months, 1 week ago by Mohammad Ali.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Bowo

    (@qriouslad)

    @mansourikhah there is no mention of ASE in the error log entries you copied. What led you to believe that these two errors are related to / is caused by ASE?

    Thread Starter Mohammad Ali

    (@mansourikhah)

    @qriouslad I disabled the plugin and the error was resolved.

    Thread Starter Mohammad Ali

    (@mansourikhah)

    @qriouslad, check this code, I think this is the problem. (code-snippets-manager.php)

    // Found in code-snippets-manager.php
    private function location_page_type( $operator, $conditional_page_type ) {
    if ( is_front_page() ) {
    $actual_page_type = 'is_front_page';
    } elseif ( is_home() ) { // Problem call
    $actual_page_type = 'is_home';
    } elseif ( is_singular() ) { // Problem call
    $actual_page_type = 'is_singular';
    } elseif ( is_author() ) { // Problem call
    $actual_page_type = 'is_author';
    } elseif ( is_date() ) { // Problem call
    $actual_page_type = 'is_date';
    } elseif ( is_archive() ) { // Problem call
    $actual_page_type = 'is_archive';
    }
    // ... and so on
    }

    This function is used by the plugin to decide whether to display a CSS, JS, or HTML snippet based on its “Conditional Logic” settings. While the plugin tries to run this logic on hooks that are usually safe (like wp_head), another plugin or your theme might be triggering those hooks in a context where the main query isn’t finalized, leading to the “incorrectly called” notice.

    Thread Starter Mohammad Ali

    (@mansourikhah)

    The plugin conflict with WooCommerce Memberships.

    Plugin Author Bowo

    (@qriouslad)

    @mansourikhah since you’re using the Pro version of ASE, please login to your account and open a support ticket there. This wp.org forum is strictly for supporting the free version of ASE, per the forum guidelines. Thank you. p.s. please also explain in the ticket why you think the problem is due to a conflict with Woo Memberships.

    Thread Starter Mohammad Ali

    (@mansourikhah)

    @qriouslad Disabling either of these two plugins will clear the error.
    You’re right, but I’ve said what was necessary here and I don’t have the patience for these obvious questions.

    Thread Starter Mohammad Ali

    (@mansourikhah)

    @qriouslad This plugin has many more incompatibilities with WooCommerce Membership.
    This plugin causes the Woo Membership Plan to have a duplicate slug.

    This is a screenshot with ASE activated.

    This is a screenshot with ASE deactivated.

    Plugin Author Bowo

    (@qriouslad)

    @mansourikhah thank you for the additional info. Bug-fixing is often times not a simple process. The first goal is to be able to identify the steps to reliably reproduce the bugs. For now, this is well-noted. Thank you for your patience. I suggest following up by opening a support ticket via your account if you’re still interested to elaborate / discuss further. I understand if you’re not willing / able.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Calling is_home() or is_archive() too early’ is closed to new replies.