This file contains 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
$variable_pricing = get_post_meta(get_the_ID(), '_variable_pricing', true); | |
if($variable_pricing) { | |
// echo edd_get_highest_price_option(get_the_ID()); | |
// echo edd_get_lowest_price_option(get_the_ID()); | |
// echo edd_price_range(get_the_ID()); | |
//Display default variation price | |
// $prices = edd_get_variable_prices(get_the_ID()); | |
// $price_id = get_post_meta( get_the_ID(), '_edd_default_price_id', true ); | |
// if(isset($prices[$price_id])) { |
This file contains 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
wp.customize( 'features_items', function( value ) { | |
value.bind( function( to ) { | |
//Clear div | |
$('#features .right_content').empty(); | |
//Decode content | |
to = JSON.parse(decodeURIComponent(to.replace(/%2F/g, " "))); | |
//Create array |
This file contains 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
<?php | |
// Add Variation Settings | |
add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 ); | |
// Save Variation Settings | |
add_action( 'woocommerce_save_product_variation', 'save_variation_settings_fields', 10, 2 ); | |
/** | |
* Create new fields for variations |
This file contains 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
# Virtual Hosts | |
# | |
# Required modules: mod_log_config | |
# If you want to maintain multiple domains/hostnames on your | |
# machine you can setup VirtualHost containers for them. Most configurations | |
# use only name-based virtual hosts so the server doesn't need to worry about | |
# IP addresses. This is indicated by the asterisks in the directives below. | |
# | |
# Please see the documentation at |
This file contains 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
# Copyright (c) 1993-2009 Microsoft Corp. | |
# | |
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows. | |
# | |
# This file contains the mappings of IP addresses to host names. Each | |
# entry should be kept on an individual line. The IP address should | |
# be placed in the first column followed by the corresponding host name. | |
# The IP address and the host name should be separated by at least one | |
# space. | |
# |
This file contains 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
add_filter('woocommerce_available_variation', , 10, 3); | |
function woocommerce_Variable_same_price($value, $object = null, $variation = null) { | |
if ($value['price_html'] == '') { | |
$value['price_html'] = '<span class="price">' . $variation->get_price_html() . '</span>'; | |
} | |
return $value; | |
} |
This file contains 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
add_filter( 'woocommerce_ajax_variation_threshold', 'woocommerce_ajax_variation_threshold', 10, 2 ); | |
function woocommerce_ajax_variation_threshold( $qty, $product ) { | |
return 10000; | |
} |
This file contains 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
function get_pages_by_template($template, $count = 1) { | |
$pages = get_pages(array( | |
'meta_key' => '_wp_page_template', | |
'meta_value' => $template, | |
'number' => $count | |
)); | |
$return = array(); | |
foreach($pages as $page){ |
This file contains 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
//Shop page URL | |
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) ); | |
//My Account URL | |
$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); | |
if ( $myaccount_page_id ) { | |
$myaccount_page_url = get_permalink( $myaccount_page_id ); | |
} | |
//Cart URL |
This file contains 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
/** | |
* Get text domain | |
*/ | |
if(!function_exists('get_textdomain')) { | |
function get_textdomain() { | |
$default_headers = array( 'td' => 'Text Domain'); | |
$text_domain = get_file_data(get_stylesheet_uri(), $default_headers ); | |
if(array_key_exists('td', $text_domain)) { | |
return $text_domain['td']; |