Skip to content

Instantly share code, notes, and snippets.

View wpflippercode's full-sized avatar

Sandeep Kumar wpflippercode

View GitHub Profile
@wpflippercode
wpflippercode / gist:1de1dbaeabea56c68740ea8ce1bf40a1
Created November 15, 2017 10:52
Display / Hide Age Verification Popup For Particular Post / Page
add_filter('agp_verify_age','agp_show_modal');
function agp_show_modal($show_popup,$post_id) {
//check condition according to post id & then return boolean value
return $show_popup;
}
@wpflippercode
wpflippercode / gist:5bf02524caee3d369a2d0c8921d9911c
Created November 15, 2017 10:39
Customize Plugin Settings In JS File
add_filter('agp_current_settings','agp_changed_plugin_settings');
function agp_changed_plugin_settings($settings) {
//Modify Settings According To Custom Conditions.
return $settings;
}
@wpflippercode
wpflippercode / gist:9a33446e4b4963634e3bafab8b240f39
Last active November 13, 2017 13:13
Fix marker display issue in conflicting countries having same zipcodes
add_filter('wdap_exclude_countries','excluding_countries');
function excluding_countries($countries) {
/*Return array of country codes which you want to exclude to display marker. Some countries have same zipcodes due to which markers are displayed on both countries and this represent product delivery area, however you need to display it in only one country as your deliver in one country only */
return $countries;
}
@wpflippercode
wpflippercode / gist:18ab5dd27156ece70a5f00b537cfb398
Created November 13, 2017 13:06
Update default placeholder text of search input textbox inside product availability google map
add_filter('wdap_placeholder_search','wdap_placeholder_search');
function wdap_placeholder_search($placeholder) {
//Modify search textbox's default placeholder value.
return $placeholder;
}
@wpflippercode
wpflippercode / gist:3f2212eb97c09bde1012547ffe5b35f4
Last active November 13, 2017 13:17
Update zipcode listing heading text inside product availability tab on product page
add_filter('wdap_zipcode_listing_heading','wdap_zipcpde_listing_heading');
function wdap_zipcpde_listing_heading($text) {
//Modify Zipcode Listing Heading.
return $text;
}
@wpflippercode
wpflippercode / gist:39311393f30db99f010bbdba2b8444dd
Created November 13, 2017 13:02
Update Default Heading Of Product Availability Tab
add_filter('wdap_pa_tab_heading','wdap_tab_heading');
function wdap_tab_heading($text) {
//Modify Product Availability Tab Label On Product Page.
return $text;
}
@wpflippercode
wpflippercode / gist:43739a6261d8d5da26f6b42f6eac1834
Last active November 13, 2017 12:58
Update Marker's Icon Image In Google Maps Representing Product Availability Areas
add_filter('wdap_map_icon','wdap_map_icon_update');
function wdap_map_icon_update($icon) {
// update google map icon.
return $icon;
}
@wpflippercode
wpflippercode / gist:b71df14a8e6c0c89b693c8444bd1bb4a
Created November 8, 2017 11:58
Change loader image in delivery area form
add_filter('wdap_loader_img_url','wdap_loader_image');
function wdap_loader_image($icon_url) {
//replace icon url.
return $icon_url;
}
@wpflippercode
wpflippercode / gist:aa861eec6865d3941fd4c535c9878f08
Created October 11, 2017 10:13
Change Map Language According to Site Language
add_filter('wpgmp_map_lang','wpgmp_map_lang' );
function wpgmp_map_lang($lang) {
global $post;
if( $post->ID == 96 )
{
$lang = 'hi';
}
return $lang;
}
@wpflippercode
wpflippercode / gist:a5c92df20c86fbc722c0b39c62aa3ac2
Created September 28, 2017 12:33
Modify Strings Used on Frontend in Google Maps Plugin
add_filter('wpgmp_text_settings','wpgmp_text_settings',1,2);
function wpgmp_text_settings($strings,$map_id) {
$strings['search_placeholder'] = "";
return $strings;
}