• Resolved apb1963

    (@apb1963)


    $ wp wc product_cat get 41 --user=1
    +-------------+-----------+
    | Field       | Value     |
    +-------------+-----------+
    | id          | 41        |
    | name        | Book Ends |
    | slug        | book-ends |
    | parent      | 0         |
    | description |           |
    | display     | default   |
    | image       | null      |
    | menu_order  | 0         |
    | count       | 1         |
    +-------------+-----------+
    
    $ wp wc product list --user=1 --field=id --per_page=1 --category=41
    203
    
    $ wp post meta get 203 _thumbnail_id
    168
    
    $ wp post get 168 
    +-----------------------+-------------------------------------------------------------------+
    | Field                 | Value                                                             |
    +-----------------------+-------------------------------------------------------------------+
    | ID                    | 168                                                               |
    | post_author           | 0                                                                 |
    | post_date             | 2018-04-01 22:03:59                                               |
    | post_date_gmt         | 2018-04-02 05:03:59                                               |
    | post_content          |                                                                   |
    | post_title            | 37978                                                             |
    | post_excerpt          |                                                                   |
    | post_status           | inherit                                                           |
    | comment_status        | closed                                                            |
    | ping_status           | closed                                                            |
    | post_password         |                                                                   |
    | post_name             | 37978                                                             |
    | to_ping               |                                                                   |
    | pinged                |                                                                   |
    | post_modified         | 2018-04-01 22:03:59                                               |
    | post_modified_gmt     | 2018-04-02 05:03:59                                               |
    | post_content_filtered |                                                                   |
    | post_parent           | 0                                                                 |
    | guid                  | https://dragon.greetonix.com/wp-content/uploads/2018/04/37978.jpg |
    | menu_order            | 0                                                                 |
    | post_type             | attachment                                                        |
    | post_mime_type        | image/jpeg                                                        |
    | comment_count         | 0                                                                 |
    +-----------------------+-------------------------------------------------------------------+
    
    $ wp wc product_cat update 41 --image="{id: 168}" --user=1
    Success: Updated product_cat 41.
    
    $ wp wc product_cat get 41 --user=1
    +-------------+-----------+
    | Field       | Value     |
    +-------------+-----------+
    | id          | 41        |
    | name        | Book Ends |
    | slug        | book-ends |
    | parent      | 0         |
    | description |           |
    | display     | default   |
    | image       | null      |
    | menu_order  | 0         |
    | count       | 1         |
    +-------------+-----------+
    • This topic was modified 6 years ago by apb1963.
    • This topic was modified 6 years ago by apb1963.
    • This topic was modified 4 years, 6 months ago by Marius L. J..
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t change category image through wp-cli’ is closed to new replies.