Repository navigation
Conversation
### Fix: Cast `posts_per_page` to integer in Product Related widget **Description:** `$args['posts_per_page']` is sanitized via `sanitize_text_field()` prior to querying related products, converting the value to a string (e.g., `"4"`). This triggers a WooCommerce warning/error log: `Invalid limit type passed to wc_get_related_products. Expected integer, got string`. **Solution:** Wrapped `$args['posts_per_page']` with `absint()` when passing it to `wc_get_related_products()` to ensure strict type compliance.
|
drop at elementor as this repository is not supported by its developer. |
Author
|
I would but this is an Elementor Pro widget/feature, are they hosting it somewhere or you mean to plain contact them? |
|
ProElements is a 100% (One on One) copy of elementor pro without any support as stated on the proelements developers website. https://proelements.org/ So if you want to have your issues fixed you need to buy elementor pro and use your account to get support or drop it at elementor (pro) at github.
|
|
Atomic Elements - create component and Custom CSS not working wit Pro Elements. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix: Cast
posts_per_pageto integer in Product Related widgetDescription:
$args['posts_per_page']is sanitized viasanitize_text_field()prior to querying related products, converting the value to a string (e.g.,"4"). This triggers a WooCommerce warning/error log:Invalid limit type passed to wc_get_related_products. Expected integer, got string.Solution:
Wrapped
$args['posts_per_page']withabsint()when passing it towc_get_related_products()to ensure strict type compliance.