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 | |
/** | |
* Filter the 'Product tags' placeholder | |
*/ | |
function prefix_ptuwc_taxonomy_label( $label, $filterable_column ) { | |
if( $filterable_column == 'product_tag' ) { | |
$label = 'My new placeholder'; | |
} | |
return $label; | |
} |
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 | |
/** | |
* Display a single calendar | |
* Only for use with single day bookings | |
*/ | |
function prefix_auto_set_end( $auto, $product_id ) { | |
return 'yes'; | |
} | |
add_filter( 'bfwc_auto_set_end', 'prefix_auto_set_end', 10, 2 ); |
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 | |
/** | |
* Find which category is protected by a given password | |
* @return term_id | |
*/ | |
function prefix_get_product_category_by_password( $password ) { | |
$terms = get_terms( array( | |
'taxonomy' => 'product_cat' | |
) ); | |
if( $terms ) { |
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 | |
/** | |
* Prevent products with add-ons that don't add cost from updating the product price in the cart | |
* Fixes a compatibility issue with Aelia Currency Switcher with products with set prices in alt currencies | |
*/ | |
add_filter( 'pewc_ignore_price_with_extras', '__return_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 | |
/** | |
* Filter the quantity input field classes in Better Variations grid | |
*/ | |
function prefix_quantity_input_classes( $classes, $product ) { | |
$classes = 'wcbvp-grid-quantity-field qty'; | |
return $classes; | |
} | |
add_filter( 'wcbvp_quantity_input_classes', 'prefix_quantity_input_classes', 10, 2 ); |
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 | |
/** | |
* Filter the h4 tag | |
*/ | |
function prefix_field_label_tag( $tag, $item ) { | |
return 'h4'; // Change your tag here | |
} | |
add_filter( 'pewc_field_label_tag', 'prefix_field_label_tag', 100, 2 ); |
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 | |
/** | |
* Filter heading tag for group headings | |
*/ | |
function prefix_filter_group_title( $title, $group, $group_id ) { | |
$group_title = pewc_get_group_title( $group_id, $group, true ); | |
return sprintf( '<h3>%s</h3>', esc_html( $group_title ) ); // Change your tags here | |
} | |
add_filter( 'pewc_filter_group_title', 'prefix_filter_group_title', 10, 3 ); |
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
.qty-discounted-price { | |
display: inline-block !important; | |
width: 30% !important; | |
position: absolute !important; | |
right: 80px !important; | |
} | |
.qty-percent-savings { | |
position: absolute !important; | |
right: 0 !important; | |
color: green !important; |
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 | |
/** | |
* Apply part payment before tax | |
*/ | |
add_filter( 'wcdpp_apply_part_payment_before_tax', '__return_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 | |
/** | |
* Filter global role-based discounts | |
*/ | |
function prefix_role_pricing_rules( $rules, $product=false ) { | |
if( ! $product ) { | |
return $rules; | |
} | |