I will approach like this:
global $current_user;
get_currentuserinfo();
$email = (string) $current_user->user_email;
var_dump($email);
You just called got the email from the current_user array and cast it into string π that’s it
Related Posts:
- How to get the active theme’s slug?
- Preserve custom URL parameter on more pages
- if plugin is active? check if plugin is enabled or not?
- Making plugin unique to not conflict with plugins with the same name
- how to customize hello dolly plugin?
- Adding Custom Fields for Img in Posts
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- Deleting images through upload folder, but not deleting from media library
- How to restrict an entire WordPress site to visitors, but the register and login page?
- How to exclude a widget from page 1 of a paginated post
- Adding a post shortcode to a page template?
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- send_headers don’t work on wordpress multisite
- Update Option Error: Notice: Undefined index
- The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use
- Custom Post Type Plugin not loading category template and loading 404 instead
- Self deactivate plugins after an action occurs
- wp_redirect() not working in Insert PHP plugin in WordPress
- Avoid class name collision when using third party libraries in plugins?
- wordpress site | All-in-one-cufon IE Issue
- WordPress Shortcode to get URL Parameters $_GET[‘name’] redirects for no reason at all
- How to get the element ID from new menu list that added with add_filter()?
- Replacing a plugin function with a custom renamed function doesn’t work
- How to output CMB2 select options from repeated groups select elements?
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- External RSS feed to WordPress Portfolio
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Create Gallery using Custom Post Type and add sum gallery as sub gallery of Main Gallery
- WordPress get_avatar function not correct working
- How to Create a shortcode to this php function
- My single.php page does not show the related data to the post which is clicked
- Creating a CSV with PHP inside the plugin directory
- pagination on data fetched using SQL query
- How to check if a taxonomy not exists in a plugin
- How passing values ββto construct function with Actions?
- Check if variable is set in filter
- Access a particular field in an array
- How to show the number of website visitors in my theme
- wordpress add_action() issue in ajax call
- JQuery prepend a function
- How to create plugin/ page that reads from database
- I am trying to make a field show and save from quickedit screen
- Send email with list of active plugins upon activation/deactivation
- Error When Trying To Login [closed]
- Add the_post_thumbnail_url to a shortcode in function.php
- Adding a Tag Parameter / Filter to My Shortcode
- Modify pages widget and make a plugin?
- eaccelerator PHP error
- Looking for a good way to include php code in posts, but using special include markup rather than direct php code
- Ajax call not working in wordpress through a plugin
- Strange admin-ajax / CSS / $_SESSION issue
- Redirect unloggedin users
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How to create admin setting for this small plugin
- Cookie value changes back to previous value after changing
- Allowed memory size of 134217728 β¦ wp-includes/wp-db.php on line 1989
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Post source link plugin – small modification
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- How to create algorithm for ordering posts in WordPress?
- How to use WordPress header function and footer function and not load word press database
- Hooking into the HTML header container
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- Block plugin update possibilities (but not by hiding notifications)
- Show custom taxonomy in theme
- Flexslider empty slide
- Conditional Fields depending on checkboxes
- Soflyy WP All Import Custom File Download Issue
- WordPress Admin sub-level menu issue
- Update (a function) post’s featured image as soon as $image_url changes
- Add class as plugin for other plugins
- Social sharing plugin directing to blank page after post sharing
- How to order users alphabetically by name? in plugin UPME
- Displaying friend’s posts only
- Media Playlist Plugin
- WordPress Background Audio – Continous AutoPlay
- Template from scratch: Sidebars not showing widget
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- Replace Dash (-) and Underscore ( _ ) with Space
- How use Dynamic hyperlink on each wordpress post?
- How to execute init or woocommerce_init only for checkout page
- how to restore wordpress backup(.rar) manually?
- White Screen When Includding A Folder With PHP Files
- wordpress jquery is not defined because the head tag is empty
- Two sites one PC
- PHP if url extension action=discussion condition use [closed]
- How to add custom html to the Media > Attachment Details modal?
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- Option value not getting updated until page refresh in WordPress
- Fatal error: Uncaught Error: Call to a member function fetch_array() on bool
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class