6

だから私は現在、バリエーションの多い Woocommerce ストアに取り組んでいます。

私が基本的に探しているのは、その前に選択されたバリエーションで選択されたものに基づいて、次のバリエーションが更新されることです。

たとえば、http://freelance.tstwebdesign.co.uk/platino/product/plain-platinum-court/ にアクセスする場合( ロード時間が遅いことをお詫びします) 「幅」から選択したいのですが、その幅に一致する使用可能な深さのみを表示する「深さ」を更新します。

これは可能ですか?

ありがとう!

4

1 に答える 1

2

多くのバリエーションのデフォルト機能です。多くのバリエーションでは、関数でそれを行うことができます

    // Woo Commerce – Make Variations only appear when available
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 500;
}

add_filter( ‘woocommerce_ajax_variation_threshold’, ‘custom_wc_ajax_variation_threshold’, 10, 2 );
于 2016-12-06T14:38:23.757 に答える