I have successfully added option to add color to cells using "setcellmeta" by adding "className". And also, I save the cell "className" to backend database using the "afterSetCellMeta" hook.
During the page load, I add these classes back to the table using "setcellmeta" in a loop from the server using php. However during this the "afterSetCellMeta" hook is triggered automatically and sends multiple requests to the server as many cells have the "className" set.
So, I need a way to stop the trigger of "afterSetCellMeta" when the classes to the cells are added during initial page load.