WP Rocket instellingen

// 1. Activeer caching add_filter( ‘rocket_enable_cache’, ‘__return_true’ ); add_filter( ‘rocket_cache_mobile’, ‘__return_true’ ); add_filter( ‘rocket_separate_mobile_cache’, ‘__return_true’ ); // 2. Preload cache en fonts add_filter( ‘do_rocket_generate_caching_files’, ‘__return_true’ ); add_filter( ‘rocket_preload_cache’, ‘__return_true’ ); add_filter( ‘rocket_font_preload’, function( $fonts ) { return array( ‘/wp-content/themes/jouwthema/fonts/roboto.woff2’, ‘/wp-content/themes/jouwthema/fonts/open-sans.woff2’,…Continue reading

MemberPress: Get All the Sub-Accounts Data Under a Corporate Parent User

function display_sub_account_users() { $user = MeprUtils::get_currentuserinfo(); $sub_user_ids = array(); $output = ”; if ($user !== false) { $transactions = $user->active_product_subscriptions(‘transactions’); if (!empty($transactions)) { foreach ($transactions as $txn) { if (($sub = $txn->subscription()) !== false) { // Recurring subscription $ca =…Continue reading

Enable menu_order for product tags

// Enable menu_order for product tags function enable_menu_order_for_product_tags() { register_taxonomy( ‘product_tag’, ‘product’, array( ‘hierarchical’ => false, ‘label’ => __( ‘Product tags’, ‘woocommerce’ ), ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => array( ‘slug’ => ‘product-tag’ ), ‘sort’ => true, ‘args’…Continue reading