elementor / elementor/elementor
🐞 Bug report: WooCommerce Subscription Products Aren't Searchable On Some Buttons With "Add To Cart" Dynamic Tag.
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.6k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 193
Description
### Prerequisites
- [X] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [X] The issue still exists against the latest stable version of Elementor.
### Description
I am using WooCommerce subscriptions and have created two subscription products.
When i create a button with the "add to cart" dynamic tag and search for these subscription products ? the search returns no results.
After changing these products from "simple subscription" products to "simple" products, the same button with the "add to cart" dynamic tag is able to search and find the product.
This i have found occurs on the pricing table button and the Elementor button widget.
**THIS ERROR DOES NOT occur on the "custom add to cart" button**
### Steps to reproduce
1. Create Two Simple Subscription Products With WooCommerce Subscriptions Plugin;
2. Add Pricing Table And/Or Regular Button To Page;
3. Add "Add To Cart" Dynamic Tag To Button Elements;
4. Search Product.
**Search Returns Zero Results**
Changing The Product From "Simple Subscription" To "Simple Product" Rectifies This Problem And Makes The Product Searchable
### Isolating the problem
- [X] This bug happens with only Elementor plugin active (and Elementor Pro).
- [X] This bug happens with a Blank WordPress theme active ([Hello theme](https://wordpress.org/themes/hello-elementor/)).
- [X] I can reproduce this bug consistently using the steps above.
### System Info
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: MariaDB Server v10.3.35
PHP Version: 8.1.6
PHP Memory Limit: 40M
PHP Max Input Vars: 1000
PHP Max Post Size: 128M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 6.0
Site URL: http://servkode.co.za
Home URL: http://servkode.co.za
WP Multisite: No
Max Upload Size: 128 MB
Memory limit: 40M
Max Memory limit: 256M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Language: en-US
Timezone: 0
Admin Email: admin@servkode.co.za
Debug Mode: Inactive
== Theme ==
Name: Hello Elementor
Version: 2.5.0
Author: Elementor Team
Child Theme: No
== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
== Active Plugins ==
All In One WP Security
Version: 4.4.12
Author: All In One WP Security & Firewall Team
Elementor
Version: 3.6.6
Author: Elementor.com
Elementor Pro
Version: 3.7.1
Author: Elementor.com
Loginizer
Version: 1.7.1
Author: Softaculous
WooCommerce
Version: 6.6.0
Author: Automattic
WooCommerce Subscriptions
Version: 4.4.0
Author: WooCommerce
== Elements Usage ==
footer : 1
heading : 5
icon-list : 4
social-icons : 1
header : 1
nav-menu : 1
wp-page : 2
form : 1
heading : 1
product-archive : 1
button : 3
price-table : 3
wc-add-to-cart : 1
== Elementor Experiments ==
Optimized DOM Output: Active by default
Improved Asset Loading: Active by default
Improved CSS Loading: Active by default
Inline Font Icons: Inactive by default
Accessibility Improvements: Active by default
Import Export Template Kit: Active by default
Additional Custom Breakpoints: Active by default
Hide native WordPress widgets from search results: Active by default
: Inactive by default
Flexbox Container: Inactive by default
Default to New Theme Builder: Active by default
Hello Theme Header & Footer: Active by default
Landing Pages: Active by default
Color Sampler: Active by default
Favorite Widgets: Active by default
Admin Top Bar: Active by default
Page Transitions: Active by default
Notes: Active by default
Form Submissions: Active by default
Scroll Snap: Active by default
== Log ==
PHP: showing 4 of 4PHP: 2022-06-14 16:50:21 [notice X 261][/home/servkbza/public_html/wp-content/plugins/elementor-pro/core/database/model-base.php::135] Return type of ElementorPro\Core\Database\Model_Base::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [array (
'trace' => '
#0: /home/servkbza/public_html/wp-content/plugins/elementor-pro/core/database/model-base.php(10): Elementor\Core\Logger\Manager -> rest_error_handler()
#1: /home/servkbza/public_html/wp-content/plugins/elementor-pro/plugin.php(153): class type include()array (
0 => '/home/servkbza/public_html/wp-content/plugins/elementor-pro/core/database/model-base.php',
)
#2: /home/servkbza/public_html/wp-content/plugins/elementor-pro/modules/notes/database/models/note.php(18): ElementorPro\Plugin -> autoload()
#3: /home/servkbza/public_html/wp-content/plugins/elementor-pro/plugin.php(153): class type include()array (
0 => '/home/servkbza/public_html/wp-content/plugins/elementor-pro/modules/notes/database/models/note.php',
)
#4: /home/servkbza/public_html/wp-content/plugins/elementor-pro/modules/notes/data/controller.php(236): ElementorPro\Plugin -> autoload()
',
)]
PHP: 2022-06-14 23:29:21 [notice X 12][/home/servkbza/public_html/wp-content/plugins/elementor-pro/core/utils/collection.php::75] Return type of ElementorPro\Core\Utils\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2022-06-14 23:55:26 [warning X 3][/home/servkbza/public_html/wp-content/plugins/elementor/core/common/modules/ajax/module.php::171] Undefined array key "data" [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2022-06-14 23:57:24 [warning X 5][/home/servkbza/public_html/wp-content/plugins/elementor/includes/managers/image.php::87] Trying to access array offset on value of type bool [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
== Elementor - Compatibility Tag ==
Elementor Pro: Compatible
== Elementor Pro - Compatibility Tag ==
Contributor guide
Assessment
This issue has not been assessed yet.