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 Write if its not already open | |
add_filter( 'woo_include_recaptcha_script', 'woo_recaptcha_include_script' ); | |
function woo_recaptcha_include_script( $include ) { | |
return $include = true; | |
} |
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 | |
// To change error message: | |
// The minimum allowed quantity for ABC is 5 (you currently have x in your cart). | |
add_filter('woo_min_allowed_product_qty_err', 'woo_min_allowed_product_qty_err_message', 10, 4 ); | |
function woo_min_allowed_product_qty_err_message( $err_msg, $_product, $minimum_quantity, $in_cart ) { | |
$err_msg = __( 'Your message here', 'woo_min_max_quantities' ); | |
return $err_msg; |
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_filter('woo_gatway_df_amount', 'woo_amount_to_99_cents' ); | |
function woo_amount_to_99_cents( $amount ) { | |
$amount = number_format( round( $amount, 0 ) - 0.01, 2 ); // round to 99 cents | |
return $amount; | |
} |