• Resolved Andi Lee Davis

    (@andi-lee-davis)


    hi,

    firstly hope you are safe and well.
    I installed your plugin and all looks good. However one MAJOR FLAW…

    I have 2 custom post types, one for our blog and one for our newsletter.
    Our posts are used for our tracks/videos.
    So I deleted the campaign notifications for normal posts and set up only two that would mail out when a new blog entry or newsletter is created.

    However when a video post is created it automatically schedules those as well and uses the templates I created for the custom post types.

    Video/Music tracks are uploaded by our artists all the time, so last night approximately 9 communications were sent out to a great deal of our community erroneously.

    This should not happen, in this scenario normal POSTS should be excluded, as would otherwise spam our members. Again this is a major flaw.

    We cannot go PRO with your plugin until this is fixed.

    I will be looking into the code of the plugin to find out how it is selecting and filtering the posts to see if I can help you resolve this issue.

    Thanks

    Andi

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Andi Lee Davis

    (@andi-lee-davis)

    I think the issue is in this line:

    /lite/includes/db/class-es-db-campaigns.php
    Lines 686,687

    
    $post_type = ES_Common::prepare_custom_post_type_string( $post_type );
    				$where    .= " and categories LIKE '%" . wp_specialchars_decode( addslashes( $post_type ) ) . "%'";
    
    

    Should it not be where posts->post_type = xyz
    As this is about getting the post by post_type not by category?

    Thread Starter Andi Lee Davis

    (@andi-lee-davis)

    Or in

    /email-subscribers/lite/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php

    
    

    protected function create_post_array( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) {
    $post = array(
    ‘post_type’ => self::POST_TYPE,
    ‘post_title’ => $action->get_hook(),
    ‘post_content’ => json_encode($action->get_args()),
    ‘post_status’ => ( $action->is_finished() ? ‘publish’ : ‘pending’ ),
    ‘post_date_gmt’ => $this->get_scheduled_date_string( $action, $scheduled_date ),
    ‘post_date’ => $this->get_scheduled_date_string_local( $action, $scheduled_date ),
    );
    return $post;
    }`

    `

    There does not seem to be any filter for the POST TYPE, The self::POST_TYPE is set to
    const POST_TYPE = ‘scheduled-action’; presumably this gets set before the method is accessed?

    Plugin Contributor kishanranawat

    (@kishanranawat)

    Hi @andi-lee-davis,

    We have already replied to your queries in our support channel.

    Closing this ticket for now. Feel free to reopen it if the issue persists after this.

    Thank You!

    Plugin Contributor kishanranawat

    (@kishanranawat)

    Hi @andi-lee-davis,

    We have released a new version(4.6.11) of the Email Subscribers plugin with an option to disable the post notification for normal WordPress posts.

    You can use the new ‘None‘ option in the ‘Select post category‘ section to achieve that if required. This does not affect other custom post types.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CPT also includes normal posts too’ is closed to new replies.