Hide nutrition facts for Tasty Recipes printing
add_filter( ‘tasty_recipes_print_view_buttons’, ‘wpt_hide_nutrition_button’ ); function wpt_hide_nutrition_button( $buttons ) { unset( $buttons[‘nutrition’] ); return $buttons; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘tasty_recipes_print_view_buttons’, ‘wpt_hide_nutrition_button’ ); function wpt_hide_nutrition_button( $buttons ) { unset( $buttons[‘nutrition’] ); return $buttons; }Continue reading
/* Make Product Non Purchasable for Wholesale Customer Iif Product Stock is Less Than X Amount */ add_filter( ‘woocommerce_is_purchasable’, ‘wwpp_limit_purchase_based_on_stock’, 10, 2 ); function wwpp_limit_purchase_based_on_stock( $is_purchasable, $product ) { //Get Product Stock Quantity $product_quantity = $product->get_stock_quantity(); //Get current user’s wholesale…Continue reading
/** * Hide Price & Add to Cart for Non Logged in Users for Specific Products */ function is_non_purchasable_products_for_visitors( $product ) { $not_purchasable_products = array( 23, 22 ); // Replace with Products ID you want to set as non purchasable…Continue reading
/** Removes the “Login with GoDaddy” SSO Integration. **/ add_action( ‘plugins_loaded’, function() { add_filter( ‘wpaas_gd_sso_button_enabled’, ‘__return_false’, 99999999, 1 ); } );Continue reading
document.addEventListener(“contextmenu”, (evt) => { evt.preventDefault(); }, false); document.addEventListener(“copy”, (evt) => { evt.clipboardData.setData(“text/plain”, “You must pay a premium subscription to copy our content”); evt.preventDefault(); }, false);Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { $settings[‘codeEditingEnabled’] = current_user_can( ‘manage_options’ ); return $settings; } );Continue reading
// Prevent search queries. add_action( ‘parse_query’, function ( $query, $error = true ) { if ( is_search() && ! is_admin() ) { $query->is_search = false; $query->query_vars[‘s’] = false; $query->query[‘s’] = false; if ( true === $error ) { $query->is_404 =…Continue reading