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
add_action( ‘admin_init’, function() { // remove the color scheme picker remove_action( ‘admin_color_scheme_picker’, ‘admin_color_scheme_picker’ ); // force all users to use the “Ectoplasm” color scheme add_filter( ‘get_user_option_admin_color’, function() { return ‘nwwp’; }); });Continue reading
add_action( ‘admin_menu’, ‘aioseo_hide_search_stats_menu’, 99999 ); function aioseo_hide_search_stats_menu() { global $submenu; if ( ! isset( $submenu[‘index.php’] ) ) { return; } foreach ( $submenu[‘index.php’] as $index => $props ) { if ( ! empty( $props[2] ) && admin_url( ‘/admin.php?page=aioseo-search-statistics’ ) ===…Continue reading