Replies
- Niculae Constantinescu on August 31, 2022 at 4:35 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #46261
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 - Niculae Constantinescu on August 30, 2022 at 4:35 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #46246
Hi Brajesh
I am looking forward for the snippet.
Thank you
Cristi - Niculae Constantinescu on August 30, 2022 at 7:35 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #46232
Hi Tosin,
Thank you for your involvement.
Should I use both codes together?@brajesh What is your opinion?
Thank you
Cristi - Niculae Constantinescu on August 30, 2022 at 6:53 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #46227
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 - Niculae Constantinescu on August 23, 2022 at 12:12 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #46121
Hi,
Do you think that this week will be ready the update?
Thank you - Niculae Constantinescu on August 11, 2022 at 6:17 am in reply to: [Resolved] BuddyBlog Pro Media Uploader and Article Images #45990
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 - Niculae Constantinescu on August 11, 2022 at 6:12 am in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #45989
Hi,
This is a great news.
I am looking forward to this update.
Thank you
Cristi - Niculae Constantinescu on August 10, 2022 at 12:12 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #45983
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
- Niculae Constantinescu on August 10, 2022 at 12:10 pm in reply to: [Resolved] Pay Per Post by selling access with WooCommerce #45982
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
Cristireturn $passed;
} - Niculae Constantinescu on August 9, 2022 at 7:35 am in reply to: [Resolved] BuddyBlog Pro Media Uploader and Article Images #45965
Hi,
Any news?
Thank you
Cristi