Marketpress with Upgrades plugin?

Is it possible to offer marketpress as an upgrade with the upgrades plugin?

  • Mason

    Hiya,

    You could do this, but you'd have to create some new code for MarketPress to do so. If you take a look at the included plugins with 'upgrades' (in the upgrades plugin folder) you can see how the plugins are registered conditionally on matching the unique key.

    Follow this format and you should be able to make it work. Alternatively you could post your project on the Job Board and a developer could handle it:
    https://premium.wpmudev.org/wpmu-jobs/

    Hope this helps. Thanks!

  • Brayne

    I wonder if a developer could take a look and make sure I'm not missing anything here...

    I placed the file marketpress.php and the entire directory 'marketpress-includes' inside of the upgrade-plugins directory. Then I located the init of the MarketPress class inside of marketpress.php and wrapped the upgrades_register_feature around it.

    //###########################Register MarketPress as an Upgrade################

    //register premium features
    upgrades_register_feature('xxxxxxxxblahblahblah', 'MarketPress', 'A complete e-commerce solution.');

    if (upgrades_active_feature('xxxxxxxxblahblahblah') == 'active'){
    global $mp;
    $mp = new MarketPress();
    }

    //###########################Register MarketPress as an Upgrade################

    It seems to be working out just great! Am I missing any functionality here? Thanks in advance.

    Gregg

  • Brayne

    Update - Resolved.....

    I only needed to place the proper marketpress files and directories into the mu-plugins directory as normal. I then edited the marketpress.php file. I did a search for the 'new MarketPress' and wrapped the code like the following.....

    //###########################Register MarketPress as an Upgrade################

    //register premium features
    upgrades_register_feature('xxxxxxxxblahblahblah', 'MarketPress', 'A complete e-commerce solution.');

    if (upgrades_active_feature('xxxxxxxxblahblahblah') == 'active'){
    global $mp;
    $mp = new MarketPress();
    }

    //###########################Register MarketPress as an Upgrade################

    and It works perfectly with the 'Upgrades' plugin. Just create a package as you normally would in 'Upgrades' and you are good to go.