linux4me2
Forum Replies Created
-
If you’re trying to get WordPress/wooCommerce to automatically put smaller images on a 600 x 600 white background, I don’t have a solution for you, but if you are willing to process the images on your PC before uploading them, you’ve got a couple of options.
First, Photoshop has a batch editing capability you could use. If you search for “photoshop batch edit” you’ll find a bunch of tutorials on how to set up a new action to affect all the images files in a folder.
I use Imagemagick from the command line to do batch photo processing. There’s a version of it for all the major operating systems. The command(s) you’ll use will vary a bit depending on the OS, but there are plenty of examples out there. Basically, you’ll be using the “convert” command if you want to create a new image file, and the “mogrify” command if you want to use the same file. For example, if you want to put all the JPEG images in the current folder on a 600 x 600 white background, you’d run the following command from the command line:
mogrify -gravity center -background white -extent 600x600 *.jpgForum: Plugins
In reply to: [WooCommerce] Ideas anyone? -Buyer needs to certify qualifed to purchase…If you can get by with a user-selection that enables your Add to Cart button for each product for which professional qualification is necessary; i.e., you’re trusting the user to be honest about their qualification(s), I have a suggestion that will work out-of-the-box with WooCommerce.
Set each product for which you need the qualification check up as a variable product, then add an Attribute of “I certify that I am a…,” “Professional Qualification,” or whatever you want to call it, with a variation for each professional level. Once you do that, the Add to Cart Button will be disabled until the user selects one of the three variations (professional qualifications) that qualifies them to buy the product.
You can add some explanatory text in the product’s Short Description describing the need to select the professional qualification to purchase the product if needed.
I don’t think MainWP has a setting for this; I think it uses the WordPress’s settings.
Fortunately, WordPress allows you set the FROM and use SMTP using the phpmailer_init action in your child theme’s functions.php:
add_action('phpmailer_init', 'sendMailViaSMTP'); function sendMailViaSMTP($phpmailer) { $phpmailer->isSMTP(); $phpmailer->Host = 'yourmailhost'; // Force it to use Username and Password to authenticate $phpmailer->SMTPAuth = true; $phpmailer->Port = 587; $phpmailer->Username = '[email protected]'; $phpmailer->Password = 'yoursenderpassword'; // Additional settingsβ¦ // Choose SSL or TLS, if necessary for your server $phpmailer->SMTPSecure = "tls"; $phpmailer->From = "[email protected]"; $phpmailer->FromName = "Your From Name"; }What you’ll need to do is go through and change all the settings to those applicable to your server, and all your mail from MainWP will use these settings and send mail via SMTP, which you should be doing, anyway.
There are a lot of reports about Gmail free accounts ignoring the “Reply-To” header even if it is formatted correctly. Take a look at this one, which lists a couple of instances that can cause the problem, though there are plenty of users who report the “Reply-To” doesn’t always work even if they have corrected for those two problems:
There are two situations where Gmail will ignore the Reply-to header. Automatic replies (like vacation responders and canned responses) always get sent to the return address from the SMTP envelope. (Shown in the Return-path header.) If the From address is an alias of the Gmail account, replies will preserve the TO address. (Gmail treats "reply to self" as a follow-up to the original recipient.) Otherwise, replies from Gmail apps will respect the reply-to. (Other email clients may work differently, even with Gmail.)I’m still seeing Gmail ignore the Reply-To header when those two causes aren’t met.
One workaround is to include the user’s email address in the body of message, though I know that’s not ideal.
Forum: Plugins
In reply to: [WooCommerce] Show woocommerce products on different domainIn terms of maintaining the site, having everything on one installation of WordPress seems like it would make the most sense, and would solve your problem with displaying products everywhere you want them. However, the more plugins you have, the more likely you are to run into plugin conflicts with updates, and that would be a headache to debug. You should plan on having a staging site to test updates before going live with them.
I suggest considering some options that would prevent you from being limited by the 20-plugins you’re shooting for.
For example, you could look at the following options that might allow you to run everything together:
- a dedicated server with plenty of resources for what you need
- or a cloud-based server that would scale based on your resource needs and traffic
- or running your database on a different server than the one on which you host the WordPress files (some hosts do this routinely) since MySQL is one of the major resource-hogs with WordPress
- picking a web host that offers security solutions that make it unnecessary to run a full-featured security plugin
- make sure you include a caching plugin like WP Super Cache and a CSS/Javascript optimizing plugin like Autoptimize in the planning for your WordPress install
- use WEBP format for all your images to make them as small as possible
If I were you, I think I’d contact a few reputable web hosts that offer shared, dedicated, wordPress, and cloud hosting, tell them what you want to do, give them an estimate of your monthly traffic, and ask them what solution they offer that would handle it. Some even offer automatic staging sites with WordPress, eliminating yet another plugin, and most have a 30-day free trial. If they have a common control panel, you can export your setup and move it to another host if it doesn’t work out.
Forum: Plugins
In reply to: [WooCommerce] How to add store address to emails?@jpnl you are welcome! I’m glad it worked for you.
Forum: Plugins
In reply to: [WooCommerce] How to add store address to emails?Hi @jpnl,
I couldn’t leave this alone. π
Here is a code snippet you can put in your child theme’s functions.php to add the store address placeholders (or others) to the footer text in WooCommerce > Settings > Emails:
add_action( 'woocommerce_email_footer_text', 'addWCFooterPlaceholders', 10, 1 ); function addWCFooterPlaceholders($footer_text){ /* This function adds the following placeholders to the WooCommerce footer text: * {store_address} * {store_address_2} * {store_city} * {store_postcode} * {store_country} * {store_state} */ // The main address pieces: $store_address = get_option('woocommerce_store_address'); $store_address_2 = get_option('woocommerce_store_address_2'); $store_city = get_option('woocommerce_store_city'); $store_postcode = get_option('woocommerce_store_postcode'); // The country/state $store_raw_country = get_option('woocommerce_default_country'); // Split the country/state $split_country = explode(":", $store_raw_country); // Country and state separated: $store_country = $split_country[0]; $store_state = $split_country[1]; $search = array( '{store_address}', '{store_address_2}', '{store_city}', '{store_postcode}', '{store_country}', '{store_state}' ); $replace = array( $store_address, $store_address_2, $store_city, $store_postcode, $store_country, $store_state ); $footer_text = str_replace($search, $replace, $footer_text); return $footer_text; }It won’t add the available placeholders to the tooltip for the footer text, so I put them in as a comment in the code snippet.
Once you’ve added the code snippet to your child theme’s functions.php, all you have to do is add the placeholders you want to use to the footer text box on the WooCommerce Email Settings page. I’ve tested it in WP 5.9.2 and WooCommerce 6.3.1, and it works with no errors.
Forum: Plugins
In reply to: [WooCommerce] How to add store address to emails?What about just going to WooCommerce > Settings > Emails, then scrolling down to the Footer Text box and putting the store address in there?
If you don’t want to go that route, you could use the hook woocommerce_email_footer($email) in the functions.php of your child theme to programmatically add the store address to all the emails. If you search for “woocommerce email hook” you’ll find a number of tutorials that will get you there.
It would take a few minutes to code it, but it would be easier than overriding and editing all the email templates.
Forum: Plugins
In reply to: [WooCommerce] Plugin updated automatically but autoupdate disabledThe 6.3.1 update was a security update. I think what you’re seeing is that since version 3.7 or so, WordPress will push security updates for plugins if they judge them to be serious enough to justify it, whether or not you have autoupdates enabled. It doesn’t happen often.
Forum: Plugins
In reply to: [WooCommerce] Duplicate “failed order” notificationsThat gave me an idea.
I think I have a solution for you. On my affected site, I’m using the WooCommerce Stripe Gateway. I get duplicate Failed Order notifications on every failed order.
On a test site which uses Payment Plugins for Stripe WooCommerce, In Stripe “test” mode, I placed an order using the Stripe test credit card number 4100000000000019, which is designed to “[result] in a charge with a risk_level of highest. The charge is blocked as itβs considered fraudulent.”
I placed two orders using that card number, and only got one Failed Order notification email for each order. I’m running WP 5.9, WooCommerce 6.1.1, and Payment Plugins for Stripe WooCommerce 3.3.15. So it looks like switching Stripe payment gateways fixes the problem.
I have no association with Payment Plugins for Stripe WooCommerce other than being a satisfied user. π
Forum: Plugins
In reply to: [WooCommerce] Duplicate “failed order” notificationsHi @mywebmaestro,
I just encountered this issue yesterday. It’s marked as resolved. Did you ever find a solution?
Forum: Alpha/Beta/RC
In reply to: Reorder Gallery images in 5.9 RC3Hi @hellofromtonya,
No problem. Here’s the ticket.
Forum: Alpha/Beta/RC
In reply to: Reorder Gallery images in 5.9 RC3Hi @blogaid,
You can use the List View to change the order of the images in the Gallery Block, not just the position of the Gallery in the post.
@hellofromtonya, the image toolbar with the arrows does allow me to move the images within a Gallery Block, but I believe what @blogaid is pointing out is that in Twenty Twenty Two with no other plugins and an existing new Gallery Block, if you:
- Use the List View to select the Gallery
- Click the Media Library link to open the Add to Gallery dialog box
- Click the Edit Gallery link
- Try to drag-and-drop an image to reorder it in the gallery
Drag-and-drop fails to reorder the images in WP 5.9, whereas it worked in WP 5.8.x.
Forum: Alpha/Beta/RC
In reply to: How to disable inline styling (style id=’global-styles-inline-css’)?I haven’t tested this yet, but you might try creating a child theme of the block theme you’re testing and adding a theme.json that sets different values for those you don’t want to use; i.e, eliminate the ones you aren’t using.
I can’t find it now, but I think I read somewhere that the child theme’s theme.json will override the parent theme’s, and might allow you to eliminate unused styles?
Forum: Alpha/Beta/RC
In reply to: Reorder Gallery images in 5.9 RC3In the Editor, if you click the List View (Shift-Alt-O), you can drag the “Image” item in the list to reorder them in 5.9-RC4-52636.