Remove all users with ROLE:
wp user delete $(wp user list --role=ROLE --format=ids)
Run commands as specific user identified by ID
wp eval 'echo get_current_user_id();' --user=ID
| add_filter( 'max_srcset_image_width', __NAMESPACE__ . '\\remove_max_srcset_image_width', 99 ); | |
| /** | |
| * Reset max srcset image width. | |
| * | |
| * @param int $max_width The maximum image width to be included in the 'srcset'. Default '1600'. | |
| * | |
| * @return bool You can return sensible value also this resets to default 1600. | |
| */ | |
| function remove_max_srcset_image_width( $max_width ) { | |
| return false; |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /** | |
| * Moves ordered items in draft state. | |
| */ | |
| function custom_draft_complete_orders( $order_id ) { | |
| // Fetch order infromation | |
| $order = new WC_Order( $order_id ); | |
| // Get products on order | |
| $items = $order->get_items(); | |
| <?php | |
| /** | |
| * Moves ordered items in draft state. | |
| */ | |
| function custom_draft_complete_orders( $order_id ) { | |
| // Fetch order infromation | |
| $order = new WC_Order( $order_id ); | |
| // Get products on order | |
| $items = $order->get_items(); | |
| foreach( $items as $product ) { |