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 | |
class My_Custom_My_Account_Endpoint { | |
/** | |
* Custom endpoint name. | |
* | |
* @var string | |
*/ | |
public static $endpoint = 'my-custom-endpoint'; |
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
// Difference for between now and a date in the future | |
$future_timestamp = strtotime( '1st January 2020' ); | |
$difference = human_time_diff( current_time( 'timestamp' ), $future_timestamp ); | |
// Difference between a date in the past and now | |
$past_timestamp = strtotime( '1st January 2016' ); | |
$difference = human_time_diff( $past_timestamp, current_time( 'timestamp' ) ); |
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 The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
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
/* global shipping for each seller into the seller profile */ | |
add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); | |
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); | |
function my_show_extra_profile_fields( $user ) { | |
$country_obj = new WC_Countries(); | |
$countries = $country_obj->countries; | |
$states = $country_obj->states; |
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 | |
function remove_wc_password_meter() { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
add_action( 'wp_print_scripts', 'remove_wc_password_meter', 100 ); |
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
jQuery(function($) { | |
$(".dokan-dashboard-content .dokan-table").addClass("table"); | |
$( ".dokan-dashboard-content .dokan-table" ).before( "<div class='table-responsive'></div>" ); | |
$( ".dokan-dashboard-content .table-responsive" ).append( $( ".dokan-table" ) ); | |
}); |
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
1) Dokan Plugin | |
dokan-fr_FR.po | |
dokan-fr_FR.mo | |
2) Dokan Live Search | |
dokan_ls-fr_FR.mo | |
dokan_ls-fr_FR.po | |
3) Dokan Paypal Adaptive | |
dokan-wc-pap-fr_FR.po |
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
$(document).ready(function() { | |
// Preloading | |
var div_box = "<div id='load-screen'><div id='loading'></div></div>"; | |
$("body").prepend(div_box); | |
$('#load-screen').delay(700).fadeOut(600, function(){ | |
$(this).remove(); | |
}); |
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 | |
function dokan_new_shipping_processing_times() { | |
$times = array( | |
'' => __( 'Ready to ship in...', 'dokan' ), | |
'1' => __( '1 business day', 'dokan' ), | |
'2' => __( '1-2 business day', 'dokan' ), | |
'3' => __( '1-3 business day', 'dokan' ), | |
'4' => __( '3-5 business day', 'dokan' ), | |
'5' => __( '1-2 weeks', 'dokan' ), |