Title: Errors on checkout page
Last modified: January 16, 2019

---

# Errors on checkout page

 *  [matt](https://wordpress.org/support/users/wiscoteam/)
 * (@wiscoteam)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/errors-on-checkout-page/)
 * Hi there,
 * I’m getting an error on my checkout page that is causing orders to fail.
 * Notice: Undefined offset: 0 in /www/wp-content/plugins/wc-fields-factory/includes/
   wcff-checkout-fields.php on line 178
 * Notice: Trying to get property ‘ID’ of non-object in /www/wp-content/plugins/
   wc-fields-factory/includes/wcff-checkout-fields.php on line 178
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferrors-on-checkout-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Saravana Kumar K](https://wordpress.org/support/users/mycholan/)
 * (@mycholan)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/errors-on-checkout-page/#post-11098669)
 * Hi, thankls for posting this, it is an issue.
 * Here is a quick fix.
 * `/www/wp-content/plugins/wc-fields-factory/includes/wcff-checkout-fields.php 
   on line 177`
 * replace the following function
 *     ```
       private function get_fields_meta( $_type ){
           $res = get_post_meta( get_posts( array( 'post_type' => 'wcccf', 'name' => $_type ) )[0]->ID );
           $return = !empty( $res ) && is_array( $res ) ? $res : array();
           return $return;
       }
       ```
   
 * with the below snippet
 *     ```
       private function get_fields_meta( $_type ) {            
           $posts = get_posts(array('post_type' => 'wcccf', 'name' => $_type));
           if ($posts && is_array($posts) && count($posts) > 0) {
               $res = get_post_meta($posts[0]->ID);
               return (!empty($res) && is_array($res)) ? $res : array();
           }            
           return array();
       }
       ```
   
 * The fix will be available with our upcoming release

Viewing 1 replies (of 1 total)

The topic ‘Errors on checkout page’ is closed to new replies.

 * ![](https://ps.w.org/wc-fields-factory/assets/icon-128x128.jpg?rev=2738843)
 * [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-fields-factory/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-fields-factory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-fields-factory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-fields-factory/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Saravana Kumar K](https://wordpress.org/support/users/mycholan/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/errors-on-checkout-page/#post-11098669)
 * Status: not resolved