Max Lyuchin
Forum Replies Created
-
Thanks for the quick fix @jkohlbach
It looks like the better solution will be fixing the return value:
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”:
/** * 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
In reply to: [Safe SVG] SVG size issue after update@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="https://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
In reply to: [MCE Table Buttons] Latest updates makes MCE table buttons disappear…No table buttons in regular posts too
WP 3.8.3Forum: Fixing WordPress
In reply to: time in the postYou should open
index.php
(it maybe other file depending on your theme) inAppearance > 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
In reply to: need to shorten post contentUse
more
button in the editor to cut the rest part of your postsForum: Fixing WordPress
In reply to: Site being redirected somehow – HELP!What did you changed in httpd.conf?
Forum: Fixing WordPress
In reply to: How to upgrade WP on Localhost using FTP ?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 FTPForum: Fixing WordPress
In reply to: Image links with transparent backgroundHi MajinSaha!
To make the transparent background of your images you need to save them in to PNG format.