BuddyDev

Search

Replies

  • Participant
    Level: Master
    Posts: 196

    Hi,
    Thank you for your kind support.
    Regards
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,

    Everything is perfect.

    However it does not delete the images after deleting the article.
    I have this plugin installed;
    https://wordpress.org/plugins/dx-delete-attached-media/

    Should I make any other setting in BuddyBlog Pro, or change the plugin for deleting the images?

    Thank you
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi Brajesh
    I am looking forward for the snippet.
    Thank you
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi Tosin,

    Thank you for your involvement.
    Should I use both codes together?

    @brajesh What is your opinion?

    Thank you
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,
    It seems to be working very well.
    However I would need to remove all old items in cart when a user purchase an article product.
    I have this code in the function.php Child Theme, but it does not have effect on it.
    Is there any other solution for achieving this?

    // remove old items in cart when new items added woocommerce
    add_filter(‘woocommerce_add_to_cart_validation’, ‘remove_cart_item_before_add_to_cart’, 1, 3);
    function remove_cart_item_before_add_to_cart($passed, $product_id, $quantity) {
    if (!WC()->cart->is_empty()) {
    WC()->cart->empty_cart();
    }

    Thank you
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,
    Do you think that this week will be ready the update?
    Thank you

  • Participant
    Level: Master
    Posts: 196

    Hi,
    I have managed to change some CSS for the WP Media Uploader.
    It is not a very elegant solution but at least the users can not delete nor see files from there.
    Perhaps when you have time you’ll make a better modification.
    Regards.
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,
    This is a great news.
    I am looking forward to this update.
    Thank you
    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,

    I also have in the functions.php file these codes related to BuddyBlog Pro.

    /**
    * BuddyBlog Pro woocommerce validation rule Not adding Points to Pending Article.
    */
    add_action( ‘woocommerce_order_status_completed’, function () {
    add_filter( ‘gamipress_user_deserves_trigger’, ‘__return_true’ );
    }, 9 );

    add_action( ‘wp_ajax_bblpro_submit_post’, function () {
    add_filter( ‘gamipress_user_deserves_trigger’, ‘__return_false’ );
    }, 9 );

    /**
    * BuddyBlog Pro field validation rule Not adding Points to Pending Article.
    */
    add_filter(‘bblpro_validation_errors’, function ($errors, $submitted_data, $post_data) {

    $status = $post_data[‘post_status’];

    if (!empty($submitted_data[‘bbl_post_title’]) && bblpro_custom_get_words_count($submitted_data[‘bbl_post_title’]) > 20) {
    $errors->add(‘bbl_post_title’, __(‘Titlul poate să conțină maxim de 20 de cuvinte.’));
    }

    // additional check for publish.
    if (‘publish’ === $status && bblpro_custom_get_words_count($submitted_data[‘bbl_post_content’]) > 5000) {
    $errors->add(‘bbl_post_content’, __(‘Articolul poate să conțină maxim 5000 de cuvinte.’));
    }

    return $errors;
    }, 10, 3);

    /**
    * Counts number of words in a string.
    *
    * @param string $str string.
    *
    * @return int
    */
    function bblpro_custom_get_words_count($str)
    {
    $words = preg_split(“/[\n\r\t ]+/”, $str, -1, PREG_SPLIT_NO_EMPTY);

    return count($words);
    }
    /**
    * End BuddyBlog Pro field validation rule.
    */

    Cristi

  • Participant
    Level: Master
    Posts: 196

    Hi,

    I updated the Pay Per Post to the V3 and also BuddyBoss 2 Theme and Platform Pro.

    My issue is that after I edit an already payd and published post it direct me to the Checkout Page.
    It should not do this.

    Also I have this code in my function.php file and it does not work with BuddyBlog Pro.

    // remove old items in cart when new items added woocommerce
    add_filter(‘woocommerce_add_to_cart_validation’, ‘remove_cart_item_before_add_to_cart’, 1, 3);
    function remove_cart_item_before_add_to_cart($passed, $product_id, $quantity) {
    if (!WC()->cart->is_empty()) {
    WC()->cart->empty_cart();
    }

    Thank you
    Cristi

    return $passed;
    }