Forum Replies Created

Viewing 15 replies - 1 through 15 (of 66 total)
  • Thread Starter bklogos

    (@bklogos)

    Hi Shazeen,

    Thanks for the information, I made a comment on the original closed issue, someone else also made a note there about the re-occurrence.

    Thread Starter bklogos

    (@bklogos)

    The issue remains with update v10.4.2.

    A similar issue was resolved previously, but it is back again after the update 10.4.0 2025-12-10, and it is still the case when I tried the update 10.4.2. today.

    The only difference between this occurrence and the previous occurrence is that the undo fails regardless of how many items are in the cart. In the previous instance, it only failed when there was 1 item in the cart.

    I test these updates out on a clone of the production site, so I there is really no point to giving a link to the site.

    Thread Starter bklogos

    (@bklogos)

    Been through this before …. all circumstances are the same, except this time the undo does not function if there is 1 item in the cart or more than 1 item in the cart. The page just refreshes with the same result, the item remains deleted.

    I’ll wait unit the next update.

    https://ww.wp.xz.cn/support/topic/undo-cart-deletion-not-working-after-update-v-10-1-0/page/2/
    https://github.com/woocommerce/woocommerce/issues/60550

    Thread Starter bklogos

    (@bklogos)

    I figured it out… the developer used some css to hide both options. Which is strange considering they could have turned them off in the plugin. I can see if they were using the css for different media screens, but they weren’t. Just in case anybody has a use for these…

    .woo-variation-gallery-wrapper .woo-variation-gallery-slider-wrapper:after{
    content: "";
    width: 100%;
    height: 100%;
    background-color: #bbb;
    opacity: 0.1;
    position: absolute;
    left: 0;
    top: 0;
    }
    .woo-variation-gallery-trigger {
    display: none !Important;
    }
    Thread Starter bklogos

    (@bklogos)

    Upgrading to Nexi v8.1.0 Same problems as above… although at least now there is an new icon, but it does not say Nexi its just a plain card.

    Payment cards

    Thread Starter bklogos

    (@bklogos)

    Hi @fizanzvai , thanks for the reply.

    I did not write the theme, but I’m stuck with it.

    Zoom works perfectly if I switch to Storefront. After making certain that theme support is included, it still does not work. I looked over that wc doc, and the custom theme looks up to wc standards, but no joy.

    Can there be added css or js that that would prevent the zoom function from working? I know they used css to block the gallery image popup from working, that I found and commented it out.

    I spun up a clone, I’ll leave it up for the day

    https://tavat-eyewear-a.c.wetopi.com/

    Thread Starter bklogos

    (@bklogos)

    here’s the code for undo

    woocommerce/includes/class-wc-form-handler.php – line 684

    	// Undo Cart Item.
    $cart_item_key = sanitize_text_field( wp_unslash( $_GET['undo_item'] ) );

    WC()->cart->restore_cart_item( $cart_item_key );

    if ( wp_get_referer() ) {
    wp_safe_redirect( remove_query_arg( array( 'undo_item', '_wpnonce' ), wp_get_referer() ) );
    exit;
    }
    }
    Thread Starter bklogos

    (@bklogos)

    Hi @shahzeenfarooq

    You are mistaken, WooCommerce cart has an undo.

    Don’t take my word for it, just load WooCommerce and the StroreFront theme, add a item to the cart, delete the item, and you will be presented with a link to undo the removal.

    Thread Starter bklogos

    (@bklogos)

    Hi @frankremmy

    I would like to review this again if I may.

    I tried this again using a fresh clone, with the StoreFront theme, and all plugins disabled except for WooCommerce and the bug is reproducible. So I have entered it as such on the WC Dev GitHub pages

    <br>### WordPress Environment ###<br><br>WordPress address (URL): https://tavat-eyewear-a.c.wetopi.com<br>Site address (URL): https://tavat-eyewear-a.c.wetopi.com<br>WC Version: 10.1.1<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ✔ 3.9.3<br>Log Directory Writable: ✔<br>WP Version: 6.8.2<br>WP Multisite: –<br>WP Memory Limit: 768 MB<br>WP Debug Mode: –<br>WP Cron: –<br>Language: en_US<br>External object cache: –<br><br>### Server Environment ###<br><br>Server Info: nginx/1.24.0<br>Server Architecture: Linux 5.4.0-204-generic x86_64<br>PHP Version: 7.4.33<br>PHP Post Max Size: 200 MB<br>PHP Time Limit: 300<br>PHP Max Input Vars: 5000<br>cURL Version: 8.5.0<br>OpenSSL/3.0.13<br><br>SUHOSIN Installed: –<br>MySQL Version: 10.11.11-MariaDB-ubu2404<br>Max Upload Size: 200 MB<br>Default Timezone is UTC: ✔<br>fsockopen/cURL: ✔<br>SoapClient: ✔<br>DOMDocument: ✔<br>GZip: ✔<br>Multibyte String: ✔<br>Remote Post: ✔<br>Remote Get: ✔<br><br>### Database ###<br><br>WC Database Version: 10.1.1<br>WC Database Prefix: wp_<br>Total Database Size: 130.23MB<br>Database Data Size: 105.90MB<br>Database Index Size: 24.33MB<br>wp_woocommerce_sessions: Data: 0.03MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_order_items: Data: 0.08MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_order_itemmeta: Data: 0.36MB + Index: 0.44MB + Engine InnoDB<br>wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_actions: Data: 1.17MB + Index: 0.80MB + Engine InnoDB<br>wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_logs: Data: 0.16MB + Index: 0.14MB + Engine InnoDB<br>wp_ac_segments: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_admin_columns: Data: 0.08MB + Index: 0.02MB + Engine InnoDB<br>wp_aelia_dismissed_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_ajaxsearchpro: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_ajaxsearchpro_priorities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_ajaxsearchpro_statistics: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_alm: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_asp_index: Data: 0.31MB + Index: 0.56MB + Engine InnoDB<br>wp_asp_synonyms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_bsk_pdf_manager_cats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_bsk_pdf_manager_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_bsk_pdf_manager_pdfs: Data: 0.13MB + Index: 0.00MB + Engine InnoDB<br>wp_bsk_pdf_manager_relationships: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>wp_bsk_pdf_manager_user_available: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_check_email_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_cli_cookie_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_cli_cookie_scan_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_cli_cookie_scan_cookies: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_cli_cookie_scan_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_cli_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_comments: Data: 0.27MB + Index: 0.31MB + Engine InnoDB<br>wp_dgwt_wcas_index: Data: 1.52MB + Index: 0.33MB + Engine InnoDB<br>wp_dgwt_wcas_invindex_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_dgwt_wcas_invindex_doclist: Data: 0.41MB + Index: 0.48MB + Engine InnoDB<br>wp_dgwt_wcas_invindex_wordlist: Data: 0.17MB + Index: 0.31MB + Engine InnoDB<br>wp_dgwt_wcas_tax_index: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_duplicator_pro_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_duplicator_pro_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_edpw_custom_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_edpw_templates: Data: 2.50MB + Index: 0.00MB + Engine InnoDB<br>wp_elfsight_popup_widgets: Data: 0.03MB + Index: 0.00MB + Engine InnoDB<br>wp_email_customizer_plus_templates: Data: 4.02MB + Index: 0.00MB + Engine InnoDB<br>wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_mclean_refs: Data: 0.23MB + Index: 0.00MB + Engine InnoDB<br>wp_mclean_scan: Data: 0.13MB + Index: 0.02MB + Engine InnoDB<br>wp_nexi_xpay_order_lock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_options: Data: 5.34MB + Index: 0.33MB + Engine InnoDB<br>wp_podsrel: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_postmeta: Data: 29.56MB + Index: 14.03MB + Engine InnoDB<br>wp_posts: Data: 53.44MB + Index: 1.50MB + Engine InnoDB<br>wp_pum_subscribers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_shipment_batch_process: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_termmeta: Data: 0.50MB + Index: 0.70MB + Engine InnoDB<br>wp_terms: Data: 0.13MB + Index: 0.16MB + Engine InnoDB<br>wp_term_relationships: Data: 0.23MB + Index: 0.17MB + Engine InnoDB<br>wp_term_taxonomy: Data: 0.14MB + Index: 0.16MB + Engine InnoDB<br>wp_usermeta: Data: 0.39MB + Index: 0.39MB + Engine InnoDB<br>wp_users: Data: 0.05MB + Index: 0.05MB + Engine InnoDB<br>wp_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_invoice_number_2022: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_invoice_number_2023: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_receipt_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_customer_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_product_lookup: Data: 0.06MB + Index: 0.08MB + Engine InnoDB<br>wp_wc_order_stats: Data: 0.06MB + Index: 0.05MB + Engine InnoDB<br>wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_product_attributes_lookup: Data: 0.14MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_meta_lookup: Data: 0.25MB + Index: 0.52MB + Engine InnoDB<br>wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_amazon_buyer_index: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woo_shipment_status_email: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woo_shippment_provider: Data: 0.14MB + Index: 0.00MB + Engine InnoDB<br>wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpmailsmtp_emails_log: Data: 0.06MB + Index: 0.08MB + Engine InnoDB<br>wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_yoast_indexable: Data: 1.50MB + Index: 0.66MB + Engine InnoDB<br>wp_yoast_indexable_hierarchy: Data: 0.13MB + Index: 0.20MB + Engine InnoDB<br>wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_yoast_seo_links: Data: 0.22MB + Index: 0.16MB + Engine InnoDB<br>wp_yoast_seo_meta: Data: 0.39MB + Index: 0.00MB + Engine InnoDB<br><br>### Post Type Counts ###<br><br>_pods_field: 4<br>_pods_pod: 2<br>_pods_template: 1<br>acf-field: 11<br>acf-field-group: 2<br>aoc_popup: 3<br>attachment: 4662<br>custom_css: 1<br>customize_changeset: 365<br>erforms: 2<br>erforms_submission: 1388<br>flamingo_contact: 126<br>flamingo_inbound: 94<br>nav_menu_item: 32<br>page: 43<br>popup: 2<br>popup_theme: 8<br>post: 2<br>product: 258<br>product_variation: 1480<br>revision: 59<br>shop_order: 448<br>shop_order_refund: 31<br>soliloquy: 2<br>woo_mb_template: 12<br>woo_product_badges: 1<br>wpcf7_contact_form: 2<br>wpforms: 1<br>wpsl_stores: 1093<br><br>### Security ###<br><br>Secure connection (HTTPS): ✔<br>Hide errors from visitors: ✔<br><br>### Active Plugins (1) ###<br><br>WooCommerce: by Automattic – 10.1.1<br><br>### Inactive Plugins (47) ###<br><br>Additional Variation Images Gallery for WooCommerce: by Emran Ahmed – 1.3.28<br>Admin Columns Pro: by AdminColumns.com – 6.4.21<br>Advanced Custom Fields: by WP Engine – 6.5.0<br>Advanced Shipment Tracking for WooCommerce: by zorem – 3.8.5<br>Amazon Pay for WooCommerce: by Amazon Pay – 2.5.4<br>Auto Image Attributes From Filename With Bulk Updater: by Arun Basil Lal – 4.4<br>Better Plugin Compatibility Control: by Oliver Schlöbe – 6.8.0<br>Better Search Replace: by WP Engine – 1.4.10<br>BSK PDF Manager Pro: by BannerSky.com – 3.7<br>Classic Editor: by WordPress Contributors – 1.6.7<br>Collapse-O-Matic: by twinpictures<br>baden03 – 1.8.5.8<br><br>Contact Form 7: by Takayuki Miyoshi – 6.1.1<br>CookieYes | GDPR Cookie Consent: by CookieYes – 3.3.3<br>CURCY - WooCommerce Multi Currency Premium: by VillaTheme – 2.3.10<br>Debug Bar: by wordpressdotorg – 1.1.7<br>Duplicator Pro: by Snap Creek – 4.5.7<br>Email Customizer for WooCommerce - Spark Editor Pro: by emaileditorplus – 1.0.16<br>Envato Market: by Envato – 2.0.12<br>FiboSearch - AJAX Search for WooCommerce (Pro): by FiboSearch Team – 1.31.0<br>Login & Register Customizer – Popup | Slider | Inline | WooCommerce: by XootiX – 2.9.6<br>LoginPress: by LoginPress – 5.0.0<br>Members: by MemberPress – 3.2.18<br>Nexi XPay: by Nexi SpA – 7.6.2<br>Page scroll to id: by malihu – 1.7.9<br>Payment Plugins for Stripe WooCommerce: by Payment Plugins<br>[email protected] – 3.3.91<br><br>PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 4.6.2<br>Perfmatters: by forgemedia – 2.4.7<br>Popup Anything - A Marketing Popup: by Essential Plugin – 2.8.8<br>Preview E-mails for WooCommerce: by Digamber Pradhan – 2.2.14<br>Product Pre-Orders for Woocommerce: by VillaTheme – 1.2.14<br>Redirection: by John Godley – 5.5.2<br>Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.6<br>Smush: by WPMU DEV – 3.20.0<br>Sold Out Badge for WooCommerce: by Charlie Etienne – 4.4.0<br>SysBasics WooSwatches – Color or Image Variation Swatches For WooCommerce: by sysbasics – 4.8.0<br>WooCommerce - Show only lowest prices in variable products: by Fernando Tellado – 2.0<br>WooCommerce PDF Invoices Italian Add-on: by laboratorio d'Avanguardia – 0.7.4<br>WordPress Importer: by wordpressdotorg – 0.8.4<br>WP Crontrol: by John Blackbourn – 1.19.1<br>WPFront Notification Bar: by Syam Mohan – 3.5.1<br>WP Mail SMTP Pro: by WP Mail SMTP – 4.5.0<br>WP Rollback: by WP Rollback – 3.0.3<br>WP Store Locator: by Tijmen Smit – 2.2.260<br>WP Store Locator - CSV Manager: by Tijmen Smit – 1.2.12<br>WP Super Cache: by Automattic – 3.0.1<br>Yoast SEO: by Team Yoast – 25.6<br>Yoast Test Helper: by Team Yoast – 1.18<br><br>### Settings ###<br><br>Legacy API Enabled: –<br>Force SSL: –<br>Currency: EUR (€)<br>Currency Position: right<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: –<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: –<br>Enabled Features: analytics<br>marketplace<br>order_attribution<br>site_visibility_badge<br>remote_logging<br>blueprint<br>point_of_sale<br><br><br>### Logging ###<br><br>Enabled: ✔<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 354 KB<br><br>### WC Pages ###<br><br>Shop base: #12 - /shop/<br>Cart: #42 - /carrello/ - Contains the [woocommerce_cart] shortcode<br>Checkout: #43 - /checkout/ - Contains the [woocommerce_checkout] shortcode<br>My account: #44 - /mio-account/ - Contains the [woocommerce_my_account] shortcode<br>Terms and conditions: ❌ Page not set<br><br>### Theme ###<br><br>Name: Storefront<br>Version: 4.6.1<br>Author URL: https://woocommerce.com/<br>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<br>Theme type: Classic theme<br>WooCommerce Support: ✔<br><br>### Templates ###<br><br>Overrides: –<br><br>### Admin ###<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>onboarding<br>onboarding-tasks<br>pattern-toolkit-full-composability<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>printful<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br>add-to-cart-with-options-stepper-layout<br><br>Disabled Features: product-data-views<br>experimental-blocks<br>experimental-iapi-mini-cart<br>experimental-iapi-runtime<br>coming-soon-newsletter-template<br>minified-js<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br>use-wp-horizon<br>experimental-wc-rest-api<br><br>Daily Cron: ✔ Next scheduled: 2025-08-22 11:49:35 +02:00<br>Options: ✔<br>Notes: 16<br>Onboarding: completed<br><br>### Action Scheduler ###<br><br>Complete: 657<br>Oldest: 2025-07-21 20:39:35 +0200<br>Newest: 2025-08-21 16:09:04 +0200<br><br>Failed: 482<br>Oldest: 2021-08-06 09:22:07 +0200<br>Newest: 2025-08-03 15:37:16 +0200<br><br>Pending: 13<br>Oldest: 2025-08-21 17:40:14 +0200<br>Newest: 2026-01-01 00:00:01 +0100<br><br><br>### Status report information ###<br><br>Generated at: 2025-08-21 16:31:19 +02:00<br>

    Thread Starter bklogos

    (@bklogos)

    Also, if I comment out all of my cart code, and install WPC Fly Cart 5.9.5 the undo issue is present. So it is not just my theme ( function.php ) that is at issue. The update has caused problems with other cart plugins as well.

    Thread Starter bklogos

    (@bklogos)

    Ugh…

    Here something to think about, if I install the plugin Side Cart Woocommerce | Woocommerce Cart
    By xootix, everything works as it should without the enqueue

    Thread Starter bklogos

    (@bklogos)

    Hi @frankremmy

    That just ends up at the status quo, the enqueue is still needed for the counter to function, and it needs to be commented out for the undo to function on the last item in the cart.

    Back to where I started.

    Would it be possible to enqueue/dequeue within the AJAX shortcode function?

    function enqueue_wc_cart_fragments() {
    if ( WC()->cart && ! WC()->cart->is_empty() ) {
    wp_enqueue_script( 'wc-cart-fragments' );
    }
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );


    //function enqueue_wc_cart_fragments() {
    // wp_enqueue_script( 'wc-cart-fragments' );
    //}
    //add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );



    add_shortcode ('woo_cart_but', 'woo_cart_but' );
    /**
    * Create Shortcode for WooCommerce Cart Menu Item
    */
    function woo_cart_but() {
    ob_start();

    $cart_count = WC()->cart->cart_contents_count; // Set variable for cart item count
    $cart_url = wc_get_cart_url(); // Set Cart URL

    ?>
    <li><a class="menu-item cart-contents" href="<?php echo $cart_url; ?>" title="My Basket">
    <?php
    if ( $cart_count > 0 ) {
    ?>
    <span class="cart-contents-count"><?php echo $cart_count; ?></span>
    <?php
    }
    ?>
    </a></li>
    <?php

    return ob_get_clean();

    }


    add_filter( 'woocommerce_add_to_cart_fragments', 'woo_cart_but_count' );
    /**
    * Add AJAX Shortcode when cart contents update
    */
    function woo_cart_but_count( $fragments ) {

    ob_start();

    $cart_count = WC()->cart->cart_contents_count;
    $cart_url = wc_get_cart_url();

    ?>
    <li><a class="menu-item cart-contents" href="<?php echo $cart_url; ?>" title="<?php _e( 'View your shopping cart' ); ?>">
    <?php
    if ( $cart_count > 0 ) {
    ?>
    <span class="cart-contents-count"><?php echo $cart_count; ?></span>
    <?php
    }
    ?></a></li>
    <?php

    $fragments['li a.cart-contents'] = ob_get_clean();

    return $fragments;
    }



    add_filter( 'wp_nav_menu_menu-principale_items', 'woo_cart_but_icon', 10, 2 ); // Change menu to suit - example uses 'top-menu'
    /**
    * Add WooCommerce Cart Menu Item Shortcode to particular menu
    */
    function woo_cart_but_icon ( $items, $args ) {
    $shortcodeoutput = do_shortcode( '[woo_cart_but]' );
    $items .= $shortcodeoutput;
    return $items;
    }
    Thread Starter bklogos

    (@bklogos)

    Hi @frankremmy

    Sorry, I didn’t copy the complete chain of code pertaining to the cart. I believe there is already a code calling to the JS. I didn’t write this, but now I have to deal with it. Maybe the Ajax code written below isn’t 100% correct?

    OK, the link to the clone is https://tavat-eyewear-a.c.wetopi.com/sun/ I’ve commented out the enqueue code, so the undo is working as it should, the big issue now is the counter not updating.

    Brian

    //Create Shortcode for WooCommerce Cart Menu Item
    add_shortcode ('woo_cart_but', 'woo_cart_but' );
    function woo_cart_but() {
    ob_start();

    $cart_count = WC()->cart->cart_contents_count; // Set variable for cart item count
    $cart_url = wc_get_cart_url(); // Set Cart URL

    ?>
    <li><a class="menu-item cart-contents" href="<?php echo $cart_url; ?>" title="My Basket">
    <?php
    if ( $cart_count > 0 ) {
    ?>
    <span class="cart-contents-count"><?php echo $cart_count; ?></span>
    <?php
    }
    ?>
    </a></li>
    <?php

    return ob_get_clean();

    }

    //Add AJAX Shortcode when cart contents update
    add_filter( 'woocommerce_add_to_cart_fragments', 'woo_cart_but_count' );
    function woo_cart_but_count( $fragments ) {

    ob_start();

    $cart_count = WC()->cart->cart_contents_count;
    $cart_url = wc_get_cart_url();

    ?>
    <a class="cart-contents menu-item" href="<?php echo $cart_url; ?>" title="<?php _e( 'View your shopping cart' ); ?>">
    <?php
    if ( $cart_count > 0 ) {
    ?>
    <span class="cart-contents-count"><?php echo $cart_count; ?></span>
    <?php
    }
    ?></a>
    <?php

    $fragments['a.cart-contents'] = ob_get_clean();

    return $fragments;
    }


    //Add WooCommerce Cart Menu Item Shortcode to particular menu
    add_filter( 'wp_nav_menu_menu-principale_items', 'woo_cart_but_icon', 10, 2 );
    function woo_cart_but_icon ( $items, $args ) {
    $shortcodeoutput = do_shortcode( '[woo_cart_but]' );
    $items .= $shortcodeoutput;
    return $items;
    }


    Thread Starter bklogos

    (@bklogos)

    Hi @frankremmy

    Thanks for the help. I could share a link to the clone site, contact me directly.

    • Tried the wc native function. The undo works as it should, however the menu bar cart counter will not update unless the page is refreshed.
    • The modified function has the same results as the current function.
    • The theme does override the cart.php template, however I have reviewed and updated it to the current version, including our minor cosmetic revisions which would have no effect.

    Perhaps a change to the shortcode that controls the counter could get it to work with the wc native function ?

    add_shortcode ('woo_cart_but', 'woo_cart_but' );
    /**
    * Create Shortcode for WooCommerce Cart Menu Item
    */
    function woo_cart_but() {
    ob_start();

    $cart_count = WC()->cart->cart_contents_count; // Set variable for cart item count
    $cart_url = wc_get_cart_url(); // Set Cart URL

    ?>
    <li><a class="menu-item cart-contents" href="<?php echo $cart_url; ?>" title="My Basket">
    <?php
    if ( $cart_count > 0 ) {
    ?>
    <span class="cart-contents-count"><?php echo $cart_count; ?></span>
    <?php
    }
    ?>
    </a></li>
    <?php

    return ob_get_clean();

    }

    Best regards, Brian

    Thread Starter bklogos

    (@bklogos)

    Hi @frankremmy

    If I disable the following code it functions.

    This is a WooCommerce script, and we need it to keep the cart item counter in the menu bar current.

    What do we do now ????

    function enqueue_wc_cart_fragments() { 
    wp_enqueue_script( 'wc-cart-fragments' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_wc_cart_fragments' );
Viewing 15 replies - 1 through 15 (of 66 total)