This file contains 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 | |
/** | |
* Add in your functions.php or through a plugin like Code Snippet. | |
**/ | |
add_filter('https_local_ssl_verify', '__return_true'); | |
add_filter('https_ssl_verify', '__return_true'); | |
add_action('http_api_curl', 'woonet_custom_curl_timeout', PHP_INT_MAX, 1); |
This file contains 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 | |
/** | |
* change 3,4,5 with your own site IDs where you don't want to sync stock. Each ID | |
* should be seperated by a comma. | |
*/ | |
$site_ids = array( 3, 4, 5); | |
/** | |
* Do not edit anything below. | |
**/ |
This file contains 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 | |
/** | |
* Plugin Name: WooMulti Demo Sync Product | |
* Plugin URI: https://woomultistore.com/ | |
* Description: A demo plugin to demonstrate the synchronization of products via API. | |
* Author: Lykke Media AS | |
* Version: 1.0.0 | |
* Author URI: https://woomultistore.com/ | |
*/ |
This file contains 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
define( 'WP_SHOW_CAT_IDS_NAME', 'WP Show Category ID' ); | |
define( 'WP_SHOW_CAT_IDS_VERSION', '1.0.0' ); | |
class WP_SHOW_CAT_IDS_MAIN { | |
/** | |
* All our action hooks and filters here | |
* so that they are regiestered when the | |
* plugin is initiated. |
This file contains 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 | |
/** | |
* Plugin Name: WP Show Category ID | |
* Plugin URI: https://yakub.xyz | |
* Description: A simple plugin to show category IDs for post categories and WooCommerce product caegories | |
* Author: M Yakub Mizan | |
* Version: 1.0.0 | |
* Author URI: https://yakub.xyz | |
**/ |
This file contains 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 | |
public function menu_markup() | |
{ | |
if ( !current_user_can( 'manage_options' ) ) { | |
wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); | |
} | |
?> | |
<div class="wrap"> | |
<h1>YM Options</h1> | |
<form method="post" action="options.php"> |
This file contains 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 | |
/* | |
Plugin Name: YM Options Page | |
Plugin URI: https://yakub.xyz/ | |
Description: The plugin shows you how to build an options page | |
Author: M Yakub Mizan | |
Version: 1.0.0 | |
Author URI: https://yakub.xyz | |
*/ |
This file contains 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 | |
/* | |
Plugin Name: YM Options Page | |
Plugin URI: https://yakub.xyz/ | |
Description: The plugin shows you how to build an options page | |
Author: M Yakub Mizan | |
Version: 1.0.0 | |
Author URI: https://yakub.xyz | |
*/ |
This file contains 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 | |
/** | |
** | |
** I like to prefix my functions, constants and variables in global scope | |
** with YMCODE_/ymcode_ to prevent collision. Feel free to change it. | |
**/ | |
/** | |
** Set your custom message. Do not include html as it will be stripped off. | |
**/ |
This file contains 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 the shipping row from woocommerce_get_order_item_totals array | |
**/ | |
function ymcode_remove_shipping_details_from_woocommerce_email($total_rows, $obj, $tax_display) | |
{ | |
if ( isset($total_rows['shipping']) ) | |
{ | |
unset($total_rows['shipping']); | |
} |