WHMCS WP Integration

Integrate WHMCS with WordPress for a more powerful hosting experience brought right to your dashboard.

Version 1.2.1.8

  • Fix: Redirection issues on HTTPS installs.
  • New: Added Pre and Post redirection hooks.

Changelog

November 22, 2014 - version 1.2.1.8
  • Fix: Redirection issues on HTTPS installs.
  • New: Added Pre and Post redirection hooks.

November 13, 2014 - version 1.2.1.7
  • Fix: Redirection issues in WP 4.0.

May 2, 2014 - version 1.2.1.5
  • Changed from using $_SESSION to a cookie system to support hosts like WPENGINE that break sessions.
  • Fixed set 0755 or 0777 chmod on the cache directory.
  • Added Quantum Gateway Support
  • wp-integration.php now returns text/css mime.

February 22, 2014 - version 1.2.1.4
  • Added several client IP headers to fix the real ip logging of WHMCS on different server types. They recently changed their emphasis on certain headers.

February 4, 2014 - version 1.2.1.3
  • ==1.2.1.3==
  • - Added check for the PHP mbstring extension to warn on activation if it's not available
  • - Fix to translation loading for multisite.

January 15, 2014 - version 1.2.1.2
  • Added retry if the wrong template is set. Tries to force the portal template.

December 20, 2013 - version 1.2.1.1
  • Regen cached js files more often to prevent nonce expirations.

December 10, 2013 - version 1.2.1
  • fix to themes that don't add trailing slash to paths.
  • New WPMU desktop code
  • Made SSL/TLS and certificate settings automatic. WP 3.7 supports certificates.

November 16, 2013 - version 1.2.0.9
  • Remote css cache was sometimes not loading particularly on the modern orderform.
  • Removed page query_var which was blocking paging in email.
  • Image instructions for setting the Remote Host URL
  • Link to Usage page.
  • Checked against Wordpress 3.8beta
  • Fixed stripos glitch with arrays.

November 13, 2013 - version 1.2.0.8
  • Changes to cookies syncing so the session cookie isn't lost on login.
  • Change to handling of download and knowledgebase links

November 10, 2013 - version 1.2.0.7
  • pagename query_var getting erased.
  • Added Icon

November 9, 2013 - version 1.2.0.6
  • Fixed problem with Pre- Sales Contact form returning 404
  • Filtered extraneous apostrophe in WHMCS v5.2 /templates/portal/clientareadomains.tpl line 34
  • Reworked admin settings page to work in server circumstances where schemes are forbidden in the query strings.
  • Added some more error checking on the options validation.

October 31, 2013 - version 1.2.0.5
  • An extra "s" crept into the name of the plugin subdirectory "whmcs-wordpressS-integration" instead of "whmcs-wordpress-integration".
  • This could cause two copies of the plugin to be installed so check that there is only a single copy.

October 30, 2013 - version 1.2.0.4
  • Patches for class-http.php to support WordPress 3.7.1

October 30, 2013 - version 1.2.0.3
  • "search" in query string was confusing whether to chose a WHMCS or WordPress search in bulktransfer and bulkregister.
  • Added ?ver=xxxx to captcha image url to try to disable more caches. CloudFlare appears to cache no matter what.

October 27, 2013 - version 1.2.0.2
  • Changes to support WordPress 3.7

October 23, 2013 - version 1.2.0.1
  • Byte Order Mark in one file causing header sent errors.

October 23, 2013 - version 1.2
  • Pretty permalinks for WHMCS addresses! Uses a definable endpoint slug to signal when a WHMCS page is referenced from Wordpress.
  • Added session cookie syncing so that downloads and other "login required" file downloading will work properly.
  • equires wp-integration.php installed on the root of the WHMCS install.
  • Handles Announcement, Knowledgebase and Downloads better.
  • Properly supports default page as Static Front Page
  • Updated widgets for newer versions of WHMCS (v5.2)
  • Added WHMCS_PAYPAL_SANDBOX define. Add "define('WHMCS_PAYPAL_SANDBOX', true);" to wp-config.php. Allows testing "paypal" (not paypal express) gateway against the sandbox account.

June 22, 2013 - version 1.1.4.4
  • Patches for class-http.php in Wordpress 3.5.2
  • the_content filter for &

May 29, 2013 - version 1.1.4.3
  • The WHMCS 302 redirect bug is back in 5.2.5 Requires a GET on 302 redirect.

May 29, 2013 - version 1.1.4.2
  • Added CSS to reposition the domain registration popup in the order-modern and order-slider form. It was appearing out of the viewport in WHMCS 5.2.4.

May 18, 2013 - version 1.1.4.1
  • Added get "getkbarticles" as ajax trigger. Fixes problem with background knowledgebase lookup on submit tickets from returning 0

April 29, 2013 - version 1.1.4
  • WHMCS WHMCS fixed their old bug of requiring a GET on a 302 redirect. Now properly follows the original request for 302 and requires GET for 307
  • Added more deugging code. define ('WHMCS_INTEGRATION_DEBUG', true); to turn on debug messages.
  • Added filter 'whmcs_get_args' which can be used to add query string parameters to the remote host like ?language=german defaults to ?systpl=portal

March 4, 2013 - version 1.1.3.8
  • Changed handling of local SSL certificates.

January 28, 2013 - version 1.1.3.7
  • Added some css to help out Chrome problems.

December 6, 2012 - version 1.1.3.6
  • Changed script search path in XML

December 6, 2012 - version 1.1.3.5
  • Fixed some non relative urls that were redirecting incorrectly.
  • Got the built in captcha working across net.

