/** * Extend native WordPress shortcode block with live preview */ if ( ! defined( ‘ABSPATH’ ) ) exit; class Enhanced_Shortcode_Block { public function __construct() { add_action( ‘enqueue_block_editor_assets’, array( $this, ‘enqueue_assets’ ) ); // Ensure shortcodes work in other blocks…Continue reading
/** * 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
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
add_filter( ‘woocommerce_cart_updated_notice_type’, ‘__return_false’ );Continue reading
add_filter( ‘wc_add_to_cart_message_html’, ‘__return_false’ );Continue reading
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
add_action( ‘wp_footer’, function() { ?>Continue reading
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 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
/** * 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