Skip to content

Instantly share code, notes, and snippets.

View TheTrainers's full-sized avatar

Kortnee Wilson TheTrainers

View GitHub Profile
({
events:{
'click .button': '_createMeeting',
},
_createMeeting: function(){
var meeting = app.data.createBean('Meetings');
meeting.set({
// Create its UUID
id: app.utils.generateUUID(),
name: 'Test',
@TheTrainers
TheTrainers / functions.php
Created April 3, 2018 13:19 — forked from eduwass/functions.php
Hide WooCommerce subscriptions text (in product and cart pages) from products with a set Price but no Subscription Fee
// 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;
}