在設定通知方式下方加入新的欄位:

該 filter 帶有兩個參數:
$wc_notify_action_module – 通知方式的欄位陣列
$action – 設定欄位物件
新增欄位範例:
add_filter('wc_notify_action_module','new_field');
function new_field( $wc_notify_action_module, $action ) {
$wc_notify_action_module[] = $action->addMultiSelect(
array(
'id' => 'wc_notify_trigger_user_tags',
'class' => 'wc_notify_trigger_user_tags',
'label' => __( 'User Tags', 'otz' ),
'desc' => __( 'Apply tags to user when the rule was triggered. ', 'otz' ),
),
$this->tag_db->get_all_tags_for_select2(),
true
);
return $wc_notify_action_module;
}