Support » Plugin: Woo Instant Notifications » Multiple PHP Notice, Warning and woocommerce messages

  • Resolved Carret

    (@carret)


    Hello,

    PHP notice are constant on any page in both admin and frontend.

    Others when ordering.

    
    PHP Notice:  Undefined offset: 0 in /opt/lampp/htdocs/pizza/wp-includes/plugin.php on line 924
    
    PHP Notice:  Undefined offset: 0 in /opt/lampp/htdocs/pizza/wp-includes/plugin.php on line 927
    
    PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, function 'do_email_actions' not found or invalid function name in /opt/lampp/htdocs/pizza/wp-includes/class-wp-hook.php on line 287
    
    shipping_address_1 was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_COD->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_processing'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_processing_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WCNotifications_Instance->trigger, WCNotifications_Instance->convert_template, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    
    [13-Aug-2020 13:13:50 Europe/Madrid] shipping_city was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_COD->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_processing'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_processing_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WCNotifications_Instance->trigger, WCNotifications_Instance->convert_template, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    
    [13-Aug-2020 13:13:50 Europe/Madrid] billing_country was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_COD->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_processing'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_processing_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WCNotifications_Instance->trigger, WCNotifications_Instance->convert_template, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    
    [13-Aug-2020 13:13:50 Europe/Madrid] billing_state was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_COD->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_processing'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_processing_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WCNotifications_Instance->trigger, WCNotifications_Instance->convert_template, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    
    [13-Aug-2020 13:13:50 Europe/Madrid] shipping_postcode was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_COD->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_processing'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_processing_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WCNotifications_Instance->trigger, WCNotifications_Instance->convert_template, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Georgi Bakalski

    (@irdroid)

    Hi,

    you have wordpress debugging enabled. Disable it in wp-config.php (or disable wp debug display) . You dont have the external plugins installed that is why you get these messages

    Thread Starter Carret

    (@carret)

    Hi, yes I have debug mode active, I am testing a site on localhost.

    Wocoomerce messages like this:
    “shipping_address_1 was called incorrectly. Order properties should not be accessed directly”

    I have tested that they can be removed in the convert_template() function using:

    
    $this->placeholders['{order_shipping_address_1}'] = $this->object->get_billing_address_1();

    instead of
    $this->placeholders['{order_shipping_address_1}'] = $this->object->shipping_address_1;

    The “PHP Notice: Undefined offset: 0” is very annoying because it fills up the debug.log file non-stop with each load of any page on the web.

    Thread Starter Carret

    (@carret)

    Avoid php messages:
    PHP Notice: Undefined offset: 0 in /wp-includes/plugin.php on line 924
    PHP Notice: Undefined offset: 0 in /wp-includes/plugin.php on line 927

    Change in class-wcnotifications-admin.php:

    add_action( 'activated_plugin', $this->plugin_install() );

    by

    add_action( 'activated_plugin', array( $this, 'plugin_install' ) );

    Avoid php message:
    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘do_email_actions’ not found or invalid function name in /wp-includes/class-wp-hook.php on line 287

    Change in class-wcnotifications-admin.php:

    add_action( 'woocommerce_new_order', 'do_email_actions', 10, 2 );

    by

    add_action( 'woocommerce_new_order', array( $this, 'do_email_actions' ), 10, 2 );

    It seems to work fine to me, I hope this can help and does not introduce any other errors.

    Plugin Author Georgi Bakalski

    (@irdroid)

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple PHP Notice, Warning and woocommerce messages’ is closed to new replies.