How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]

try this below code in your function.php file or in your plugin add_action(“init”, function () { // removing the woocommerce hook foreach( WC()->cart->get_cart() as $cart_item ){ $product_id = $cart_item[‘product_id’]; if($product_id!=’19’) { remove_action(‘woocommerce_checkout_process’, ‘my_custom_checkout_field_process’); } } });

Sage WordPress – Plugin Namespace: Not Found

You must specify in the roots sage theme composer.json the runtime where autoload can find the classes. “autoload”: { “psr-4”: { “App\\”: “app/”, “App\\Blocks\\”: “app/Blocks/”, “Itineris\\AcfGutenblocks\\”: “../../plugins/acf-gutenblocks/src/”, } } Don’t forget to run composer dump-autoload

Ajax gives 400 error

Explanation: The issue you are likely facing is that you are trying to add your ajax actions from within the widget itself that may be instantiated on the elementor/widgets/widgets_registered hook. If so, this is hook elementor/widgets/widgets_registered is too late and do_action( “wp_ajax_{$action}” ) and do_action( “wp_ajax_nopriv_{$action}” ) have already fired. Working example: NOTE: very rough … Read more