This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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']; |