Bob Passaro

My feedback

  1. 52 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      Bob Passaro supported this idea  · 
    • 11 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        Bob Passaro commented  · 

        Pretty simple snippet now for anyone who is interested:

        /**
        * Filter insert post array on import so that products come in as draft, not published.
        */

        add_filter( 'wclsi_import_post_fields_matrix_prod', 'mystore_import_product_as_draft' );
        add_filter( 'wclsi_import_post_fields_single_prod', 'mystore_import_product_as_draft' );

        function mystore_import_product_as_draft( $import_fields ) {
        $import_fields['post_status'] = 'draft';
        return $import_fields;
        }

        Bob Passaro commented  · 

        Oh, sorry, just noticed this, conschneider. Well I meant there is now a filter hook on the array where the Product post is created, so I can hook in and change 'status' => 'draft' without having to hack the plugin file :)

        I swear that hook wasn't there when I made the original request, but maybe it was and I missed it.

      Feedback and Knowledge Base