Ok, I saw on a forum this code:
register_post_status( ‘custom-hide-product’, array(
‘label’ => _x( ‘Approved’, ‘post’ ),
‘public’ => false,
‘exclude_from_search’ => true,
‘show_in_admin_all_list’ => true,
‘show_in_admin_status_list’ => true,
‘label_count’ => _n_noop( ‘Approved <span class=”count”>(%s)</span>’, ‘Approved <span class=”count”>(%s)</span>’ ),
) );
add_action( ‘admin_footer’, ‘display_hide_status_option’ );
function display_hide_status_option() {
global $post;
$complete = ”;
$label = ”;
if ( $post->post_type === ‘product’ ) {
if ( $post->post_status === ‘custom-hide-product’ ) {
$selected = ‘selected’;
}
echo ‘<script>
jQuery(document).ready(function($){
$(“select#post_status”).append(“<option value=\”custom-hide-product\” ‘ . $complete . ‘>Approved </option>”);
$(“.misc-pub-section label”).append(“‘ . $label . ‘”);
});
</script>
‘;
}
}
And WCFM answer to this code to be able to see it in vendor dashboard is this code:
add_filter( ‘wcfmu_products_menus’, function( $wcfmu_products_menus ) {
$wcfmu_products_menus[‘custom-hide-product’] = __( ‘Approved’, ‘wc-frontend-manager’);
return $wcfmu_products_menus;
}, 50);
What is in your code ( in the code of WCFM ) the equivalent ( the register post status )?
I put the link to the forum: https://www.ads-software.com/support/topic/show-custom-product-status/
I’m trying to making work the code of WCFM with your plugin.