This file contains 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
// use on the page https://www.facebook.com/YOUR_USER_NAME/allactivity?privacy_source=activity_log&log_filter=cluster_11 | |
// scroll down to as many posts you want to delete (make pencil icons visible) | |
// recommended to delete small batches as the process gets really slow for many deletes in parallel (UI issues) | |
// we do stuff in parallel because a single delete can take up to 7 seconds | |
// to launch, call deletePost() | |
var knownPencils={}; | |
function deletePost() { | |
var pencils=document.querySelectorAll('[data-testid="pencil_icon_link"]'); | |
var pencilFound=false; |
This file contains 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 | |
// Code goes in theme functions.php or a custom plugin | |
add_filter( 'pre_option_woocommerce_enable_guest_checkout', 'conditional_guest_checkout_based_on_product' ); | |
function conditional_guest_checkout_based_on_product( $value ) { | |
$restrict_ids = array( 1, 2, 3 ); // Replace with product ids which cannot use guest checkout | |
if ( WC()->cart ) { | |
$cart = WC()->cart->get_cart(); |