Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions: add Gutenberg support on option to toggle email delivery on a per-post basis #10876

Open
keoshi opened this Issue Dec 7, 2018 · 12 comments

Comments

Projects
None yet
10 participants
@keoshi
Copy link
Contributor

keoshi commented Dec 7, 2018

With WordPress 5.0 it became impossible for customers to use the jetpack_allow_per_post_subscriptions filter as described here: https://jetpack.com/support/subscriptions/#filters

Previously, a new option would appear in a metabox, like this:

image

Code ref:

/*
* Disable Subscribe on Single Post
* Register post meta
*/
function subscription_post_page_metabox() {
if (
/**
* Filter whether or not to show the per-post subscription option.
*
* @module subscriptions
*
* @since 3.7.0
*
* @param bool true = show checkbox option on all new posts | false = hide the option.
*/
! apply_filters( 'jetpack_allow_per_post_subscriptions', false ) )
{
return;
}
if ( has_filter( 'jetpack_subscriptions_exclude_these_categories' ) || has_filter( 'jetpack_subscriptions_include_only_these_categories' ) ) {
return;
}
global $post;
$disable_subscribe_value = get_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', true );
// only show checkbox if post hasn't been published and is a 'post' post type.
if ( get_post_status( $post->ID ) !== 'publish' && get_post_type( $post->ID ) == 'post' ) :
// Nonce it
wp_nonce_field( 'disable_subscribe', 'disable_subscribe_nonce' );
?>
<div class="misc-pub-section">
<label for="_jetpack_dont_email_post_to_subs"><?php _e( 'Jetpack Subscriptions:', 'jetpack' ); ?></label><br>
<input type="checkbox" name="_jetpack_dont_email_post_to_subs" id="jetpack-per-post-subscribe" value="1" <?php checked( $disable_subscribe_value, 1, true ); ?> />
<?php _e( 'Don&#8217;t send this to subscribers', 'jetpack' ); ?>
</div>
<?php endif;
}

Reported in 1626604-zen

@jeremypaavola

This comment has been minimized.

Copy link

jeremypaavola commented Dec 11, 2018

Reported as well in 1637443-zen

@htdat

This comment has been minimized.

Copy link
Contributor

htdat commented Dec 12, 2018

1638413-zen

@bikedorkjon

This comment has been minimized.

Copy link

bikedorkjon commented Dec 12, 2018

To be clear the current behavior for those who have this filter installed and updated to 5.0 is that dont_email_post_to_subs=1 and their emails will not send, correct?

@jeherve

This comment has been minimized.

Copy link
Member

jeherve commented Dec 13, 2018

@bikedorkjon Yes, that is correct. I would recommend removing the filter in those cases.

@oifabio

This comment has been minimized.

Copy link

oifabio commented Jan 22, 2019

Hi! Has someone found a solution for this issue?

@chaselivingston

This comment has been minimized.

Copy link
Contributor

chaselivingston commented Jan 24, 2019

Also requested in 1738651-zen

@USRFSledge

This comment has been minimized.

Copy link

USRFSledge commented Feb 2, 2019

Forgive me my stupidity (and google isn't helping either), where are those #####-zen tickets referring to?
Tried to get some more information on the matter, but where can I find these reports?

1626604-zen
1637443-zen
1638413-zen
1738651-zen

[I'm sure I make some of you giggle now]

@jeremypaavola

This comment has been minimized.

Copy link

jeremypaavola commented Feb 3, 2019

Hi @USRFSledge; those are references to reports relating to the issue at hand that have come through our (other) support channels. You won't have access to view these, but they wouldn't contain any new information either, so you're not missing out on anything.

@USRFSledge

This comment has been minimized.

Copy link

USRFSledge commented Feb 4, 2019

Thank you for the clarification @jeremypaavola . Now it make sense I couldn't find anything about them on google. I'll be monitoring this thread, as I really prefer to have this option back again.

@bikedorkjon

This comment has been minimized.

Copy link

bikedorkjon commented Mar 17, 2019

1877078-zen

@mzakariya

This comment has been minimized.

Copy link

mzakariya commented Mar 20, 2019

User in 1877078-zen wants us to notify them once issue is fixed, and specifically asked us to keep their ticket open.

Placing their ticket on an indefinite hold, so we stop sending reminder/CSAT emails.

@chaselivingston

This comment has been minimized.

Copy link
Contributor

chaselivingston commented Apr 20, 2019

I closed 1877078-zen so we don't have to keep dealing with it in Play mode. The user won't be notified or asked for CSAT. If they write back in a follow-up will be created. Similarly, when we need to follow-up with them, we can create a follow-up easily from that closed ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.