woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.31k stars 10.75k forks source link

Cart and checkout block printing the content that exist in the HTML as string under the cart name #42986

Closed A1i-Konain closed 8 months ago

A1i-Konain commented 8 months ago

Prerequisites

Describe the bug

I am trying to create a popup button under the product name in the cart so when customer click the button the popup should open. But it is printing the content in the HTML as string and not creating the button.

Expected behavior

I expected that it will display a button as it was displaying when I was using cart page shortcode. screenshot-localhost-2023 12 20-16_31_26

Actual behavior

echoing the content exist in the HTML. screenshot-localhost-2023 12 20-16_22_30

Steps to reproduce

I am doing customization in functon.php file in Woocommerce.

WordPress Environment

`

WordPress Environment

WordPress address (URL): http://localhost/wordpress Site address (URL): http://localhost/wordpress WC Version: 8.4.0 REST API Version: ✔ 8.4.0 WC Blocks Version: ✔ 11.6.2 Action Scheduler Version: ✔ 3.7.0 Log Directory Writable: ✔ WP Version: 6.4.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache/2.4.56 (Unix) OpenSSL/1.1.1t PHP/8.0.28 mod_perl/2.0.12 Perl/v5.34.1 PHP Version: 8.0.28 PHP Post Max Size: 40 MB PHP Time Limit: 120 PHP Max Input Vars: 1000 cURL Version: 7.53.1 OpenSSL/1.1.1t

SUHOSIN Installed: – MySQL Version: 10.4.28-MariaDB Max Upload Size: 40 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 8.4.0 WC Database Prefix: wp_ Total Database Size: 6.99MB Database Data Size: 5.04MB Database Index Size: 1.95MB 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.13MB + Index: 0.11MB + 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.11MB + 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.08MB + 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_easywpsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_easywpsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 3.03MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.44MB + Index: 0.20MB + Engine InnoDB wp_posts: Data: 0.19MB + Index: 0.06MB + 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.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + 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_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_wc_orders_meta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_operational_data: 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_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + 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: 34 global_product_addon: 1 page: 8 plgfy_cpt_prd_ofrs: 4 plgfy_cpt_sts_tkt: 10 po_product_options: 15 post: 1 product: 32 product_variation: 37 revision: 14 shop_coupon: 1 shop_order_placehold: 48 viwec_template: 14 wp_navigation: 1 wp_template: 2

Security

Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ❌Error messages should not be shown to visitors.

Active Plugins (5)

Easy WP SMTP: by Easy WP SMTP – 2.2.0 Loco Translate: by Tim Whitlock – 2.6.6 WooCommerce Measurement Price Calculator: by SkyVerge – 3.13.3 WooPayments: by Automattic – 6.8.0 (update to version 6.9.2 is available) WooCommerce: by Automattic – 8.4.0

Inactive Plugins (95)

WooCommerce Blocks: by Automattic – 11.5.0 WooCommerce TM Extra Product Options: by ThemeComplete – 6.2 Woo Discount Rules: by Flycart – 2.6.2 Woo Discount Rules PRO 2.0: by Flycart – 2.6.1 YITH WooCommerce Membership Premium: by YITH – 2.6.0 YITH WooCommerce Product Bundles: by YITH – 2.0.0

Settings

API Enabled: – Force SSL: – Currency: PKR (₨) Currency Position: left_space Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) yith_bundle (yith_bundle)

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 Woo.com: – Enforce Approved Product Download Directories: ✔ HPOS feature screen enabled: ✔ HPOS feature enabled: ✔ Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore HPOS data sync enabled: –

WC Pages

Shop base: #7 - /index.php/shop/ Cart: #8 - /index.php/cart/ Checkout: #9 - /index.php/checkout/ My account: #10 - /index.php/my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 4.5.3 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: /opt/lampp/htdocs/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/templates/notices/error.php /opt/lampp/htdocs/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/templates/notices/notice.php /opt/lampp/htdocs/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/templates/notices/success.php

WooPayments

Version: 6.8.0 Connected to WPCOM: ❌ No Logging: Disabled

Admin

Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-variation-management product-virtual-downloadable remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: customize-store minified-js new-product-management-experience product-external-affiliate settings async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-12-21 09:12:00 +00:00 Options: ✔ Notes: 79 Onboarding: skipped

Action Scheduler

Complete: 251 Oldest: 2023-11-27 05:55:33 +0000 Newest: 2023-12-20 11:26:09 +0000

Failed: 20 Oldest: 2023-10-24 09:20:00 +0000 Newest: 2023-12-18 08:11:49 +0000

Pending: 4 Oldest: 2023-12-21 08:45:59 +0000 Newest: 2023-12-25 08:12:00 +0000

Status report information

Generated at: 2023-12-20 11:33:53 +00:00 `

Isolating the problem

github-actions[bot] commented 8 months ago

Hi @A1i-Konain,

While our goal is to address all the issues reported in this repository, GitHub should be treated as a place to report confirmed bugs only.

The type of issue you submitted looks like a support request which may or may not reveal a bug once proper troubleshooting is done. In order to confirm the bug, please follow one of the steps below: