I agree with Goran on editing the core files. It should not be done. But, if a user has dimensions in the name of the image, they will also be replaced and the image won’t display with this regular expression. Instead, you can create a new function in your theme’s functions.php file. Something like this:
function wpsc_cart_item_image2( $width = 95, $height = 95 ) {
global $wpsc_cart;
$cart_image = wpsc_the_product_thumbnail( $width, $height, $wpsc_cart->cart_item->product_id, "shopping_cart");
if( is_ssl() )
$cart_image = str_replace( 'http://', 'https://', $cart_image );
return $cart_image;
}
Then, make sure you copy wpsc-shopping_cart_page.php to your theme directory and replace
wpsc_cart_item_image();
with
wpsc_cart_item_image2();
Or, use a regular expression that gets the last instance of an image size.
Related Posts:
- How can I add an image upload field directly to a custom write panel?
- How to implement add_image_size in a plugin
- How to catch images with blank dimensions?
- How to find attachment ID for first image in a post
- Having Problem On Getting WP Post Gallery Images URL
- Set first image (external) as featured image / thumbnail
- Hook event for upload image in the menu
- How to get an image transferred via FTP or script to appear in Media Manager?
- Add media and attach images to pages
- Is there a better way to implement responsive images than what WordPress uses by default?
- Save image as featured image
- Hook to get image filename when it is uploaded
- Resizing Images for a Gallery-Plugin?
- How to serve different thumbnails/images depending on users browser/platform
- How to Upload Images From a Folder (Not WP_Uploads)
- How to export post meta with images in wordpress
- Get attachments from a post
- Putting a resized image into media library with wp_get_image_editor(
- Display list of uploaded images, filtered by user under a specific user group
- Upload multiple images and insert them into custom html code
- Which is the better way to store images for the plugin?
- Uploaded attachment not set as featured image
- How do I change the image from the default mysteryman in the WP Profile page
- Hook after attachment added and cropped
- Conditional Generation of Image Sizes using add_image_size
- how to change image of jquery slider plugin
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- Cleaning a filename after image sideloading a url that contains `%20`
- How to list all images used on a specific page?
- Screenshots on plugin page taken old [closed]
- Resize not resizing images with Capitial extension like JPG
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- The URL of images on my website changed after being set as featured image
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- WordPress Favicon not Working For Images/Videos/PDFs
- Adding the image selector/uploader to an admin back page
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- WordPress Iframe for blog image
- Replace the WordPress Media Library Uploader
- Caption Shortcode: what filter to change the image size?
- Filter the_content() to add custom figure tags
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Images not displaying on live server
- Using “add_image_size” to register custom image sizes inside plugins not working
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Displaying an Uploaded Image as a Custom Avatar in WordPress
- Add a custom image source
- Upload to a specific media folder created by FileBird Lite
- Set srcset on a block image
- Why does WordPress use outdated jQuery v1.12.4?
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How do i best handle custom plugin page actions?
- Check for featured image in WP_Query
- Enqueue script only when shortcode is used, with WP Plugin Boilerplate
- add_filter OO with parameters
- Shortcodes, output buffering, and WordPress functions
- Auto update specifick plugin
- What is the difference between current_page_parent and current_page_ancestor?
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- Any ideas how to make unit test read the theme functions.php?
- Adding plugin settings link upon activation
- Buddypress function and global $bp question
- Custom plugin: Loop through taxonomy types and update columns for all types?
- How to Display my HTML form in my Custom Plugin?
- Incorporate small angular feature in my wordpress site
- Bootstrap doesn’t work on admin menu page-How to override wp-admin style?
- Use just a shortcode from another page
- Access bloginfo, get_option, and plugins_url from a non-core php file
- How to get a list of child ids for a named category?
- Plugin could not be activated because it triggered a fatal error, unexpected ‘[‘
- How to make the first commit on WordPress.org
- How best to handle database version dependence (from $wp_db_version)
- Associate multiple email addresses with the same user account, so they can log in with either
- Custom filter not working
- I need to refresh page to display wp_get_current_user() : why?
- What is the way to hook all wordpress email
- Configure WordPress to Generate Scheme-less Relative URLs
- Best way to distribute templates and code accross multiple wordpress sites?
- Adding Dynamic Stylesheet
- Modify code for functions.php with specific twitter user url and hashtags
- WP_Query not ordering correctly
- get_the_date() returns english Year & Day when language is Arabic
- Where to save Gutenberg plugin data?
- Add new header/footer on landing page with plugin
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- I can’t write in my DB using $wpdb->insert
- Multi hook deploiement
- Endpoint Callback Display for Custom Plugin
- Get Commentor IP When Marking Comment As Spam
- Best practice to include custom user styles in widgets
- Sending Parameter Failed
- Adding custom avatar field to comments
- i want to auto create pages with shortcode when plugin is activated and delete when deactivated
- wordpress wp_editor() does not support tag
- Insert meta-description into Yoast-SEO input-field via JavaScript
- How to customize password reset message page on success if no error in password reset
- Do uploaded files to /tmp/ get deleted in WordPress automatically?