woocommerce-subscriptions-custom-price-string
woocommerce-subscriptions-custom-price-string copied to clipboard
Product bundles with subscription items that have custom price strings only return the largest recurring payment
Describe the bug
Identified in 4294135-zen
When changing the price string of a simple subscription that is part of a product bundle, the recurring price of the entire bundle changes to match the largest custom price string in the bundle instead of adding the prices.
To reproduce
- Install and activate WooCommerce Subscriptions, WooCommerce Custom Price String, and WooCommerce Product Bundles.
- Create and publish at least 2 simple subscription products at different prices.
- Create a product bundle with a price to serve as a one-time fee.
- Add the subscription products from step 2 to the bundled product in step 3.
- Ensure each bundled product has
Priced Individually
enabled. - Publish the product bundle.
- Navigate to the product bundle page and note the listed price of the product bundle is the one-time fee and an additive amount of the recurring payments associated with the subscription products.
- Navigate to the product details for the subscriptions created in step 2.
- Modify the custom price strings for each subscription item.
- Update the subscriptions
- Navigate to the product bundle page and note the listed price of the product bundle is the one-time fee and the amount for the largest recurring payment of the bundled subscriptions.
Screenshots
Without custom price strings, the recurring payment total in a product bundle with subscriptions is additive:
Full Size: https://d.pr/i/A1FSJG
With custom price strings, the recurring payment total only takes the highest recurring payment value of the product bundle.
Full Size: https://d.pr/i/HcJsbQ
Expected behavior
When custom price strings are used for subscriptions that are a part of a bundle, the combined total of the recurring payments should be returned.
Additional details
System status
`
### WordPress Environment ###
WordPress address (URL):
Site address (URL):
WC Version: 5.6.0
REST API Version: ✔ 5.6.0
WC Blocks Version: ✔ 5.5.1
Action Scheduler Version: ✔ 3.2.1
WC Admin Version: ✔ 2.5.1
Log Directory Writable: ✔
WP Version: 5.8.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –
### Server Environment ###
Server Info: nginx/1.16.0
PHP Version: 7.4.1
PHP Post Max Size: 1,000 MB
PHP Time Limit: 1200
PHP Max Input Vars: 4000
cURL Version: 7.54.0
LibreSSL/2.6.5
SUHOSIN Installed: –
MySQL Version: 8.0.16
Max Upload Size: 300 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 5.6.0
WC Database Prefix: wp_
Total Database Size: 9.43MB
Database Data Size: 7.12MB
Database Index Size: 2.31MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.08MB + Index: 0.13MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_email_log: Data: 0.27MB + Index: 0.00MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 4.05MB + Index: 0.09MB + Engine InnoDB
wp_postmeta: Data: 1.52MB + Index: 0.58MB + Engine InnoDB
wp_posts: Data: 0.17MB + Index: 0.11MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_bookings_availabilitymeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
### Post Type Counts ###
attachment: 19
event_ticket: 4
event_ticket_email: 1
page: 10
post: 3
product: 77
product_variation: 125
revision: 3
shop_order: 8
wc_booking: 2
### Security ###
Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
### Active Plugins (5) ###
WooCommerce Stripe Gateway: by WooCommerce – 5.4.1
WooCommerce Product Bundles: by SomewhereWarm – 6.12.0 (update to version 6.12.1 is available)
WooCommerce Subscriptions - Custom Price String: by Prospress Inc. – 1.0.4
WooCommerce Subscriptions: by WooCommerce – 3.1.4
WooCommerce: by Automattic – 5.6.0
### Inactive Plugins (10) ###
Amazon Product Importer: by Nxtal – 1.2.4
Email Log: by Sudar – 2.4.5
Hello Dolly: by Matt Mullenweg – 1.7.2
WooCommerce Bookings: by WooCommerce – 1.15.43
WooCommerce Box Office: by WooCommerce – 1.1.35
WooCommerce Braintree Gateway: by SkyVerge – 3.3.3
WooCommerce Deposits: by WooCommerce – 1.5.7
WooCommerce Product CSV Import Suite: by WooCommerce – 1.10.46
WooCommerce Ship to Multiple Addresses: by WooCommerce – 3.6.32 (update to version 3.6.33 is available)
WooCommerce Table Rate Shipping: by WooCommerce – 3.0.33
### Settings ###
API Enabled: –
Force SSL: –
Currency: CAD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: booking (booking)
bundle (bundle)
external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)
Taxonomies: Product Visibility: exclude_from_catalog (exclude_from_catalog)
exclude_from_search (exclude_from_search)
exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to WooCommerce.com: ✔
### WC Pages ###
Shop base: #6 - /shop/
Cart: #7 - /cart/
Checkout: #8 - /checkout/
My account: #9 - /my-account/
Terms and conditions: ❌ Page not set
### Theme ###
Name: Storefront
Version: 3.8.1
Author URL: https://woocommerce.com/
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔
### Templates ###
Overrides: –
### Subscriptions ###
WCS_DEBUG: ✔ No
Subscriptions Mode: ✔ Live
Subscriptions Live URL: http://cm.local
Subscription Statuses: –
WooCommerce Account Connected: ✔ Yes
Active Product Key: ❌ No
Report Cache Enabled: ✔ Yes
Cache Update Failures: ✔ 0 failure
### Store Setup ###
Country / State: Canada — British Columbia
### Payment Gateway Support ###
Stripe: products
refunds
tokenization
add_payment_method
subscriptions
subscription_cancellation
subscription_suspension
subscription_reactivation
subscription_amount_changes
subscription_date_changes
subscription_payment_method_change
subscription_payment_method_change_customer
subscription_payment_method_change_admin
multiple_subscriptions
pre-orders
### Product Bundles ###
Database Version: 6.12.0
Loopback Test: –
Template Overrides: –
### Action Scheduler ###
Complete: 181
Oldest: 2021-09-02 15:41:34 +0000
Newest: 2021-09-14 14:40:53 +0000
Pending: 1
Oldest: 2021-09-14 16:18:30 +0000
Newest: 2021-09-14 16:18:30 +0000
### Status report information ###
Generated at: 2021-09-14 16:18:03 +00:00
`