woocommerce_thankyou_order_id

woocommerce_thankyou_order_id

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_thankyou_order_id') is found 2 times:

  • /includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php line 107
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    * @deprecated 6.4 Use check_response_for_order instead.
     */
    public function check_response() {
        global $wp;
        $order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) );
     
        $this->check_response_for_order( $order_id );
    }
     
    /**
     * Check Response for PDT.
  • /includes/shortcodes/class-wc-shortcode-checkout.php line 271
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    private static function order_received( $order_id = 0 ) {
        $order = false;
     
        // Get the order.
        $order_id  = apply_filters( 'woocommerce_thankyou_order_id', absint( $order_id ) );
        $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( wp_unslash( $_GET['key'] ) ) ); // WPCS: input var ok, CSRF ok.
     
        if ( $order_id > 0 ) {
            $order = wc_get_order( $order_id );
     
            if ( ( ! $order instanceof WC_Order ) || ! hash_equals( $order->get_order_key(), $order_key ) ) {