Jetpack Instant Search Wholesale Visibility

/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading

Mobile Dock HTML and JS (by Andrei)

add_action(‘wp_footer’, ‘add_custom_mobile_dock’); function add_custom_mobile_dock() { if (is_cart() || is_checkout()) { return; // Don’t show dock on cart or checkout pages } ?> Начало Меню Търсене ПомощContinue reading

Show Wholesale Prices Text In Single Product Page For Wholesale Role Customers

/** * First Remove The Existing Pricing Filter So That It Will Be Available To All Users */ add_action(‘init’, ‘remove_existing_pricing_html’, 10); function remove_existing_pricing_html() { global $wc_wholesale_prices; remove_filter(‘woocommerce_get_price_html’, [$wc_wholesale_prices->wwp_for_non_wholesale_customer,’add_click_wholesale_price_for_non_wholesale_customers’], 10 ); } /** * Include Pricing HTML for all users */…Continue reading

Convert headings to sentence case

function convert_to_sentence_case($text) { $exceptions = array( ‘API’, ‘URL’, ‘HTML’, ‘CSS’, ‘PHP’, ‘SQL’, ‘XML’, ‘JSON’, ‘HTTP’, ‘HTTPS’, ‘CEO’, ‘CTO’, ‘CFO’, ‘USA’, ‘UK’, ‘EU’, ‘AI’, ‘ML’, ‘IoT’, ‘GPS’, ‘FAQ’, ‘PDF’, ‘SEO’, ‘ROI’, ‘KPI’, ‘B2B’, ‘B2C’, ‘SaaS’, ‘WordPress’, ‘WooCommerce’, ‘jQuery’, ‘JavaScript’, ‘MySQL’, ‘AWS’…Continue reading

PRINT WP POST

add_filter(‘the_content’, function($content) { if (!is_single()) return $content; $button = ‘ Print Post ‘; $pos = strpos($content, ‘ ‘); if ($pos !== false) { return substr_replace($content, $button, $pos + 4, 0); } return $button . $content; });Continue reading