A Magento 2 product normally has one of two statuses: enabled or disabled. Use the following code to check its status programmatically:
|
1 2 3 |
// 1 = aktiviert // 2 = deaktiviert $status = $product->getStatus() |
Fertig!
Getting a product’s status
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.