• [Fri Nov 26 09:35:19.248046 2021] [php7:error] [pid 1966] [client 103.46.203.144:0] PHP Fatal error: Uncaught Error: Call to a member function get_billing_first_name() on null in /nas/content/live/tellihealth/wp-content/themes/twentytwentyone-child/functions.php:1028\nStack trace:\n#0 /nas/content/live/tellihealth/wp-includes/class-wp-hook.php(305): new_customer_registered_send_email_admin(204731429)\n#1 /nas/content/live/tellihealth/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)\n#2 /nas/content/live/tellihealth/wp-includes/plugin.php(470): WP_Hook->do_action(Array)\n#3 /nas/content/live/tellihealth/wp-content/plugins/woocommerce/includes/wc-user-functions.php(105): do_action(‘woocommerce_cre…’, 204731429, Array, false)\n#4 /nas/content/live/tellihealth/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(1092): wc_create_new_customer(‘aman.gupta3601@…’, ‘aman.gupta3601’, ‘Amangupta@123’)\n#5 /nas/content/live/tellihealth/wp-includes/class-wp-hook.php(303): WC_Form_Handler::process_registration(”)\n#6 /nas/content/live/tellihealth/wp-includes/class-wp-hook.php(327): WP_Hoo in /nas/content/live/tellihealth/wp-content/themes/twentytwentyone-child/functions.php on line 1028, referer: https://tellihealth.wpengine.com/my-account/

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, aman006, the error that you specified is tied to a function reference in your functions.php file.

    Are you able to post the line that the error is referencing?

    Thread Starter aman006

    (@aman006)

    This is the code of my references-

    function new_customer_registered_send_email_admin($customer_id) 
          {
    
            $user = get_user_by( 'id', $customer_id );
            $fullname = $order->get_billing_first_name()." ".$order->get_billing_last_name();
    
            sendgrid_send_mail("{\"personalizations\":[{\"to\":[{\"email\":\"".$user->user_email."\",\"name\":\"".$fullname."\"}]}],\"from\":{\"email\":\"[email protected]\",\"name\":\"tellihealth\"},\"reply_to\":{\"email\":\"".$user->user_email."\",\"name\":\"".$fullname."\"},\"template_id\":\"d-d10a9fe177504e85a6c9bd297128477a\"}");
    
          }
    
        add_filter( 'woocommerce_login_redirect', 'my_login_redirect', 9999, 2 );
    
          /**
         *  manage login redirection
         */
        function my_login_redirect( $redirect, $user) 
           {
            if(isset($_GET['checkout']) && $_GET['checkout'] =='true')
            {
             $redirect = home_url('/checkout');
            }
         
            return $redirect;
          }
    Thread Starter aman006

    (@aman006)

    Hi Sir,

    Can you check my code of reference as i am stuck in that work

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @aman006 I have archived and removed your 3 other identical topics. Don’t do that please.

    You are being helped here already.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Fatal error: Uncaught Error:’ is closed to new replies.