Date: 2 Feb 2017
Laravel version: 5.1.0
Guide assumes that you have installed Homestead following official guide,
and have the homesteadcommand alias:
| version: '3' | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: | |
| MYSQL_ROOT_PASSWORD: somewordpress |
Date: 2 Feb 2017
Laravel version: 5.1.0
Guide assumes that you have installed Homestead following official guide,
and have the homesteadcommand alias:
| <?php | |
| // Allow Weaker passwords | |
| add_filter( 'woocommerce_min_password_strength', 'uh_oh_weakpasswords' ); | |
| function uh_oh_weakpasswords() { | |
| return 1; | |
| } |
| <?php | |
| /** | |
| * Checks if the cart contains a product bundle | |
| * @return [bool] | |
| */ | |
| function cart_contains_product_bundle(){ | |
| global $woocommerce; | |
| $contains_product_bundle = false; | |
| if ( sizeof( WC()->cart->get_cart() ) > 0 ) { | |
| // if cart has items |
| /* | |
| * Skeleton V2.0.4 (Customised Grid Only) | |
| * Sass Version by Seth Coelen https://github.com/whatsnewsaes | |
| * | |
| * Customised by Edu Wass | |
| * Includes: | |
| * - breakpoint variables | |
| * - offset classes | |
| * - push/pull classes | |
| * - visibilty classes |
| // Define which products we should hide the subscription text for | |
| function should_hide_subscription_text($product){ | |
| $is_subscription = (get_class($product) == 'WC_Product_Variable_Subscription'); | |
| $has_price = (intval($product->subscription_price)>0); | |
| $has_fee = (intval($product->subscription_sign_up_fee)>0); | |
| if($is_subscription && $has_price && !$has_fee){ | |
| return true; | |
| } else { | |
| return false; | |
| } |
| //////////////////////////////////////////////////////////////////// | |
| // Run: 'gulp download-db' to get latest SQL dump from production // | |
| // File will be put under the 'dumps' folder // | |
| //////////////////////////////////////////////////////////////////// | |
| // Load stuff | |
| 'use strict' | |
| var gulp = require('gulp') | |
| var GulpSSH = require('gulp-ssh') | |
| var fs = require('fs'); |
| #!/bin/bash | |
| # This script will automatically set up a single node Flynn Cluster on your linux box | |
| # Fresh Flynn install with domain provided by the xip.io service | |
| # Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet | |
| # @date 16 Nov 2015 | |
| # @author Edu Wass (eduwass at gmail com) | |
| echo '---- START SETUP ----' |