Updating Role Prices with Metadata

Modified on Tue, 23 Jan at 8:43 PM

To adjust role prices utilizing metadata, implement the following code snippet, ensuring it aligns with your specific data structure and system requirements. To update prices with meta, please use following code:


$data = '{
    "role1Name":"200",
    "role2Name":"300",
    "salePrice": {
        "role1Name":"",
        "role2Name":""
    },
    "schedule": {
        "role1Name": {
            "date_from": "",
            "date_to":""
        },
        "role2Name": {
            "date_from": "",
            "date_to":""
        }
    }
}'
update_post_meta($ID , 'festiUserRolePrices', $data );



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article