I don’t use “blocks”, is there any way to remove the inline CSS?

[ad_1]

Hey @sho-down

There are 2 options you have.

1) Disable the EDD blocks entirely just as If your WordPress setup does not support them:


/**
 * Fully disable EDD blocks.
 */
add_action( 'plugins_loaded', 'eddwp_disable_blocks', 499 );
function eddwp_disable_blocks() {
	remove_action( 'plugins_loaded', 'EDD\Blocks\init_core_blocks', 500 );
}

2) Disable just the Blocks Styles:


/**
 * Disable Just EDD blocks CSS.
 */
add_action( 'enqueue_block_assets', 'eddwp_disable_block_styles', 9 );
function eddwp_disable_block_styles() {
	remove_action( 'enqueue_block_assets', 'EDD\Blocks\Styles\add_to_global_styles' );
	remove_filter( 'edd_button_color_class', 'EDD\Blocks\Styles\update_button_color_class' );
}

You can add that to your theme’s functions.php or as a custom plugin.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer