how to add subscribers without using shortcode in send press - wordpress

I am using sendpress plugin. I want to add subscribers through code without using sendpress shortcode .like i have checkbox signup for news letter if it is checked email address will automatically added to newsletter plugin database

Use Sendpress:SUBSCRIBE-user() function which takes email and listid as an argument which updates all table in sendpress.

Related

is there a function in woocommerce to get email attachment download link

I am a WordPress developer and using woocomerce hook woocommerce_email_attachments to attach a file with completed order email
This works fine , it attaches the required file
But I want to get that downloadable link of particular attachment , so i could use it in the email template anywhere instead of having it at the bottom of the email
(So when user clicks the link it should download that attachment)
I tried reading so many woocommerce classes but unfortunately couldn't find any function that returns the download link of attachment
Thank You

How to remove custom fields from “WooCommerce Thankyou Order” email?

I have added custom fields to my product. I don't want to display those into "WooCommerce Thankyou Order" email. Please, can someone tell me, how to hide the custom fields?
For ex: I want to hide the details that are highlighted email template
Go WooCommerce in the wordpress Dashboard, click on Email tab. At the end you have Email Template.
In order to override the default email template edit woocommerce/templates/emails/customer-process-proshop/woocommerce/emails/customer-processing-order.php
At least that's WooCommerce instructions says. I do not have a wordpress with commerece to test or check that file but I suppose in there you could decide what information is actually sent to the customer.

How to run a woocommerce email notification function from inside a custom php script

I am trying to run something similar to this function.
wp_new_user_notification( $new_user_id );
this function above works already but I would like to use the woocommerce function. As that includes a better email template. I know I can tick it on in the woocommerce admin. But I am using my own form script for the user registration. Which doesn't trigger the woocommerce email notification.
I found this function somewhere in the woocommerce code but I have no idea how to use it.
woocommerce_created_customer_notification.
Please help thanks!
Yes you are right woocommerce includes a better email template, but this is not a good practice to use them in php script for registration script.
You can use your custom code for new user registration email and change you email template as you wish.
For second option there are many plugins available for new user email.
like :https://wordpress.org/plugins/welcome-email-editor/

How to Add Custom Field to a Buddypress Update

I would like to add a simple _custom_field to buddypress activity updates so that when you post a buddypress activity update there is an additional input field where I enter text, whenever that update is displayed in the activity stream, the update template should display the _custom_field aswell
This did it, You have to modify the activity post form to add the new input field then you create a function in bp-custom.php/functions.php to post that new value to the database, this will only work after modifying the javascript that processes the form, the following link gives a clear walk through
https://buddypress.org/support/topic/adding-a-second-element-for-posting-with-an-activity/

Save custom post fields value before Woocommerce email send

I have an issue regarding emails sent by Woocommerce.
I have multiple custom fields, set up using the ACF plugin, for Wooocomerce orders. These fields contain additional info that should be visible in the emails sent to the user.
But for some reason I can't get them to save before the email is send and thus the email is empty of those values. Only after I click resend email are the values visible.
I tried prioritizing the action hooks using the Prioritize Hooks plugin but to no avail. Tried multiple things in order to prioritize.
I have the Woocommerce emails set up in the template that I use and get retrieve the custom fields like this:
$fields = get_field('fields', $customer_order->ID);
How can I get this to work properly? Any help is appreciated.
you need to store your data before send the email, so you need to find the correct hook.
If i'm not wrong the before_woocommerce_pay hook is your answer check here for more woocommerce hooks

Resources