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 // only copy this line if needed | |
add_filter( 'send_password_change_email', '__return_false' ); | |
add_filter( 'send_email_change_email', '__return_false' ); |
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 // only copy this line if needed | |
function sv_wc_customer_order_csv_auto_export_subscriptions_renewals_only( $order_ids ) { | |
if ( defined( 'DOING_CRON' ) && DOING_CRON && function_exists( 'wcs_order_contains_subscription' ) ) { | |
$subscriptions = $renewals = array(); | |
$subscriptions = array_filter( $order_ids, 'wcs_order_contains_subscription' ); | |
$renewals = array_filter( $order_ids, 'wcs_order_contains_renewal' ); |
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 //only copy this line if needed | |
// WPML WooCommerce Multilingual compatability with PDF Product Vouchers | |
function sv_wc_pdf_product_vouchers_wc_multilingual_duplicate_exception( $exclude, $cart_item ) { | |
if ( isset( $cart_item[ 'voucher_id' ] ) ) { | |
$exclude = true; | |
} | |
return $exclude; |
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 // only copy this line if needed | |
// WPML WooCommerce Multilingual compatability with Measurement Price Calculator | |
function sv_wc_mpc_woocommerce_multilingual_duplicate_exception( $exclude, $cart_item ) { | |
if ( isset( $cart_item[ 'pricing_item_meta_data' ] ) ) { | |
$exclude = true; | |
} | |
return $exclude; |
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 // only copy this line if needed | |
function sv_mpc_measurement_label( $label ) { | |
if ( 'fr_FR' === get_locale() ) { | |
$label = str_replace( 'Required Width', 'Largeur requise', $label ); | |
$label = str_replace( 'Width', 'Largeur', $label ); | |
} | |
return $label; |
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
function sv_wc_shipwire_remove_notice( $message ) { | |
$shipwire_notices = array( | |
'Please enter your country to see available shipping rates.', | |
'Please enter your ZIP Code to see available shipping rates.', | |
); | |
if ( in_array( $message, $shipwire_notices ) ) { | |
$message = ''; | |
} |
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 | |
function wc_tab_manager_product_tabs_hide_books_tab( $tabs ) { | |
global $product; | |
// + check if we are on the product page before removing the tab so that the | |
// tab still displays in the admin | |
// + change some_condition() to a function/variable which returns true if the | |
// product should be displayed | |
// + "unique-tab-name" is uniquely generated by Tab Manager and can be found by | |
// inspecting the source on a product page and finding the HTML which outputs |
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
function sv_wc_measurement_price_calculator_amount_needed() { | |
wc_enqueue_js( ' | |
$( "input.amount_needed" ).attr( { "step" : "0.1", "type" : "number" } ); | |
' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'sv_wc_measurement_price_calculator_amount_needed' ); |