What is a valid use case for an around plugin?
A. The execution of the pluginized method must be suppressed
B. The arguments of the before plugins must be modified
C. The arguments of the after plugins must be modified
D. The execution of the before and after plugins must be suppressed
The only use case for around method plugins is when the execution of all further plugins and original methods need termination.
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html
Answer: A
What will be the answer then ? A or D…
I think the correct answer should be A because as valid case, all further plugins and the pluginized method execution must be suppressed. Here in option A, the statement is correct. But in option D, it is mentioning about before and after plugins but around plugins also should be included.
A
The only use case for around method plugins is when the execution of all further plugins and original methods need termination