Add the following code to your theme’s functions.php
file, or as a new plugin:
add_filter( 'woocommerce_in_cart_product_title', 'add_sku_in_cart', 20, 3);
function add_sku_in_cart( $title, $values, $cart_item_key ) {
$sku = $values['data']->get_sku();
return $sku ? $title . sprintf(" (SKU: %s)", $sku) : $title;
}
Related Posts:
- How to get home page ID?
- How to detect WP plugins used on a site
- WordPress plugin executing code twice
- How to Override a Pluggable Function
- Login with OpenID, similar to Stack Exchange sites?
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- Which method is best to enqueue scripts
- How to override a theme function (within a class) using a plugin
- How to restrict Front-End Editor on a page?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Custom interval is not working
- Advanced custom field plugin not showing in admin sidebar
- How to remove action from plugin?
- Sidebar Generator issue [closed]
- ‘Easy Table’ Plugin has float issues
- Force plugin to fail activation
- Is there a plugin to help with translation of other plugins? [closed]
- Can anyone identify this like plugin (not facebook like)?
- How to load default scripts included with WordPress correctly?
- Skip file when plugin updated
- Can I use a Shortcode output as an HTML attribute value?
- Use WordPress with a custom OAuth2 provider
- $wpdb working with ajax but showing ajax error instead of success
- Inserting large amounts of data into a custom table during plugin install
- WP-Markdown treating java generics like HTML tags
- Can’t get title of latest post
- How to remove all javascript in a theme wordpress?
- Display success message after wp_update_post
- Global variables during plugin activation , deactivation and uninstall operarations
- Need help restoring my WordPress blog
- White page on custom plugin option submit
- Image upload and other options in the same plugin settings form?
- “Request has expired” with “Make your site social” (Gigya) plugin
- wordpress site | All-in-one-cufon IE Issue
- How to change this WP_Query to get all ProductIDs and not only specific one?
- WordPress plugin output formatting
- Finding which plugin uses cloudflare (due to GDPR)
- Automatically Assign Author to Category [closed]
- How can I change the meta_key for a particular piece of information?
- How to Create a shortcode to this php function
- Trouble with very basic plugin creation
- My single.php page does not show the related data to the post which is clicked
- How to add CSS via custom plugin?
- How to add custom table style for table block in gutenberg editor
- Moving a plugin js to footer
- WordPress Ajax code is not Working
- Add a “View all” button on WooCommerce product archives pages
- I am trying to make a field show and save from quickedit screen
- How do I add an options page at the bottom of the list?
- Hardcoded paths in my plugin
- What goes into wp_postmeta and why?
- Dequeue, Unregister, Remove Action – Not Working on Plugin
- HTTP requests start hanging after I try activating all plugins, and only stop when I manually disable the plugins via DB
- how to request a script more than once in wordpress
- How can recognize post’s category?
- Developing plugin, where to place action hooks etc?
- Widget content turns up before title
- Load script only in the admin page
- How do I fill the Home Description?
- Ajax 400 error when used inside a plugin
- Disable “auto embed” feature when pasting text and links
- how to show all posts of each category in pages
- Error thrown Call to a member function get() on null
- How to prevent users to view server files using WP File Manager plugin?
- reminder wp_schedule_event
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Alternative Hook to the_content for Changing Background Color
- Adding shortcodes to multiple pages with function
- How to use WordPress header function and footer function and not load word press database
- SASS not showing in customized preloader plugin
- Media Dialog CSS broken in WP v.5.3.2
- I want to display “how many times this tag used in WordPress?”
- After updating theme & plugin I am getting an error message
- Slide through page effect?
- Get a list of Product Categories inside a loop
- Suspect incomplete .pot file – what to do?
- Password Protect wp-content?
- How to make cover image in post block expand to entire screen?
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Conditional Fields depending on checkboxes
- Translation plugin with default language?
- wordpress ajax pagination object value does not change
- Google analytic issue in wordpress
- image upload error wordpress
- WordPress API hook
- jquery conflict with widget page
- Automatically add child pages to menu
- Infinite Scroll plugin scrolling truly “infinitely” (i.e. does not recognize end of posts)
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- OOP Plugin: Where should I place the action hooks in the class?
- How to get the real address from a url (permalink)
- White Screen When Includding A Folder With PHP Files
- making a simple plugin
- How to make temporary expiring link for a downloadable file
- Add country flags
- Custom single-product page for product from category x
- Content expands beyond its column container [closed]
- How to add custom html to the Media > Attachment Details modal?
- Unable to access WPadmin, website down
- ‘Active lotteries’ only custom query for woocommerce lottery plugin and elementor