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
// Load plugins | |
const gulp = require("gulp"); | |
const sass = require('gulp-sass')(require('sass')); | |
const postcss = require("gulp-postcss"); | |
const cssnano = require("gulp-cssnano"); | |
const concat = require("gulp-concat"); | |
const autoprefixer = require("autoprefixer"); | |
// CSS task | |
function styles() { |
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 | |
add_action( 'woocommerce_thankyou', 'tracking_code', 10, 1 ); | |
function tracking_code( $order_id ) { | |
if ( ! $order_id ) | |
return; | |
// Ignore localhost/dev submits |
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
# Rewrite url for maintenance mode | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^123\.456\.78\.90 | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.true -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /maintenance.html [R=503,L] | |
ErrorDocument 503 /maintenance.html | |
</IfModule> |
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 | |
// Custom language switcher for TranslatePress | |
$trp = TRP_Translate_Press::get_trp_instance(); | |
$trp_url = $trp->get_component( 'url_converter' ); | |
$trp_settings = $trp->get_component( 'settings' )->get_settings(); | |
// Get all published languages | |
$lang = $trp_settings['publish-languages']; |
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 | |
// place this code in your functions.php file. | |
function add_cc_to_certain_emails( $headers, $id ) { | |
// Define the email type and check if true (You can use all woocommerce email types, for more info: https://docs.woocommerce.com/wc-apidocs/class-WC_Email.html) | |
if ( 'new_order' === $id ) { | |
$headers .= "Cc: FirstName LastName <[email protected]>\r\n"; | |
$headers .= "Bcc: FirstName LastName <[email protected]>\r\n"; | |
// You can add more extra email headers here. Make sure you use $headers .= otherwise it will overwrite the variable. | |
} |