Smart Coupons: Admin Voucher References, Notes & Search

function rd_add_generated_gift_coupon_order_note( $generated_coupon ) { if ( ! is_array( $generated_coupon ) || empty( $generated_coupon[‘new_coupon_id’] ) ) { return; } $coupon = new WC_Coupon( absint( $generated_coupon[‘new_coupon_id’] ) ); if ( ! $coupon->get_id() ) { return; } $order_id = absint( $coupon->get_meta( ‘generated_from_order_id’,…Continue reading

Add YoOhw Clone Actions to Order List & Edit Screen

function rd_yoohw_clone_order_is_available( $order ) { if ( ! function_exists( ‘wc_get_order’ ) || ! class_exists( ‘WC_Order’ ) || ! $order instanceof WC_Order || ! has_action( ‘woocommerce_order_action_yoos_duplicate_order’ ) || ! current_user_can( ‘administrator’ ) || ! current_user_can( ‘edit_shop_order’, $order->get_id() ) ) { return…Continue reading

Show Order Numbers in YoOhw Duplicate Notes

function rd_get_yoohw_duplicate_note_reference_order_id( $note_content, $note_template ) { $pattern = ‘/^’ . str_replace( ‘%s’, ‘([0-9]+)’, preg_quote( $note_template, ‘/’ ) ) . ‘$/’; if ( ! preg_match( $pattern, $note_content, $matches ) ) { return 0; } return absint( $matches[1] ); } function rd_show_order_numbers_in_yoohw_duplicate_notes(…Continue reading

Mark WooCommerce Order Clones

function rd_mark_yoohw_order_duplicate_on_redirect( $location ) { if ( ! function_exists( ‘wc_get_order’ ) || ! class_exists( ‘WC_Order’ ) || ! has_action( ‘woocommerce_order_action_yoos_duplicate_order’ ) ) { return $location; } $redirect_parts = wp_parse_url( $location ); if ( empty( $redirect_parts[‘query’] ) ) { return $location;…Continue reading

Reset Payment Method on YoOhw Order Duplicates

function rd_reset_payment_method_on_yoohw_order_duplicate_redirect( $location ) { if ( ! function_exists( ‘wc_get_order’ ) || ! class_exists( ‘WC_Order’ ) || ! has_action( ‘woocommerce_order_action_yoos_duplicate_order’ ) ) { return $location; } $redirect_parts = wp_parse_url( $location ); if ( empty( $redirect_parts[‘query’] ) ) { return $location;…Continue reading

Enable Editing of Draft & Processing WooCommerce Orders

add_filter( ‘wc_order_is_editable’, function ( $is_editable, $order ) { if ( ! $order instanceof WC_Order ) { return $is_editable; } if ( ! current_user_can( ‘edit_shop_order’, $order->get_id() ) ) { return $is_editable; } return $is_editable || in_array( $order->get_status(), array( ‘checkout-draft’, ‘processing’ ),…Continue reading

Untitled Snippet

صحتنا | حاسبة السعرات صحتنا خطتك تبدأ بخطوة توازن يدوم اعرف احتياجك. واصنع عاداتك. حاسبة ذكية تمنحك نقطة بداية واضحة للسعرات، مؤشر كتلة الجسم، وخطة يومية عملية تناسب هدفك. حاسبة شخصية أدخل بياناتك لنرسم طريقك الصحي الاسم (اختياري) الجنس ذكرأنثى…Continue reading

Inversiones Festidram (copy)

{ “@context”: “https://schema.org”, “@type”: [“EventVenue”, “LocalBusiness”], “name”: “Inversiones Festidram”, “description”: “Servicios integrales de festejos, alquiler de toldos, estructuras, tarimas y mobiliario para eventos.”, “url”: “https://www.tusitioweb.com”, “logo”: “https://www.tusitioweb.com/logo.png”, “image”: [ “https://www.tusitioweb.com/images/evento1.jpg”, “https://www.tusitioweb.com/images/toldos.jpg” ], “address”: { “@type”: “PostalAddress”, “addressLocality”: “Carrizal”, “addressRegion”: “Miranda”,…Continue reading

Inversiones Festidram

{ “@context”: “https://schema.org”, “@type”: [“EventVenue”, “LocalBusiness”], “name”: “Inversiones Festidram”, “description”: “Servicios integrales de festejos, alquiler de toldos, estructuras, tarimas y mobiliario para eventos.”, “url”: “https://www.tusitioweb.com”, “logo”: “https://www.tusitioweb.com/logo.png”, “image”: [ “https://www.tusitioweb.com/images/evento1.jpg”, “https://www.tusitioweb.com/images/toldos.jpg” ], “address”: { “@type”: “PostalAddress”, “addressLocality”: “Carrizal”, “addressRegion”: “Miranda”,…Continue reading