Get woocommerce product category list in functions.php

I am trying to create a an array of woocommerce product categories to use as dropdown in customizer. The following code is working in function hooked to ‘customize_register’ but not in functions.php Unfortunately I need to create an array in functions.php $woo_cat_args = array( ‘taxonomy’ => ‘product_cat’, ‘orderby’ => ‘name’, ‘hide_empty’ => 0, ); $woo_categories…

Using WP-API and SSE not authenticating user ID

I am using the wp-api to create a custom endpoint for my data: add_action( ‘rest_api_init’, function() { register_rest_route( ‘mb/v1’, ‘/sse/’, array( ‘methods’ => ‘get’, ‘callback’ => ‘mb_sse_data’, ‘nonce’ => wp_create_nonce( ‘wp_rest’ ) ) ); } ); function mb_sse_data( $request ) { // headers to notify SSE header( “Content-Type: text/event-stream” ); header( “Cache-Control: no-cache” ); //…

Must I change the admin user email address while changing the general email address?

I changed the email at Settings > General from me@gmail.com to info@mysite.com. It seems like the email didn’t change, although I received the confirmation email to change. I’m still receiving emails from me@gmail.com. Do I still need to change the Administrator email under Users to info@mysite.com for the change to take effect? Using WP 5.1.3