Commit Graph

131 Commits

Author SHA1 Message Date
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Oluwaseun Olorunsola
4a1a4d6729 Update loadedvia URL param order.
MAILPOET-5701
2023-12-11 20:49:29 +01:00
Oluwaseun Olorunsola
c957cc0c2b Convert loadedvia part to URL search param instead of URL hash
MAILPOET-5701
2023-12-11 20:49:29 +01:00
Oluwaseun Olorunsola
ddde17f83a Remove multichannel integration from experimental features
MAILPOET-5701
2023-12-11 20:49:29 +01:00
Oluwaseun Olorunsola
3c6090702c Add tracking for pages loaded via WooCommerce Multichannel Marketing dashboard
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
246f54d799 Refactor MPMarketingChannel.
The aim is to make both the MPMarketingChannelController and the MPMarketingChannel class lighter by moving most of the data request feature to the MPMarketingChannelDataController class

MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
4b674737b0 Format price to 2 decimal places
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
a73189e5a1 Add support for fetching Automation revenue
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
74fd910d78 Add Revenue info to multichannel dashboard
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
91e12fb6b0 Update method for fetching MailPoet Automations
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
65de203ea3 Fix fetching standard newsletters and post-notification history items
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
f3ecf8366a Add basic methods for fetching campaign data
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Oluwaseun Olorunsola
e1b8f59fc2 Fix formatting errors
MAILPOET-5697
2023-12-07 15:51:02 +01:00
Oluwaseun Olorunsola
52470070a2 Translate strings
MAILPOET-5697
2023-12-07 15:51:02 +01:00
Oluwaseun Olorunsola
bc6bb5dcc3 Direct users to Newsletter template selection page from the Woo marketing dashboard
MAILPOET-5697
2023-12-07 15:51:02 +01:00
Oluwaseun Olorunsola
cb0c6491d2 Add campaign types to the MailPoet Marketing Channel
MAILPOET-5697
2023-12-07 15:51:02 +01:00
Oluwaseun Olorunsola
f805a777fb Reuse existing method Bridge::isMailpoetSendingServiceEnabled
MAILPOET-5696
2023-12-07 15:04:41 +01:00
Oluwaseun Olorunsola
efec9057bb Add error and product status information to the MailPoet Marketing Channel
MAILPOET-5696
2023-12-07 15:04:41 +01:00
Oluwaseun Olorunsola
b7f53b5f4a Add setup information for the MailPoet Marketing Channel
MAILPOET-5695
2023-11-27 10:25:09 +01:00
Oluwaseun Olorunsola
fb257f7c01 Refactor the registering of Marketing channel to DI class
MAILPOET-5695
2023-11-27 10:25:09 +01:00
Oluwaseun Olorunsola
783fbd6c5c Add MailPoet icon-white and use in MP Marketing Channel
MAILPOET-5692
2023-11-23 10:40:43 +01:00
Oluwaseun Olorunsola
90b9fd989b Add MailPoet Marketing Channel support
MAILPOET-5692
2023-11-23 10:40:43 +01:00
David Remer
0450d06883 Add wcs_get_subscription
[PREMIUM-256]

Add helper for woocommerce-subscriptions

[PREMIUM-256]
2023-11-19 18:39:16 +01:00
John Oleksowicz
b1dd110bf8 Add lookup data retrieval for used shipping method
For ease of lookup, I changed the helper to return an array with keys
corresponding to the instanceId of the shipping methods. I couldn't see
anywhere else in the codebase where the keys would have mattered.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
David Remer
17ca776189 Ensure that woocommerce is actually active
[MAILPOTE-5613]
2023-10-11 10:19:24 +02:00
Rostislav Wolny
eb12069122 Ensure the integer is returned when we call paginated wc_get_orders
In Woo 8.2.0-beta.1, the total value was null. In this commit I want to
make sure we always return an integer.
[MAILPOET-5621]
2023-10-03 10:00:56 +02:00
Jan Lysý
26417bab52 Change Coupon API parameter from include_coupon_id to include_coupon_id
[MAILPOET-5123]
2023-09-25 02:28:51 -07:00
Jan Lysý
79d506ca34 Create new API endpoint for WC coupons
Because I haven't found an easy way how to use WP or WC API,
I decided to create a MailPoet endpoint for getting coupons that
allows me loading them via Ajax.
[MAILPOET-5123]
2023-09-25 02:28:51 -07:00
David Remer
05b45173d6 Add event option to tracking
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
7a2ddd0053 Track only completed orders
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
30eafb9146 Extract purchase states to helper method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
John Oleksowicz
acc7084b65 Ensure shipping method instanceIds are strings
Selected shipping methods were not appearing when after saving and
reloading a segment because the instanceIds were actually coming through
 as integers, while the values are getting saved as strings.

