In this section, you will learn about advanced topics. These include WWK Hooks and how to use WWK to build a fantastic user interface with Elementor widgets like what you see in WWK Demo.
Advanced Shortcode Usage
WordPress shortcodes are a simple yet powerful feature that runs a function and returns its value on the frontend. A Shortcode with attributes can be like this:
[sample-shortcode id="123" size="medium"]
WWK also has shortcodes that help you show your WHMCS everywhere, supporting shortcodes in WordPress. WWK has a shortcode builder that can quickly generate the desired shortcode. The WWK shortcodes and their attributes are explained on the rest of this page.
WWK Service Price
This shortcode can show your WHMCS service prices.
| Attribute | Description | Possible Values |
| pid | The id of the product in WHMCS | – |
| period |
The period for which you want the price to be displayed.
|
msetupfee, qsetupfee, ssetupfee, asetupfee, bsetupfee, tsetupfee, monthly, quarterly, semiannually, annually, biennially, triennially |
| currency | The id of desired currency in WHMCS | – |
| disable_price_format | Disable price formatter | true, false |
Example:
[wwk-service-price pid="1" period="msetupfee" currency="1" disable_price_format="false"]
WWK Domain Price
This shortcode can show your WHMCS domain prices.
| Attribute | Description | Possible Values |
| ext | The domain extension, for example, “.com” | – |
| action | The action for which you want the price to be displayed. | register, renew, transfer |
| period | The period for which you want the price to be displayed. | 1-10 |
| group_id | The client group id for which you want the price to be displayed. Use 0 for the default group. | – |
| currency | The id of desired currency in WHMCS | – |
| disable_price_format | Disable price formatter | true, false |
Example:
[wwk-domain-price ext=".com" action="register" period="" group_id="0" currency="1" disable_price_format="true"]
WWK Configurable Option Price
This shortcode can show your WHMCS service prices.
| Attribute | Description | Possible Values |
| cid | The id of the configurable option item in WHMCS, Unfortunately, this number is not visible in WHMCS. You can use shortcode builder to find the id. | – |
| period |
The period for which you want the price to be displayed.
|
msetupfee, qsetupfee, ssetupfee, asetupfee, bsetupfee, tsetupfee, monthly, quarterly, semiannually, annually, biennially, triennially |
| currency | The id of desired currency in WHMCS | – |
| disable_price_format | Disable price formatter | true, false |
Example:
[wwk-config-price cid="1" period="quarterly" currency="1" disable_price_format="false"]
Customize pricing format
WWK has some hooks on pricing that can be used to customize the price format. These hooks can be used by the WordPress Apply Filters method.
| Hook Name |
Description | Args (in order) |
| ewb_price | This hook applies to price before showing it when you disable price format
|
|
|
ewb_formatted_amount
|
This hook applies to price after the price amount is formatted. This hook is used before adding prefix and suffix to the amount.
|
|
|
ewb_formatted_price
|
This hook applies to price after the price is formatted. This hook is used after adding prefix and suffix to the amount. |
|