WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Layered Nav Widget warning array_merge() (3 posts)

  1. sabahat
    Member
    Posted 1 year ago #

    Hi,

    I added the Woocommerce Layered Nav widget manually to my shop page so that it appears as a dropdown on the top of the shop page. I did this through functions.php:

    add_action( 'woocommerce_before_shop_loop', 'widgetized_shop_filter', 50 );
    
    function widgetized_shop_filter() {
    	global $woocommerce;
    
    	echo '<form class="woocommerce-ordering" method="get">';
    	the_widget('WC_Widget_Layered_Nav', 'title=&attribute=irauthor&query_type=AND&display_type=dropdown');
    	echo '</form>';
    
    }

    It works fine on my test site: emaginetestbed.com/indireads/books, but on the live site, I get this error:

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/xxxx/indireads.com/wp-content/plugins/woocommerce/classes/widgets/class-wc-widget-layered-nav.php on line 56

    Any idea why this would happen? I have a few extra extensions on the live site than on the test site (payment gateways). But I don't see how this affects the widget. If I call the widget into a sidebar, I have no errors. It's just where it's called manually.

    Am on a tight schedule, so any help would be appreciated.

    http://wordpress.org/extend/plugins/woocommerce/

  2. sabahat
    Member
    Posted 1 year ago #

    Sorry, I should have added that this error only appears when I go into a category page - not on the main bookstore page.

  3. nedmartin.org
    Member
    Posted 9 months ago #

    I also have this problem. Did you ever find a fix?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic