Replies
Hello Brajesh
Great, it works 🙂
Thank you
Regards
ps: is it possible to see the meta_user (in a plugin) without programming?Hi Brajesh,
The other developer finally gave me good value back $custom[3].Is there a test value (ex .: isBtnFeatured ()) to know if the “featured Member” comes from clicking on the “set featured” button?
RegardsHi Brajesh,
In progress 🙂
It works after payment if I put:
bp_featured_members()->add_user(18));
It does not work by automating:
a) bp_featured_members()->add_user(get_current_user_id());
OR
b)
$user_id = absint($custom[5]);
bp_featured_members()->add_user($user_id);Regards
add_action( 'super_after_paypal_ipn_payment_verified', 'ajout_membre_a_la_une_apres_paiement'); function ajout_membre_a_la_une_apres_paiement(){ $custom = $_POST['custom']; $custom = explode('|', $custom); $form_id = $custom[0]; // $user_id = absint($custom[5]); // get_current_user_id () ne fonctionnera pas, car ce n'est pas une requête provenant de l'utilisateur, mais du serveur paypal. // if ( ($form_id==4769) && (page(3579)) ){ // super-forms: paiement pour mise à la une membre ET page: tableau de bord //bp_featured_members()->add_user($user_id); // $user_id bp_featured_members()->add_user(get_current_user_id()); // } }
Hi Brajesh
Do you have an idea for it to work together?
RegardsHi Brajesh
Despite my email reminders, the developer of the payment plugin does not want to help me by giving information on its plugin.
So I sent the payment plugin and the server log file
Hoping that it helps
RegardsHi Brajesh,
Thank you for answering me. I do not see any errors in the logs, unfortunately.
Objective: the member pays with paypal IPN.
At the end of the payment, it is automatically switched to “featured member”What works
payment with tag “paid in the payment plugin
the passage has “featured member” outside the function of the payment pluginThe developer (after several days of advice) asks me to see you.
I hope you have an ideaHi,
Excerpts from our last 2 exchanges with the developer of paypal payment which also works:
…
dev:
Ok so in both situations the email was sent, which is good,
So I just believe that the BP function is not initialized at that moment / point in time.I think you should test the code with a prefixed user ID, and see if it works outside of the hook itself.
So something like this directly in the functions.php but most likely you have to do it in a “init” hook (not sure I would check BP docs for this).bp_featured_members () -> add_user (1234);
But it is working, except the bp_featured_members () function itself.
…Me:
bp_featured_members () -> add_user (18);
yes works outside the function
no does not work in the functiondev:
…
It means that the function is defined at that stage.The hook is triggered by “parse_request” action of wordpress core.
It is triggered probably before that function is defined.
- Hervé on August 16, 2018 at 11:45 am in reply to: [Resolved] Featured Member: time limit option #16820
Hi Brajesh,
It works 🙂
It did not work, wanting to test with my features with less than an hour
Regards - Hervé on August 14, 2018 at 1:46 pm in reply to: [Resolved] Featured Member: time limit option #16795
Hi Brajesh,
I just checked again. I think it works 🙂
I put thatprivate function get_interval() { return 60 ; }
After one hour, the display disappears. What does it take to display for a month?
The problem stems (perhaps) from the frequency of the wordpress cron with this function.add_filter( 'cron_schedules', 'isa_add_every_three_minutes' ); function isa_add_every_three_minutes( $schedules ) { $schedules['every_three_minutes'] = array( 'interval' => 180, 'display' => __( 'Every 3 Minutes', 'woffice' ) // ZZZZZZZ 3 minutes ?? ); return $schedules; } // Schedule an action if it's not already scheduled if ( ! wp_next_scheduled( 'isa_add_every_three_minutes' ) ) { wp_schedule_event( time(), 'every_three_minutes', 'isa_add_every_three_minutes' ); // { wp_schedule_event( time(), 'hourly', 'my_task_hook' ); }
Regards
Hi Brajesh,
I reinstalled the plugin,
clear the cache
and waited a day
the cron is activated,
I putprivate function get_interval() { return 7 *60 ; // 7 days.DAY_IN_SECONDS }
I no longer have the message in the debug.log, but still no suppression !!
No urgency but if other member can confirmRegards
PHP Version 7.1.17
MySQL Version 5.7.21[23-Jul-2018 20:40:48 UTC] Test toutes les 3 mn [24-Jul-2018 08:18:57 UTC] Test toutes les 3 mn [24-Jul-2018 08:25:48 UTC] Test toutes les 3 mn [24-Jul-2018 09:35:53 UTC] Test toutes les 3 mn [24-Jul-2018 10:42:53 UTC] Test toutes les 3 mn [24-Jul-2018 12:13:44 UTC] Test toutes les 3 mn [24-Jul-2018 12:17:08 UTC] Test toutes les 3 mn