Skip to content

How to instantiate an helper class from my custom module in a test program in the directory at the same level as the root of Magento?

With the code below, I’m trying to instantiate an helper class from my custom module.

// Sanitize the $_GET[] value
// Create an object of the order loaded with the $order_id passed as query string.
$orderId = htmlspecialchars($_GET["order_id"]);
$order = $objectManager->create('MagentoSalesModelOrder')->loadByIncrementID($orderId);

// Instantiate app/code/Perfectmakeupmirrors/Order/Helper/Data.php
// call assemble_order_info(Order $order)
$helper = $objectManager->get('appcodePerfectmakeupmirrorsOrderHelperData');

Please guide me on the right way to do it.