View wcraq_add_cart_item_data.php
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 cart item data. | |
* | |
* @param Array $cart_item_data Cart item meta data. | |
* @param Integer $product_id Product ID. | |
* @param Boolean $variation_id Variation ID. | |
* | |
* @return Array | |
*/ |
View oliver_get_bookings_for_tomorrow.php
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 | |
/** | |
* Get all bookings scheduled for tomorrow | |
*/ | |
function oliver_get_bookings_for_tomorrow() { | |
// Get tomorrow's date | |
$tomorrow = date( 'Y-m-j', strtotime('tomorrow') ); | |
$args = array( |
View number.css
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
/* Set number field to 100% width */ | |
.pewc-style-simple .pewc-item input[type=number] { | |
width: 100% !important; | |
max-width: 100%; | |
} |
View wcmmqo_add_to_cart_validation.php
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 | |
/** | |
* Disable add to cart validation for min/max | |
*/ | |
function prefix_remove_wcmmqo_add_to_cart_validation() { | |
remove_filter( 'woocommerce_add_to_cart_validation', 'wcmmqo_add_to_cart_validation', 10, 5 ); | |
} | |
add_action( 'init', 'prefix_remove_wcmmqo_add_to_cart_validation'); |
View wcbvp-sticky-table-headers.css
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
.wcbvp-scrollable { | |
height: 500px; | |
} | |
.woocommerce div.product form.cart table { | |
border-width: 0 0 1px; | |
position: relative; | |
} | |
.wcbvp-table-wrapper thead th { | |
position: sticky; | |
top: 0; |
View ptuwc_field_price_html.php
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 price in Product Table Ultimate | |
*/ | |
function prefix_field_price_html( $price_html, $product, $args ) { | |
$price = $product->get_price(); // Just the numerical price, e.g. 4.50 | |
$price_html = wc_price( $price ); // The price formatted with currency, e.g. $4.50 | |
return $price_html; | |
} | |
add_filter( 'ptuwc_field_price_html', 'prefix_field_price_html', 10, 3 ); |
View prefix_custom_fonts.php
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
/** | |
* Hide duplicate metadata in order screen | |
*/ | |
function prefix_custom_fonts() { | |
echo '<style> | |
table.display_meta { | |
display: none | |
} | |
</style>'; | |
} |
View wcmo_disable_new_registration_email.php
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 | |
/** | |
* Disable new registration emails | |
*/ | |
add_filter( 'wcmo_disable_new_registration_email', '__return_true' ); |
View wcbvp_enable_variations_grid.php
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 | |
/** | |
* Role-based check for grid view | |
*/ | |
function prefix_enable_grid_for_roles( $enable, $product_id ) { | |
$permitted_roles = array( 'administrator' ); | |
if( is_user_logged_in() ) { |
View prefix_update_time_field.php
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 | |
/** | |
* JS function to dynamically remove options from an add-ons select field | |
* Update the field ID of your add-ons select field in line 12 below | |
*/ | |
function prefix_update_time_field() { | |
?> | |
<script> | |
jQuery( document ).ready( function( $ ) { |
NewerOlder