What do you want to save?
Add Code snippet
New code examples
-
-
Other 2022-01-30 12:06:48
woocommerce hook after order success
add_action('woocommerce_thankyou', 'enroll_student', 10, 1); function enroll_student( $order_id ) { if ( ! $order_id ) return; // Allow code execution only once if( ! get_post_meta( $order_id, '_thankyou_action_done', true ) ) { ... Add solution -
Other 2022-01-22 03:51:45
woocommerce get product categories
global $product; $product->get_id(); Add solution -
PHP 2021-10-05 09:45:02
if product open display this button
add_action( 'woocommerce_single_product_summary', 'custom_button_by_categories', 32 ,0 ); function custom_button_by_categories(){ global $product; // Define your categories in this array (can be Ids, slugs or names) $product_cats = array... Add solution -
PHP 2021-09-23 08:45:03
get product details from wc_get_product
// Get Product ID $product->get_id(); // Get Product General Info $product->get_type(); $product->get_name(); $product->get_slug(); $product->get_date_created(); $product->get_date_modified(); $prod... Add solution -
PHP 2021-09-17 10:58:05
pass the product name to form field cf7 woocommerce
<button type="submit" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button button alt"><?php echo _e( 'Request', 'framework' ); ?></button> <input type=&... Add solution
Best helpers
Gabi Purcaru
+5
L. Samson
+5
Yoyo
+5
Skry
+5
Colocvial
+5
Sarah witte
+5
Leosar
+5
Tobiak777
+5
Tjd
+5