• Resolved yhazem

    (@yhazem)


    Hello,
    How can I disable the like button from published posts older than X days?
    Thank you

    • This topic was modified 3 years, 10 months ago by yhazem.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alimir

    (@alimir)

    Hi @yhazem

    Please check the following sample code:
    https://gist.github.com/Alimir/755db5680a464fc6469c377016cf9531

    But before that, please go to the following path:
    wp-content/plugins/wp-ulike/includes/classes/class-wp-ulike-cta-listener.php

    And change this line:

    return $this->sendError( array(
    'message' => $e->getMessage(),
    'messageType' => 'error',
    'hasToast' => wp_ulike_setting_repo::hasToast( $this->settings_type->getType() )
    ) );

    With this one:

    return $this->sendError( array(
    'message' => $e->getMessage(),
    'messageType' => 'error',
    'hasToast' => wp_ulike_setting_repo::hasToast( $this->data['type'] )
    ) );

    * This is a small issue in the current version that will be fixed in the next update (5.0.0).

    Thread Starter yhazem

    (@yhazem)

    ok, thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable liking after x days from being published.’ is closed to new replies.