• Resolved erredeco

    (@erredeco)


    Hi, I am using the free version of pie-register and I’ve experienced a fatal error:
    I’ve set up a private page https://www.metaverse-cms.com/testing/ with the following settings:
    – Visibility: show to logged in users
    – Restriction type: Redirect
    – Redirect page: login

    But visiting the page, it leads to a fatal error.
    After enabling the WordPress Logs I’ve seen this error:

    [31-May-2023 07:16:57 UTC] PHP Fatal error: Uncaught Error: Call to undefined function is_shop() in /home/metcmsadm/metaverse-cms.com/wp-content/plugins/pie-register/pie-register.php:1659
    Stack trace: 0 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-hook.php(310): PieRegister->piereg_template_restrict(Object(WP_Post)) 1 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 2 /home/metcmsadm/metaverse-cms.com/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 3 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-query.php(4690): do_action_ref_array('the_post', Array) 4 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-query.php(3652): WP_Query->setup_postdata(Object(WP_Post)) 5 /home/metcmsadm/metaverse-cms.com/wp-includes/query.php(1005): WP_Query->the_post() 6 /home/metcmsadm/metaverse-cms.com/wp-content/themes/astra/inc/class-astra-loop.php(194): the_post() 7 /home/metcmsadm/metaverse-cms.com/wp-content/themes/astra/inc/class-astra-loop.php(174): Astra_Loop->loop_markup(true) 8 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-hook.php(308): Astra_Loop->loop_markup_page('') 9 /home/metcmsadm/metaverse-cms.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 10 /home/metcmsadm/metaverse-cms.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 11 /home/metcmsadm/metaverse-cms.com/wp-content/themes/astra/inc/core/theme-hooks.php(267): do_action('astra_content_p…') 12 /home/metcmsadm/metaverse-cms.com/wp-content/themes/astra/page.php(32): astra_content_page_loop() 13 /home/metcmsadm/metaverse-cms.com/wp-includes/template-loader.php(106): include('/home/metcmsadm…') 14 /home/metcmsadm/metaverse-cms.com/wp-blog-header.php(19): require_once('/home/metcmsadm…') 15 /home/metcmsadm/metaverse-cms.com/index.php(17): require('/home/metcmsadm…') 16 {main} thrown in /home/metcmsadm/metaverse-cms.com/wp-content/plugins/pie-register/pie-register.php on line 1659

    The problem is: I don’t have WooCommerce installed, so why it is searching for the is_shop() function? Should I do something?
    Thank you in advance for your support

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pie Register

    (@pieregister)

    Hi,

    We apologize for the inconvenience.

    Can you please contact us here so that our development team can further debug your environment?

    Thank you
    Pie Register Support

    Thread Starter erredeco

    (@erredeco)

    The problem is in file pie_register.php, line 1659

    if ( !empty($redirect_page) && ( $update['after_login'] == '-2' ) && !is_user_logged_in() && !is_home() && !is_front_page() && !is_shop())
    if WooCommerce is not present, the function is_shop() cannot be verified.
    After contacting the support, the line should be replaced with:

    if ( !empty($redirect_page) && ( $update['after_login'] == '-2' ) && !is_user_logged_in() && !is_home() && !is_front_page() && ( function_exists( 'is_shop' ) && !is_shop() ) )

    Plugin Author Pie Register

    (@pieregister)

    Hi,

    Thank you for your contribution. We haven’t heard back from you in a while, so we are going to mark this thread as resolved. You can always raise a new one or continue this one if you need any further assistance.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error on redirect’ is closed to new replies.