當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


PHP WHMCS PremiumPriceOverride用法及代碼示例

在搜索高級域時執行。返回可能會改變注冊和續訂費用,停止購買域名或迫使客戶聯係支持。

參數

變量 類型 注意
domainName string
tld string 例如whmcs.com中的com
sld string 例如 whmcs.com 中的 whmcs
register float 如果是注冊,溢價域名的注冊價格
transfer float 如果轉讓,溢價域名的轉讓價格
renew float 高級域名續費價格

響應

接受返回以覆蓋注冊、轉讓或更新定價。還有布爾值 noSale 或 contactUs 以停止銷售帶有不同消息的域

示例代碼

<?php

//Stop the Domain Purchase for this Premium Domain
add_hook('PremiumPriceOverride', 1, function($vars) {
    return ['noSale' => true,];
});

//Force the Client to Contact Support to Purchase Domain
add_hook('PremiumPriceOverride', 1, function($vars) {
    return ['contactUs' => true,];
});

//Override the Register and Renew Pricing & Skip Markup Application
add_hook('PremiumPriceOverride', 1, function($vars) {
    return [
        'register' => 150.00,
        'renew' => 200.00,
        'skipMarkup' => true,
    ];
});

相關用法


注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 PremiumPriceOverride。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。