Skip to content

Instantly share code, notes, and snippets.

@webdados
Last active August 10, 2023 20:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdados/0ebf17d548ddfce84a4c03878981a4c7 to your computer and use it in GitHub Desktop.
Save webdados/0ebf17d548ddfce84a4c03878981a4c7 to your computer and use it in GitHub Desktop.
Change "available on backorder" WooCommerce text
<?php
add_filter( 'woocommerce_get_availability', 'my_woocommerce_get_availability' );
function my_woocommerce_get_availability( $availability ) {
if ( $availability['class'] == 'available-on-backorder' ) {
$availability['availability'] = 'Your text here';
}
return $availability;
}
@mykhailo-murat
Copy link

/👍

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