Hi @stuartiwoodheadgmailcom!
Thanks for posting, appreciate it!
Would you please be able to paste your system status here so I can get a better idea of what might be going on? You can grab it by going to:
WooCommerce > Status and clicking on Get system report.
That’ll help me to narrow down what might be going on here.
Thanks!
Julie 🙂
SkyVerge
I’m getting the exact same message
Hi @mahiwahi,
Could you please open your own thread in the forum here and include your system status? We’re not supposed to have multiple people in the same thread:
https://ww.wp.xz.cn/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too
Thanks so much!
Julie 🙂
SkyVerge
Thread Starter
Stu
(@stuartiwoodheadgmailcom)
Hi @mahiwahi
FYI – I ended up uninstalling the plugin. It was clashing with too many other things. In the end I just added code to the function.php file that ordered my store front by availability (which is all I needed from this plugin).
Here is the code….
// Add custom sorting options
function filter_woocommerce_get_catalog_ordering_args( $args ) {
$orderby_value = isset( $_GET[‘orderby’] ) ? wc_clean( $_GET[‘orderby’] ) : apply_filters( ‘woocommerce_default_catalog_orderby’, get_option( ‘woocommerce_default_catalog_orderby’ ) );
if ( $orderby_value == ‘availability’ ) {
$args[‘orderby’] = ‘meta_value_num’;
$args[‘order’] = ‘DESC’;
$args[‘meta_key’] = ‘_stock’;
}
return $args;
}
add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘filter_woocommerce_get_catalog_ordering_args’, 10, 1 );
function custom_woocommerce_catalog_orderby( $sortby ) {
$sortby[‘availability’] = ‘Availability’;
return $sortby;
}
add_filter( ‘woocommerce_default_catalog_orderby_options’, ‘custom_woocommerce_catalog_orderby’, 10, 1 );
add_filter( ‘woocommerce_catalog_orderby’, ‘custom_woocommerce_catalog_orderby’, 10, 1 );
// Optional: use for debug purposes (display stock quantity)
function action_woocommerce_after_shop_loop_item() {
global $product;
echo wc_get_stock_html( $product );
}
add_action( ‘woocommerce_after_shop_loop_item’, ‘action_woocommerce_after_shop_loop_item’, 10, 0 );
// End of add custom sorting options
Hi @stuartiwoodheadgmailcom,
So sorry things seemed to be conflicting too much for you to be able to use the plugin. That said, I’m glad you were able to find a workaround. Thanks for sharing it!
Julie 🙂
SkyVerge