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...
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...
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
3 months agoOliva
2 months agoBurma
3 months agoAlberta
3 months agoAmber
3 months agoNieves
3 months agoMarcelle
2 months agoEdward
2 months agoGlory
2 months agoGeorgene
2 months agoGertude
3 months agoAdela
3 months agoWerner
3 months agoYoulanda
3 months agoClorinda
3 months agoMelodie
4 months agoDorsey
3 months agoCarin
3 months agoGerald
4 months agoAlline
4 months agoGerald
4 months ago