
內容簡介
在購物頁面上顯示 WooCommerce 特價商品的日期。
篩選器
調整日期格式:
add_filter( 'sale_date_format', 'my_custom_sale_date_format' );
function my_custom_sale_date_format() {
return 'r';
}
調整標籤:
add_filter( 'sale_date_label', 'my_custom_sale_date_label' );
function my_custom_sale_date_label() {
return '有效期至';
}<h3>貢獻</h3>
歡迎貢獻。請前往 Github 建立問題或開啟拉取請求。
外掛標籤
開發者團隊
② 後台搜尋「SMNTCS Show Sale Price Date for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
Show WooCommerce sale prices date on shopping page.
Filter
Adjust date format:
add_filter( 'sale_date_format', 'my_custom_sale_date_format' );
function my_custom_sale_date_format() {
return 'r';
}
Adjust label:
add_filter( 'sale_date_label', 'my_custom_sale_date_label' );
function my_custom_sale_date_label() {
return 'Valid until';
}
Contribute
Contributions are always welcome. Simply head over to Github and create an issue or open a pull request.
