Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alidemirci/5744eeacef1d7dd0a05c4a2917fafb70 to your computer and use it in GitHub Desktop.
Save alidemirci/5744eeacef1d7dd0a05c4a2917fafb70 to your computer and use it in GitHub Desktop.
Change "Sold Out" text with another text in WooCommerce with Filter
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;
}
@alidemirci
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment