• Hi – I’m bravely trying to use a [display-posts] shortcode in a Woocommerce short description. This is with the Flatsome theme. All seems good except the Woocommerce Quick View function (which pops up a lightbox with the short description on product catalog pages) breaks for any product with the display-posts shortcode in the product’s short description. It breaks even with a single [display-posts] with no parameters so probably not parameter related.

    Now I realise this is probably more a Woocommerce issue but just wanted to check if anyone had ever reported this before or if it’s easily (!) fixable.

    Here’s the error I get in my nginx error log (with site/IP addresses censored):

    2020/04/17 19:18:54 [error] 1601#1601: *47214 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_type() on null in /var/www/mysite.com/wp-content/plugins/woocommerce/includes/wc-template-functions.php:1576
    Stack trace:
    #0 /var/www/mysite.com/wp-includes/class-wp-hook.php(287): woocommerce_template_single_add_to_cart(”)
    #1 /var/www/mysite.com/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/mysite.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /var/www/mysite.com/wp-content/themes/flatsome/woocommerce/content-single-product-lightbox.php(57): do_action(‘woocommerce_sin…’)
    #4 /var/www/mysite.com/wp-content/plugins/woocommerce/includes/wc-core-functions.php(251): include(‘/var/www/mysite.c…’)
    #5 /var/www/mysite.com/wp-content/themes/flatsome/inc/extensions/flatsome-wc-quick-view/flatsome-quick-view.php(41): wc_get_template(‘content-single-…’)
    #6 /var/www/mysite.com/wp-includes/class-wp-hook.php(287): flatsome_quickview(” while reading response header from upstream, client: xx.xx.xx.xx, server: mysite.com, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.0-fpm.sock:”, host: “mysite.com”, referrer: “https://mysite.com/my-product-category/”

  • The topic ‘Problem with Woocommerce Quick View and Display Posts’ is closed to new replies.