plink saved first time once

This commit is contained in:
magepeopleteam 2019-05-02 11:18:49 +00:00
parent 7ccf053ef8
commit b442c1a957
1 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,17 @@ function mep_language_load(){
load_plugin_textdomain( 'mage-eventpress', false, $plugin_dir );
}
// Flash Permalink only Once
function mep_flash_permalink_once() {
if ( get_option( 'mep_flash_event_permalink' ) != 'completed' ) {
global $wp_rewrite;
$wp_rewrite->flush_rules();
update_option( 'mep_flash_event_permalink', 'completed' );
}
}
add_action( 'admin_init', 'mep_flash_permalink_once' );
// Class for Linking with Woocommerce with Event Pricing
add_action('plugins_loaded', 'mep_load_wc_class');
function mep_load_wc_class() {