Last active
March 5, 2020 13:02
-
-
Save alidemirci/5744eeacef1d7dd0a05c4a2917fafb70 to your computer and use it in GitHub Desktop.
Change "Sold Out" text with another text in WooCommerce with Filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_get_availability_text', 'amc_change_out_of_stock_text', 10, 2 ); | |
function amc_change_out_of_stock_text( $availability, $product ){ | |
if ( ! $product->is_in_stock() ) { | |
$availability = __( 'in de winkelmand', 'woocommerce' ); | |
} | |
return $availability; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source