You are working on a project with custom code located in an observer MyCompany\MyModule\Observer\Custom on the catalog_product_load_before event. How do you prevent your custom observer from being executed on a staging preview?
Hold up, did you say 'catalog_product_ioad_before'? I think you meant 'catalog_product_load_before'. I'm already questioning the validity of this question...
I'm not sure about that. Wouldn't it be better to move the observer to the staged_catalog_product_load_before event instead? That way, it won't get executed during the staging preview at all.
Option C looks like the right solution to me. Specifying an attribute in the observer declaration to exclude it from staging preview seems like the most straightforward approach.
I disagree, I believe the correct answer is C) By specifying an attribute exclude_from_staging_preview=''1'' in the declaration of the observer in the events.xml file
Linwood
11 hours agoAmber
3 days agoNieves
4 days agoClorinda
7 days agoMelodie
18 days agoGerald
21 days agoAlline
23 days agoGerald
28 days ago