Home / eCommerce / Disable the “grab image” setting for Divi on checkout
Duplicate Snippet

Embed Snippet on Your Site

Disable the “grab image” setting for Divi on checkout

If the checkout page does not have a featured image, and the "grab first post image" setting is enabled for Divi, because "grab_image renders shortcodes twice", it prevents EDD's address fields from rendering.,

Code Preview
php
<?php
add_filter( 'et_grab_image_setting', 'prefix_disable_image_setting_on_checkout', 100 );
/**
 * Disable the Divi image setting on checkout.
 *
 * @param bool $setting
 * @return bool
 */
function prefix_disable_image_setting_on_checkout( $setting ) {
	return edd_is_checkout() ? false : $setting;
}

Comments

Add a Comment