Woocommerce REST API allow normal users make an order
I found our my solution by customize “woocommerce_rest_check_permissions”
I found our my solution by customize “woocommerce_rest_check_permissions”
Thank @Sally CJ I made the solution : main code global $sitepress_settings; //Insert post with main lang $post = $binding_main_cpt[‘post’]; $default_language = $sitepress_settings[‘default_language’]; $main_post = $post[$default_language]; $postInformation = [ ‘post_title’ => wp_strip_all_tags(trim($main_post[‘post_title’] ) ), ‘post_content’ => $main_post[‘post_content’], ‘post_type’ => $main_post_type, ‘post_status’ => ‘publish’ ]; $master_post_id = wp_insert_post($postInformation); echo sprintf( “insert post %d”, $master_post_id ); foreach($sitepress_settings[‘active_languages’] … Read more
How to add custom preview urls for some pages?
Fetch post block/field data as JSON with WordPress API
Why does wp_remote_post returns an empty body response on certain endpoints?
Get non-rendered content from WP-API
How can I get the media inside a post?
WordPress as GraphQL client
I apologize but I only now have a way to post my solution, maybe it can be useful to someone. Here is my solution to the problem: $new_user_id = wp_insert_user($userdata); $value = json_decode($response[‘body’], true)[‘Id’]; // get value from response you want to set update_field(‘field_60084ad3970a8’, $value, ‘user_’.$new_user_id);
Amending REST API function without deactivate/activate plugin every time changes is made