У меня есть функция, которая может изменять текст деталей подписки.
function wc_subscriptions_custom_price_string( $pricestring ) {
global $product;
$products_to_change = array( 2212 );
if ( in_array( $product->id, $products_to_change ) ) {
$pricestring = str_replace( 'on the 20th day of every 6th month', 'on the 20th November and 20th May', $pricestring );
}
return $pricestring;
}
add_filter( 'woocommerce_subscriptions_product_price_string', 'wc_subscriptions_custom_price_string' );
Это работает хорошо, но не меняет текст в тележке или мини-тележке, в которой по-прежнему отображается текст по умолчанию 20-го числа каждого 6-го месяца. Как применить это к корзине?