A Pen by Mike Hacker on CodePen.
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
/* | |
* Disable Continue shopping message after add to cart. | |
*/ | |
add_filter( 'wc_add_to_cart_message', function( $string, $product_id = 0 ) { | |
$start = strpos( $string, '<a href=' ) ?: 0; | |
$end = strpos( $string, '</a>', $start ) ?: 0; | |
return substr( $string, $end ) ?: $string; | |
} ); |
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
/* | |
* External domains for add to cart redirect | |
*/ | |
add_filter( 'allowed_redirect_hosts', function( $hosts ) { | |
$hosts[] = 'staging.energyefficientsolutions.com'; // Add your external domain in here. | |
/* No http/https schema prefix. Duplicate for additional allowed domains */ | |
return $hosts; | |
} ); |
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
/** | |
* Allow rendering of checkout and account pages in iframes. | |
*/ | |
add_action( 'after_setup_theme', 'wc_remove_frame_options_header', 11 ); | |
function wc_remove_frame_options_header() { | |
remove_action( 'template_redirect', 'wc_send_frame_options_header' ); | |
} |
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
/** | |
* Redirect the Continue Shopping URL from the default (most recent product) to | |
* a custom URL. | |
* Place this code snippet in your theme's functions.php file. | |
*/ | |
function custom_continue_shopping_redirect_url ( $url ) { | |
$url = "http://www.woothemes.com"; // Add your link here | |
return $url; | |
} | |
add_filter('woocommerce_continue_shopping_redirect', 'custom_continue_shopping_redirect_url'); |
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. | |
*/ | |
add_action( 'after_setup_theme', 'wc_remove_frame_options_header', 11 ); | |
/** | |
* Allow rendering of checkout and account pages in iframes. | |
*/ |
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
<% option explicit %> | |
<!--#include file="FedexAccountInfo.asp"--> | |
<% | |
Dim subscriberzip | |
Dim subscribercountry | |
Dim ShipmentDate | |
Dim xmlReq | |
Dim objhttp | |
Dim outstr | |
Dim NodeList |
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
@@ -28,7 +28,7 @@ | |
if (!string.IsNullOrEmpty(_orderID)) | |
{ | |
string sql = @" select c.CustomerID, c.FirstName, c.LastName, c.Address, c.Address2, c.City, c.State, c.Zip, c.Country, c.PhoneNumber, c.Extension, c.EmailAddress, ROUND(o.OrderTotal, 2) AS OrderTotal | |
string sql = @" select c.CustomerID, c.FirstName, c.LastName, c.Address, c.Address2, c.City, c.State, c.Zip, c.Country, c.PhoneNumber, c.Extension, c.EmailAddress, ROUND(o.OrderTotal, 2) AS OrderTotal, o.OrderKey | |
from customers c | |
join orders o | |
on c.CustomerID = o.CustomerID |
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
//initialize all of our variables | |
var app, base, concat, directory, gulp, gutil, hostname, path, refresh, sass, uglify, imagemin, minifyCSS, del, browserSync, autoprefixer, gulpSequence, shell, sourceMaps, plumber; | |
var autoPrefixBrowserList = ['last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4']; | |
//load all of our dependencies | |
//add more here if you want to include more libraries | |
gulp = require('gulp'); | |
gutil = require('gulp-util'); | |
concat = require('gulp-concat'); |
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
+var express = require('express'); | |
+var app = express(); | |
+var server = require('http').Server(app); | |
+ | |
+app.set('port', (process.env.PORT || 3000)); | |
+ | |
+app.use(express.static(__dirname + '/dist')); | |
+ | |
+app.listen(app.get('port'), function() { | |
+ console.log('Node app on port', app.get('port')) |