docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q -f dangling=true)
// 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; | |
} |
/* | |
* 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 |
<?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 |
<?php | |
// Allow Weaker passwords | |
add_filter( 'woocommerce_min_password_strength', 'uh_oh_weakpasswords' ); | |
function uh_oh_weakpasswords() { | |
return 1; | |
} |
Date: 2 Feb 2017
Laravel version: 5.1.0
Guide assumes that you have installed Homestead following official guide,
and have the homestead
command alias:
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |
<?php | |
class FitmetrixAPI{ | |
private $base_url; | |
private $encoded_auth; | |
private $facility_location_id; | |
public function __construct($token, $token_key, $facility_location_id){ | |
$this->base_url = 'https://api.fitmetrix.io/api/'; |
setInterval(function(){ | |
botao = jQuery('#smush-box-meta-boxes-bulk > div.sui-box-body > div.wp-smush-bulk-wrapper > button'); | |
if( botao.attr('disabled') != 'disabled' ) { | |
botao.trigger('click'); | |
} | |
}, 1000); |