<?php
/**
 * Enqueue script and styles for child theme
 */
function woodmart_child_enqueue_styles() {
	wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) );
}

// Disable all WordPress core updates
add_filter('automatic_updater_disabled', '__return_true');
add_filter('auto_update_core', '__return_false');
add_filter('pre_site_transient_update_core', '__return_null');
add_filter('pre_site_transient_update_plugins', '__return_null');
add_filter('pre_site_transient_update_themes', '__return_null');
 
// Disable plugin updates
remove_action('load-update-core.php', 'wp_update_plugins');
add_filter('pre_site_transient_update_plugins', '__return_null');
 
// Disable plugin update checks
add_action('admin_init', function() {
    remove_action('admin_init', '_maybe_update_plugins');
    remove_action('wp_update_plugins', 'wp_update_plugins');
    remove_action('load-plugins.php', 'wp_update_plugins');
});
 
// Disable theme updates
remove_action('load-update-core.php', 'wp_update_themes');
add_filter('pre_site_transient_update_themes', '__return_null');
 
// Disable theme update checks
add_action('admin_init', function() {
    remove_action('admin_init', '_maybe_update_themes');
    remove_action('wp_update_themes', 'wp_update_themes');
    remove_action('load-themes.php', 'wp_update_themes');
});
 
// Disable all automatic updates
add_filter('automatic_updater_disabled', '__return_true');
 
// Disable update notifications
add_filter('admin_init', function() {
    remove_action('admin_notices', 'update_nag', 3);
});