This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Elementor ONLY | |
// Select your element in the elementor editor (container, widget etc..whatever), and go to the advanced tab, enable dynamic visibility option. | |
// Scroll down in the list, until you see the new category: wc_membership | |
// select the Access memberships | |
// Choose you logic, hide or show | |
// in the Memberships select field you can choose the memberships (one or more), this relation always "AND" | |
// Status always only the Active | |
// This visibility always check the current logged in user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// Dont forget! This code is for the WooCommerce Points and Rewards plugin, so if it is not installed and activated, | |
// you will not be able to use this condition! | |
// https://woo.com/products/woocommerce-points-and-rewards/ | |
// Go to you block, widget container etc, open the Dynamic Visibility modul, and scroll down in the list, | |
// you will see a new category: Woo Points and Rewards | |
// this visibility only work for logged-in users. Will Check if the points is more than 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// Dont forget! This code is for the WooCommerce Points and Rewards plugin, so if it is not installed and activated, | |
// you will not be able to use this condition! | |
// https://woo.com/products/woocommerce-points-and-rewards/ | |
// Go to you block, widget container etc, open the Dynamic Visibility modul, and scroll down in the list, | |
// you will see a new category: Woo Points and Rewards | |
// this visibility only work for logged-in users. You can use the value field, to define the points. | |
// example : select the new Current user Equal or greater condition | |
// in the value field Enter the point amount. This visibility will check if the current user points equal or greater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// This conditions required the JetReview plugin to be installed and activated on your site. This Conditions only work with | |
// LOGGED IN USERS, Not supported GUESTS | |
// Only check the Review, and not the Comments. | |
// This conditions check if the current user already submitted a review (and approved) in the current source (eg: cpt current-post) | |
add_action( 'jet-engine/modules/dynamic-visibility/conditions/register', function( $conditions_manager ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// This conditions required the JetReview plugin to be installed and activated on your site. This Conditions only work with | |
// LOGGED IN USERS, Not supported GUESTS | |
// Only check the Review, and not the Comments. | |
// This conditions check if the current user submitted a review and its still awaiting moderation (so only this status) in the current source (eg: cpt current-post) | |
add_action( 'jet-engine/modules/dynamic-visibility/conditions/register', function( $conditions_manager ) { | |
class JE_Review_Awaiting_Moderation extends \Jet_Engine\Modules\Dynamic_Visibility\Conditions\Base { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// This conditions required the Woo Subscriptions plugin to be installed and activated on your site. This Conditions only work with | |
// LOGGED IN USERS | |
// https://woo.com/products/woocommerce-subscriptions/ | |
// This is the code to see if the current logged in user has any subscriptions that are active. | |
add_action( 'jet-engine/modules/dynamic-visibility/conditions/register', function( $conditions_manager ) { | |
class Woo_Subscriptions_Active_Subscription extends \Jet_Engine\Modules\Dynamic_Visibility\Conditions\Base { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference by default https://gist.github.com/Crocoblock/d8bcacb6c851ae670bc0514f2f9173d6 | |
// In the jetformbuilder checkbox field - use the Advanced section - Class field name, and add: check-limit | |
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// You can define if the user not logged in how many checkbox can check. This is the : 'guest' => 1, | |
// HOW TO | |
// In the $limits = [ add your role name like 'mycustomrole" => 4, where the "mycustomrole" is your role cap name, and the "4" is the limit | |
// Dont forget to target your checkbox field, in the form gutenberg editor like the image: https://prnt.sc/FjqDLNL_q78m | |
// CSS Class name: check-limit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference by default https://gist.github.com/Crocoblock/25125c7db9b19c60b1043061015556d0 | |
// In the jetformbuilder Select field - use the Advanced section - Class field name, and add: select-limit | |
// Dont forget to enable the multiple option | |
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// You can define if the user not logged in how many select item can check. This is the : 'guest' => 1, | |
// HOW TO | |
// In the $limits = [ add your role name like 'mycustomrole" => 4, where the "mycustomrole" is your role cap name, and the "4" is the limit | |
// Dont forget to target your select field, in the form gutenberg editor like the image: https://prnt.sc/Q4fqdpj3vgTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin like Fluent Snippts etc.. | |
// This conditions required the FluentCRM plugin to be installed and activated on your site. This Conditions only work with | |
// LOGGED IN USERS + user need to Contant in your CRM | |
// https://fluentcrm.com/ | |
// https://wordpress.org/plugins/fluent-crm/ | |
// Only Elementor | |
// HOW TO | |
// Go to your , widget container etc, open the Dynamic Visibility modul, and scroll down and select the Fluent CRM Lists option | |
// In the next select field, choose one or more Lists (Internal operator OR) | |
// don't see any listings? That's because you haven't created them yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy this code in the child theme functions.php or a specific code plugin like FluentSnippets | |
add_action( 'user_register', 'auto_enroll_user_to_course', 10, 1 ); | |
function auto_enroll_user_to_course( $user_id ) { | |
if ( ! is_wp_error( $user_id ) ) { | |
$course_ids = array( 131 ); // Course ID, or ID's user separate comme if you want to add multiple id. | |
if ( !is_array( $course_ids ) ) { | |
$course_ids = array( $course_ids ); | |
} |