2014-10-07 66 views
0

我有woocommerce設置和正常工作,我只是需要一點點調整。Woocommerce沒有最近的訂單文字

在我的帳戶頁面上,默認值是最近的訂單,顯示客戶最近的訂單。但是,如果沒有訂單,頁面是空白的。 我想添加一行文字來顯示頁面已加載,並可能鼓勵用戶創建訂單。

我在哪裏添加這個到我的訂單或我的帳戶頁面只顯示沒有其他訂單存在?任何幫助讚賞。謝謝。

回答

0

您可以將my-orders.php模板複製到您的主題(在wp-content/themes/my-theme/woocommerce/myaccount/my-orders.php)。

你會看到這個模板有一個if語句:

if ($customer_orders) : 
// prints the orders table 
endif; 

你只需要給這個聲明的else條件,像這樣:

if ($customer_orders) : 
// prints the orders table 
else : 
    echo 'please buy some stuff'; 
endif; 
+0

完美。謝謝你的幫助。 – Crease 2014-10-09 07:38:03