post_type == 'product'; $is_uxbuilder = isset( $_POST['ux_builder_action'] ); $is_rendering = $is_uxbuilder && $_POST['ux_builder_action'] == 'do_shortcode'; $is_saving = isset( $_POST['action'] ) && $_POST['action'] == 'ux_builder_save'; if ( ( $is_product && flatsome_product_block( $post->ID ) ) || $is_rendering || $is_saving ) { require_once __DIR__ . '/shortcodes/custom-product.php'; } }