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 | |
if( !function_exists('letsgo_culqi_force_language') ) { | |
function letsgo_culqi_force_language($language = 'es') { | |
return 'es'; //"es" or "en" | |
} | |
add_filter('fullculqi/global/language', 'letsgo_culqi_force_language', 10, 1); | |
} |
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 | |
/** | |
* Modify the price range format on the product page | |
* @package LetsGodev\MuPlugins | |
* @since 1.0 | |
*/ | |
add_filter( 'woocommerce_get_price_html', 'priceRangeFormat', 10, 2 ); | |
/** |
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 | |
/** | |
* Send php variables to js | |
* @package LetsGodev\MuPlugins | |
* @since 1.0 | |
* @description : use letsgo_vars.ajax_url in script js | |
*/ | |
add_action( 'wp_enqueue_scripts', 'sendVarsToScripts' ); |
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 | |
/** | |
* @link https://www.letsgodev.com/ | |
* @since 1.0.0 | |
* @package Plugins/LetsGoDev/PluginExample | |
* | |
* Plugin Name: Plugin Example | |
* Plugin URI: https://www.letsgodev.com/ | |
* Description: This plugin is an example | |
* Version: 1.0.0 |
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 | |
/** | |
* @link https://www.letsgodev.com/ | |
* @since 1.0.0 | |
* @package Plugins/LetsGoDev/PluginExample | |
* | |
* Plugin Name: Set minimum order | |
* Plugin URI: https://www.letsgodev.com/ | |
* Description: This plugin is an example | |
* Version: 1.0.0 |
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 | |
/********* | |
* Hooks | |
* Remember to remove shipping-transient-version transient | |
********/ | |
// Snippet 1 : Hide other shipping methods | |
add_filter( 'woocommerce_package_rates', 'maybeFreeShipping' ); | |
// Snippet 2 : Notify that the customer can access free shipping. |
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 | |
/** | |
* Convert your Ecommerce in catalog mode | |
* @package LetsGodev\MuPlugins | |
* @since 1.0 | |
*/ | |
// Hide the cart page & checkout page | |
add_action( 'template_redirect', 'hideCartCheckoutPage' ); |
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 | |
/****************** | |
* Product Hooks | |
******************/ | |
// Print a product custom field | |
add_action( 'woocommerce_before_add_to_cart_button', 'printProductCustomFields' ); | |
/*************** | |
* Cart Hooks | |
***************/ |
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 | |
/** | |
* Payment Complete in WC | |
*/ | |
add_action( 'woocommerce_payment_complete', 'createMoodleUser' ); | |
/** | |
* Create Moodle User | |
* @param int $orderID |
OlderNewer