This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Redirect posts with old permalink structure to new links. | |
| * | |
| * If you change your posts permalink structure you should redirect all | |
| * trafic from old permalink to new one. This script will redirect posts | |
| * from /%postname%/ to current post link using 301 status. | |
| * | |
| * This script is working only for /%postname%/ => current link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // WC_Checkout | |
| /** | |
| * Add coupon lines to the order. | |
| * | |
| * @param WC_Order $order Order instance. | |
| * @param WC_Cart $cart Cart instance. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| // original snippet URL: https://gist.github.com/solaceten/7f03aed8c3b232742b1f6fb7777d8776 | |
| // Author solaceten. You are free to do what you want with this but not sell it or make any money from its use. | |
| // | |
| // Explainer: | |
| // Below is a custom function to add a custom variable into automate woo. | |
| // This example enables the use of a new variable: order.billing_email - as a variable in the workflow ACTION section, email TO field. | |
| // As at Dec 2024, in automatewoo, this variable is working after adding the following code. | |
| // | |
| // While this code allows you to use the new variable {{ order.billing_email }} in your Workflow, note that in the main queue admin table, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define("WPE_JSON_TRANSIENT_NAME", "wpe_dummyjson"); | |
| define("WPE_JSON_TRANSIENT_TTL", 60); | |
| define("WPE_JSON_ENDPOINT_BASE", "https://dummyjson.com/"); | |
| /** Add query type to dropdown */ | |
| add_filter("bricks/setup/control_options", function ($control_options) { | |
| // Add a new query loop type | |
| $control_options["queryTypes"]["wpe_json"] = esc_html__( | |
| "DummyJSON", |
OlderNewer