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 | |
// Create a new User Query in the Query builder. | |
// Go to the Include/exclude section | |
// Click the Dynamic tag icon, and select the WC Current User memberships macro. In the text field write your membership IDs and done. | |
// this version can handle multiple memberip id's | |
// Include or Exclude can apply this macro. | |
// This macro will return the selected user id | |
// If the membership ID not exist, or not have user with selected ID membership active, will return | |
// My all Gist: https://gist.github.com/Lonsdale201 |
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 | |
// Create a new User Query in the Query builder. | |
// Go to the Include/exclude section | |
// Click the Dynamic tag icon, and select the WC Current User membership macro. In the text field write your membership ID and done. | |
// Include or Exclude can apply this macro. | |
// This macro will return the selected user id | |
// If the membership ID not exist, or not have user with selected ID membership active, will return | |
// My all Gist: https://gist.github.com/Lonsdale201 |
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
add_action( 'jet-engine/register-macros', function(){ | |
class Current_User_Email extends \Jet_Engine_Base_Macros { | |
public function macros_tag() { | |
return 'current_user_email'; | |
} | |
public function macros_name() { | |
return 'Current user email'; |
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
// az elem, amire kattintva, szimulációt kell leadni az elementor Wp menü widgetre, add meg ezt az ID: triggerelement | |
// másold a kódot egy megfelelő js fájlba vagy használd az Elementor custom code funkciót | |
// verzió 1 csak kinyitás | |
<script> | |
document.addEventListener('DOMContentLoaded', function () { | |
var triggerElement = document.getElementById('triggerelement'); | |
if (triggerElement) { |
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
// make your Checkbox filter, and ensure that "Group terms by parents" option is checkhed. | |
// In the Checkbox filter widget enable the Dropdown additions. You can use the search option also. (Mixed filter type not tested) | |
// Paste this code in a specific js file, plugin, or use the Elementor custom code function. (if elementor custom code, dont forget to | |
// use the tags, like <script> and <style> | |
// Multi level not tested, only one level. | |
// Warning this script will affect all of your checkbox filter, where you settinged up the "Group terms by parents" option. | |
// PREVIEW : https://prnt.sc/5fPJ6iebdDCy |
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
function hw_current_user_points_shortcode() { | |
// Csak bejelentkezett felhasználóknál jelenjen meg valami | |
if ( is_user_logged_in() ) { | |
$user_id = get_current_user_id(); | |
// A felhasználó pontegyenlegének lekérdezése a WC_Points_Rewards_Manager osztály használatával | |
$points = WC_Points_Rewards_Manager::get_users_points( $user_id ); | |
// Ellenőrizzük, hogy a felhasználónak van-e pontja | |
if ( empty( $points ) ) { |
NewerOlder