• Resolved shecky

    (@shecky)


    Hi!

    After last update of your theme (ver. 1.2.7) in my site I have this error:

     PHP Fatal error:  Uncaught Error: Call to a member function get_gallery_image_ids() on null in ......./public_html/wp-content/themes/ascend/lib/woocommerce/woo-single-product-hooks.php:25
     Stack trace:
     #0 ......./public_html/wp-includes/class-wp-hook.php(288): single_product_post_class(Array)
     #1 ......./public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array)
     #2 ......./public_html/wp-includes/post-template.php(543): apply_filters('post_class', Array, Array, -1)
     #3 ......./public_html/wp-includes/post-template.php(423): get_post_class(Array, NULL)
     #4 ......./public_html/wp-content/themes/me-pro/templates/content-product.php(203): post_class()
     #5 ......./public_html/wp-content/themes/ascend/lib/woocommerce/woo-single-product-hooks.php on line 25

    The problem is born because in file functions.php it’s not verified that Woocommerce is active before the request of Woocommerce libraries for theme support.

    I have fixed problem with:

    if ( class_exists( 'WooCommerce' ) ) {
    	require_once( trailingslashit( get_template_directory() ) . 'lib/woocommerce/woo-support.php'); 					// Woocommerce functions
    	require_once( trailingslashit( get_template_directory() ) . 'lib/woocommerce/woo-archive-hooks.php'); 				// Woocommerce archive functions
    	require_once( trailingslashit( get_template_directory() ) . 'lib/woocommerce/woo-single-product-hooks.php'); 		// Woocommerce Single Product 
    	require_once( trailingslashit( get_template_directory() ) . 'lib/woocommerce/woo-account.php'); 					// Woocommerce My Account
    	require_once( trailingslashit( get_template_directory() ) . 'lib/woocommerce/woo-cart.php'); 						// Woocommerce Cart
    }

    Please fix it in next release.

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey,
    Thanks for posting, can you tell me what product plugin your using. Based on your error it’s happening on a single product page so is this with another product plugin?

    I’ve got an update coming today.
    Ben

    Thread Starter shecky

    (@shecky)

    Hi @britner!

    I’m not using any plugins.
    I’ve built a customized e-commerce that uses some WordPress “fake” pages with customized templates.

    Templates are based on Ascend Child Theme downloaded from your site (https://www.kadencethemes.com/child-themes/).

    I’m awaiting for the update and hope it solves the problem.

    Regards.
    Davide.

    Thread Starter shecky

    (@shecky)

    Hi @britner.

    Ten minutes ago I have updated my site with your last revision (ver. 1.2.8).
    Now all works perfectly!!!

    Thanks.
    Davide.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal Error after last update’ is closed to new replies.