Title: Renners's Replies | WordPress.org

---

# Renners

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/renners/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/renners/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Google for WooCommerce] Google Merchant Center alert: Drop in number of active items](https://wordpress.org/support/topic/google-merchant-center-alert-drop-in-number-of-active-items/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/google-merchant-center-alert-drop-in-number-of-active-items/#post-16890340)
 * Hi [@shameemreza](https://wordpress.org/support/users/shameemreza/)
 * Thank you for your reply.
 * Re: – *Resync Products:* Try manually resyncing your products with Google Merchant
   Center. You can do this by going to *Marketing > Google Listings & Ads > Product
   Feed* and clicking on *Sync products*.
 * I don’t have a ‘Sync Products’ option on the page should it be a button or hyperlink?
 * I’ve 11 errors that were present previously, these have previously been addressed
   however don’t appear to disappear.
 * The page Overview shows
    - Active 962
    - Expiring 0
    - Pending 0
    - Disapproved 2
    - Not Synced 1
 * Feed setup: Free listings setup completed 11 issues to resolve.
 * Sync with Google: Automatically synced to Google Last updated: 12th July 2023,
   5:19 pm, containing 964 products
 * It would appear that some products have resynced by themselves as the number 
   active was originally 824 (down 29%) so they may be reappearing.
 * I have no fatal errors that would affect this issue.
 * Regards,
 * Renners
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Sanitise search input on instant search](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/#post-16414994)
 * I finally got our staging server to function properly and have tested the changes.
   It works OK with a few caveats 1. No error is produced when illicit characters
   are entered. 2. It didn’t solve our problem!
 * I’ve left it in and pushed it live any way as it now stops any nonalphanumeric
   search terms someone enters hitting algolia (and us being charged for it.)
 * The Issue we have, which became apparent once we dug further into it, is that
   we are getting hit by searchbots hitting the search page with terms such as domain.
   com/?s=”[cfi</a><li><a class=page-numbers href=](https://www.algolia.com/apps/WYOVJYS61Q/analytics/no-results/wp_searchable_posts/no-result-search?from=2023-01-20&to=2023-01-26&search=cfi%3C%2Fa%3E%3Cli%3E%3Ca%20class%3Dpage-numbers%20href%3D)”
   this is not parsed by instantsearch.js. We are looking into a solution based 
   on their useragent/url combo to prevent them from hitting the search page to 
   stop this.
 * Regards,
 * Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Sanitise search input on instant search](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/#post-16393726)
 * Thank you for your reply and assistance. I’ve got it on a staging server at the
   moment so not on our live site. I’ve got no errors on the console although I 
   appear to have different results between staging and live currently even though
   I copied it over at the beginning of this. I need to understand this first before
   proceeding further.
 * Regards,
 * Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Sanitise search input on instant search](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/#post-16393280)
 * Well, I it added into the code, in the customised template which I am already
   using thus:
 *     ```wp-block-code
       				/* Instantiate instantsearch.js */
       				var search = instantsearch({
       					indexName: algolia.indices.searchable_posts.name,
       					searchClient: algoliasearch( algolia.application_id, algolia.search_api_key ),
       					routing: {
       						router: instantsearch.routers.history({ writeDelay: 1000 }),
       						stateMapping: {
       							stateToRoute( indexUiState ) {
       								return {
       									s: indexUiState[ algolia.indices.searchable_posts.name ].query,
       									page: indexUiState[ algolia.indices.searchable_posts.name ].page
       								}
       							},
       							routeToState( routeState ) {
       								const indexUiState = {};
       								indexUiState[ algolia.indices.searchable_posts.name ] = {
       									query: routeState.s,
       									page: routeState.page
       								};
       								return indexUiState;
       							}
       						}
       					}
       				});
       /* Added sanitisation code */				
       				const whitelist = /^(?:(?!<[^>]*>).)*$/;
   
       				search.addWidgets([
   
       					/* Search box widget */
       					instantsearch.widgets.searchBox({
           					container: '#algolia-search-box',
           					placeholder: 'Search constrained...',
           					queryHook: function(query, search) {
               		if (!whitelist.test(query)) {
                   	return 'Invalid search terms';
               		}
       							return search(query);
       						},
           			showReset: false,
           			showSubmit: false,
           			showLoadingIndicator: false,
         				}),
       /* end of Added sanitisation code */
       /*				search.addWidgets([
   
       					/* Search box widget */
       /*					instantsearch.widgets.searchBox({
       						container: '#algolia-search-box',
       						placeholder: 'Search for...',
       						showReset: false,
       						showSubmit: false,
       						showLoadingIndicator: false,
       					}),
       */
       ```
   
 * Hasn’t made a blind bit of difference either way. It still happily accepts additional
   characters, you see in the example code above I even tried a different regex 
   to exclude html content only, to no effect.
 * Regards,
 * Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Sanitise search input on instant search](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/sanitise-search-input-on-instant-search/#post-16388588)
 * Thank you for your reply, I continued to press AI on how to do it and it said
   this:
 * This code should be placed in the JavaScript file(s) that are responsible for
   initializing and configuring the instantsearch.js library on your WordPress site.
 * It is common to have a separate JavaScript file for instantsearch.js configuration,
   where you would place the above code snippet. You can then include this JavaScript
   file in your WordPress theme or plugin using the wp_enqueue_script() function,
   which is used to load JavaScript files on the frontend of a WordPress site.
 * You could also include the code directly in the template file where you are using
   instantsearch.js, but it’s generally recommended to keep your JavaScript code
   in separate files for better maintainability and organization.
 * It’s also important to note that, you need to make sure that the instantsearch.
   js library is properly loaded and configured before the above code snippet is
   executed, otherwise it would throw an error.
 * and:
 * If you are using the ‘WP Search with Algolia’ plugin, you will need to place 
   the code snippet in a custom JavaScript file that you create and include it to
   the plugin’s settings.
 * You can create a new JavaScript file, for example `algolia-search.js`, and place
   the code snippet there.
 * Then you can include this file to the plugin’s settings, you should look for 
   the option to include custom javascript files in the plugin’s settings page or
   documentation.
 * It’s important to note that, you need to make sure that the instantsearch.js 
   library is properly loaded and configured by the plugin before the above code
   snippet is executed, otherwise it would throw an error.
 * You should also make sure that the code is only loaded on the search page, and
   not on every page of your website.
 * —-
 * I got the distinct feeling the AI was generalising for wordpress plugins and 
   the last comment worried me as it implies there will be issues.
 * Regards,
 * Renners
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] changelog for 6.3.0 2022-03-08 is missing](https://wordpress.org/support/topic/changelog-for-6-3-0-2022-03-08-is-missing/)
 *  [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/changelog-for-6-3-0-2022-03-08-is-missing/#post-15441792)
 * [https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt)
   link on woocommerce plugin page under changelog needs updating to reflect the
   current changelog.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] if then styling for quantity](https://wordpress.org/support/topic/if-then-styling-for-quantity/)
 *  [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/if-then-styling-for-quantity/#post-12909751)
 * We set up our own template, added a function to the template-functions.php
 *     ```
       function getQuantityColour(int $number)
       {
           if ($number > 1 )
               return 'red;color: white;';
           else if ($number = 1)
               return 'white;color: black;';
       }
       ```
   
 * Then changed the lines for quantity to check
 *     ```
       			<td class="quantity"><span style="background-color: <?php echo getQuantityColour($item['quantity']); ?>">&nbsp;<?php echo $item['quantity']; ?>&nbsp;</span></td>
       ```
   
 * This sets the background to red with white writing when quantity is more than
   1.
 * Hope this helps.
 * Regards,
    Renners
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product GTIN (EAN, UPC, ISBN) for WooCommerce] Does not work on WordPress 5.1.1 and leaves damage](https://wordpress.org/support/topic/does-not-work-on-wordpress-5-1-1-and-leaves-damage/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/does-not-work-on-wordpress-5-1-1-and-leaves-damage/#post-11335261)
 * I’ve restored the missing meta data (sku) I’ve found another plugin to do the
   same function so there’s no need to address this issue.
    -  This reply was modified 7 years, 1 month ago by [Renners](https://wordpress.org/support/users/renners/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] wp_woocommerce_sessions table growing very very large](https://wordpress.org/support/topic/wp_woocommerce_sessions-table-growing-very-very-large/)
 *  [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/wp_woocommerce_sessions-table-growing-very-very-large/#post-10950091)
 * Just checked sessions table 1.37gb currently, I’ve spent ages trying to find 
   why the site is so slow suspect this may have something to do with it.
 * Watching with interest.
 * Regards,
    Phil.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Catalog Mode] The add to cart button appears in Javascript pop up on desktop](https://wordpress.org/support/topic/the-add-to-cart-button-appears-in-javascript-pop-up-on-desktop/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/the-add-to-cart-button-appears-in-javascript-pop-up-on-desktop/#post-10796944)
 * Hi there,
 * Thank you for your reply, this works however this appears to permanently remove
   the add to cart button whether your plugin is active or not.
 * Is there another solution?
 * Regards,
    Phil.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pixel Manager for WooCommerce – Conversion Tracking, Google Ads, GA4, TikTok, Dynamic Remarketing] Plugin stops WC Fields Factory validation function](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/#post-10710091)
 * Hi Alekv,
 * Thank you for your reply and assistance.
 * I’ve come to the conclusion it probably is not your plugin causing the issue 
   it is more likely a google analytics plugin. I’ve tried two now as I need these
   for global tracking codes to complement your conversion tool. If I disable this(
   I’ve tried both separately) and leave your plugin running I do not get the error
   condition.
 * I’m not a fan of directly adding code however I am going to have to try adding
   the google global tag code directly to try and confirm if it is the plugin or
   google’s code that is interacting with the wc fields factory plugin and causing
   the error.
 * Thanks for being so responsive, I hope to be able to use your plugin once I resolve
   the issue.
 * Regards,
    Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pixel Manager for WooCommerce – Conversion Tracking, Google Ads, GA4, TikTok, Dynamic Remarketing] Plugin stops WC Fields Factory validation function](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/#post-10709365)
 * Hi Alekv,
 * I tried and get the following error:
    The following recipient(s) cannot be reached:
 *  ‘support@wolfundbaer.ch’ on 21/09/2018 07:59
    552 5.7.0 message content and 
   attachment content guidelines. q3-v6sm4086840wma.45 – gsmtp
 * I assume you do not allow zip files to be sent. You can download it from [https://wordpress.org/plugins/wc-fields-factory/](https://wordpress.org/plugins/wc-fields-factory/)
 * Regards,
    Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pixel Manager for WooCommerce – Conversion Tracking, Google Ads, GA4, TikTok, Dynamic Remarketing] Plugin stops WC Fields Factory validation function](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/plugin-stops-wc-fields-factory-validation-function/#post-10706503)
 * HI Aleks,
 * Thank you for your reply, sorry no my staging is only accessible locally. If 
   you need anything though please let me know.
 * Regards,
    Renners.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Fields Factory] Conflict with another plugin Add to cart from Category page bypasses validation](https://wordpress.org/support/topic/bug-add-to-cart-from-category-page-bypasses-validation/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/bug-add-to-cart-from-category-page-bypasses-validation/#post-10705974)
 * I found the other plugin it is “WooCommerce AdWords Conversion Tracking” I’ve
   turned this off for the time being whilst I search for a solution.
 * Regards,
    Renners
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tracking Code Manager] Conflict with WP Super Cache](https://wordpress.org/support/topic/conflict-with-wp-super-cache-15/)
 *  Thread Starter [Renners](https://wordpress.org/support/users/renners/)
 * (@renners)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/conflict-with-wp-super-cache-15/#post-10621058)
 * Hi there,
 * Thank you for the details, I can confirm this worked and WP Super Cache now works
   with both plugins active.
 * #I do have the same concern as sticksu mentions above in that I now have custom
   code.
 * I have been caught out by this before and actively work not to have custom plugins
   which are not controlled by myself.
 * If you are not going to update your own core, can I add this amendment to our
   own custom plugin to achieve the same results?
 * Regards,
    Renners.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/renners/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/renners/replies/page/2/?output_format=md)