# Checkout respects Divi Builder layout when custom checkout is off (SUP-23876)

**Date**: 2026-03-30  
**Support Ticket**: SUP-23876

## What Changed

- `functions.php` — Added `bodycommerce_is_custom_checkout_layout_enabled()` to detect “Enable Custom Checkout Layout?” using explicit values (`on`, `1`, boolean true) instead of loose comparison to `0`.
- `includes/core/template-overrides.php` — `template_include` only loads `master-template.php` on checkout when that helper returns true.
- `includes/core/woo-checkout.php` — Hook reordering and payment-below-order-review logic run only when custom checkout layout is enabled; removed fragile `! $checkout_page_enable == "1"` guard (operator precedence).
- `changelog.txt` — User-facing FIX line for checkout layout behavior (under current release section).
- `divi-bodyshop-woocommerce.php` — Corrected plugin description typo (“BdyCommerce” → “BodyCommerce”); version left at current release.

## Why

- **Problem**: With BodyCommerce active and “Enable Custom Checkout Layout?” off, checkout pages built in the Divi Builder lost their normal section/row width and appeared full width.
- **Cause**: On PHP 8, non-numeric strings such as `""` and `"off"` no longer compare equal to `0`, so `get_bodycommerce_option( 'checkout_page_enable' ) != 0` stayed true when the option was disabled. That incorrectly swapped the theme template to `master-template.php`, which outputs `[woocommerce_checkout]` via `get_header( 'shop' )` without Divi’s normal page wrapper.

## Context

- Customer checkout built as a standard Divi page with WooCommerce checkout shortcode (or block) inside a section/row.

## Technical Details

- **Implementation**: Centralized “enabled” check in one helper; template swap and checkout-specific Woo hook changes are gated the same way the settings UI intends (checkbox on only).
- ⚠️ **Do not** revert to `!= 0` for this option on PHP 8+; use `bodycommerce_is_custom_checkout_layout_enabled()` or equivalent strict checks.

## Related

- Changelog: FIX — Checkout pages built in the Divi Builder keep their normal layout when Custom Checkout Layout is disabled.
- Historical note: 8.4.0 changelog mentioned fullwidth checkout when custom layout was disabled; root cause aligns with PHP 8 comparison semantics.

## Notes

- None.
