Usage Instructions - wpmudev/whmcs-wordpress-integration GitHub Wiki

Installation

If you are new to WordPress or WordPress Multisite and need instructions for installing plugins view our complete Plugin Installation Guide here. Please note: WHMCS Integration can be activated on both a single site or Multisite network. You only need to "Network Activate" the WHMCS Integration plugin in Multisite if you want to make the shortcodes and widgets available on all of the sites across your network.

Getting Started

Once installed and activated, a WHMCS Integration menu item will be added to the WordPress dashboard. whmcs-integration-1202-menu

Configuring the Settings

There are only a few simple settings to fully integrate your WHMCS install with your WordPress site. 1. Enter the full URL to your WHMCS site. 2. Select the site page to use for WHMCS. 3. Enter your preferred custom slug. 4. Enter the URL to encode. 1. Enter the full URL to your WHMCS site.
2. Select the site page to use for WHMCS.
3. Enter your preferred custom slug.
4. Enter any WHMCS URL to encode for your site. 1. The Remote WHMCS Host is the full URL to your WHMCS install. For example: http://your-whmcs-install.com/

  • You must end the Remote WHMCS host url with slash "/"
  • All URLs entered (in the plugin settings and at your WHMCS install) must follow the SAME convention. If one is HTTP, they must all be HTTP. If one is WWW, they must all be WWW. Be sure all URLs follow the same convention. Be sure all URLs follow the same convention.

2. The "Default Content Page" can be any page on your site. If you don't already have a page for this, you can create one and add it now.

  • This page can contain any content you like, but it must have the [wcp_content] shortcode in it (see below for more on the available shortcodes).

3. You can enter your own custom Endpoint Slug to avoid possible conflicts with other content on your site. If nothing is entered here, the default slug will be: whmcsportal.

  • Note that like all WordPress slugs, it should contain only lowercase alphanumerics and the optional hyphen.

4. The WHMCS URL Encoder is not really a setting, but a helper tool to help you get specific WHMCS URLSs that you can use anywhere on your site.

Note that there are no settings for the selection of a template. Regardless of the template used at your WHMCS install, the plugin will always use the Portal template for seamless integration with your active WordPress theme.

IP Forwarding & Client IP Orders

As a security measure, WHMCS only accepts IP headers from trusted IPs. Add the IP address of your WordPress or Multisite installation to the list of trusted proxies under the security tab on WHMCS. Setup >General Settings >Security trusted-proxy

Shortcodes & Widgets

To help you get the most out of WHMCS Integration, we've included a number of shortcodes & widgets that you can use anywhere on your site. whmcs-integration-1202-shortcodes whmcs-integration-1202-widgets

  • [wcp_content] shortcode or WHMCS Content widget- Displays the primary content of a WHMCS page.whmcs-integration-1202-portal-home
  • [wcp_welcome] or WHMCS Welcome widget - Displays the current WHMCS user, My details and WHMCS Logout link, If not logged in, it prompts for the user to login.whmcs-integration-1202-welcome
  • [wcp_menu] shortcode or WHMCS Menu widget - Displays the top menu from WHMCS. Note that you can style it with CSS as either a vertical or horizontal menu. In a sidebar widget, it would default to vertical. Here's an example of the basic CSS you could use to get it to display horizontally (change .page-content to the ID or class of your main page container element): .page-content .whmcs_menu li {float:left;padding:3px 10px 3px 0;}whmcs-integration-1202-widget-menu
  • [wcp_quick_nav] shortcode or WHMCS Quick Navigation widget - Displays the Quick Navigation links. Note that you can style this too with CSS as either a vertical or horizontal menu. In a sidebar it would default to vertical.whmcs-integration-1202-widget-navigation
  • [wcp_account] shortcode or WHMCS Account widget - Displays the current logged in WHMCS user's account information. If no user is logged in, it will display a login form and Knowledgebase search.whmcs-integration-1202-widget-account
  • [wcp_statistics] shortcode or WHMCS Statistics widget - Displays the current logged in WHMCS user's product statistics. If no user is logged in, it will not be displayed.whmcs-integration-1202-widget-statistics

Cookie Syncing

To enable your users to download protected files from your WHMCS Downloads or Knowledgebase sections, you will need to copy a small helper file from the plugin to the root of your WHMCS install. The file you'll want to copy over is: whmcs-wordpress-integration/wp-integration.php

  • Note that if this file is not copied over, your users will be redirected to your WHMCS install for downloads, and will have to login there also.

WordPress and WHMCS on the Same Server

If both your WordPress and WHMCS installs are on the same server, please ensure that they do not reside in the same directory or you will have problems. The best way to prevent any conflicts is to install WHMCS as an Addon Domain or a Subdomain of your main account. If you are using a distinct domain name for your WHMCS install, you can add it to your main account in cPanel as an Addon Domain. Note that the Addon Domain name must already be registered with a valid registrar and DNS configured to point to your server. whmcs-integration-1202-addon-domain Or you could include it as a Subdomain on your main account. whmcs-integration-1202-subdomain As always, we hope that you enjoy the WHMCS Integration plugin. If you ever hit a snag, or just need to discuss a configuration issue, please head on over to the community forums where a stellar group of support staff and members are standing by to give you a hand. :)