plugin updates

This commit is contained in:
Tony Volpe
2024-09-17 10:43:54 -04:00
parent 44b413346f
commit b7c8882c8c
1359 changed files with 58219 additions and 11364 deletions

View File

@@ -74,4 +74,28 @@ class WC_Product_Simple extends WC_Product {
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( $text, $this->get_name() ), $this );
}
/**
* Get the add to cart button success message - used to update the mini cart live region.
*
* @return string
*/
public function add_to_cart_success_message() {
$text = '';
if ( $this->is_purchasable() && $this->is_in_stock() ) {
/* translators: %s: Product title */
$text = __( '“%s” has been added to your cart', 'woocommerce' );
$text = sprintf( $text, $this->get_name() );
}
/**
* Filter product add to cart success message.
*
* @since 9.2.0
* @param string $text The success message when a product is added to the cart.
* @param WC_Product_Simple $this Reference to the current WC_Product_Simple instance.
*/
return apply_filters( 'woocommerce_product_add_to_cart_success_message', $text, $this );
}
}