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( 'wcmo_disable_product_data_tab', '__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
form.cart.variations_form .woocommerce-variation-add-to-cart { | |
display: block !important; | |
} | |
ul.wcdpp-deposit-options-wrapper { | |
list-style: none !important; | |
margin-left: 0 !important; | |
margin-bottom: 2em; | |
padding-left: 0; | |
} | |
ul.wcdpp-deposit-options-wrapper h3 { |
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 | |
/** | |
* Hide products from specific category on shop page | |
* Update line 13 with category slugs to hide | |
*/ | |
function pr_product_query_tax_query( $tax_query, $query ) { | |
if( ! is_shop() ) return $tax_query; | |
$tax_query[] = array( |
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 | |
/** | |
* Hide product category from main query | |
* Update line 17 with the slug of the category to be hidden | |
*/ | |
function pr_product_query( $q ) { | |
if ( ! $q->is_main_query() ) return; | |
if ( ! $q->is_post_type_archive() ) return; |
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
.ptuwc_table_container table thead tr th, .ptuwc_table_container table tbody tr td { | |
padding-top: 16px; | |
padding-bottom: 16px; | |
} |
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 product if user not logged in | |
*/ | |
function pr_demo_is_purchasable( $purchasable, $product ) { | |
if( !is_user_logged_in() ) { | |
return false; | |
} | |
return $purchasable; | |
} |
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 price for non-logged-in users | |
*/ | |
function pr_demo_get_price_html( $price, $product ) { | |
if( !is_user_logged_in() ) { | |
// Add a custom message here to display instead of the price | |
return __( 'Price on application', 'your_textdomain' ); | |
} | |
return $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 | |
/** | |
* Hide products with specific IDs | |
* Edit line 7 with the IDs you want to hide prices for | |
*/ | |
add_filter( ‘woocommerce_get_price_html’, function( $price, $product ) { | |
if( is_admin() ) return $price; | |
$product_ids = array( 1234, 5678 ); | |
if( in_array( $product->get_id(), $product_ids ) ) { | |
return ''; |
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( ‘woocommerce_get_price_html’, function( $price ) { | |
if ( is_admin() ) return $price; | |
return ”; | |
}); | |
add_filter( ‘woocommerce_cart_item_price’, ‘__return_false’ ); | |
add_filter( ‘woocommerce_cart_item_subtotal’, ‘__return_false’ ); |
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( ‘woocommerce_get_price_html’, function( $price ) { | |
if ( is_admin() ) return $price; | |
return ”; | |
}); |
NewerOlder