Title: Fatal PHP error
Last modified: May 28, 2018

---

# Fatal PHP error

 *  Resolved [tusharattar](https://wordpress.org/support/users/tusharattar/)
 * (@tusharattar)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/fatal-php-error-13/)
 * Hi Team
 * First of all thanks for such a wonderful plugin. Further, here is an error message
   I have got in my debug.log, not sure what causing issue.
 *     ```
        PHP Fatal error:  Uncaught Error: Call to a member function item() on null in /var/www/html/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php:268
       Stack trace:
       #0 /var/www/html/wp-includes/class-wp-hook.php(286): Wc_Smart_Cod_Public->apply_custom_message(Array)
       #1 /var/www/html/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array)
       #2 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(258): apply_filters('woocommerce_upd...', Array)
       #3 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(272): WC_AJAX::update_order_review_expired()
       #4 /var/www/html/wp-includes/class-wp-hook.php(286): WC_AJAX::update_order_review('')
       #5 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
       #6 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
       #7 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(78): do_action('wc_ajax_update_...')
       #8 /var/www/html/wp-includes/class-wp-hook.php(286): WC_AJAX::do_wc_ajax('')
       # in /var/www/html/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php on line 268
       ```
   
 * Please check
    Regards

Viewing 1 replies (of 1 total)

 *  Plugin Author [FullStack-ing](https://wordpress.org/support/users/fullstackhouse/)
 * (@fullstackhouse)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/fatal-php-error-13/#post-10332421)
 * Hi tusharattar,
 * The reason of seeing this message is because you altered the default woocommerce“
   payment_methods” html that is getting produced on checkout page.
    Either by using
   a plugin or your theme overrides the default woocommerce markup.
 * Thus our plugin trying to find the expected html structure to inject the custom
   messages and fails.
 * Please refer to this posts:
    [https://wordpress.org/support/topic/fatal-error-2856/](https://wordpress.org/support/topic/fatal-error-2856/)
   [https://wordpress.org/support/topic/disable-if-cart-amount-is-greater-than/](https://wordpress.org/support/topic/disable-if-cart-amount-is-greater-than/)
 * We are going to try a more generic approach to inject the messages in our next
   update.
 * Best Regards
    -  This reply was modified 7 years, 11 months ago by [FullStack-ing](https://wordpress.org/support/users/fullstackhouse/).

Viewing 1 replies (of 1 total)

The topic ‘Fatal PHP error’ is closed to new replies.

 * ![](https://ps.w.org/wc-smart-cod/assets/icon-128x128.png?rev=3372621)
 * [Smart COD for WooCommerce](https://wordpress.org/plugins/wc-smart-cod/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-smart-cod/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-smart-cod/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-smart-cod/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-smart-cod/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [FullStack-ing](https://wordpress.org/support/users/fullstackhouse/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/fatal-php-error-13/#post-10332421)
 * Status: resolved