The goal being:
User first subscribes > Trigger this function
User automatically pays for subsequent months > Trigger this function
The Function:
function my_change_meta_on_payment_received($morder) {
update_user_meta($morder->user_id, 'meta_field_1', 1);
}
add_action('pmpro_subscription_payment_completed', 'my_change_meta_on_payment_received', 10, 1);
(Note – I have dumbed this function down to a very basic test, change ‘meta_field_1
‘ to “1”).
What’s Happening:
Nothing is happening. Would this be due to running this in a ‘testing’ environment?
I have tested this with my Payment Gateway set to: Testing Only, but also tried Stripe – both with the Gateway Environment set to: Sandbox/Testing.
When testing with Stripe, I have successfully “Connected in test mode”.
When testing with Stripe, I have successfully “Connected in test mode”.
As a further question – I’m getting this working in the test environment, should that continue to work once I have it live with Stripe or I need to redo the code in some way?
]]>How do I find this metadata associated with each individual event so that I can store it in my own PHP variables?
]]>I can’t seem to get the posted or updated date to show in the metadata displayed on a single post, despite having the option selected in the theme’s customizer: https://snipboard.io/Kt04Bl.jpg
I am using a child theme.
Please, if someone could assist me?
]]>Although the titles and description still appear in the analytical EXTENSIONS.
How do I restore the meta title and description so that it does not appear again on the site?
]]>I’ve been looking for a solution to streamline my music file uploading process. So far, I’ve been manually editing each file to update the metadata—specifically the artist, album name, and featured image. This process is quite tedious and time-consuming, so I was wondering if this plugin allows for bulk editing of this information without needing to update each music file individually?
Thanks in advance!
]]>We are working on programmatically adding SEO metadata and using Yoast features via the WordPress REST API. However, we are encountering challenges when trying to set the following metadata fields:
We would like to know the exact field names and data structures used by Yoast to programmatically add these metadata and blocks during post creation or update.
For example, we have tried setting _yoast_wpseo_focuskw
, _yoast_wpseo_metadesc
, and _yoast_wpseo_title
in the meta
field of the REST API payload, but some fields do not work as expected or are not saved correctly. Additionally, we are unable to insert the “Table of Contents” block dynamically.
Could you please provide us with documentation or guidance on how to:
Thank you for your assistance.
Best regards,
Giuseppe
However, the filter is never applied. Any clue?
Here is my filter:
add_filter( 'wc_stripe_intent_metadata', 'add_custom_stripe_metadata', 50, 2 );
function add_custom_stripe_metadata( $metadata, $order, $prepared_source = null ) {
error_log("--- add_custom_stripe_metadata, order: " . $order->get_id());
// Add name, quantity, and price for each line item.
$count = 1;
foreach ( $order->get_items() as $item_id => $line_item ) {
$product = $line_item->get_product();
$product_sku = $product->get_sku();
error_log("--- add_custom_stripe_metadata, sku: " . $product_sku);
$metadata['sku' . $count] = $product_sku;
$count += 1;
}
return $metadata;
}
]]>My name is Palak, and I am a WordPress developer at Wingstech Solutions. I am encountering a complex issue in the admin dashboard where some order lists are missing details for variable items, specifically SKU and variation ID. Additionally, certain custom metadata is not being recorded as expected.
Despite my efforts to replicate the issue, I have been unsuccessful. I would greatly appreciate your assistance in identifying the root cause and finding a solution.
Thank you for your help!
Best regards,
Palak
Wingstech Solutions