Commit Graph

45 Commits

Author SHA1 Message Date
Jan Lysý
4c0c5c1583 Duplicate email post meta and update tests
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
John Oleksowicz
bfa3770d99 Add backend logic for purchase by attribute filter
MAILPOET-5467
2024-03-11 10:52:30 +01:00
John Oleksowicz
314b1f3c27 Change method for detecting empty product pages
The previous method was relying on the idea that product pages would not
 trigger the `the_content` filter since they don't have to render the
 content. Testing revealed that this idea was unreliable.

In one instance WordPress was triggering `the_content` when attempting
to filter the excerpt, even though the excerpt was empty.

This changes the detection method to a much more direct inspection of
the post's content.

MAILPOET-5859
2024-03-08 12:27:06 +01:00
John Oleksowicz
0ab2be782d Show forms on empty product pages
The current logic for form rendering assumes that a single product page
will trigger the filter `the_content`. This is not always true. In cases
where the product has no description, WooCommerce does not render the
description tab at all, which is where that filter usually fires (in my
testing).

This change ensures that we still give these forms a chance to render on
 such pages.

MAILPOET-5859
2024-03-08 12:27:06 +01:00
Jan Lysý
aba54c5116 Fix ampersand character rendered by newsletter:post_title shortcode
[MAILPOET-5724]
2024-02-22 10:00:38 +01:00
Pavel Dohnal
7a0cad8abf Update post status when email is sent
[MAILPOET-5851]
2024-02-15 10:43:46 +01:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Jan Jakes
ed76bbf3d6 Invoke "mailpoet_scripts_admin_before" from the asset controller
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Rostislav Wolny
fabdf6f4c5 Add EmailApiController that adds MailPoet specific data to post api
When loading an email post in the editor we need to attach MailPoet
specific data like associated newsletter entity id, email type etc.

This is done using register_rest_field function.
So far we only send the associated entity ID but there is also a method `saveEmailData` that will
be used to save MailPoet specific email data.

[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
John Oleksowicz
677ae370ed Handle special case for selected Posts page
MAILPOET-4897
2023-07-12 10:14:52 +02:00
John Oleksowicz
481f5585a0 Add form placement options for homepage, archives
MAILPOET-4897
2023-07-12 10:14:52 +02:00
Jan Jakes
30a3bde940 Unify add menu/submenu parameters with WP
[MAILPOET-5383]
2023-06-16 17:14:34 +02:00
Jan Jakes
bb979cd1ba Add menu page function types to analyze them statically
[MAILPOET-5383]
2023-06-16 17:14:34 +02:00
Rostislav Wolny
e62a3ee5b5 Add escaping for known shortcodes when rendered in form textarea's value
[MAILPOET-5243]
2023-04-27 10:42:34 +02:00
Sam Najian
ef7f2ebade Define method to disable theme templates settings
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
alex-mailpoet
1603378d7d Skip upgrader->install() as false positve
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
alex-mailpoet
930ff18785 Skip add_query_arg() finding as false positive
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
Pavel Dohnal
8028bd3e95 Use discouraged function directly
We need to add a warning so that we know for sure
that this piece of risky code gets reviewed by a human and consciously ignore the warning

[MAILPOET-5245]
2023-04-20 12:00:29 +02:00
Pavel Dohnal
0f4ffd7849 Use get_plugin_data from WPFunctions
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
Pavel Dohnal
cf88a3fab2 Display warning for unsupported WooCommerce version
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
alex-mailpoet
bf234cdd6e Update removeAction definition to match original WP function
[MAILPOET-5057]
2023-03-06 11:22:58 +01:00
Jan Lysý
847132b433 Create new component for existing coupons
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
Oluwaseun Olorunsola
d9eca55189 Redirect to Landing page after plugin activation
MAILPOET-4795
2023-01-06 18:29:46 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Oluwaseun Olorunsola
5a378b3c5f Add replacePrivacyLinkTags method for Form Template
MAILPOET-4651
2022-11-16 16:51:12 +01:00
Sam Najian
99198e5c2d Fix MailPoet\WP\Functions newly added method name
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
Sam Najian
6e8c9731d8 Define new isSiteUsingHttps method for WP_Functions
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
Oluwaseun Olorunsola
b6e7e39fb0 Rename method and move wcGetPageId to Woo helper class
MAILPOET-4663
2022-11-01 14:58:47 +01:00
Oluwaseun Olorunsola
8c24d59f43 Add tests for form display on Woo Shop listing page
MAILPOET-4663
2022-11-01 14:58:47 +01:00
Oluwaseun Olorunsola
5ed0c3fb2d Allow form display on Woo Shop listing page
The WooCommerce Shop page is a special kind of page. It’s basically a post archive.

The Shop page is a placeholder for a post type archive for products. It may render differently than other pages in your install.
https://woocommerce.com/document/woocommerce-pages/#section-4

It doesn’t have any content and WooCommerce core team is also removing the the-content filter from the Shop listing page hence why we are unable to hook into the the-content filter we use for other parts of the codebase

MAILPOET-4663
2022-11-01 14:58:47 +01:00
Jan Jakes
ba35ddf6e6 Extract automation API to MailPoet REST API
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
David Remer
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
Rostislav Wolny
272e875643 Deactivate action scheduler recurring actions on plugin deactivation
We need to cleanup these recurring actions otherwise they would be rescheduled indefinitely.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
David Remer
8c7097df85 Add / when generating the Iframe URL
[MAILPOET-4337]
2022-05-16 11:31:39 +02:00
David Remer
53fc49d1eb Simplify phpcs:disable comments
Additionally this commit contains a conversion from %d to %s in a query

[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
cb55cae1b2 Escape SQL queries following wp org sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
David Remer
f4b040d8ff Fix two minor sniff warnings
WordPress.NamingConventions.PrefixAllGlobals.DeprecatedWhitelistCommentFound
WordPress.WP.DeprecatedParameters.Load_plugin_textdomainParam2Found
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
a8d88beec9 Escape output according to WP sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
Jan Jakes
6293809b1e Add strict validator service (wrapping WP REST validator)
[MAILPOET-4195]
2022-03-30 11:29:58 +02:00
Rostislav Wolny
84b7ec709a Fetch .com language packs info during plugin activation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Jan Lysý
f86f4e3f79 Add wordpress functions
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Jakes
ec0f490397 Restrict automation API only for admins
[MAILPOET-4135]
2022-02-21 09:56:26 +01:00
Rostislav Wolný
164a6880bf Revert "Add wordpress functions"
This reverts commit 2aa83da2c7.
2022-02-16 12:49:35 +01:00
Jan Lysý
2aa83da2c7 Add wordpress functions
[MAILPOET-3808]
2022-02-14 11:53:32 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00