Skip to content

Instantly share code, notes, and snippets.

View carlitoescobar's full-sized avatar
👁️
Looking

Carlito carlitoescobar

👁️
Looking
View GitHub Profile
@carlitoescobar
carlitoescobar / gist:8ab734d123bfc8f39520e6ec8d692872
Created March 23, 2022 20:57 — forked from NikV/gist:7b7ec046df69b1f390bf
Example for: gform_post_payment_completed
/**
* Fires after a payment has been completed
*
* @param array $entry The Entry object
* @param array $action The Action Object
* $action = array(
* 'type' => 'cancel_subscription', // See Below
* 'transaction_id' => '', // What is the ID of the transaction made?
* 'subscription_id' => '', // What is the ID of the Subscription made?
* 'amount' => '0.00', // Amount to charge?
@carlitoescobar
carlitoescobar / gist:54fd0fba733fe1290cc1681bde931193
Created March 23, 2022 20:57 — forked from NikV/gist:bb1ca7ce478c0c60d155
Examples for: gform_post_payment_callback
/**
* Send a notification after a user attempts a purchase
*
* @param $entry The Entries object
* @param array $action The Action Object
* $action = array(
* 'type' => 'cancel_subscription', // See Below
* 'transaction_id' => '', // What is the ID of the transaction made?
* 'subscription_id' => '', // What is the ID of the Subscription made?
@carlitoescobar
carlitoescobar / functions.php
Created June 29, 2021 20:22 — forked from cliffordp/functions.php
Automatically login a single WordPress user upon arrival to a specific page.
<?php
/**
* Automatically login a single WordPress user upon arrival to a specific page.
*
* Redirect to home page once logged in and prevent viewing of the login page.
* Compatible with WordPress 3.9.1+
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead."
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 1.
*
(function($){
$.fn.quantityDiscounts = function(options) {
// set up default options
var defaults = {
discountColor: '#FF0000',
discounts: [
{ limit: 174, discount: .75, text: "25% Discount Applied"},
{ limit: 139, discount: .80, text: "20% Discount Applied"},
@carlitoescobar
carlitoescobar / install nano.sh
Created December 10, 2020 06:53 — forked from BlakeGardner/install nano.sh
Syntax highlighting in nano on Mac OS
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/
# install nano from homebrew
brew install nano
# update your nanorc file with the contents of the nanorc file below
nano ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
@carlitoescobar
carlitoescobar / Quantity Discounts
Last active December 5, 2020 21:38 — forked from bhays/Quantity Discounts
Auto discount prices based on quantities in Gravity Forms. Uses a percentage based approach.
(function($){
$.fn.quantityDiscounts = function(options) {
// set up default options
var defaults = {
discountColor: '#FF0000',
discounts: [
{ limit: 174, discount: .75, text: "25% Discount Applied"},
{ limit: 139, discount: .80, text: "20% Discount Applied"},
@carlitoescobar
carlitoescobar / index.html
Created January 13, 2020 15:17
Pricing Tables
<div class="demo-wrap">
<div class="demo-header">
<h1>Responsive Pricing</h1>
<p>pricing plan layout using flexbox</p>
</div>
<!-- PRICING PLANS -->
<section class="pricing-plans">
<!-- Pricing Tables -->
@carlitoescobar
carlitoescobar / index.pug
Created January 13, 2020 15:16
Pricing Tables
.lm-tabel
.lm-item.lm-item-2
.lm-item-top
span.lm-item-title.lm-underline START
.lm-item-price
i.icon-dollar
|0.995
.lm-item-body
.lm-item-desc
strong CUSTOM AIR
@carlitoescobar
carlitoescobar / bootstrap-rounded-pricing-tables.markdown
Created January 13, 2020 15:12
Bootstrap rounded Pricing tables