Sensei and Woocommerce checkout notices - remove action - woocommerce

First question so please be patient!
I'm using Sensei and Woocommerce for an LMS and payment portal site.
When the checkout is complete and a course (from Sensei) has been purchased I want to remove the notice created by Sensei and the top of the page.
It is added with this action.
add_action( 'template_redirect', array( 'Sensei_WC','course_link_from_order' ) );
Therefore, how do I remove or change this notice created by the action
I've tried this!
remove_action( 'template_redirect', array( 'Sensei_WC','course_link_from_order' ) );
in my functions file by alas, no success!
Thanks in advance

Related

Woocommerce how to disable add to cart option

Disable add to cart option When I purchased product.
I'm using "Martfury - WooCommerce Marketplace WordPress Theme".
This problem is only for variable product. simple product is fine.
Please check this link below and find attachment. please help anyone..
https://daisysell.com/product/2021-new-fashion-lady-oversize-rimless-square-bee-sunglasses/
These hook will help you out
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add this in functions.php
for more details refer
https://quadlayers.com/remove-add-to-cart-button-in-woocommerce/

No Reviews Tab Custom WooCommerce Theme

I'm currently working on a custom WooCommerce from a WordPress theme I have built from scratch. So far everything is working perfectly but I have come across an issue that I can't seem to get my head around. When I click on a product I am taken to the single product page, everything works as expected when I scroll down to the tabs section I am seeing the Description tab, but there is no reviews tab. I spent a big chunk of the weekend trying to find a solution to displaying this but I have been unsuccessful.
I have searched the project for the following lines to make sure I haven't disabled the functionality.
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30);
remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30);
I am completely stumped now. I have tried Google to find a solution, but I can only find articles and forum posts for pre-existing bought themes. Now I'm left wondering if I have actually missed something. I can display the review stars and it is correctly displaying the number of reviews but when I click on the url to go to the reviews the address bar displays wp-lds-shop/product/happy-ninja/#reviews.
I would really appreciate any help or advice on this.
I have found the following solution, which worked for me.
You have to declare WooCommerce support, otherwise the "Review" tab will not show up.
I followed this link: https://github.com/woocommerce/woocommerce/wiki/Declaring-WooCommerce-support-in-themes and added this code at the bottom of my functions.php
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
I hope this works for you!
Please Check This:
Reviews are enabled in:
How to enable reviews remove Reviews tab
just add to function.php template
add_filter( 'woocommerce_product_tabs', 'yikes_remove_description_tab', 20, 1 );
function yikes_remove_description_tab( $tabs ) {
// Remove the description tab
if ( isset( $tabs['description'] ) ) unset( $tabs['description'] );
return $tabs;
}

How to change the complete wordpress structure to show most recent posts according to last modified

In wordpress blog, posts appears according to most recent (new). Here i want to change it to show all recent posts according to last modified. Does it possible?
I don't know where the code is, checked theme functions but not found anything.
Can anyone help me?
You need to use this hook to get the post order by last modified.
function custom_loop( $query ) {
$query->set( 'orderby', 'modified' );
}
add_action( 'pre_get_posts', 'custom_loop' );
Use this in functions.php

Moving woocommerce shortdescription

im new at wordpress, and im trying to move the blocks from the product page details of woocommerce. In my situation im trying to move the short_description block after the add button, but isnt working.
Here my code:
add_action( 'woocommerce_after_add_to_cart_button', 'woocommerce_short_description');
woocommerce_short_description is a filter, not a function that loads the short description template. The function that you want is woocommerce_template_single_excerpt
add_action( 'woocommerce_after_add_to_cart_button', 'woocommerce_template_single_excerpt' );

Dynamically add amount to cart in woocommerce

I am very new to this community. kindly help me to get resolve form wordpress related query.
I am working on woocommerce website and need to add a service for ex:"electricity bill payment" . So, user has to dynamically add the amount and it should add to the card and reduced from his main wallet.
Is there any plugin or extension for this dynamically price added by this enduser ?
Plz suggest me and sorry for my bad english.
Many thanks,
sai
function woo_add_cart_fee() {
global $woocommerce;
$woocommerce->cart->add_fee( __('Custom', 'woocommerce'), 5 );
}
add_action( 'woocommerce_cart_calculate_fees', 'woo_add_cart_fee' );
Would you please add above code in your active theme functions.php ? but it will be applied on over all cart.

Resources