Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

M Yakub Mizan mymizan

🎯
Focusing
View GitHub Profile
View pub_key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDo3lWN9oiFqot70pQYu0Va/GscKCSUviG5ixdOwU9pjnxd2z10AwXp7EgFipcs4Q3Dm5+J3rD/rRwO0g7/SLdYma21OeHrJttQw5qDWZ0tWdmuV+2BSVr3ZwQlVTEr12QVv7YSuytFFaiApy/c2EGmYhLRZAmV5hhb5NpbOheCIw5Yxr8EwFNuR7DUBu1s17TeiJ7gGZvYDgGXvC24jZ3QJxL3lTwOWgJonBQROGq31HmYnHw7pxUJ/MDvfLTRBX0X7PCgbeR6r4lm0QOMpRl+jHItv4Or0e5cPWoti2GnBKuSD1PdzZ1DrTfjgHhwqs8xzVdeUqYwNti+nCfZFzh7T4Ta+0wLM1zYqSeEGKibUP0CSKMeXChlk8dz06XLTtt9gLAqRQF4R0u2Jht2i1Z1Nkib8fqMKJANxs7baA+lVh4xwiQUe8Zuu8NpT4/qSbr6UpTAj56fp2qnwMlF17p+AvKkv/60xpG0c7ot4rcERg5PdSKUCzb0O3SpShbfZmU= yakub@spreex
View woonet-refund-plugin.php
<?php
/**
* Plugin Name: WooMultistore Refund Order Plugin.
* Plugin URI: https://woomultistore.com
* Description: Custom WooMultistore extension to handle refund orders.
* Version: 1.0.0
* Author: Lykke Media AS
* Author URI: https://woomultistore.com
* License: GPL2+
* Text Domain: woonet
@mymizan
mymizan / allow-webp-media-sideload.php
Last active Feb 22, 2022
Allow uploading of webp image by media media_sideload_image()
View allow-webp-media-sideload.php
<?php
/**
* Allow webp for media_sideload function.
*/
add_filter( 'image_sideload_extensions', 'woonet_add_types', 10, 1 );
function woonet_add_types( $ext ) {
$ext[] = 'webp';
return $ext;
View disable-legacy-code.php
<?php
add_filter( 'WOO_MSTORE_admin_product/disable_legacy_get_slave_product_id', '__return_true' );
View metadata-wholesale-suit-Rymera-plugin
wholesale_customer_AUD_wholesale_price
wholesale_customer_wholesale_price
wholesale_customer_have_wholesale_price
wholesale_customer_GBP_wholesale_price
wholesale_customer_USD_wholesale_price
_regular_currency_prices
_sale_currency_prices
_product_base_currency
variable_regular_currency_prices
_variable_regular_currency_prices
View disable_total_sale_sync.php
<?php
add_filter( 'WOO_MSTORE_SYNC/process_json/meta', 'woonet_custom_filter_remove', 10, 3 );
function woonet_custom_filter_remove( $_whitelisted_meta, $product_id, $wc_product ) {
if (($key = array_search('total_sales', $_whitelisted_meta)) !== false) {
unset($_whitelisted_meta[$key]);
}
return $_whitelisted_meta;
}
View woo_multistore-order-status-action-column.php
<?php
add_filter('WOO_MSTORE_ORDER/woocommerce_admin_order_actions', 'woonet_add_order_status', 10, 2);
function woonet_add_order_status( $actions, $the_order ) {
$actions['view'] = array(
'url' => esc_url( $the_order['store_url'] . '/wp-admin/post.php?post=' . $the_order['id'] . '&action=edit' ),
'name' => __( 'View', 'woonet' ),
'action' => 'view',
);
return $actions;
View disable-ssl-verify.php
<?php
/**
* Disable certain security features on development machines.
*
* @class WOO_MSTORE_SINGLE_DEV_ENV
* @since 3.0.6
*/
class WOO_MSTORE_SINGLE_DEV_ENV {
public function __construct() {
add_action('init', array($this, 'init'), 10, 0);
View simple-build-script.php
#!/usr/bin/php
<?php
$working_directory = getcwd();
$plugin_folder = basename( $working_directory );
$parent_folder = dirname( $working_directory );
/**
* Check if there's a git repo in the current directory.
*/
if ( ! file_exists( $working_directory . '/.git/index') ) {
View sime-build-script.sh
#!/bin/bash
rm -rf woocommerce-multistore.zip
zip -r woocommerce-multistore.zip woocommerce-multistore -x '*.git*' -x '.DS_Store' -x '.travis.yml' -x 'bin' -x 'phpunit.xml.dist' -x 'tests'