Rename method
This commit is contained in:
parent
b6deb23e5c
commit
9a8681a713
|
@ -606,7 +606,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
'image_srcset' => $image_srcset ? $image_srcset : '',
|
||||
'image_sizes' => $image_sizes ? $image_sizes : '',
|
||||
'price_html' => apply_filters( 'woocommerce_show_variation_price', $variation->get_price() === "" || $this->get_variation_price( 'min' ) !== $this->get_variation_price( 'max' ), $this, $variation ) ? '<span class="price">' . $variation->get_price_html() . '</span>' : '',
|
||||
'availability_html' => wc_get_product_stock_html( $variation ),
|
||||
'availability_html' => wc_get_stock_html( $variation ),
|
||||
'sku' => $variation->get_sku(),
|
||||
'weight' => $variation->get_weight() ? $variation->get_weight() . ' ' . esc_attr( get_option( 'woocommerce_weight_unit' ) ) : '',
|
||||
'dimensions' => $variation->get_dimensions(),
|
||||
|
|
|
@ -2471,14 +2471,14 @@ function wc_display_product_attributes( $product ) {
|
|||
* @param WC_Product $product
|
||||
* @return string
|
||||
*/
|
||||
function wc_get_product_stock_html( $product ) {
|
||||
function wc_get_stock_html( $product ) {
|
||||
ob_start();
|
||||
|
||||
wc_get_template( 'single-product/stock.php', array(
|
||||
'product' => $product,
|
||||
) );
|
||||
|
||||
return apply_filters( 'woocommerce_get_product_stock_html', ob_get_clean(), $product ); // @todo map old woocommerce_stock_html filter to this
|
||||
return apply_filters( 'woocommerce_get_stock_html', ob_get_clean(), $product ); // @todo map old woocommerce_stock_html filter to this
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,7 +70,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
|||
<td class="price">
|
||||
<?php
|
||||
echo $product->get_price_html();
|
||||
echo wc_get_product_stock_html( $product );
|
||||
echo wc_get_stock_html( $product );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -26,7 +26,7 @@ if ( ! $product->is_purchasable() ) {
|
|||
return;
|
||||
}
|
||||
|
||||
echo wc_get_product_stock_html( $product );
|
||||
echo wc_get_stock_html( $product );
|
||||
|
||||
if ( $product->is_in_stock() ) : ?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue