^(\+98|0)?9\d{9}$
This file contains hidden or 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
<?php | |
/** | |
* Iran's province and city php class | |
* @author Amin Rasouli <[email protected]> | |
* @version 1.0 | |
*/ | |
class City | |
{ |
This file contains hidden or 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
(WIP) This file contains a list with Woocommerce jquery events | |
Usage: you can fire functions when some event happen | |
Example: | |
$(document.body).on('woocommerce_event', function(){ | |
// do stuff | |
}); | |
Events |
This file contains hidden or 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
/* | |
📝 Remove "For Development Only" Watermark on GOOGLE MAP 😁 | |
👤 SCRIPT BY AmirhpCom ( https://amirhp.com/) 👑 | |
➕ Add this code on your project and edit langID,mapCanvas variables | |
*/ | |
var langID = "en-US", mapCanvas = "#map-canvas", $ = jQuery; | |
setInterval(function () {googlemap_remap();}, 10); | |
function googlemap_remap() { | |
$(`${mapCanvas}>div:last-of-type`).hide(); //hide top message says this is for dev only | |
var gimg = $(`img[src*="maps.googleapis.com/maps/vt?"]:not(.gmf)`); |
This file contains hidden or 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 woo_scripts_cleaner() { | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { | |
$woo_styles = [ | |
'woocommerce_frontend_styles', | |
'woocommerce-general', | |
'woocommerce-layout', | |
'woocommerce-smallscreen', | |
'woocommerce_fancybox_styles', | |
'woocommerce_chosen_styles', |
This file contains hidden or 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
/** | |
* Get All orders IDs for a given product ID. | |
* | |
* @param integer $product_id (required) | |
* @param array $order_status (optional) Default is 'wc-completed' | |
* | |
* @return array | |
*/ | |
public function getOrderIdsByProductId($product_id, $order_status = ['wc-completed', 'wc-processing']) { | |
global $wpdb; |
This file contains hidden or 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
<?php | |
/** | |
* WooCommerce: Display In-Stock Products First | |
* https://www.linkedin.com/posts/activity-7254955257355456515-ypfV | |
* | |
* This code snippet reorders products in WooCommerce to show | |
* in-stock items first, followed by out-of-stock items. It uses | |
* the 'posts_clauses' filter to modify the default product query. | |
* | |
* Usage: |
This file contains hidden or 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
/* | |
create a KV and bind to your worker -> kv_link | |
*/ | |
const pageUrl = "https://ledc.ir/%D8%AE%D8%A7%D9%85%D9%88%D8%B4%DB%8C%D9%87%D8%A7%DB%8C-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D8%B1%DB%8C%D8%B2%DB%8C-%D8%B4%D8%AF%D9%87"; | |
const botToken = "2365785233:AAG7afaplinQtnGgLvfgEgsAhbUQERSSYXFo"; | |
const chatId = "@barghmire"; |
OlderNewer