exam questions

Exam AD0-E716 All Questions

View all questions & answers for the AD0-E716 exam

Exam AD0-E716 topic 1 question 32 discussion

Actual exam question from Adobe's AD0-E716
Question #: 32
Topic #: 1
[All AD0-E716 Questions]

An Adobe Commerce developer has created a module that adds a product attribute to all product types via a Data Patch.
According to best practices, how would the developer ensure this product attribute is removed in the event that the module is uninstalled at a later date?

  • A. Add an Uninstall.php file extending \Magento\Framework\Setup\UninstallInterface to the module's setup directory and implement the uninstall method.
  • B. Add instructions to the module's README.md file instructing merchants and developers that they must manually remove this attribute if they want to uninstall the module.
  • C. Make the Data Patch implement \Magento\Framework\Setup\Patch\PatchRevertableInterface and implement the revert method to remove the product attribute.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
arierave
3 months ago
Selected Answer: C
C according to claude.ai epos: The correct answer is C. Make the Data Patch implement \Magento\Framework\Setup\Patch\PatchRevertableInterface and implement the revert method to remove the product attribute. Here's the explanation: In Adobe Commerce, when creating a module that adds a product attribute via a Data Patch, it's important to follow best practices and ensure that the attribute is properly removed if the module is uninstalled at a later date. The recommended approach is to make the Data Patch revertable by implementing the PatchRevertableInterface. By implementing the PatchRevertableInterface, you can define the revert method in your Data Patch class. The revert method should contain the logic to remove the product attribute that was added by the Data Patch.
upvoted 2 times
...
den33063
3 months, 1 week ago
Selected Answer: C
Option C is correct. using Data patch
upvoted 2 times
...
den33063
3 months, 1 week ago
Option C is correct. using Data patch
upvoted 2 times
...
JasonZhuo
6 months, 2 weeks ago
I choose C
upvoted 2 times
taynerjhony
6 months, 1 week ago
The correct answer is A, Ref https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/uninstall-modules.html?lang=en
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago