Woocommerce: limit user to see only the products he created

I believe changing the following conditional: if( !current_user_can( ‘manage_options’ ) ) to this one: if( !current_user_can( ‘manage_options’ ) && ‘product’ === $query->get( ‘post_type’ ) ) would do it. Brief explanation: I added a second condition which checks if the query is for WooCommerce products where the post type is product. UPDATE If you want to … Read more

correctness of URL

See the accepted answer to this question: https://webmasters.stackexchange.com/questions/81252/is-a-trailing-slash-appropriate-before-url-parameters tl;dr Either way is correct, but consistency in the result is the key to best SEO practices, because with/without is a different URL. If you don’t want the trailing slash (or you do), you can change it in your Admin, Permalinks screen.

Add to array, redirect and display

If you need to pass some data over the redirect, you can do that by adding parameters to the redirect url with add_query_arg(). But other more elegant solutions might exist also. Single parameter, wp_redirect( add_query_arg( ‘notice’, ‘success’, get_site_url(null, ‘/redirect_to_two’) ) ); exit; or multiple parameters wp_redirect( add_query_arg( array( ‘notice’ => ‘success’, ‘foo’ => ‘bar’ ), … Read more

Merge tags in multistep Gravity Form?

This is possible with Live Merge Tags, a feature of Gravity Forms Populate Anything. If you’re looking to get your hands dirty with some code, Gravity Forms has an example of how this might work with a snippet on their docs for the gform_pre_render filter: https://docs.gravityforms.com/gform_pre_render/#3-populate-field-with-values-from-earlier-page

I am trying to make a field show and save from quickedit screen

You have to register your quick edit custom box: function display_custom_quickedit_book( $column_name, $post_type ) { // it would be a good idea to add a nonce here ?> <fieldset class=”inline-edit-col-right inline-edit-book”> <div class=”inline-edit-col column-<?php echo $column_name; ?>”> <label class=”inline-edit-group”> <!– here goes your input –> </label> </div> </fieldset> <?php } add_action( ‘quick_edit_custom_box’, ‘display_custom_quickedit_book’, 10, 2 … Read more