Created
November 10, 2022 11:16
-
-
Save wpweb101/284f28dd91e396d0f1e0def5f5e2e90d to your computer and use it in GitHub Desktop.
WooCommerce PDF Voucher - Disable custom background for storefront theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not add this if it's already added in your theme | |
// Remove storefront custom backgroud image which appears on pdf when previewing/downloading | |
function remove_featured_images_from_child_theme() { | |
if( isset( $_GET['post_type'] ) && $_GET['post_type'] == 'woovouchers' ) { | |
remove_theme_support( 'custom-background' ); | |
} | |
} | |
add_action( 'after_setup_theme', 'remove_featured_images_from_child_theme', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment