After a bit is digging and work, I finally got my script to identify the private posts and to selectively remove them on a conditional basis from the option_name = “ws_plugin__s2member_options” settings.
Objective: I want to make all private posts public after a certain defined number of weeks of being restricted.
My script re-writes the “level0_posts”, “level1_posts”, “level2_posts”, “level3_posts”, and “level4_posts” perfectly.
However, when I run the script I get the following errors and my query fails to update the wp_options table:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘options_checksum”;s:32:”620f01dcca7b6b9fe1508dacab099e37″;s:15:”options_version”‘ at line 2
Can anyone assist on how to resolve this error?
Plus here are posts on the S2 restriction array that no longer exist in the WordPress posts table. How do I remove them from S2 and sync to my WP tables?
Thank you.