I am programmatically adding products from the front end along with custom options. After adding, the custom options are missing from the product in the admin. They only show up when I add another option from admin.
I am using this for custom options:
$product->setCanSaveCustomOptions(true);
$product->getOptionInstance()->addOption($optiondata);
$product->setHasOptions(true);
Best Answer
I fallowed this way it is working may it will useful for you