craftcms / docs

Documentation for Craft CMS, Craft Commerce, and other official products.
https://craftcms.com/docs
38 stars 144 forks source link

[4.x]: Documentation: Emails documentation is wrong when referring to Global Sets #432

Closed robzor closed 1 year ago

robzor commented 1 year ago

What happened?

Description

In the documentation: https://craftcms.com/docs/commerce/4.x/emails.html#html-email-template-path

CleanShot 2022-10-17 at 5 27 06

If you try to use {% set globalSetName = craft.globals.getSetByHandle('globalSetName') %} you will get a Twig error and it appears that in Commerce 4, global variables are available in Email templates without having to fetch them.

Craft CMS version

4.2.7

Craft Commerce version

4.1.3

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

-

pdaleramirez commented 1 year ago

I can confirm there is an issue on the Craft Commerce docs.

AugustMiller commented 1 year ago

Thanks for pointing this out—will have a patch out soon. ❤️