Type: php
Smart-Buttons und Zahlungsbereich ausblenden, wenn der Warenkorb leer ist (Funktioniert auf Desktop & Mobile mit Woo/FunnelKit Checkout)
/** * Smart-Buttons und Zahlungsbereich ausblenden, wenn der Warenkorb leer ist * Funktioniert auf Desktop & Mobile mit Woo/FunnelKit Checkout */ add_action(‘woocommerce_checkout_before_customer_details’, function () { if ( function_exists(‘WC’) && WC()->cart ) { printf( ‘‘, WC()->cart->get_cart_contents_count() ); } }); add_filter(‘woocommerce_update_order_review_fragments’, function…Continue reading
WooCommerce Warenkorb überspringen
function skip_to_checkout_on_add_to_cart($url) { return wc_get_checkout_url(); } add_filter(‘woocommerce_add_to_cart_redirect’, ‘skip_to_checkout_on_add_to_cart’);Continue reading
Hinweis zur Aktualisierung des Warenkorbs entfernen
add_filter( ‘woocommerce_cart_updated_notice_type’, ‘__return_false’ );Continue reading
Nachricht “Artikel wurde deinem Warenkorb hinzugefügt” in WooCommerce entfernen
add_filter( ‘wc_add_to_cart_message_html’, ‘__return_false’ );Continue reading
Anzahl der Revisionen begrenzen
add_filter( ‘wp_revisions_to_keep’, function( $limit ) { // Limit to the last 5 revisions. Change 5 to whatever limit you want. return 5; } );Continue reading
Tooltip Fade Navi
add_action( ‘wp_footer’, function() { ?>Continue reading
Update Product Preview Image after First Variant Attribute Selection
/** * Partial variation image preview (Avada‑friendly, ES5) * Loads after wc-add-to-cart-variation and only on single product pages. */ add_action(‘wp_enqueue_scripts’, function () { if (!is_product()) { return; } // Ensure Woo’s variation script is present. wp_enqueue_script(‘wc-add-to-cart-variation’); // Use NOWDOC so…Continue reading
Replace The WordPress Logo on Login Page with your own logo (copy)
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://qcs-ghana.stromstadafroshop.se/wp-content/uploads/2024/04/logo-email-header.webp’; $logo_width = 100; $logo_height = 100; printf( ‘.login h1 a {background-image:url(%1$s) !important; margin:0…Continue reading
Allow SVG Files Upload (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading