woocommerce_add_to_cart_fragments deprecated
-
Hi Team,
It appears that although the filter
woocomerce_add_to_cart_fragments
has been deprecated in favor ofadd_to_cart_fragments
the deprecated filter is still being called inWC_AJAX::get_refreshed_fragments()
as of WC Version 3.0.0./** * Get a refreshed cart fragment, including the mini cart HTML. */ public static function get_refreshed_fragments() { ob_start(); woocommerce_mini_cart(); $mini_cart = ob_get_clean(); $data = array( 'fragments' => apply_filters( 'woocommerce_add_to_cart_fragments', array( 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>', ) ), 'cart_hash' => apply_filters( 'woocommerce_add_to_cart_hash', WC()->cart->get_cart_for_session() ? md5( json_encode( WC()->cart->get_cart_for_session() ) ) : '', WC()->cart->get_cart_for_session() ), ); wp_send_json( $data ); }
Website Link
No link as the testing was performed on a localhost install.System Status Report:
The systen status report was take from a localhost instance running on MAMP 3.3.0.### WordPress Environment ### Home URL: https://localhost:8888/paymentplugins Site URL: https://localhost:8888/paymentplugins WC Version: 3.0.0 Log Directory Writable: ? WP Version: 4.7.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ? WP Cron: ? Language: en_US ### Server Environment ### Server Info: Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2h mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/5.4.1 mod_perl/2.0.8 Perl/v5.16.3 PHP Version: ? 5.4.1 - We recommend a minimum PHP version of 5.6. See: How to update your PHP version PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.36.0 OpenSSL/1.0.2h SUHOSIN Installed: – MySQL Version: 5.6.34 Max Upload Size: 2 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? wp_remote_post() failed. Contact your hosting provider. cURL error 35: Unsupported SSL protocol version Remote Get: ? wp_remote_get() failed. Contact your hosting provider. 200 ### Database ### WC Database Version: 2.3.8 WC Database Prefix: wp_paymentplugins woocommerce_sessions: ? woocommerce_api_keys: ? woocommerce_attribute_taxonomies: ? woocommerce_downloadable_product_permissions: ? woocommerce_order_items: ? woocommerce_order_itemmeta: ? woocommerce_tax_rates: ? woocommerce_tax_rate_locations: ? woocommerce_shipping_zones: ? woocommerce_shipping_zone_locations: ? woocommerce_shipping_zone_methods: ? woocommerce_payment_tokens: ? woocommerce_payment_tokenmeta: ? MaxMind GeoIP Database: ? ### 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 (4) ### Heartbeat Control: by Jeff Matson – 1.0.3 Braintree For WooCommerce Pro: by Payment Plugins [email protected] – 2.6.1 WooCommerce: by Automattic – 3.0.0 Zendesk Plugin: by Payment Plugins – 1.0.0 ### Settings ### API Enabled: ? Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: braintree_subscription (braintree_subscription) braintree-subscription (braintree-subscription) braintree-variable-subscription (braintree-variable-subscription) external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) ### WC Pages ### Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ ### Theme ### Name: Mystile Version: 1.3.9 – 1.3.18 is available Author URL: https://www.woothemes.com Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally then we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: mystile/woocommerce/archive-product.php mystile/woocommerce/cart\cart-empty.php mystile/woocommerce/cart\cart-item-data.php mystile/woocommerce/cart\cart-shipping.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/cart\cart-totals.php mystile/woocommerce/cart\cart.php version 2.3.8 is out of date. The core version is 3.0.0 mystile/woocommerce/cart\cross-sells.php version 1.6.4 is out of date. The core version is 3.0.0 mystile/woocommerce/cart\mini-cart.php version 2.1.0 is out of date. The core version is 2.5.0 mystile/woocommerce/cart\proceed-to-checkout-button.php mystile/woocommerce/cart\shipping-calculator.php mystile/woocommerce/checkout\cart-errors.php mystile/woocommerce/checkout\form-billing.php mystile/woocommerce/checkout\form-checkout.php mystile/woocommerce/checkout\form-coupon.php mystile/woocommerce/checkout\form-login.php mystile/woocommerce/checkout\form-pay.php version 1.6.4 is out of date. The core version is 2.5.0 mystile/woocommerce/checkout\form-shipping.php mystile/woocommerce/checkout\payment-method.php mystile/woocommerce/checkout\payment.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/checkout\review-order.php mystile/woocommerce/checkout\thankyou.php version 2.2.0 is out of date. The core version is 3.0.0 mystile/woocommerce/content-product.php version 2.4.0 is out of date. The core version is 2.6.1 mystile/woocommerce/content-product_cat.php version 2.4.0 is out of date. The core version is 2.6.1 mystile/woocommerce/content-single-product.php mystile/woocommerce/content-widget-product.php version - is out of date. The core version is 2.5.0 mystile/woocommerce/emails\admin-cancelled-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\admin-new-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-completed-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-invoice.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-new-account.php mystile/woocommerce/emails\customer-note.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-processing-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-refunded-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\customer-reset-password.php mystile/woocommerce/emails\email-addresses.php mystile/woocommerce/emails\email-footer.php mystile/woocommerce/emails\email-header.php mystile/woocommerce/emails\email-order-items.php version 2.1.2 is out of date. The core version is 3.0.0 mystile/woocommerce/emails\email-styles.php mystile/woocommerce/emails\plain\admin-cancelled-order.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\admin-new-order.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-completed-order.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-invoice.php version 2.2.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-new-account.php mystile/woocommerce/emails\plain\customer-note.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-processing-order.php version 2.3.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-refunded-order.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/emails\plain\customer-reset-password.php mystile/woocommerce/emails\plain\email-addresses.php mystile/woocommerce/emails\plain\email-order-items.php version 2.1.2 is out of date. The core version is 3.0.0 mystile/woocommerce/global\breadcrumb.php mystile/woocommerce/global\form-login.php mystile/woocommerce/global\quantity-input.php version 2.1.0 is out of date. The core version is 2.5.0 mystile/woocommerce/global\sidebar.php mystile/woocommerce/global\wrapper-end.php mystile/woocommerce/global\wrapper-start.php mystile/woocommerce/loop\add-to-cart.php version 2.1.0 is out of date. The core version is 2.5.0 mystile/woocommerce/loop\loop-end.php mystile/woocommerce/loop\loop-start.php mystile/woocommerce/loop\no-products-found.php mystile/woocommerce/loop\orderby.php mystile/woocommerce/loop\pagination.php mystile/woocommerce/loop\price.php mystile/woocommerce/loop\rating.php mystile/woocommerce/loop\result-count.php mystile/woocommerce/loop\sale-flash.php mystile/woocommerce/myaccount\dashboard.php mystile/woocommerce/myaccount\downloads.php version 2.6.0 is out of date. The core version is 3.0.0 mystile/woocommerce/myaccount\form-add-payment-method.php mystile/woocommerce/myaccount\form-edit-account.php mystile/woocommerce/myaccount\form-edit-address.php mystile/woocommerce/myaccount\form-login.php mystile/woocommerce/myaccount\form-lost-password.php mystile/woocommerce/myaccount\form-reset-password.php mystile/woocommerce/myaccount\lost-password-confirmation.php mystile/woocommerce/myaccount\my-account.php mystile/woocommerce/myaccount\my-address.php mystile/woocommerce/myaccount\my-downloads.php mystile/woocommerce/myaccount\my-orders.php mystile/woocommerce/myaccount\navigation.php mystile/woocommerce/myaccount\orders.php mystile/woocommerce/myaccount\payment-methods.php mystile/woocommerce/myaccount\view-order.php mystile/woocommerce/notices\error.php mystile/woocommerce/notices\notice.php mystile/woocommerce/notices\success.php mystile/woocommerce/order\form-tracking.php mystile/woocommerce/order\order-again.php mystile/woocommerce/order\order-details-customer.php version 2.4.0 is out of date. The core version is 3.0.0 mystile/woocommerce/order\order-details-item.php version 2.4.0 is out of date. The core version is 3.0.0 mystile/woocommerce/order\order-details.php version 2.4.0 is out of date. The core version is 3.0.0 mystile/woocommerce/order\tracking.php mystile/woocommerce/product-searchform.php version - is out of date. The core version is 2.5.0 mystile/woocommerce/single-product\add-to-cart\external.php mystile/woocommerce/single-product\add-to-cart\grouped.php version 2.1.7 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\add-to-cart\simple.php version 2.1.0 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\add-to-cart\variable.php version 2.4.0 is out of date. The core version is 2.5.0 mystile/woocommerce/single-product\meta.php version 1.6.4 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\price.php version 1.6.4 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\product-attributes.php version 2.1.3 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\product-image.php version 2.0.14 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\product-thumbnails.php version 2.3.0 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\rating.php mystile/woocommerce/single-product\related.php version 1.6.4 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\review.php version 2.1.0 is out of date. The core version is 2.6.0 mystile/woocommerce/single-product\sale-flash.php mystile/woocommerce/single-product\share.php mystile/woocommerce/single-product\short-description.php mystile/woocommerce/single-product\tabs\additional-information.php version 2.0.0 is out of date. The core version is 3.0.0 mystile/woocommerce/single-product\tabs\description.php mystile/woocommerce/single-product\tabs\tabs.php mystile/woocommerce/single-product\title.php mystile/woocommerce/single-product\up-sells.php mystile/woocommerce/single-product-reviews.php mystile/woocommerce/single-product.php mystile/woocommerce/taxonomy-product_cat.php mystile/woocommerce/taxonomy-product_tag.php Outdated Templates: ?Learn how to update
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘woocommerce_add_to_cart_fragments deprecated’ is closed to new replies.