You could also use json_encode()
function instead of serialize
.
$var = json_encode($array);
update_option('option_name', $var);
Related Posts:
- Creating two database tables via plugin
- Query Posts by Custom Field ‘Price’
- How use %like% in sql statement wordpress
- Accessing GET variable named ‘error’
- WP_Query ordering numbers as letters
- switched from query_posts to WP_query, not working now?
- AJAX search posts and pages
- how to use in custom single.php template using php?
- How to create a custom shortcode based on the layout?
- Redirect to another page using contact form 7? [closed]
- Delete data from custom table when deleting a post
- How to Join wp_posts & wp_postmeta table using custom query
- adding dynamic/multiple slug values in ‘option_none_value’
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- Checkbox field that add a subscription product and change prices of other products in checkout and cart page
- How to use information from the database in the front-end?
- Shortcode in a blog post, footer and related products stop working
- WP-Snap too slow (caused by WP_Query?)
- WordPress Meta Query: Relation is not working correctly
- Making a Custom Post Type Publish Loop
- Checking url from plugin [duplicate]
- Accessing Correct Database to Create REST API Endpoint
- WP_Query does not return the result even if the data is present in the database
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- Read text defined under __()
- How to change commenter links to /user/user_id?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Execute a plugin only on post pages
- What is the best way to mimic a search query within a plugin
- Next and/or previous post content
- Serialize data for wp options
- Remove rewrite rules generated by plugin during deactivation
- How to trigger $_GET request within admin plugin page?
- HTML in WooCommerce settings
- How can i list random post from multiple category?
- Plugin Paths Issue
- Building an email signup form. Where should the information be saved in the DB?
- Can WordPress Plugin Directory Cache Delay the Upload of Images?
- Why my Plugin keeps deactivating automatically?
- Determine Registered Admin Menus
- How to generate video out of images via WordPress plugin
- how do i remove posts from a WP_Query so the pagination is right?
- How can I add an options page for my class based plugin?
- How to Create a Custom Plugin Permalink
- Sending WP posts to external API
- How to write a plugin to add users to a mail list
- What function can I use consistently to escape possible HTML for editing and display?
- WordPress plugin for activating other plugins
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- plugin development: problem with functions
- How can I get WordPress to save comments in markdown format?
- First WordPress Plugin – Stat Issues
- Getting a List of Categories for Use in a Plugin?
- Changing labels of status filters for post grid
- Can we use a webservice with WordPress?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- How do I add a custom sub menu menu under Woo-commerce marketing?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- How to load plugin after page is loaded – pagespeed issues
- Open Post Thumbnail in New Child Theme File in WordPress
- How to pull code snippet from functionality plugin?
- How to use get_theme_mod in gutenberg editor wordpress?
- MITM risk of not sanitizing?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Where should I save an API key of my user when installing my plugin?
- How to make a customize role and view a specific plugins base on that role?
- Reusable functions and tools (Framework)
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Accessing post’s meta data based on user’s click of a post
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Where (or when) should I register a new taxonomy?
- Woocommerce plugin for minimum order and add-to-card-step
- Self deactivate plugins after an action occurs
- How to get current post user id
- UnInstallation of a Plugin from a developers perspective – The correct and clean method
- Issue with adding count to “subsubsub” aka quick links on custom_post_type
- WooCommerce shop page orderby [closed]
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to slice an array using posts_per_page? [closed]
- White page on custom plugin option submit
- Simple ajax call not working in wordpress plugin
- Plugin version is not showing up in wordpress.org plugin directory
- Do action only on certain front end pages?
- Change plugin main file name (that is currently in the repo)
- Create dynamic page content from custom WordPress plugin page
- Plugin Options Not Saving to Database in WP 4.5
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- How to create ‘import dummy data’ option in custom wordpress plugin
- Call to a member function have_posts() on a non-object on normal loop
- Get posts from WP_Query and format them on admin_head
- JS Support Ticket – Auto create WP account