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

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

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Completely Disable Comments (copy) (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

FC – Permitir subidas SVG

// Permitir subida de SVG en la biblioteca de medios add_filter(‘upload_mimes’, function ($mimes) { $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘svgz’] = ‘image/svg+xml’; return $mimes; });Continue reading

Outseta Subdomain Backend Checker

add_action(‘wp_ajax_check_subdomain’, ‘check_subdomain_handler’); add_action(‘wp_ajax_nopriv_check_subdomain’, ‘check_subdomain_handler’); add_action(‘rest_api_init’, function () { register_rest_route(‘custom/v1’, ‘/trigger-deploy’, [ ‘methods’ => ‘POST’, ‘callback’ => ‘rmm_trigger_deploy’, ‘permission_callback’ => ‘__return_true’, // Replace with real auth in production ]); }); error_log(“✅ check_subdomain_handler called: ” . date(‘c’)); function rmm_trigger_deploy($request) { $params =…Continue reading