Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
s Add ssh fingerprint and enter password provided in email
# Code to make sure WooCommerce Subscription URL does not update during a Search and Replace script. | |
# Add to your themes functions.php file | |
# Replace https://example.com with your live URL | |
if (class_exists('WC_Subscriptions')) { | |
function wc_subs_live_url() { | |
update_option( 'wc_subscriptions_siteurl', 'https://example.com' ); | |
} | |
add_action('init', 'wc_subs_live_url'); | |
} |
/** | |
* Gutenburg Default Colors | |
*/ | |
add_theme_support( 'editor-color-palette', array( | |
array( | |
'name' => __( 'Ecru', 'custom_colors' ), | |
'slug' => 'ecru', | |
'color' => '#BCAF83', | |
), | |
array( |
function mdt_woo_pricing_rules() { | |
global $post; | |
$pricing_rule_sets = apply_filters( 'dynamic_pricing_product_rules', get_post_meta( $post->ID, '_pricing_rules', true ) ); | |
if ( ! is_array( $pricing_rule_sets ) ) { | |
return [ ]; | |
} | |
$product = new WC_Product(get_the_ID()); | |
$price = $product->get_price(); |
# Greating when starting terminal | |
function fish_greeting | |
set_color green | |
echo -n "Welcome, Michael." | |
end | |
# fish git prompt | |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' | |
set __fish_git_prompt_showupstream 'yes' |
add_action( 'woocommerce_before_calculate_totals', 'add_custom_price' ); | |
function add_custom_price( $cart_object ) { | |
foreach ( $cart_object->cart_contents as $key => $value ) { | |
$addons = $value['addons']; | |
$add_to_price = 0; | |
foreach($addons as $addon) { | |
$add_to_price .= $addon['price']; |
// Set default value to 0 for Custom price input | |
jQuery(document).ready(function(){ | |
jQuery('.addon-custom-price').val("0"); | |
}); |
// Check the name of your addon field in the source. Example: addon-7934-test-addon | |
jQuery( "input[name='addon-7934-test-addon']" ).datepicker( { | |
minDate: 0, | |
"dateFormat": 'yy-mm-dd' | |
} ); |
function hide_nrelate_from_posts($load_nrelate) { | |
if ( is_woocommerce() ) { | |
$load_nrelate = false; | |
} | |
return $load_nrelate; | |
} | |
add_filter('nrelate_related_is_loading', 'hide_nrelate_from_posts'); |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
s Add ssh fingerprint and enter password provided in email