Skip to content

Instantly share code, notes, and snippets.

View jessijean's full-sized avatar
📚
Study Time

Jessica Jean Bujazia jessijean

📚
Study Time
View GitHub Profile
@corsonr
corsonr / functions.php
Created June 29, 2018 08:17
WooCommerce Stripe: force customer creation in Stripe
<?php // Do not include this if already open! Code goes in theme functions.php.
/*
* Force customer creation process in Stripe.
*/
add_filter( 'wc_stripe_force_save_source', '__return_true' );
@webarthur
webarthur / install-nodejs-gulp.sh
Created September 20, 2015 23:25
Installing NodeJS + Gulp to work with Apache/PHP env
# install NodeJS + npm
sudo apt-get install nodejs
# symbolic link for node
sudo ln -s /usr/bin/nodejs /usr/bin/node
# install gulp
sudo npm install --global gulp gulp-utils
# install nice plugins
@bonny
bonny / gist:3851566
Created October 8, 2012 09:16
Simple Fields getting values
/**
* Gets a single value.
* The first value if field group is repeatable
*
* @param string $field_slug
* @param int $post_id ID of post or null to use current post in loop
* @param array $options Array or query string of options to send to field type
* @return mixed string or array, depending on the field type
*/
function simple_fields_value($field_slug = NULL, $post_id = NULL, $options = NULL) {
@amfeng
amfeng / index.php
Last active October 16, 2024 21:27
Stripe OAuth Example -- PHP
<?php
define('CLIENT_ID', 'YOUR_CLIENT_ID');
define('API_KEY', 'YOUR_API_KEY');
define('TOKEN_URI', 'https://connect.stripe.com/oauth/token');
define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize');
if (isset($_GET['code'])) { // Redirect w/ code
$code = $_GET['code'];