Get the count of “in stock” product variations for a variable product in Woocommerce
问题 I'm trying to make a snippet for functions.php file that shows only one price of selected variation, thus omitting the price range displayed along with variation price on single product page. I'm using the following code: add_action( 'woocommerce_before_single_product', 'my_remove_variation_price' ); $product_variations=$product_variable->get_available_variations; function my_remove_variation_price() { global $product; if ( $product->is_type( 'variable' ) { remove_action( 'woocommerce_single