Skip to content

Instantly share code, notes, and snippets.

Charles Sellers CharlesSellers

Block or report user

Report or block CharlesSellers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
CharlesSellers / functions.php
Created May 2, 2017 — forked from jameskoster/functions.php
WooCommerce - Remove product data tabs
View functions.php
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
View external-composer-library
"type": "package",
"package": {
"name": "[s3-bucket]/[packagename]",
"version": "",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "[authenticated s3 URL]"
View Packagist
"name": "acme/brilliant-wordpress-site",
"description": "My brilliant WordPress site",
"require": {
CharlesSellers / install.php
Created Sep 1, 2016 — forked from tschoffelen/install.php
A simple PHP script that automatically downloads and unzips the latest version of Wordpress in the current directory (./), so that I don't have to download it and upload it to my server through FTP manually.
View install.php
echo '<pre>';
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL;
// Download file
file_put_contents('', file_get_contents(''));
$zip = new ZipArchive();
$res = $zip->open('');
if ($res === TRUE) {
CharlesSellers / WHMCS Client Ref Hook
Last active Dec 18, 2015
This is a WHMCS Hook to create a unique account number. This is in a similar way to Sage or KashFlow and is used on our invoices as a customer reference for Bank Transfers. The result is a unique six place account reference which is generated automatically from either the company name or surname. e.g. if we have a client called "Facebook" and an…
View WHMCS Client Ref Hook
// The function defines a new hook (and hook name) for WHMCS
function hook_client_ref($vars) {
//Pull data from Database, these are the three variables we require.
$id = $vars['userid'];
$companyname = $vars['companyname'];
$surname = $vars['lastname'];
You can’t perform that action at this time.