Change a currency symbol AMD to Դրամ

/** * Change a currency symbol */ add_filter(‘woocommerce_currency_symbol’, ‘change_existing_currency_symbol’, 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case ‘AMD’: $currency_symbol = ‘֏’; break; } return $currency_symbol; }Continue reading

MemberPress: Send “Profile Updated” Admin Notification

function user_profile_update( $user_id ) { $site_url = get_bloginfo( ‘wpurl’ ); $user_info = get_userdata( $user_id ); $user_name = $user_info->display_name; //Retrieves user’s full name $user_email = $user_info->user_email; //Retrieves user’s e-mail address $subject = “Profile Updated: “.$site_url.””; $message = “Profile of $user_name ,…Continue reading

MemberPress: Disable MemberPress Password Lost/Changed Email

function disable_admin_pw_changed_email_memberpress( $recipients, $subject, $message, $headers ) { if( strpos( $subject, ‘Password Lost/Changed’) !== false ) { $recipients = array(); // no recipients } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘disable_admin_pw_changed_email_memberpress’, 11, 4 );Continue reading

Add column Product type in WooCommerce

// Add column: Product type add_filter( ‘manage_edit-product_columns’, ‘huk_admin_products_visibility_column’); function huk_admin_products_visibility_column( $columns ){ $columns[‘product_type’] = ‘Type’; return $columns; } add_action( ‘manage_product_posts_custom_column’, ‘huk_admin_products_visibility_column_content’, 20, 2 ); function huk_admin_products_visibility_column_content( $column, $product_id ){ if ( $column == ‘product_type’ ) { $product = wc_get_product( $product_id…Continue reading