我建议您首先查看“wpsc\\u purchase\\u log\\u update”操作,该操作在wpsc includes/purchase log中触发。班php并传递wpsc\\u purchase\\u log对象。测试$previous_status
该对象的成员,以及新的状态值(可能在数据成员中为$data[\'statusno\']
) == WPSC\\u购买日志::已调度作业。
类似这样(未经测试):
add_action(\'wpsc_purchase_log_update\', \'wpse_73707_wpscPurchaseLogUpdate\');
/**
* trigger event or option to the "Job Dispatched" status change
* @param WPSC_Purchase_Log $purchaseLog
*/
function wpse_73707_wpscPurchaseLogUpdate($purchaseLog) {
if ($purchaseLog->previous_status && $purchaseLog->data[\'statusno\'] == WPSC_Purchase_Log::JOB_DISPATCHED) {
// send your email ...
}
}