Anestezy adlı üyeden alıntı: mesajı görüntüle
Hocam ücretsiz bir eklenti var o da hatalı çalışıyor ama idare ediyor yorum dursun size belirtirim müsait olunca adını
YApay zekaya kod yazdırdım sorunum cözüldü

add_action( 'woocommerce_single_product_summary', 'add_custom_text_below_add_to_cart', 30 );
function add_custom_text_below_add_to_cart() {
    $current_day = date('N');
    $current_time = date('H:i');
    $days_to_add = ($current_day >= 1 && $current_day <= 5 && $current_time >= '00:01' && $current_time <= '16:00') ? 2 : 3;
    $shipping_date = date('d.m.Y', strtotime("+$days_to_add day"));
    if($current_day == 6) {
        $shipping_date = date('d.m.Y', strtotime("+2 day", strtotime('next monday')));
    } elseif($current_day == 7) {
        $shipping_date = date('d.m.Y', strtotime('+1 day', strtotime('next monday')));
    }
   echo '<p style="color:blue;font-weight:bold;">Tahmini Teslim Tarihi: '.$shipping_date.'</p>';
}