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 custom fonts to add-on headings **/ | |
.pewc-group-heading-wrapper h3, .pewc-input-wrapper, p.pewc-description { | |
font-family: "quincy-cf", sans-serif !important; | |
} | |
.pewc-field-label { | |
overflow: hidden; | |
font-family: 'quincy-cf', sans-serif !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 | |
function prefix_role_expiration_date( $expires, $role, $user_id ) { | |
$today = strtotime( 'today' ); | |
$expire = strtotime( "31 December " . ( getdate($today)['year'] + 1 ) ); | |
// Specify the role you want to target - change text here | |
$target_role = 'your_target_role'; | |
// Check if the user has the target role |
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 | |
if (!empty($brands[0])) { | |
$brand = $brands[0]; | |
$brand_id = $brand->term_id; | |
// Let's check if the brand applies | |
if (!empty($discounts_by_brand[$brand_id]) && isset($roles[0])) { | |
$user_role = $roles[0]; | |
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 | |
// Always round up dynamic pricing discounts | |
function custom_price_rounding($price) { | |
return ceil($price); | |
} | |
add_filter('wcfad_adjusted_price', 'custom_price_rounding'); |
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 | |
function modify_price_with_jquery() { | |
// Add custom jQuery code | |
wp_add_inline_script('jquery-core', ' | |
jQuery(document).ready(function($) { | |
$(".ptuwc-price").text("Our Price"); | |
}); | |
'); | |
} |
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 | |
function my_prefix_pewc_get_permitted_mimes( $permitted_mimes ) { | |
// Add list of permitted mime types | |
$permitted_mimes['pdf'] = "application/pdf"; | |
$permitted_mimes['ai'] = "application/adobe.illustrator"; | |
$permitted_mimes['eps'] = "application/postscript"; | |
// Remove gif file type from being supported |
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
.col-add-to-cart a.product_type_variable.add_to_cart_button { | |
width: auto !important; | |
color: #fff !important; | |
} | |
.col-add-to-cart .shopengine-quickview-trigger.se-btn { | |
display: none; | |
} | |
.woocommerce div.product p.stock { | |
font-weight: inherit !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 | |
function optional_quote_fields( $fields ) { | |
/** Make fields not required **/ | |
$fields['phone']['required'] = false; | |
$fields['email']['required'] = false; | |
return $fields; |
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 | |
/** Don't round discounts prices - instead 2 decimal places **/ | |
function custom_adjusted_price( $adjusted_price ) { | |
$formatted_price = number_format( $adjusted_price, 2, '.', '' ); | |
return $formatted_price; | |
} |
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
.pewc-radio-image-wrapper label input[type=radio], .pewc-checkbox-image-wrapper label input[type=checkbox] { | |
visibility: initial; | |
} | |
.pewc-preset-style .pewc-item-field-wrapper input[type="checkbox"], .pewc-preset-style input[type="checkbox"].pewc-checkbox-form-field{ | |
opacity: 1; | |
height: 10px; | |
position: relative; | |
} |