Forum Replies Created

Viewing 15 replies - 1 through 15 (of 146 total)
  • Hello @thall11 ,

    I think you could use some kind of online drive to do so and share the link here.

    That would be great. ??

    Great news! Happy to help.

    And I opened a ticket for this problem. I’m sure they will solve it soon.

    Hello,

    As suggested here, you may try to delete the plugin directory and unzip its latest version to check if it works better.

    Even if you used WP’s update system, you should try this.

    Hope it helps.

    Hello @tboy123 ,

    I had the exact same problem. How do you update this plugin? Manually or using the WP update system ?


    I ask as, in my case, for my most sensitive plugins, I manually update them and, in general, to do so I just unzip the plugin’s new version zip in the wp-content/pluginsfolder as most often all files are overwritten.

    But when it’s not the case, you can get into some troubles.

    Here, doing so you get multiple versions of main.*.js under advanced-coupons-for-woocommerce-free\js\app\admin-app\build\static\js\ which, should not be a problem in fact.

    But as you can read from line 566 in Admin_App.php , JS files are dynamically loaded (and a little bit further, so are CSS files).

    Loading blindly resources is a bad idea and is a potential vulnerability?!

    In my case (and maybe yours), those lines load all the previous JS versions you can have in this directory. And you may end with the wrong one winning the race… Even if everywhere else, the correct one is called by its name. So you can get NO ERROR, but things do not work as expected!

    @fauzanade I strongly suggest you to correct the way you get an load those JS (and even CSS).

    @tboy123 I suggest you to delete your current advanced-coupons-for-woocommerce-free and unzip the latest zip to be sure to have a safe install.

    Hope it helps!

    madmax4ever

    (@madmax4ever)

    Hello,

    The improvements you made for custom sizes interest me. Would you mind sharing them, please ?

    Forum: Plugins
    In reply to: [WooCommerce] Php 8 support

    I did not find any “upper limit” version, and my site has been running WC with PHP8.1 for over 4 months now, without any notable issue.

    Read https://woocommerce.com/document/update-php-wordpress/

    Thread Starter madmax4ever

    (@madmax4ever)

    My bad: I must have made a mistake (or deactivation) during my tests.

    This also works on automated emails, so I guess I have my own solution!

    Thanks.

    Thread Starter madmax4ever

    (@madmax4ever)

    Hello,

    I’ve done it the same day I posted here.

    I’ve worked on this subject (important one for us) and already found a way to deal with newsletters (but not automated mails if I make no mistake…).

    I used a filter MailPoet offers to do so. It makes no change for newsletter editor but make copy of images and changes the images URL accordingly at render time (so before the mail is actually sent).

    I share it here (you may need to adapt here to fit your needs):

    add_filter('mailpoet_sending_newsletter_render_after_pre_process', 'mr_process_mail', 10, 2);
    function mr_process_mail ($aRenderedNewsletter, $oNewsletter) {
    	$aRenderedNewsletter['html'] = mr_process_images( $aRenderedNewsletter['html'], $oNewsletter->getId() );
    	return $aRenderedNewsletter;
    }
    
    function mr_process_images( $sHtml, $iId ) {
    	// CREATE DIRECTORY
    	$sDestDir = '/wp-content/uploads/mailpoet/newsletter_images/' . $iId;
    	if ( !file_exists( ABSPATH . $sDestDir ) ) mkdir ( ABSPATH . $sDestDir, 0755, true );
    	$sDetectionRegExp = '#(<img[^/>]+)(?<=\s)(src=)(\"|\')([^\"\']*)(\'|\")([^/>]*/>)#miUs';
    	$sResult = preg_replace_callback( $sDetectionRegExp, function( $matches ) use( $sDestDir ) {
    		// COMPUTE URI
    		$src = $matches[4];
    		$new_src = preg_replace( '#(.*)/wp-content/(.*)/([\w-]+)(\.(jpe?g|png|gif|webp|avif|svg))$#iU', '$1'.$sDestDir.'/$3$4', $src );
    		$new_src = preg_replace( '#(.*)/wp-content/(.*)/([\w-]+)(\.(jpe?g|png|gif|webp|avif|svg))\?(.*)$#iU', '$1'.$sDestDir.'/$3$4?$6', $new_src );
    		// COMPUTE PATHS
    		$site_url = get_site_url(null, '/');
    		$src_file = preg_replace('' . $site_url . '', ABSPATH, $src);
    		$src_file = preg_replace('\?(.*)$', '', $src_file); // Remove query string
    		if ( file_exists( $src_file ) ) {
    			$dst_file = preg_replace('' . $site_url . '', ABSPATH, $new_src);
    			$dst_file = preg_replace('\?(.*)$', '', $dst_file); // Remove query string
    			// COPY FILES
    			if ( file_exists( $dst_file ) ) unlink( $dst_file );
    			if ( ( $in = fopen( $src_file, "rb" ) ) && ( $out = fopen( $dst_file, "wb" ) ) ) {
    				while ( !feof( $in ) ) {
    				  $buffer = fread( $in, 64 );
    				  fwrite( $out, $buffer );
    				}
    				fclose( $out ); 
    				fclose( $in );
    				return $matches[1].$matches[2].$matches[3].$new_src.$matches[5].$matches[6];
    			}
    			return $matches[0]; // No change
    		}
    		return $matches[0]; // No change
    	}, $sHtml );
    	
    	return $sResult;
    }

    Still looking for a solution/some filter to make it work in others cases (automated mails).

    As MailPoet already manages a cache and thumbnails for templates and sent mails, I think this should be more simple for your team to do so…

    • This reply was modified 2 years, 1 month ago by madmax4ever.
    Thread Starter madmax4ever

    (@madmax4ever)

    Thank you for your quick reply!
    And your right for L1073, sorry for my mistake…

    Thread Starter madmax4ever

    (@madmax4ever)

    Sorry, my bad.
    I re-checked on my side using a brand new staging site and a new v2.0 installation and things work as expected.
    I mark this as resolved.

    Thank you for this update!

    Hello,
    Your pictures certainly contain EXIF orientation information. Which are not used or stripped while converting.
    You could :

    • use cwebp and add -metadata all as Extra command line options
    • use GraphicsMagic and add -auto-orient as Extra command line options

    This way, with cwebp, metadata are kept and your converted picture should be auto-rotated like the orginial and, with gm, converted picture will be rotated according to orientation metadata then metadata will be removed.
    Just give it a try.

    Hope it helps.

    Thread Starter madmax4ever

    (@madmax4ever)

    Not solved in v2.0…

    Bonjour,

    De fait, j’ai trouvé un bug dans cette évolution et c’est peut-être la raison de votre ticket si vous avez tenté d’utiliser la fonction boxtal_connect_print_tracking_number.
    Pour ma part, l’appel à cette fonction échoue lors du premier mail envoyé au client. Dans ma précédente version du template, comme je ne l’utilisais pas, tout allait bien mais ce n’était pas la même présentation (notamment les horaires étaient absents).

    J’ai réglé ce souci, toujours sans toucher au code de Boxtal, dans cette version 1.1.

    En espérant que cela vous aide.

    Bonjour,

    Ma solution a évolué depuis ce post (notamment pour faire appel aux hooks créés par boxtal) et elle devrait pouvoir vous satisfaire.

    Comme je l’ai indiqué, c’est une adaptation simple du modèle de mail WooCommerce que vous pouvez très simplement mettre en oeuvre en copiant ces fichiers modèles dans un répertoire woocommerce/ sous l’arborescence d’un thème enfant.

    Ainsi vos clients auront bien l’information du point relais comme adresse de livraison dans tous leurs mails re?us (nécessitant une information de livraion).

    Par praticité, je vous partage mes modèles ici.

    Au passage, peut-être que boxtal pourrait intégrer de tels modèles et ajouter l’aide nécessaire pour leur mise en oeuvre sur une de leurs pages ?

    En espérant avoir aidé.

    -M-

    • This reply was modified 2 years, 5 months ago by madmax4ever.
    Thread Starter madmax4ever

    (@madmax4ever)

    Hello Andrija,

    Thank you for this answer.

    I totally agree, there is certainly more to check on my side.
    As I don’t have this time (yet), I will mark this as resolved, even if it isn’t.
    And if/when I get time to investigate this further, I’ll share with you my discoveries.
    At least, it’s good to know other sites using UpdraftPlus work along with your plugin. (That said, it works with mine too, just I noticed that it makes the db backup really slow…)

    Regards,

    -M-

Viewing 15 replies - 1 through 15 (of 146 total)