Modify the "backordered" text on the WooCommerce order receiving page.
P粉594941301
2023-07-30 17:12:12
<p>I'm trying to modify the word "reservado" or "backordered" in the order details page. </p><p>I used the following code but unfortunately did not achieve the expected result. The text of "backordered" has not changed, any suggestions? </p><p><br /></p>
<pre class="brush:php;toolbar:false;">function custom_backorder_message( $text, $product ){
if ($product->is_on_backorder( 0 ) ) {
$text = __( 'This item may take 3-4 weeks to deliver' );
}
return $text;
}
add_filter( 'woocommerce_get_availability_text', 'custom_backorder_message', 10, 2 );<span style="font-family:'sans serif, tahoma, verdana, helvetica';"><span style="white-space:nowrap ;"> </span></span></pre>
<p><br /></p>
Translation: If you want to modify it through code, you can use the woocommerce_backordered_item_meta_name filter hook.
So you get:
But you can also make changes in the language file.