Nestor Soriano
23df8a4d17
Revert a couple of files to its original content after a messed rebase
2020-07-24 09:20:24 +02:00
Nestor Soriano
281ec18158
Undo the registration of old singletons in the DI container.
...
The container will in principle be used only to register classes
in the `src` directory.
Also, CustomerProvider class removed.
2020-07-24 09:20:24 +02:00
Nestor Soriano
312383ae47
First steps towards introducing a dependency injection framework.
...
- Add PHP League's Container package via Composer.
- Add an ObjectContainer class that encapsulates all the configuration
and insulates the codebase from the concrete DI engine used.
- Add an improved ReflectionContainer class that will allow to
register individual classes as singletons while autowiring.
- Use ObjectContainer to resolve the WooCommerce class, everything
instantiated with "new" inside it, and all singletons that are
usually obtained via WC() function.
- Introduce the CustomerProvider class.
- Introduce a service provider to resolve WC_Queue_Interface,
this replaces the WC_Queue class.
- Mark as obsolete all the replaced "instance()" methods,
and the entire WC_Queue class.
2020-07-24 09:20:21 +02:00
Remi Corson
c9092d5dbf
backwards compatibility
2020-02-11 16:35:40 +01:00
Remi Corson
89f07da20d
Replace {sitde_address} by {site_url} for consistency
...
Replace {sitde_address} by {site_url} for consistency in WooCommerce emails, for better consistency.
2020-02-11 10:46:32 +01:00
Christopher Allford
6ad091a9b7
Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages
2020-01-28 21:21:29 -08:00
Claudio Sanches
eb57532740
Fixed number of filter args in WC_Emails
2019-12-24 12:09:50 -03:00
Rodrigo Primo
36cdc3cf8f
Simplify and modernize WC_Emails::queue_transactional_email()
...
This commit replaces calls to call_user_func_array() with the spread operation.
2019-11-22 15:25:44 -03:00
Peter Fabian
a2cd974d79
Don't display Downloads section on refund emails.
2019-11-01 15:51:30 +01:00
Gerhard
d4eb233843
Deprecate email_footer_replace_site_title and use replace_placeholders
2019-07-04 09:36:05 +02:00
Claudio Sanches
22f9cdcb0d
Allow {woocommerce} placeholder in lowercase
2019-05-21 17:47:54 -03:00
Mike Jolley
003a5bd188
Better placeholder replacement for footer
2019-03-04 14:53:19 +00:00
JeroenSormani
f4775ccd90
Use shipping method instead of property through magic + doc return statements
2019-01-04 12:41:38 +00:00
claudiulodro
33154afd03
Send emails for cancelled_to_* orders
2018-08-31 09:31:16 -07:00
Mike Jolley
c3144012a5
Include as needed
2018-06-15 12:43:10 +01:00
Mike Jolley
d9d2093d50
Log errors from transaction emails with logger
...
Closes #20118
2018-05-24 15:37:00 +01:00
Claudio Sanches
a529e1fdf3
Fixed includes/class-wc-emails.php PHPCS violations
2018-03-22 14:54:16 -03:00
Caleb Burks
c21cc2e8fe
Replace “Cheatin’ uh?” with friendlier messages
2018-02-07 17:01:12 -05:00
The Dramatist
85ce4e0078
Class wc emails backorder method extract function removed ( #17724 )
...
* Replaced extract() function usage.
Usage of `extract()` is kinda discouraged. Though here the array `$args` is verified, I think avoiding this `extract()` function will make it better. Besides, without `extract()` the code is more readable and easily understandable.
* Object checking should be done.
Checking `$args['product']` is an object or not should be done before `get_formatted_name()` method is being called.
2017-11-17 11:38:26 +00:00
Claudiu Lodromanean
f7d52ad0ba
Merge pull request #17542 from MikeKoval/master
...
Update class-wc-emails.php
2017-11-07 09:37:31 -08:00
Mike Jolley
c824dd7a85
Hide downloads from admin emails
2017-11-06 17:02:35 +00:00
Mike Koval
d15aaf682d
Update class-wc-emails.php
...
Added missing param sent_to_admin to email-addresses template
2017-11-03 11:33:55 +02:00
Mike Jolley
9d92b8a8ff
phpcs
2017-11-01 13:10:25 +00:00
Ryan Halliday
671b602db6
Added `{site_title}` replacement to Email footer
2017-10-28 15:18:53 +13:00
Claudio Sanches
2dd5288659
Fixed WC_Emails::wrap_message hooks
...
Included `null` instead of instances of `WC_Email`, fixing fatal error
for extensions that expects all params from both hooks.
Closes #16936
2017-09-26 13:27:50 -03:00
Jaydeep Rami
46d3638089
Fix missing return statement ( #16148 )
...
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
2017-07-20 18:01:14 +01:00
Mike Jolley
b6847ebe60
remove exit
2017-07-11 16:09:31 +01:00
Mike Jolley
94b32e644a
HTML emails
2017-07-11 14:52:30 +01:00
amansaini
03699dcaae
Fixes issue #15489
2017-06-07 11:58:09 +05:30
Rasmus Bengtsson
185934fad9
Fix phpdoc to include params and correct types
2017-05-15 13:50:52 +02:00
Mike Jolley
6259ee69e9
Adds a fallback to queue_transactional_email if background sending is disabled.
...
Fixes #14476
After turning off deferred emails by default it seems Subscriptions was
using the ‘default’ value in a filter to check if deferred emails were
enabled or not to hook in these methods.
https://github.com/woocommerce/woocommerce-subscriptions/blob/f87a11cdf0
9bb59aa66f4e86d37592f74193937f/includes/class-wc-subscriptions-email.php
#L339
@thenbrent
This code change adds a fallback so if this method was hooked in
anywhere, and the background emailer was not init or disabled, it will
fallback to regular send-now.
2017-04-18 11:35:37 +01:00
Mike Jolley
77d93a70e0
Set woocommerce_defer_transactional_emails to false by default
2017-04-13 14:22:33 +01:00
Mike Jolley
180f5cd40b
send_transactional_email try catch block
2017-04-13 14:22:07 +01:00
Mike Jolley
85a67151ff
woocommerce_notify_low_stock and woocommerce_notify_no_stock were not hooked up
2017-04-12 18:01:59 +01:00
Claudio Sanches
fa40e7b205
Merge pull request #14035 from woocommerce/fix/13963
...
Background Emailer instead of just CRON
2017-04-06 14:47:15 -03:00
Mike Jolley
288026ca9f
Background Emailer instead of just CRON
2017-04-06 13:46:07 +01:00
Claudio Sanches
e2881d5af1
Ensure gateways are loaded in emails
...
Fix missing bank details in emails
closes #13966
2017-04-05 15:50:40 -03:00
Mike Jolley
9d5aee2c73
Remove code which expands/changes objects in emails
2017-03-21 17:36:46 +00:00
Claudio Sanches
59c2849736
Changed version 2.7 to 3.0
2017-03-15 13:36:53 -03:00
Mike Jolley
737c962e48
docblock
2017-02-28 21:16:58 +00:00
Mike Jolley
4f333d0e82
More efficient expand
2017-02-28 21:16:03 +00:00
Mike Jolley
fb576b015b
Email cron jobs - avoid storing full data objects
2017-02-28 20:35:52 +00:00
Mike Jolley
f2990b0c7d
Check we have a WC_Order during email events
2017-02-27 17:08:13 +00:00
Claudio Sanches
4eccbef6e1
Fixed infinite loop cause by duplicated hook names
2017-02-24 17:02:05 -03:00
Mike Jolley
8ae66520e8
woocommerce_send_queued_transactional_email filter
...
Closes #13318
2017-02-24 13:16:41 +00:00
Claudiu Lodromanean
ab8fb48bb4
Fix and standardize e-mail sending
2017-02-09 14:49:39 -08:00
Claudio Sanches
c350ecfb99
Fixed PHP 5.2 fatal error, closes #13128
2017-02-09 15:27:26 -02:00
Mike Jolley
16afdeec96
Add prefix
2017-02-09 12:30:33 +00:00
Mike Jolley
e46b256c67
Use cron to send emails to avoid long page load times on checkout
2017-02-01 20:08:18 +01:00
Mike Jolley
d7dfdd3d10
Wrap all deprecation calls.
2016-11-23 16:15:00 +00:00