Untitled Snippet

add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); add_filter( ‘woocommerce_product_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); function saphie_custom_add_to_cart_text() { return ‘ADD TO BAG’; }Continue reading

Allow SVG/JPEG/WEBP/ICO/AVIF Files Upload

function allow_additional_mime_types($mime_types) { $mime_types[‘jpeg’] = ‘image/jpeg’; $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘avif’] = ‘image/avif’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading

Fluent Forms embed endpoint for Astro

/** * Fluent Forms embed endpoint for Astro * * Test first: * https://connect.carfit-hamburg.de/?ff_embed=1&form_id=11 * * Then test pretty URL: * https://connect.carfit-hamburg.de/ff-embed/?form_id=11 */ add_action(‘init’, function () { add_rewrite_tag(‘%ff_embed%’, ‘([^&]+)’); add_rewrite_rule(‘^ff-embed/?$’, ‘index.php?ff_embed=1’, ‘top’); }); add_filter(‘query_vars’, function ($vars) { $vars[] = ‘ff_embed’;…Continue reading