Closed vijayhardaha closed 3 years ago
Hi @vijayhardaha,
The problem with your code is that it is hooked onto the init
action (with priority 20), which is too early. Depending on what triggers PayPal Checkout, it might register those image sizes at different moments (widget hooks, while visiting the WooCommerce settings page, REST API init, etc.). Because some of those things can happen after init
, your snippet might or might not be successful at preventing the sizes from being registered.
The logo and header image have been deprecated, though, so we will probably remove the code that adds those sizes in a future version. In the mean time, if you don't want to constantly fight with the different moments the sizes might be registered, I'd suggest you comment out the following lines (76-79) in file woocommerce-gateway-paypal-express-checkout/includes/abstracts/abstract-wc-gateway-ppec.php
:
Hope that helps. Feel free to re-open this issue if you're having trouble or have any questions.
I am trying to remove 'ppec_logo_image_size', 'ppec_header_image_size' image sizes using this code.
on the regenerate thumbnail page those sizes don't show up but they get generated somehow. if I generate individual images then those sizes show up.
check attachments.
in the above screenshot, you'll see that those sizes are not showing.
But in the individual image, you can see those image sizes are showing and they also exist in the upload directory.
Is there a proper way to remove those sizes? and are they necessary for the plugin to work?