MAILPOET-5496
2023-08-17 13:49:08 +02:00
Rodrigo Primo
841745c706 Remove shipping method IDs from the 'used shipping method' query
This commit simplifies the logic of the 'used shipping method' segment
by removing the shipping method IDs from the queries. After some
considering, we have come to the conclusion that using just the shipping
method instance ID is enough.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
f85b7a52fc Change logic of the code to build the 'used shipping method' segment UI
This commit fixes an issue with the initial logic used to retrieve
shipping methods to build the UI of the 'used shipping method' segment.
It updates the code to properly retrieve WooCommerce shipping methods
configured for all zones. Before the code was getting just the shipping
method types and the shipping method instances.

The query that is used to get the subscribers that match this segment
will be updated in another commit.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
243c096643 Add UI for new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
David Remer
190da3b0e5 Use WooCommerce wrapper instead of native functions, test if WC is active
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
John Oleksowicz
0e9b96d0b7 Track opens, clicks, purchases, and page views
MAILPOET-4998
2023-06-22 15:29:22 +02:00
Jan Jakes
54e6e11cf0 Fix latest coupon fetching logic
[MAILPOET-5169]
2023-06-19 11:06:23 +02:00
Rodrigo Primo
206bd7fbab Fix layout error in the optin checkbox for some WP themes
This commit fix a layout error in the optin checkbox that MailPoet adds
to the WooCommerce checkout when the site is using the themes Twenty
Twenty-Two and Twenty Twenty-Three.

This problem was happening because WooCommerce add CSS to make its own
checkboxes work with those two themes, but it broke checkboxes the
layout of checkboxes created with woocommerce_form_field().

The Woo checkboxes in the checkout display the text inside an <span>
element and that doesn't happen for checkboxes created with
woocommerce_form_field(). The problem is in those CSS rules:

0ea5205672/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss (L731-L757)

[MAILPOET-4133]
2023-06-01 11:38:54 +02:00
Rodrigo Primo
cd43cfbb1f Fix typo
[MAILPOET-4178]

Co-authored-by: John Oleksowicz <8656640+johnolek@users.noreply.github.com>
2023-05-30 13:25:24 +02:00
Rodrigo Primo
80655813b7 Stop subscribing customers to the Woo list when they are created
This commit changes the behavior of
\MailPoet\Segments\WooCommerce::synchronizeRegisteredCustomer(). This
method is called when a new WooCommerce customer is created. Before, it
would always add the customer to the Woo segment expecting
\MailPoet\WooCommerce\Subscription::subscribeOnCheckout() to unsubscribe
the customer if the optin checkbox was not checked.

Since the behavior of the latter method changed in a previous commit and
it doesn't unsubscribe customers anymoreif the option checkbox is not
checked, the former method had to be updated to only subscribe the customer
if not in checkout context or if in checkout context and optin checkbox is
enabled and checked.

[MAILPOET-4178]
2023-05-30 13:25:24 +02:00
Rodrigo Primo
d6e0768e1f Change the behavior of the optin checkbox in the Woo checkout
This commit changes the behavior of the optin checkbox that MailPoet
adds to the WooCommerce checkout.

Now the checkbox is not checked by default for logged in users who
already subscribed to a list. Also, users won't be unsubscribed anymore
and have their global status change to unsubscribed if they uncheck the
checkbox.

The only action that is performed after this change is to subscribe
users if they check the checkbox.

This change was implemented both for the normal checkout and the block
checkout.

It was also necessary to remove the AutomateWoo integration that
depended on subscribers being unsubscribed during checkout.

[MAILPOET-4178]
2023-05-30 13:25:24 +02:00
David Remer
09f984689f Make strings translateable
[MAILPOET-4973]
2023-05-29 10:53:38 +02:00
David Remer
28b38ef8f5 Add MailPoet info to WooCommerce System Status Report
[MAILPOET-4973]
2023-05-29 10:53:38 +02:00
John Oleksowicz
ec68818c1a Add filter for used payment method
MAILPOET-4993
2023-05-19 11:57:13 +02:00
Brezo Cordero
c0ffcbac9b Opt out when subscription unchecked
This commit adds an action when customer unsubscribes to WooCommerce segment on checkout and opt outs Automate Woo customer.

[MAILPOET-4230]
2023-05-15 12:04:24 +02:00
Brezo Cordero
00e5dea5b4 Opt out AutomateWoo customer
This commit adds an action to opt out AutomateWoo customer When MailPoet Subscriber global status changes to unsubscribed.

[MAILPOET-4230]
2023-05-15 12:04:24 +02:00
Oluwaseun Olorunsola
feba707c76 Use dependency injection (DI) for process shortcodes
MAILPOET-5110
2023-04-03 13:36:04 +02:00
Oluwaseun Olorunsola
c75dc63cc5 Process Shortcodes in WooCommerce custom template
MAILPOET-5110
2023-04-03 13:36:04 +02:00
David Remer
e081c554aa Add method to retrieve order statuses
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00