December 2, 2012 - version 1.1.3.4
  • Added viewquote.php to unfiltered pages.
  • Fixed javascript on new viewquote page.

October 14, 2012 - version 1.1.3.2
  • Fixed mixed single and double quotes problem in Server Status
  • Script encoder not requiring a match with the remote_host base url.
  • Added warnings on mixing http: and https: in the plugin/WHMCS combination.
  • Added warning about encoding with the smae Remote WHMCS base url.

July 17, 2012 - version 1.1.2
  • == 1.1.2 ==
  • * More patches for WP v3.4.1 (header filter broken causing 413 error)
  • * method="get" => method="post" for verticalsteps orderform. Don't need to patch templates on WHMCS
  • * Added titles to widgets.
  • * Cleaned up debug display.
  • * converted $ => jQuery in some scripts for no conflict mode.

July 7, 2012 - version 1.1.1
  • == 1.1.1 ==
  • * Fixed non relative url in the Knowledgebase breadcrumbs.
  • * In order to fix some badly formed urls coming from WHMCS templates a number of *.tpl file need their method="get" changed to method="post".
  • * Files that need editing as of WHMCS version 5.3 are:
  • templates/orderforms/verticalsteps/addons.tpl line 11
  • templates/orderforms/verticalsteps/adddomain.tpl line 11
  • templates/orderforms/verticalsteps/domainrenewals.tpl line 11
  • templates/orderforms/verticalsteps/products.tpl line 11
  • templates/orderforms/boxes/products.tpl line 7

June 26, 2012 - version 1.1
  • Back peddled on the base64 encoding. Some javascript was building urls from variables and tacking extra &name=value items to the end of the url.
  • is messed up the encoding and broke things like the remove link on the order forms.
  • New scheme to avoid the http security filters is to rename the "http://" and "https://" in front of the url to "whmcs://" and "whmcss://"
  • e plugin automatically translates back and forth.
  • Repaired whmcs translation on ajax calls.
  • Added javascript caching and patching to fix WHMCS non-standard javascript file and redirect posts.
  • Fixed class-http patch for WPv3.4
  • Left the URL encoder in except it now does urlencode as before instead of base 64.

June 4, 2012 - version 1.0.5
  • Added Default Content Page to settings. When set this is the page that wHMCS menu items will go to when clicked.
  • suming it has a content shortcode there it will display the content.

June 2, 2012 - version 1.0.4
  • Because of some security filters that trigger on the "http://" on shared servers like Hostgator the redirect urls are now
  • se64 encoded to prevent triggering the filter.
  • Added a base64 encoder to the Settings so users can easily encode a direct url such as a product url.

May 26, 2012 - version 1.0.3.5
  • Changed debug code to remove the tag so relative urls don't go to the wrong place.
  • Trigger debug with "&whmcsportal[debug]=true" added to the end of the WP redirected url

May 25, 2012 - version 1.0.3.4
  • Added debug code for remote debugging.

March 28, 2012 - version 1.0.3.2
  • Corrected the WDP ID number

March 27, 2012 - version 1.0.3.1
  • Corrected misloading of some WHMCS stylesheets.

March 26, 2012 - version 1.0.3
  • Setup AJAX for cross domain retrieval of javascript requests.
  • Added detection for safe_mode and open_basedir PHP settings which affect cURLs redirect handling.

March 26, 2012 - version 1.0.2
  • Fixed page parsing to work with older versions of PHP

March 25, 2012 - version 1.0.1
  • Fixed crashes on earlier versions of PHP

March 20, 2012 - version 1
  • First Release Version 1.0

Downloads 23,342

Compatibility WordPress 4.2 Multisite 4.2

WHMCS WP Integration brings the power of WHMCS to your WordPress dashboard.

Give clients the ability to open and manage tickets, make new orders and search for domain names – all from WordPress.

Not Sure What WHMCS Is?

WHMCS is an all-in-one client management, billing & support solution for online businesses. Handling everything from signup to termination, WHMCS is a powerful business automation tool that puts you firmly in control – WHMCS.com

Bring the whole WHMCS Portal to your site.

WHMCS WordPress Integration
Access the whole portal without leaving your site

 

Get support tickets right from your dashboard.

WHMCS - Support Desk
Provide amazing fast support

Your clients can even add credit and handle all the WHMCS options.

WHMCS - Server Status
Allow users to view realtime status reports

Built-in widgets and shortcodes make it easy to get everything where you need it quickly.

WHMCS Integration - Shortcodes
Setup is fast and simple using built-in widgets and shortcodes

This works really well with our WHMCS Provision plugin, where you can also sell websites in your WordPress Multisite installation.

Bring the complete WHMCS experience to WordPress for powerful automated hosting.

For help with installing plugins please see our Plugin installation guide.

Please note that WHMCS Integration can be activated on a single site or on a network. There are no benefits to network activating other than the shortcodes and widgets will be available on all websites within your network.

Once installed and activated, you will see a new WHMCS Integration menu item in your admin:

whmcs-integration-1202-menu

Configuring the Settings

There are only a few simple settings to fully integrate your WHMCS install with your WordPress site. Let’s go over them now.

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/

  • Important: for the Remote WHMCS host, you must end the url with slash “/”
  • Also important: 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, why not create it now, then come back and select it here.

  • 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.

  • For example, if you need to link to the shopping cart of your WHMCS install, enter http://your-whmcs-install.com/cart.php and click “Encode URL”. The tool will return the URL you can use for your site, for example: http://your-wp-site.com/whmcs/whmcsportal/cart.php/?

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.

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 issues in this case is to install WHMCS as an Addon Domain or a Subdomain on 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. :)