Skip to content

Instantly share code, notes, and snippets.

View ambercouch's full-sized avatar

Richard Arnold ambercouch

View GitHub Profile
@ambercouch
ambercouch / contact-form-7-default-form.html
Last active December 31, 2021 18:54
A default contact form for contact form 7
<div class="c-contact-form__content" >
<label class="c-contact-form__label" >
<span class="c-contact-form__label-text" >
Your Name <small>(required)</small>
</span>
<span class="c-contact-form__input-wrapper" >
[text* your-name placeholder "Name"]
</span>
</label>
<label class="c-contact-form__label">
@thenbrent
thenbrent / extend-subscription-lengths.php
Last active November 18, 2021 16:18
Add a new billing range to WooCommerce Subscriptions to allow for longer subscription lengths. Specifically a new "36 months" range to allow you to sell a subscription with a length of 36 months.Requires Subscriptions 1.4.4 or newer.
<?php
/**
* Plugin Name: WooCommerce Subscription Length Extender
* Description: Add a custom 36 month subscription length to WooCommerce Subscriptions (requires WC Subscriptions 1.4.4 or newer) to give the option of having a subscription expire after 36 months.
* Author: Brent Shepherd
* Version: 1.0
* License: GPL v2
*/
function eg_extend_subscription_expiration_options( $subscription_lengths ) {
@thenbrent
thenbrent / extend-subscription-intervals.php
Last active September 10, 2023 12:03
Add a new billing interval to WooCommerce Subscriptions. Specifically a "every 10 weeks" billing interval to selling a subscription to something and be charged every 10 weeks.
<?php
/**
* Plugin Name: Extend WooCommerce Subscription Intervals
* Description: Add a "every 10 weeks" billing interval to WooCommerce Subscriptions
* Author: Brent Shepherd
* Author URI: http://brent.io
* Version: 1.0
* License: GPL v2
*/
@pdfcrowd
pdfcrowd / pdfmail_api_v1.php
Last active February 15, 2020 21:18
Generate PDF using the Pdfcrowd API v1 and send it as an email attachment
// uses the PHP PEAR modules for sending MIME email
// http://pear.php.net/package/Mail
// http://pear.php.net/package/Mail_Mime
<?php
require 'pdfcrowd.php';
require_once('Mail.php');
require_once('Mail/mime.php');