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 wc_ninja_remove_password_strength() { | |
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
} | |
add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 ); | |
add_filter( 'woocommerce_min_password_strength', create_function( '', 'return 1;' ) ); | |
add_action( 'wp_enqueue_scripts', 'my_strength_meter_localize_script' ); |
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_get_availability', 'wcs_custom_get_availability', 1, 2); | |
function wcs_custom_get_availability( $availability, $_product ) { | |
// Change Out of Stock Text | |
if ( ! $_product->is_in_stock() ) { | |
$availability['availability'] = __('<b>SOLD OUT!</b><BR><BR> | |
<font color=#007a00;> </font>', 'woocommerce'); | |
} | |
return $availability; |
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
// hide coupon field on cart page. | |
function hide_coupon_field_on_cart( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field_on_cart' ); |
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_single_product_summary','flatsome_sale_flash_custom',21); | |
function flatsome_sale_flash_custom(){ | |
do_action('flatsome_sale_flash'); | |
} |
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
//* change product excerpt and add to cart order in the single product page *// | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); | |
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 50 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); | |
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 20 ); | |
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 iconic_wc_ajax_variation_threshold( $qty, $product ) { | |
return 50; | |
} | |
add_filter( 'woocommerce_ajax_variation_threshold', 'iconic_wc_ajax_variation_threshold', 10, 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
/** | |
* @snippet Add Billing First_name to Email Receipt | |
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 | |
* @sourcecode https://businessbloomer.com/?p=19870 | |
* @author Rodolfo Melogli | |
* @testedwith WooCommerce 2.5.2 | |
*/ | |
add_filter('woocommerce_email_subject_customer_processing_order', 'bbloomer_change_processing_email_subject', 10, 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
function custom_guaven_js(){ | |
?> | |
<script> | |
jQuery(window).scroll(function(){ | |
var guaven_woos_offset = jQuery('.header-search-form-wrapper [name="s"]').offset(); | |
jQuery(".guaven_woos_suggestion").css('left', guaven_woos_offset.left); | |
jQuery(".guaven_woos_suggestion").css('top', guaven_woos_offset.top + parseFloat(jQuery('.header-search-form-wrapper [name="s"]').outerHeight())); | |
}); | |
</script> | |
<?php |
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
+ // only copy this line if needed | |
+/** | |
+ * Remove "View Invoice" link from customer emails | |
+ * or change HTML of the original link button in "View Order" page from "My Account" | |
+ * | |
+ * @param string $button The button HTML | |
+ * @param string $action The current context where the link button is produced ('send_email' or 'print') | |
+ * @return string HTML | |
+ */ | |
+function sv_pip_view_invoice_button_html( $button, $action ) { |
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( 'wc_order_is_editable', 'wc_make_processing_orders_editable', 10, 2 ); | |
function wc_make_processing_orders_editable( $is_editable, $order ) { | |
if ( $order->get_status() == 'processing' ) { | |
$is_editable = true; | |
} | |
return $is_editable; | |
} |
NewerOlder