sous.studio
Forum Replies Created
-
Hi,
Well, your answer with inability to recreate the issue has motivated me to try. I have discovered the problem. Suppose user intentionally removed “Delivery Time Interval” (could happen for one reason or another). Then, this function in wfs-core-functions.php:
673:function wfs_get_service_time_interval( $service ) { $service_interval = get_option( '_wfs_'.$service.'_time_interval', 0 ); $service_interval = intval( $service_interval ) * 60; return $service_interval; }
Doesn’t return the proper value – intval(null) * 60 = 0. This in turn causes range() in this function:
function wfs_get_store_timing( $service_type ) { .. $pickup_interval = wfs_get_service_time_interval( 'pickup' ); $delivery_interval = wfs_get_service_time_interval( 'delivery' ); .. if ( $service_type == 'delivery' ) { if( ( $close_time - $open_time ) > $delivery_interval ) $store_timings = range( $open_time, $close_time, $delivery_interval ); } else { if( ( $close_time - $open_time ) > $pickup_interval ) $store_timings = range( $open_time, $close_time, $pickup_interval ); }
to turns into $store_timings = range(“11:00”, “12:00”, 0), and since step cannot be 0, we get the aforementioned error.
Suggested fix
Our proposal is to add simple check to wfs_get_service_time_interval() function, that would insure the value is never 0:675: $service_interval = get_option( '_wfs_'.$service.'_time_interval', 0 ); if (!is_numeric($service_interval)) $service_interval = 30; // set it to 30 $service_interval = intval( $service_interval ) * 60;
We set it 30, because 0 would cause an error, and 1 would turn times into 1 minute-stepped intervals, instead of showing “Slots unavailable for selected Date!”, when such situation occurs.
Another way to fix it would be some sort of javascript/jQuery code that would check and/or adjust the value, if it goes blank.
Third way would be to check the value upon updating the database, but it seems like it requires substantial code modifications.
NOTE: Similar problem must probably take place when using pickup_interval instead of delivery, though I haven’t tested it.
Hope it helps!
Forum: Plugins
In reply to: [EWWW Image Optimizer] JFIF?I got it about the line. The question is – does it get converted with your plugin?
Forum: Plugins
In reply to: [W3 Total Cache] Horizontal Scaling Flush Cache Across nodesHey, Marko!
Thank you so much for prompt reply. Indeed that information helps a lot. I would just want to clarify about flushing cache across nodes. Should I write a custom code for it or is there some sort of mechanism that will queue flushing cache, so only updating aforementioned config file is required (and flushing will be triggered automagically)?Forum: Plugins
In reply to: [RSS for Yandex Turbo] На Турбо-версии содержатся не все подписи[2596]:
echo '<figure><img src="'. strtok(get_the_post_thumbnail_url(get_the_ID(),$ytselectthumb), '?') .'" /><figcaption>'.wp_get_attachment_caption(get_post_thumbnail_id(get_the_ID())).'</figcaption></figure>'.PHP_EOL;} ?>
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Answers on reviewsYou’re very welcome! ?? If you have any issues with it, let me know, I’ll try to help you (you can contact me directly using this form.
I hope, if time/mood allows, to expand my little blog and release couple of plugins, so stay tuned.
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Answers on reviewsSorry for that. Fixed now! ??
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Structured Data Testing Tool errorsHey, Charlie!
I hope you don’t mind, I’ve provided some instructions for people to be able to add responses to reviews.
Thank you for great plugin! ??
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Owner ResponsesThis might help.
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Answers on reviewsPerhaps, this this can help a bit?
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Structured Data Testing Tool errorsActually, Charlie, it was my mistake and you saved me lots of time by your remark – thank you! I wasn’t aware that snippet insertion is required for Google to see the data correctly. Now I’ve added the snippet – problem solved!
Will drop you a letter, though, JIC ??
Forum: Plugins
In reply to: [Rich Reviews by Starfish] Structured Data Testing Tool errorsCharlie, it happens on my client’s website, which is under development right now. Is there a way I could provide you with link privately?
Also, just to note, I’ve modified your plugin as to include Admin’s reply to reviews – nice coding, by the way! ?? It was really quick and easy.
As for structured data, it’s all really in rich-reviews/shortcodes/rr-show.php, so I guess I’ll be able to fix it aswell.
Anyway, thanks for your reply! ??
Forum: Plugins
In reply to: [Oi Yandex.Maps for WordPress] Совместимость с php 7 | Compatible with php 7Я решал проблему с ошибкой. Вот решение, чтобы работали карты – заменяем split (ну или str_split) на explode.
return implode(‘,’,array_reverse(explode(‘ ‘,trim(strip_tags($point[1])))));
Протестировал – работает.
Forum: Plugins
In reply to: [Oi Yandex.Maps for WordPress] Совместимость с php 7 | Compatible with php 7Всё просто. В файле /wp-content/plugins/oi-yamaps/oi-ya-maps.php находим строчку
return implode(‘,’,array_reverse(split(‘ ‘,trim(strip_tags($point[1])))));
и меняем её на
return implode(‘,’,array_reverse(str_split(‘ ‘,trim(strip_tags($point[1])))));
__
PHP7 fix for OI YA MAPS/wp-content/plugins/oi-yamaps/oi-ya-maps.php находим строчку
return implode(‘,’,array_reverse(split(‘ ‘,trim(strip_tags($point[1])))));
->
return implode(‘,’,array_reverse(str_split(‘ ‘,trim(strip_tags($point[1])))));Forum: Plugins
In reply to: [qTranslate X] Bulk remove languageSolved by custom script (which adds language tags to existing posts). Thank you!
Forum: Plugins
In reply to: [qTranslate X] Bulk remove languagesent