Submit a form and save data to custom post type in woocommerce

I am wondering how can I send the data submit in WS FORM to a tab in WooCommerce Frontend Manager the tab have his own php but the site is multivendor.

wsform gave this action config im triyng using Push to Custom Endpoint: http://localhost/vendor/tabpage.php and requested method:post

<?php 

$ vendor_id = $ store_user->get_id(); $ $ wcfm_modified_endpoints= get_user_meta( $ vendor_id, ‘wcfm_endpoints’, true ); ?>

echo do_shortcode( ‘[wcfm_store_info data="ws_form id="2"]’ );

Unable to hit hook with form submit build with “wp_ajax_{$action}”

I’m all I’m currently trying to build a hook using do_action( "wp_ajax_{$ action}" ) on a Form submit. I built the following form.

 <div class="layout-gutter bg-grey-lightest p-4">       <div class="bg-grey-light p-4">         <form action="http://localhost:8080/wp-admin/admin-ajax.php" method="post">           <input name="action" type="hidden" value="feedback">           <?php wp_nonce_field( 'feedback_nonce' ); ?>            <fieldset class="c-question">             <legend class="c-question__label">Was this page helpful?</legend>             <div class="c-question__container">               <div>                 <label class="toggle">                   <input data-type="boolean" name="helpful" type="radio" value="1" />                   <span class="toggle__label">Yes</span>                 </label>                 <label class="toggle">                   <input checked="true" data-type="boolean" name="helpful" type="radio" value="0" />                   <span class="toggle__label">No</span>                 </label>               </div>             </div>           </fieldset>             <div class="c-question">             <label class="c-question__label" for="client-0-email-address">Why or why not?</label>             <div class="c-question__container">               <div>                 <input required="true" type="text" name="description" />               </div>             </div>           </div>            <div>             <button class="btn text-inherit" type="cancel">Cancel</button>             <button class="btn-primary" type="submit">Submit</button>           </div>         </form>       </div>     </div> 

But when I submit the form I am unable to hit the action hook. I have the following file lib/feedback.php

<?php namespace FeedbackNYC;  add_action('wp_ajax_feedback', 'FeedbackNYC\feedbackHandler'); add_action('wp_ajax_nopriv_feedback', 'FeedbackNYC\feedbackHandler');  function feedbackHandler() {   echo "Hellow World";   echo $  _POST:   // Do some code here } 

But when I submit the form I’m not getting to feedbackHandler. The form has a hidden input field <input name="action" type="hidden" value="feedback"> but I never get to the hook. I tried echo in strings but nothing gets returned back. The request returns a 404 error as shown below:

enter image description here

How can I hit feedbackHandler on form submission?

Submit new posts to current category

i’m trying to Submit new posts to current category. For example on a wordpress site i select the category "Cars" and i see all the posts that belong to category "Cars" as archive page. In this time the current category is "Cars". If i use a form plugin to insert at front end the title and the body of a new post, is it possible to assign the current category on the new post?

thanks for the support.

Double JWT submit method

I’m implementing my JWT method by using the double submit method: where we separate the payload & header portion of the JWT from the signature.

The header & payload is stored in a separate cookie, not HttpOnly so its accessible by the client, and the signature is HttpOnly.

The implementation seems pretty straight forward, but I’m having an issue understanding how refresh works.

For example, since I’m using firebase, the users jwt token has an expiration of 1 hour. When that expires, we need to automatically refresh the token, but this means we are refreshing the whole token. The whole point of the signature token is to be session long.

How can we refresh just the payload & header part of the token, without it affecting the signature?

The strategy I am using is based on this article: https://medium.com/lightrail/getting-token-authentication-right-in-a-stateless-single-page-application-57d0c6474e3