Title: Max Lyuchin's Replies | WordPress.org

---

# Max Lyuchin

  [  ](https://wordpress.org/support/users/cadic/)

 *   [Profile](https://wordpress.org/support/users/cadic/)
 *   [Topics Started](https://wordpress.org/support/users/cadic/topics/)
 *   [Replies Created](https://wordpress.org/support/users/cadic/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/cadic/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/cadic/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/cadic/engagements/)
 *   [Favorites](https://wordpress.org/support/users/cadic/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Vendors - WooCommerce Multivendor, WooCommerce Marketplace, Product Vendors] Unable to ship partially refunded order (considered as full refund?)](https://wordpress.org/support/topic/unable-to-ship-partially-refunded-order-considered-as-full-refund/)
 *  Thread Starter [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/unable-to-ship-partially-refunded-order-considered-as-full-refund/#post-18698022)
 * Thanks [@supportfitri](https://wordpress.org/support/users/supportfitri/) !
 * I also found the same issue in WC Vendors Pro (legacy controllers and commission
   download controller). I know it’s different plugin, but maybe here is the best
   place to communicate it to your team.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Vendors - WooCommerce Multivendor, WooCommerce Marketplace, Product Vendors] Unable to ship partially refunded order (considered as full refund?)](https://wordpress.org/support/topic/unable-to-ship-partially-refunded-order-considered-as-full-refund/)
 *  Thread Starter [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/unable-to-ship-partially-refunded-order-considered-as-full-refund/#post-18697268)
 * I made a quick research and found the root cause:
 *     ```wp-block-code
       // class-wcv-order-controller.php:701$order_total   += $vendor_order->get_item_total( $item, false, true );
       ```
   
 * When you detect partial refund, the `get_item_total()` method of WC_Order is 
   used, which will return the item price (instead of the line subtotal when we 
   have quantity greater than 1). F.e. it will return “100” for the order line “
   Product 1: 100 x 5 = 500”. Later on the line 750, the `$is_full_refund` variable
   is assigned `true`, which is not correct.
 * The fix is to use `get_line_total()` instead — it will return 500 for the example
   above and `$is_full_refund` will be assigned `false` (correct).
 * I hope it will help to provide the fix, we really depend on it!
    -  This reply was modified 7 months, 3 weeks ago by [Max Lyuchin](https://wordpress.org/support/users/cadic/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Vendors - WooCommerce Multivendor, WooCommerce Marketplace, Product Vendors] Commissions are not inserted](https://wordpress.org/support/topic/commissions-are-not-inserted/)
 *  Thread Starter [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/commissions-are-not-inserted/#post-17209114)
 * Thanks for the quick fix [@jkohlbach](https://wordpress.org/support/users/jkohlbach/)
 * It looks like the better solution will be fixing the return value:
 *     ```wp-block-code
       diff --git a/classes/class-commission.php b/classes/class-commission.php
       index a1dccc3..eeaf404 100644
       --- a/classes/class-commission.php
       +++ b/classes/class-commission.php
       @@ -338,7 +338,7 @@ class WCV_Commission {
                                                               AND status = %s
                       ";
   
       -               return $wpdb->get_var( $wpdb->prepare( $query, $status ) ); //phpcs:ignore
       +               return intval( $wpdb->get_var( $wpdb->prepare( $query, $status ) ) ); //phpcs:ignore
               }
       ```
   
 * Because the return value of WC_Vendors::check_commission_status() is declared“
   int”:
 *     ```wp-block-code
       /**
        * Check the commission status for the order.
        *
        * @param array  $order The order.
        * @param string $status The status.
        *
        * @return int
        */
       public static function check_commission_status( $order, $status ) {
       ```
   
 * While in fact, the function returns $wpdb->get_var() which is always the string!
 * In the other way, the same issue may happen with WC Vendors Pro in the future,
   which currently use non-strict compare (same as WC Vendors prior to 2.4.7.1 did)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Safe SVG] SVG size issue after update](https://wordpress.org/support/topic/svg-size-issue-after-update/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/svg-size-issue-after-update/#post-15413638)
 * [@dkotter](https://wordpress.org/support/users/dkotter/) same here, the image
   tag output turned from
 * SafeSVG 1.9.9
    `<img src="https://example.com/wp-content/uploads/2020/09/image.
   svg" class="attachment-medium size-medium entered lazyloaded" alt="" height="
   36.984" width="223.756" data-lazy-src="https://example.com/wp-content/uploads/
   2020/09/image.svg" data-ll-status="loaded">`
 * into
 * SafeSVG 1.9.10
    `<img width="300" height="300" src="https://example.com/wp-content/
   uploads/2020/09/image.svg" class="attachment-medium size-medium entered lazyloaded"
   alt="" data-lazy-srcset="https://example.com/wp-content/uploads//2020/09/image.
   svg 150w, https://example.com/wp-content/uploads//2020/09/image.svg 300w, https://
   example.com/wp-content/uploads//2020/09/image.svg 1024w, https://example.com/
   wp-content/uploads//2020/09/image.svg 1536w, https://example.com/wp-content/uploads//
   2020/09/image.svg 2048w, https://example.com/wp-content/uploads//2020/09/image.
   svg 100w" data-lazy-sizes="(max-width: 300px) 100vw, 300px" data-lazy-src="https://
   example.com/wp-content/uploads//2020/09/image.svg" data-ll-status="loaded" sizes
   ="(max-width: 300px) 100vw, 300px" srcset="https://example.com/wp-content/uploads//
   2020/09/image.svg 150w, https://example.com/wp-content/uploads//2020/09/image.
   svg 300w, https://example.com/wp-content/uploads//2020/09/image.svg 1024w, https://
   example.com/wp-content/uploads//2020/09/image.svg 1536w, https://example.com/
   wp-content/uploads//2020/09/image.svg 2048w, https://example.com/wp-content/uploads//
   2020/09/image.svg 100w">`
 * The output is made with `<?php echo wp_get_attachment_image( $attachment_id, '
   medium' ); ?>` in a custom theme.
 * Also, please notice double slash in srcset URLs (the regular src attribute is
   correct).
 * The original SVG image is:
 * `<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"
   width="223.756" height="36.984" viewBox="0 0 223.756 36.984"> ... </svg>`
 * Looks like image attributes are not respected after the update when displaying`
   medium` image size: we just have default 300×300.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MCE Table Buttons] Latest updates makes MCE table buttons disappear…](https://wordpress.org/support/topic/latest-update-makes-mce-table-buttons-disappear/)
 *  Plugin Support [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/latest-update-makes-mce-table-buttons-disappear/#post-4785611)
 * No table buttons in regular posts too
    WP 3.8.3
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [time in the post](https://wordpress.org/support/topic/time-in-the-post/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/time-in-the-post/#post-1804618)
 * You should open `index.php` (it maybe other file depending on your theme) in `
   Appearance > Editor`, then find something like `<div class="author"><?php printf(
   __ ( 'by %s on', 'titan'), get_the_author()); ?> <?php the_time(__ ( 'F jS, Y','
   titan')); ?></div>` (this example is for my Titan theme, yours may be different)–
   then you just need to cut (or better comment) that part.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [need to shorten post content](https://wordpress.org/support/topic/need-to-shorten-post-content-1/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/need-to-shorten-post-content-1/#post-1804617)
 * Use `more` button in the editor to cut the rest part of your posts
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Site being redirected somehow – HELP!](https://wordpress.org/support/topic/site-being-redirected-somehow-help/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/site-being-redirected-somehow-help/#post-1797203)
 * What did you changed in httpd.conf?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to upgrade WP on Localhost using FTP ?](https://wordpress.org/support/topic/how-to-upgrade-wp-on-localhost-using-ftp/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/how-to-upgrade-wp-on-localhost-using-ftp/#post-1797199)
 * First, you should set up any FTP server and add a user account in it. Then you
   can force `ftp://username:password@localhost/` as the connection string when 
   installing or updating themes and plugins.
 * The other way is to set the write permissions to the `wp-contents` directory,
   so wordpress could update plugins without FTP
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Image links with transparent background](https://wordpress.org/support/topic/image-links-with-transparent-background/)
 *  [Max Lyuchin](https://wordpress.org/support/users/cadic/)
 * (@cadic)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/image-links-with-transparent-background/#post-1797194)
 * Hi MajinSaha!
 * To make the transparent background of your images you need to save them in to
   PNG format.

Viewing 10 replies - 1 through 10 (of 10 total)