Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
add_filter( 'woocommerce_get_return_url', function ( $return_url, $order ) { if ( ! $order instanceof WC_Order ) { return $return_url; } if ( ! $order->has_status( array( 'processing', 'completed', 'on-hold' ) ) ) { return $return_url; } $redirect_url = home_url( '/account/edit-account/' ); $target_slug = 'post_package'; $match = false; foreach ( $order->get_items() as $item ) { $product = $item->get_product(); if ( ! $product ) { continue; } if ( $product->get_type() === $target_slug ) { $match = true; break; } } return $match ? $redirect_url : $return_url; }, 10, 2 );
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)