-2
如何根據今天的日期將交貨日期部分更改爲將來3周自動更新?對不,它只是說2-4天。簡單日期php更改
function sv_shipping_method_estimate_label($label, $method) {
$label .= '<br /><small>';
switch ($method->method_id) {
case 'free_shipping':
$label .= 'Est delivery: 2-4 days';
}
$label .= '</small>';
return $label;
}
add_filter('woocommerce_cart_shipping_method_full_label', 'sv_shipping_method_estimate_label', 10, 2);
[PHP的可能的複製日期格式YYYY-MM-DD減去或添加一週後?](https://stackoverflow.com/questions/6086389/php-date-format-yyyy-mm-dd-minus-or-add-one-week -現在起) – ficuscr