Skip to content

Instantly share code, notes, and snippets.

View keshav1990's full-sized avatar
🏠
Open For Remote Jobs

Keshav Kalra keshav1990

🏠
Open For Remote Jobs
View GitHub Profile
@dededey
dededey / custom_field_woocommerce_product_category.php
Created August 5, 2015 10:21
add custom field to woocommerce product category
// Add term page
function custom_url_taxonomy_add_new_meta_field() {
// this will add the custom meta field to the add new term page
?>
<div class="form-field">
<label for="term_meta[custom_term_meta]"><?php _e( 'Custom url category', 'custom_url_category' ); ?></label>
<input type="text" name="term_meta[custom_term_meta]" id="term_meta[custom_term_meta]" value="">
<p class="description"><?php _e( 'Inserisci un custom url prodotto per la categoria','custom_url_category' ); ?></p>
</div>
<?php
@xlplugins
xlplugins / hooks.txt
Last active July 7, 2023 13:39
Funnelkit Checkout Hooks list
form.php
'wfacp_skip_form_printing'---------woofunnels-aero-checkout\public\template-common\form.php: 9
'woocommerce_checkout_must_be_logged_in_message' ---------woofunnels-aero-checkout\public\template-common\form.php: 14
'wfacp_before_form' ----for skip form printing-----woofunnels-aero-checkout\public\template-common\form.php: 31
'wfacp_outside_header' -------- woofunnels-aero-checkout\public\template-common\form.php: 52
@xlplugins
xlplugins / gist:bfcfab5b057e1c0a0719b9dccce5d7df
Created February 4, 2021 08:22
unset link on xl thank you page
add_filter ( 'woocommerce_order_item_permalink' , '__return_false' );
add_action( 'woocommerce_account_downloads_column_download-product','xlwcty_remove_hyper_link_from_download_product');
function xlwcty_remove_hyper_link_from_download_product($download)
{
echo esc_html( $download['product_name'] );
}
@xlplugins
xlplugins / change_text_of_smart_buttons_title.php
Last active October 26, 2023 07:56
Change text of smart buttons title "Express Checkout" and "OR"
/* Change text of smart buttons title*/
add_filter('wfacp_smart_button_legend_title',function (){
return __( 'Express Checkout2', 'woofunnels-aero-checkout' ) ;
});
/* Change "OR" text between smart buttons and checkout form */
add_filter('wfacp_smart_button_or_text',function (){
return 'OR2';
@xlplugins
xlplugins / wfocu_custom_product_price
Created April 15, 2021 10:25
custom upsell pricing based on order total #Upstroke
add_filter( 'wfocu_offer_data', 'wfocu_custom_alter_price', 12, 3 );
function wfocu_custom_alter_price( $output, $offer_data, $is_front ) {
$percentage_discount_on_order = 50; //put your dynamic percentage discount amount here
if ( true === $is_front ) {
foreach ( $output->products as &$product ) {
if ( is_a( $product->data, 'WC_Product' ) ) {
@xlplugins
xlplugins / gist:8fc8e3c4b97baabd67032d25e3683283
Created June 28, 2022 13:51
Payoneer Checkout Compatability Added with Funnel Checkout
class WFACP_Compatibility_With_Payoneer_Checkout_Gateway {
public function __construct() {
/* checkout page */
add_action( 'wfacp_after_checkout_page_found', [ $this, 'actions' ] );
}
public function actions() {
@xlplugins
xlplugins / hide-no-product-message
Created August 23, 2022 11:58
Hide no product found in checkout message on aerocheckout page
add_filter('wfacp_no_product_found_message',function(){
return "";
});
add_filter('wfacp_order_summary_column_item_heading',function (){
return 'Item';
});
add_filter('wfacp_order_summary_column_total_heading',function (){
return 'Amount';
});
@xlplugins
xlplugins / Express button load faster
Created September 28, 2022 07:57
Express button load faster
add_action( 'wfacp_run_checkout_event', function () {
?>
<script>
window.addEventListener('bwf_checkout_js_load', function () {
wfacp_frontend.hooks.addFilter('wfacp_run_checkout_event', function () {
return 'dom';
});
});
@xlplugins
xlplugins / Disable all shimmer until at time of load. Reactivated when user perform any action (Form change,Mini Cart )
Last active July 7, 2023 12:57
Disable all shimmer until at time of load. Reactivated when user perform any action (Form change,Mini Cart )
add_action( 'wfacp_internal_css', function () {
?>
<style>
body .wfacp_pro_switch.wfacp_animation_start .wfacp-pro-thumb:after,
body .wfacp_pro_switch.wfacp_animation_start .product-name .wfacp_product_switcher_item:after,
body .wfacp_pro_switch.wfacp_animation_start .product-name .wfacp_product_name_inner > span:after,
body .wfacp_pro_switch.wfacp_animation_start .wfacp_pro_attr_single:after,
body .wfacp_pro_switch.wfacp_animation_start .wfacp_product_subs_details span:after,
body .wfacp_pro_switch.wfacp_animation_start .product-name .wfacp_product_select_options a:after,
body .wfacp_pro_switch.wfacp_animation_start .wfacp_quantity .wfacp_qty_wrap:after,