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_action( 'woocommerce_email_after_order_table', 'custom_email_after_order_table', 10, 4 ); | |
function custom_email_after_order_table($order, $sent_to_admin, $plain_text, $email) { | |
if( $order->get_payment_method() === 'bacs') { | |
$bacs_info = get_option('woocommerce_bacs_accounts'); | |
if ($bacs_info) : foreach ($bacs_info as $account) : | |
$account_name = esc_attr(wp_unslash($account['account_name'])); | |
$bank_name = esc_attr(wp_unslash($account['bank_name'])); | |
$account_number = esc_attr($account['account_number']); | |
$sort_code = esc_attr($account['sort_code']); |
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
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); | |
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering',30 ); |
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 childtheme_no_emails( &$phpmailer ) { | |
// Empty out the values that may be set | |
$phpmailer->ClearAllRecipients(); | |
$phpmailer->ClearAttachments(); | |
$phpmailer->ClearCustomHeaders(); | |
$phpmailer->ClearReplyTos(); | |
} | |
add_action( 'phpmailer_init', 'childtheme_no_emails', 99, 1 ); |
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 // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_action( 'after_setup_theme', 'wc_remove_frame_options_header', 11 ); | |
/** | |
* Allow rendering of checkout and account pages in iframes. | |
*/ |
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
/** | |
* @param array $contents | |
* @param bool $overwrite | |
* @return bool | |
*/ | |
public function create_zip($contents = array(), $overwrite = false) { | |
$zip_filename = Shopware()->DocPath() . "files/documents" . "/jett_mce_support_".time().".zip"; | |
if (file_exists($zip_filename) && !$overwrite) { return false; } |
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 iconic_variable_price_format( $price, $product ) { | |
$prefix = sprintf('%s: ', __('From', 'iconic')); | |
$min_price_regular = $product->get_variation_regular_price( 'min', true ); | |
$min_price_sale = $product->get_variation_sale_price( 'min', true ); | |
$max_price = $product->get_variation_price( 'max', true ); | |
$min_price = $product->get_variation_price( 'min', true ); | |
$price = ( $min_price_sale == $min_price_regular ) ? |
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 child_remove_parent_function() { | |
remove_action( 'woocommerce_single_product_summary', 'sf_product_share', 45); | |
} | |
add_action( 'wp_loaded', 'child_remove_parent_function' ); |
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 custom_dequeue() { | |
wp_dequeue_style('default_body_font'); | |
wp_deregister_style('default_body_font'); | |
wp_dequeue_style('default_heading_font'); | |
wp_deregister_style('default_heading_font'); | |
} | |
add_action( 'wp_print_styles', 'custom_dequeue', 100 ); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
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 free_shipping_cart_notice_zones() { | |
global $woocommerce; | |
// Get Free Shipping Methods for Rest of the World Zone & populate array $min_amounts | |
$default_zone = new WC_Shipping_Zone(0); | |
$default_methods = $default_zone->get_shipping_methods(); | |
foreach( $default_methods as $key => $value ) { | |
if ( $value->id === "free_shipping" ) { |
NewerOlder