WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Tabs & Subscriptions (4 posts)

  1. Krissy
    Member
    Posted 11 months ago #

    I'm using the most recent versions of WordPress, WooCommerce and WooCommerce Subscriptions (paid add-on) and WooCommerce Tab Manager (paid add-on).

    With the most recent updates of WooCommerce I'm no longer able to view my tabs after selecting "Override Tab Defaults", the error coming to me is being pulled from WooCommerce function files, the two errors on the single-product view are:

    (Above Reviews)

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_product_attributes_tab' not found or invalid function name in /public_html/wp-includes/plugin.php on line 173

    (Below Reviews)

    Warning: uasort() expects parameter 1 to be array, null given in public_html/wp-content/plugins/woocommerce/woocommerce-template.php on line 795

    This is the complete string for that line:

    /**
    	 * Sort tabs by priority
    	 *
    	 * @access public
    	 * @return void
    	 */
    	function woocommerce_sort_product_tabs( $tabs = array() ) {
    
    		// Re-order tabs by priority
    		if ( ! function_exists( '_sort_priority_callback' ) ) {
    			function _sort_priority_callback( $a, $b ) {
    				if ( $a['priority'] == $b['priority'] )
    			        return 0;
    			    return ( $a['priority'] < $b['priority'] ) ? -1 : 1;
    			}
    		}
    
    		uasort( $tabs, '_sort_priority_callback' );
    
    		return $tabs;
    	}
    }

    Now I have requested assistance from WooCommerce directly but haven't yet recieved a response and my clients site is almost completely useless.

    Does anyone know why there are issues with the tabs not working when "override" has been chosen? When that option is unchecked the default tabs function properly but I'm no longer able to have the additional tabs required for the client as aspects of the extra tabs are there for the ordering process.

    AND - Is anyone else experiencing issues with the Subscriptions plugin no longer working properly? It's showing the following error:

    Fatal error: Cannot use string offset as an array in public_html/wp-content/plugins/woocommerce-subscriptions/classes/class-wc-subscriptions-product.php on line 257

    This is the complete string for that line:

    public static function get_length( $product ) {
    
    		if ( ! is_object( $product ) )
    			$product = WC_Subscriptions::get_product( $product );
    
    		if ( ! self::is_subscription( $product ) || $product->product_custom_fields['_subscription_length'][0] == 0 )
    			return 0;
    
    		return $product->product_custom_fields['_subscription_length'][0];
    	}

    Neither of these plugins have any updates, I've already checked.

    Does anyone have any idea on how to fix them?

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

  2. thenbrent
    Member
    Posted 11 months ago #

    Hi Krissy, thanks for a comprehensive bug report. Can you please also include the versions of the plugins and WooCommerce you are currently running?

    Just an FYI, Subscriptions is at version 1.3.3. In that version, line 257 of the class-wc-subscriptions-product.php is just a comment, so it looks like your version of Subscriptions could be out of date?

  3. Krissy
    Member
    Posted 11 months ago #

    I was able to get my hands on the Subscription update (the client had purchased that plugin), and I did install the Tab plugin again - even though there wasn't a change in versions (being as it was updated the same afternoon) for some reason wiping it out completely and putting it back in made the difference.

    Now the issue is 100% CSS based which is the matter of changing from underscores to dashes.

  4. thenbrent
    Member
    Posted 11 months ago #

    Great to hear. :)

Reply

You must log in to post.

About this Plugin

About this Topic