woocommerce / facebook-for-woocommerce

A first-party extension plugin built for WooCommerce. Development is managed by Ventures.
https://woocommerce.com/products/facebook/
GNU General Public License v2.0
211 stars 138 forks source link

Sale Price in Facebook catalog is filled with product Regular Price, although only Regular Price is set on WooCommerce #1833

Closed solstudioim closed 2 years ago

solstudioim commented 3 years ago

πŸ”Ž Isolate the bug

When a product on WooCommerce doesn't have "sale price", only "regular price", and the product is set to "Sync and show in catalog", strangely in Facebook catalog, the sale price field is filled and "This item is on sale" is ticked and field with regular price.

✍️ Describe the bug

Initially, I got an issue reported by a user, ref: HC-28627376, whenever a product is set to sync and show in Facebook catalog either for a simple or variable product, on Facebook side, in catalog, the sale price field is filled with the regular price and "This item is on sale" is also checked.

step4-fb-sale-price_

πŸšΆβ€β™€οΈSteps to reproduce

(You'd need a Facebook Business Manager account connected to a WooCommerce store to replicate)

  1. Create a product on Woo, set regular price, don’t set the sale price, and set as Sync and show in catalog step1-fb-sale-price_

  2. Go to Facebook Commerce Manager, navigate to Catalog section, and in Items section, search for the name of the product. step2-fb-sale-price_

  3. Click the product shown, a popup will appear, and then click Edit Item. step3-fb-sale-price_

  4. The Regular price set on WooCommerce, is set as both β€œPrice” and β€œSale Price” in the product item, and "This item is on sale" is also checked. step4-fb-sale-price_

βœ”οΈ Expected behavior

When we don't set a value for Sale Price on WooCommerce product field, it's expected that when it's synced into Facebook catalog, in the product detail, the Sale Price isn't ticked, and the value set to zero or empty.

However, if both Regular Price and Sale Price are set on WooCommerce, it's properly set up accordingly on Facebook. step6-fb-sale-price_

Live link to the product page: https://solsubs.mystagingwebsite.com/product/trendy-coral-blazer/

πŸ—ƒ Logs

### WordPress Environment ###

WordPress address (URL): https://solsubs.mystagingwebsite.com
Site address (URL): https://solsubs.mystagingwebsite.com
WC Version: 5.1.0
REST API Version: βœ” 5.1.0
WC Blocks Version: βœ” 4.4.3
Action Scheduler Version: βœ” 3.1.6
WC Admin Version: βœ” 2.0.2
Log Directory Writable: βœ”
WP Version: 5.7
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: βœ”
Language: en_US
External object cache: βœ”

### Server Environment ###

Server Info: nginx
PHP Version: 7.4.16
PHP Post Max Size: 2 GB
PHP Time Limit: 1200
PHP Max Input Vars: 6144
cURL Version: 7.75.0
OpenSSL/1.1.0l

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.3.21-MariaDB-log
Max Upload Size: 2 GB
Default Timezone is UTC: βœ”
fsockopen/cURL: βœ”
SoapClient: βœ”
DOMDocument: βœ”
GZip: βœ”
Multibyte String: βœ”
Remote Post: βœ”
Remote Get: βœ”

### Database ###

WC Database Version: 5.1.0
WC Database Prefix: wp_
Total Database Size: 4.74MB
Database Data Size: 2.84MB
Database Index Size: 1.90MB
wp_woocommerce_sessions: Data: 0.03MB + 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.06MB + 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.09MB + Index: 0.11MB + 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.05MB + Index: 0.09MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 1.06MB + Index: 0.06MB + Engine InnoDB
wp_postmeta: Data: 0.47MB + Index: 0.42MB + Engine InnoDB
wp_posts: Data: 0.14MB + Index: 0.06MB + Engine InnoDB
wp_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + 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_usermeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + 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_booking_relationships: 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_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

### Post Type Counts ###

attachment: 57
customize_changeset: 5
custom_css: 1
fgf_rules: 1
nav_menu_item: 4
page: 9
post: 1
product: 67
product_variation: 39
revision: 10
shop_coupon: 1
shop_order: 23
shop_subscription: 10
wc_booking: 3
wc_membership_plan: 1
wc_user_membership: 3

### Security ###

Secure connection (HTTPS): βœ”
Hide errors from visitors: βœ”

### Active Plugins (20) ###

Action Scheduler - Disable Default Queue Runner: by Prospress Inc. – 1.0.0
Akismet Anti-Spam: by Automattic – 4.1.9
Code Snippets: by Code Snippets Pro – 2.14.1
Facebook for WooCommerce: by Facebook – 2.3.3
Free Gifts for WooCommerce: by FantasticPlugins – 6.2
Jetpack by WordPress.com: by Automattic – 9.5.2
Printful Integration for WooCommerce: by Printful – 2.1.21
Facebook for WooCommerce - settings tools: by SkyVerge – 1.0.0
WooCommerce Accommodation Bookings: by WooCommerce – 1.1.23
WooCommerce Account Funds: by Themesquad – 2.3.11
WooCommerce Bookings: by WooCommerce – 1.15.37
WooCommerce Checkout Field Editor: by WooCommerce – 1.6.0 (update to version 1.6.1 is available)
WooCommerce Deposits: by WooCommerce – 1.5.6
WooCommerce Dynamic Pricing: by Element Stark – 3.1.24
WooCommerce Authorize.Net Gateway: by SkyVerge – 3.5.0
WooCommerce Stripe Gateway: by WooCommerce – 5.0.0
WooCommerce Memberships: by SkyVerge – 1.21.4 (update to version 1.21.6 is available)
WooCommerce Store Credit: by Themesquad – 3.6.1
WooCommerce Subscriptions: by WooCommerce – 3.0.13
WooCommerce: by Automattic – 5.1.0

### Inactive Plugins (0) ###

### Dropin Plugins (2) ###

advanced-cache.php: advanced-cache.php
object-cache.php: Memcached

### Settings ###

API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: booking (booking)
deposit (deposit)
external (external)
grouped (grouped)
simple (simple)
store_credit (store_credit)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

Taxonomies: Product Visibility: 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: #5 - /shop/
Cart: #6 - /cart/
Checkout: #7 - /checkout/
My account: #8 - /my-account/
Terms and conditions: ❌ Page not set

### Theme ###

Name: Storefront
Version: 3.5.0 (update to version 3.5.1 is available)
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: –

### Memberships ###

Restriction mode:: Hide content only
Public content:: –
Excluded from discounts:: –
Membership plans:: 1
Gym Membership:: Members: 3Access method: Product(s) purchaseAccess length: Unlimited Subscription: YesInstallment plan: No

### Subscriptions ###

WCS_DEBUG: βœ” No
Subscriptions Mode: βœ” Live
Subscriptions Live URL: https://solsubs.mystagingwebsite.com
Subscription Statuses: wc-active: 6
wc-pending-cancel: 1
wc-on-hold: 1
wc-cancelled: 2

WooCommerce Account Connected: βœ” Yes
Active Product Key: βœ” Yes
Report Cache Enabled: βœ” Yes
Cache Update Failures: βœ” 0 failure

### Store Setup ###

Country / State: United States (US) β€” Oregon

### Subscriptions by Payment Gateway ###

Account Funds: wc-active: 1
Authorize.Net Credit Card: wc-on-hold: 1
Stripe: wc-active: 5
wc-cancelled: 2
wc-pending-cancel: 1

### Payment Gateway Support ###

Authorize.Net Credit Card: products
card_types
payment_form
inline
lightbox
tokenization
token_editor
charge
charge-virtual
authorization
capture_charge
customer_decline_messages
refunds
voids
customer_id
add_payment_method
apple_pay
subscriptions
subscription_suspension
subscription_cancellation
subscription_reactivation
subscription_amount_changes
subscription_date_changes
multiple_subscriptions
subscription_payment_method_change_customer
subscription_payment_method_change_admin

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

Account Funds: products
subscriptions
subscription_cancellation
subscription_reactivation
subscription_suspension
subscription_amount_changes
subscription_date_changes
subscription_payment_method_change
subscription_payment_method_change_customer
subscription_payment_method_change_admin

### Authorize.Net Credit Card ###

Environment: Test
Tokenization Enabled: βœ”
Debug Mode: Off
Webhooks Enabled: ❌
                        No signature key configured

### Action Scheduler ###

Complete: 44
Oldest: 2021-03-08 13:52:27 +0000
Newest: 2021-03-09 02:57:31 +0000

Pending: 57
Oldest: 2021-03-10 02:10:34 +0000
Newest: 2022-03-09 00:57:46 +0000

Canceled: 105
Oldest: -0001-11-30 00:00:00 +0000
Newest: -0001-11-30 00:00:00 +0000

### Status report information ###

Generated at: 2021-03-25 07:00:53 +00:00
solstudioim commented 3 years ago

Reported here as well on the forum: https://wordpress.org/support/topic/stock-quantity-not-syncing-with-facebook/?view=all#post-14374852

solstudioim commented 3 years ago

Reported as well by a different user on the forum: https://wordpress.org/support/topic/sale-price-is-the-same-as-regular-price/?view=all