Skip to content

Instantly share code, notes, and snippets.

View ImonAwesome's full-sized avatar
✔️
Github Verified!

Md. Imon Hossain ImonAwesome

✔️
Github Verified!
View GitHub Profile
@ImonAwesome
ImonAwesome / uk-shipping-zones.md
Created July 25, 2024 09:58
UK shipping zones configuration in WooCommerce (Limit to specific ZIP/postcodes)
@ImonAwesome
ImonAwesome / my-pmpro-redirect-to-referring-page-after-checkout.php
Created March 16, 2024 06:47 — forked from ipokkel/my-pmpro-redirect-to-referring-page-after-checkout.php
Redirect new members and existing members that changes their existing level back to the referring page after checkout.
<?php
/**
* Display the last visited non-PMPro page in the confirmation message, OR
* redirect the member back to the last visited page.
*
* Usage Guide:
*
* 1. Set your preference to either display the link or redirect back to
* the referrer page by setting the $toggle_display_redirect variable
* to true or false.
@ImonAwesome
ImonAwesome / elementor.php
Last active September 2, 2023 15:10
Elementor & Elementor PRO
<?php
# Hide Pages from Search Results
if (!is_admin()) {
function banting_search_filter($query) {
if ($query->is_search) {
$query->set('post_type', array( 'post','product'));
}
return $query;
}
@ImonAwesome
ImonAwesome / PaidMembershipsPro.php
Last active September 2, 2023 15:10
Paid Memberships Pro Snippets
<?php
# Redirect Members to a Unique Confirmation Page Based on Membership Level
function my_pmpro_confirmation_url( $rurl, $user_id, $pmpro_level ) {
if ( '2' === $pmpro_level->id ) {
$rurl = '/lvl1';
} elseif ( '6' === $pmpro_level->id ) {
$rurl = '/lvl2';
} elseif ( '5' === $pmpro_level->id ) {
@ImonAwesome
ImonAwesome / wc_meta.md
Created June 18, 2023 22:33
Woocommerce Product Meta keys
_sku
Total_sales
_tax_status
_price
_regular_price
_sale_price
_stock
_virtual
_stock_status
@ImonAwesome
ImonAwesome / .htaccess.md
Created May 2, 2023 15:24
Anything related to .htaccess

How to Enable/Disable Directory Listing

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
</IfModule>
@ImonAwesome
ImonAwesome / mysql.md
Created April 26, 2023 01:13
Install MySQL + phpMyAdmin on Ubuntu

Step 1 — Installing MySQL

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service

Step 2 — Configuring MySQL

@ImonAwesome
ImonAwesome / email-certificate.md
Created October 17, 2022 02:35
Free Email Certificate | Outlook

Step - One

First goto this url: https://extrassl.actalis.it/portal/uapub/freemail?lang=en Signup for the certificate using the email address. Save the pass the password of certificate. Check your email for the ceritificate

Step - Two

Double click on "PKCS12_Credential_XXXXXXX" file and start certificate import wizard Next

@ImonAwesome
ImonAwesome / woocommerce-display-order-count.php
Created August 18, 2022 14:48
WooCommerce Display Total Order Count
<?php
/**
* Plugin Name: WooCommerce Display Order Count
* Plugin URI: http://www.skyverge.com/product/woocommerce-display-order-count/
* Description: Adds the [wc_order_count] shortcode to display the total number of orders placed on your site.
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.1.0
*
* GitHub Plugin URI: bekarice/woocommerce-display-order-count
@ImonAwesome
ImonAwesome / CyberPanel.md
Created August 8, 2022 01:03
Install CyberPanel on Ubuntu 20.04

Update/Upgrade & Service Remove

sudo apt-get update
sudo apt-get upgrade -y

sudo systemctl stop apache2
sudo systemctl stop mysql
sudo systemctl stop postfix
sudo systemctl stop dovecot