php - Woocommerce ajax variation threshold problem
Get the solution ↓↓↓I have used this snippet for changing variation ajax threshold because variable product shows this message:
Sorry, no products matched your selection.
Used snippet:
function wc_ajax_variation_threshold( $qty, $product ) {
return 150;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold', 10, 2 );
The client shop has about 130 variants per variable product, so it is necessary to change the ajax threshold value if I don't want to display mentioned message.
Problem is if change this limit to 150. I see a blank page and no error in logs. The memory limit is set to 512MB. I have also tried to modify the limit on the storefront child theme but with no luck. I am running on Woocommerce 4.9 and the latest WP (5.6.1) on shared hosting.
Do you have some recommendations on how to achieve a successful load of the product page with an increased variation threshold limit? Should a more powerful server solve this problem?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the requested url was not found on this server. xampp
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.