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
2 months agoOliva
9 days agoBurma
1 months agoAlberta
1 months agoAmber
2 months agoNieves
2 months agoMarcelle
2 days agoEdward
5 days agoGlory
9 days agoGeorgene
23 days agoGertude
29 days agoAdela
1 months agoWerner
1 months agoYoulanda
1 months agoClorinda
2 months agoMelodie
2 months agoDorsey
1 months agoCarin
1 months agoGerald
2 months agoAlline
2 months agoGerald
3 months ago