• Resolved gregfc

    (@gregfc)


    It will never be possible to return $template
    this variable does not exists in this function scope

    /**
    * Change the error message for existing email while creating a new account at the checkout page.
    *
    * @param string $message_html Error message for email existent while creating a new account.
    */
    public function change_message_registration_error_email_exists( $message_html ) {
    // Bail if not on checkout page.
    if( ! function_exists( ‘is_checkout’ ) || ! is_checkout() || is_order_received_page() || is_checkout_pay_page() ) { return $template; }

    $message_html = str_replace( ‘<a href=”#” class=”showlogin’, ‘<a href=”#” data-flyout-toggle data-flyout-target=”[data-flyout-checkout-login]” class=”‘, $message_html );
    return $message_html;
    }

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @gregfc,

    You are right. The variable that was supposed to be returned is $message_html.

    I’ve now fixed this part of the code and the fix will be available with the next update of the plugin, which is set to be released in about a week.

    I let you know once the update is available.

    I can make a beta version available to you if you need it earlier.

    Best,
    Diego

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @gregfc,

    The error has been fixed and an update (2.0.8) is now available with this fix.

    Best,
    Diego

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php bad code error’ is closed to new replies.