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
// If you're interested in automating more control, check out gulpjs.com for more dependencies | |
// This is meant as a starting point. You can do a LOT more with gulpjs than this | |
// Put inside /public directory, saved as gulpfile.js | |
// Requiring dependencies here, make sure to add them via the terminal | |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
minify = require('gulp-minify'); |
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
/* | |
This is taken directly from here and modified to fit our needs: https://developer.wordpress.org/themes/basics/including-css-javascript/ | |
*/ | |
function add_that_css_and_js() { | |
wp_enqueue_style( 'enqueue-that-css', get_template_directory_uri() . '/css/main.css', array(), '1.0', 'all'); | |
wp_enqueue_script( 'enqueue-that-js', get_template_directory_uri() . '/js/min/main.min.js', array ( 'jquery' ), 1.0, 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
// Doing pretty basic stuff here, but make sure you add these dependencies via terminal | |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
minify = require('gulp-minify'); | |
// Need to create a /sass folder inside your css | |
gulp.task('build-that-css', function() { | |
return gulp.src('css/sass/*.scss') | |
.pipe(sass().on('error', sass.logError)) |
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
$items = $order->get_items(); | |
// Loop through ordered items | |
foreach ($items as $item) { | |
$product_name = $item['name']; | |
$product_id = $item['product_id']; | |
$product_variation_id = $item['variation_id']; | |
// Check if product has variation. |