Conflict with WooCommerce
-
I have been setting up a new site for WooCommerce, currently using version 2.0.20.
When I added WP-Login Customizer unfortunately certain functions in WooCommerce broke.
I’m hoping you can find time to investigate a little. It seems to be a conflict with some javascript/jQuery.Before I loaded WP-Login Customizer I could do the following:
1) Select to add a new WooCommerce category
2) Enter necessary details
3) Under Thumbnail section, click button “Upload/Add Image”
4) A media box shows allowing either upload or selection of existing image from media library, clicking button “Use Image” closes media box
5) Image is added as thumbnail for category.When I enabled WP-Login Customizer the following happens:
1) Select to add a new WooCommerce category
2) Enter necessary details
3) Under Thumbnail section, click button “Upload/Add Image”
4) A standard WordPress media box shows, totally different to before. Only option for image is to “Insert to Post”
5) Media box closes, no errors but image is not set as category thumbnail either.The start of the script that is to do with the category thumbnail section reads:
// Only show the "remove image" button when needed if ( ! jQuery('#product_cat_thumbnail_id').val() ) jQuery('.remove_image_button').hide(); // Uploading files var file_frame; jQuery(document).on( 'click', '.upload_image_button', function( event ){ event.preventDefault(); // If the media frame already exists, reopen it. if ( file_frame ) { file_frame.open(); return; } // Create the media frame. file_frame = wp.media.frames.downloadable_file = wp.media({ title: 'Choose an image', button: { text: 'Use image', }, multiple: false });
The code following comment “Create the media frame” doesn’t seem to happen.
I have used WP-Login Customizer on one or two other WP sites and really like it, but I’ve never used it with WooCommerce so apologies if this is a WooCommerce coding problem.Many thanks.
- The topic ‘Conflict with WooCommerce’ is closed to new replies.