PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Default to show product with inventory

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Dear Woof Filter Support Team,

I am a PRO license user. For my website: https://land.elegment.com/

Is it possible to show"Available Land" checked as default when a customer opens the website link.

Meaning, swoof=1&stock=instock is the default on the home page.

Thanks! Xing Gao

Hello Xing Gao

Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png

Update  the  plugin to latest  version - https://products-filter.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato

Read  this - https://products-filter.com/manipulate-search-data-options

Hello Pablo,

  1. License key information is uploaded.
  2. WOOF plugin is updated to version 2.2.9.2
  3. After reading the article. Here is what I did:

3a) WOOF Settings --> Try to ajaxify the shop = NO (to avoid using Ajax mode)

3b) I added this piece of code to Code Snippet

if (is_front_page())
{
add_filter('woof_get_request_data', 'my_woof_get_request_data');
}

function my_woof_get_request_data($data)
{
$data['stock']='instock';
return $data;
}

Am I doing it correctly? Thanks!

My objective is that when the page is_front_page, then the filter stock=instock is automatic on (as default).

When someone first enter my front page, the instock is on as default.

Hello

Better  use  this  code:

add_filter('woof_get_request_data', 'my_woof_get_request_data');

function my_woof_get_request_data($data)
{

if (is_front_page())
{
$data['stock']='instock';

}
return $data;
}

Great! Thanks!

Hello Pablo, after some testing. Here are the results.

https://land.elegment.com/

  1. The is_front_page now defaults to show"AVAILBLE LAND" ($data['stock']='instock';)
  2. However, I am not able to"uncheck" the"AVAILABLE LAND" box. Even if I try to uncheck the box, it still returns to show instock only.

Question: is it possible to show instock as default. But still allow user to be able to uncheck the box, and see full list of products (including out of stock products)?

Thanks! Xing

Hello Xing

Yes, but in this case you need to provide the user with a link with a search query.

https://land.elegment.com/?swoof=1&stock=instock