Last active
April 6, 2020 02:53
-
-
Save ucheng/12bb043aa713f0db7aca6c78be0cf328 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----- | |
* 若您希望全部訂單都顯示,請將以下內容加入 functions.php 中 | |
----- */ | |
add_action('woocommerce_thankyou', 'shopcom_add_content_thankyou', 5); | |
function shopcom_add_content_thankyou() | |
{ | |
echo '<h2 class="h2thanks">提醒您:</h2><p class="pthanks">以下都是詐騙:訂單設錯、訂單金額有誤、設成分期每月扣款、重覆訂購多筆、宅配或超商出錯、簽收單牽成簽帳單、條碼刷錯、重複扣款。歹徒會以更改訂單要求退費給您為由,要求您操作ATM,這些都是詐騙手法。若遇可疑來電,隨時可撥打165反詐騙諮詢專線。</p>'; | |
} | |
/* ----- | |
* 若您希望只有美安的訂單才顯示,請將以下內容加入 functions.php 中 | |
----- */ | |
add_action('woocommerce_thankyou', 'shopcom_add_content_thankyou', 5); | |
function shopcom_add_content_thankyou($order_id){ | |
$rid = get_post_meta($order_id, '_wooshop_rid', true); | |
$click_id = get_post_meta($order_id, '_wooshop_click_id', true); | |
if ($rid && $click_id) { | |
echo '<h2 class="h2thanks">提醒您:</h2><p class="pthanks">以下都是詐騙:訂單設錯、訂單金額有誤、設成分期每月扣款、重覆訂購多筆、宅配或超商出錯、簽收單牽成簽帳單、條碼刷錯、重複扣款。歹徒會以更改訂單要求退費給您為由,要求您操作ATM,這些都是詐騙手法。若遇可疑來電,隨時可撥打165反詐騙諮詢專線。</p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment