This file contains hidden or 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
/* I now pronounce you AUTOCOMPLETED. You may take your money! */ | |
add_filter( 'woocommerce_payment_complete_order_status', 'steve_got_hitched_so_autocomplete_virtual_orders', 10, 2 ); | |
function steve_got_hitched_so_autocomplete_virtual_orders( $order_status, $order_id ) { | |
$order = wc_get_order( $order_id ); | |
if ('processing' == $order_status && ('on-hold' == $order->status || 'pending' == $order->status || 'failed' == $order->status)) { | |
$virtual_order = ''; |
This file contains hidden or 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
/* Marco, add all this to your child theme's functions.php file */ | |
/* Bye Emoji :-( */ | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
/* ...so sad */ | |
/* Lets really optimize this js hooplah */ |
This file contains hidden or 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
/* Howdy Paris! Add this to your child functions.php file and it should remove the additional variation number */ | |
function paris_custom_variation_price( $price, $product ) { | |
$target_product_types = array( | |
'variable' | |
); | |
if ( in_array ( $product->product_type, $target_product_types ) ) { | |
// if variable product return and empty string | |
return ''; | |
} |
This file contains hidden or 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
/* Howdy Steve. See down there where it says 250%? Add this code to your child style.css file */ | |
/* Once you've got this code added, change that number to whatever percentage you think looks good */ | |
.site-header .site-branding img, .site-header .site-logo-anchor img, .site-header .site-logo-link img { | |
height: auto; | |
max-width: 250%; | |
max-height: none; | |
} | |
/* End Custom Logo Size */ |
This file contains hidden or 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_action( 'woocommerce_cart_actions', 'move_proceed_button' ); | |
function move_proceed_button( $checkout ) { | |
echo '<a href="' . esc_url( WC()->cart->get_checkout_url() ) . '" class="checkout-button button alt wc-forward" >' . __( 'Proceed to Checkout', 'woocommerce' ) . '</a>'; | |
} |
This file contains hidden or 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_action( 'woocommerce_before_cart', 'move_proceed_button' ); | |
function move_proceed_button( $checkout ) { | |
echo '<a href="' . esc_url( WC()->cart->get_checkout_url() ) . '" class="checkout-button button alt wc-forward" >' . __( 'Proceed to Checkout', 'woocommerce' ) . '</a>'; | |
} |
This file contains hidden or 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_shipping_methods','remove_flat_over_twelve',10,1); | |
function remove_flat_over_twelve( $available_methods ) { | |
global $woocommerce; | |
$minimum_flat_rate_quantity = 12; | |
if ( $woocommerce->cart->get_cart_contents_count() >= $minimum_flat_rate_quantity ) { | |
// remove flat_rate shipping | |
unset($available_methods['flat_rate']); | |
} | |
return $available_methods; |
This file contains hidden or 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 | |
/** | |
* Plugin Name: Postcode Shipping | |
* Description: This plugin allows you to set a flat shipping rate per country or state or postcode per Quantity/Order on WooCommerce. | |
* Version: 2.1.2 |
This file contains hidden or 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 | |
//======================================================= | |
// Custom Add to Cart Buttons | |
//======================================================= | |
// Display Fields | |
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' ); | |
// Save Fields | |
add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' ); |