Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter jaceejoef

    (@jaceejoef)

    Thank you for your response. The last part is not reassuring though. I might just find another plugin then. Thank you though.

    Please consider this ticket resolved.

    Thread Starter jaceejoef

    (@jaceejoef)

    Hi. Thank you for responding.

    So far, what I did is use wp_insert_attachment, wp_generate_attachment_metadata and wp_update_attachment_metadata to register the images. I created a cron job to read the files from a specific directory.

    This approach would still return the execution timeout error so I created a bunch of txt files that have 40 images listed in them. I created these txt files via code and there are a total of almost 800 txt files. Once all the images from the txt files are registered, the txt file is deleted.

    I also added a checker if the image is already registered or not because sometimes, for some reason, it only registers the first image in the txt file and it just stops. I didn’t investigate further to know the reason.

    It’s not the best solution but atleast it’s working in the background. You might get some kind of idea from it and make it better.

    Thread Starter jaceejoef

    (@jaceejoef)

    @seank123 I ask the production team and they don’t want that so I guess I’ll just add a global product ID custom field.

    Someone also recommended Broadcast plugin (https://broadcast.plainviewplugins.com/basic/) so I’ll also check if that works.

    Thread Starter jaceejoef

    (@jaceejoef)

    @seank123 Because we don’t have SKU on the variable. The SKU are on the variation. Variable is more of the product grouping while the variation is the specific product so the SKUs are in the variation.

    For example if we are selling tshirts, “tshirt” is the variable while “red XL tshirt” is the variation.

    And if you query product post type, it will return the variable products for which we don’t have an SKU.

    Experience the same problem. Here’s my workaround:

    add_shortcode('sc_wc_yotpo_show_widget', function(){
    	$plugin_dir = WP_PLUGIN_DIR . '/yotpo-social-reviews-for-woocommerce';
    	include_once $plugin_dir.'/wc_yotpo.php';
    	wc_yotpo_show_widget();
    	
    	return;
    });
    
    add_shortcode('sc_yotpo_show_buttomline', function(){
    	$plugin_dir = WP_PLUGIN_DIR . '/yotpo-social-reviews-for-woocommerce';
    	include_once $plugin_dir.'/wc_yotpo.php';
    	wc_yotpo_show_buttomline();
    	
    	return;
    });

    Add the above code to functions.php or, in my case, Code Snippets.

    Thread Starter jaceejoef

    (@jaceejoef)

    Hi @codingpanda

    Thank you for the workaround code. It works!

    I was able to make it work using an SQL code but your code is neater so I’ll use that.

    Thread Starter jaceejoef

    (@jaceejoef)

    Hi @wpmudev-support9

    Just want to clarify. If a user pays via debit or credit card, the billing address is a must. Is that correct?

    I need to explain this to our client because he thinks online payment for a service is like paying over-the-counter via card where you only need the card details by swiping/tapping the card.

    Thread Starter jaceejoef

    (@jaceejoef)

    Hi @keraweb

    Yes, you’re right. It’s a plugin conflict. It has a conflict with Oxygen Builder which is something I can’t afford to deactivate.

    Here’s how I found out the conflict.

    Anyways, these are the activated plugins I’ve been using:

    • Oxygen Builder
    • Pods
    • Panda Pods Repeater
    • Code Snippets
    • WPS Hide Login

    Among those five, I can only deactivate WPS Hide Login since the rest are the main plugins that help me create the website. After deactivating WPS Hide Login, the post transition hooks is still not working. So what I did is setup a fresh install of WordPress and install those four plugins. I create a test CPT, test pods form, test page and save_post hook code. And it works!

    At this point, I don’t know what causes the issue in the original website so I plan to recreate everything part-by-part and test the save_post hook each time. The first I did is to create the base template in Oxygen. After applying the base template on the page with my test form, the save_post hook stop working. So the culprit is Oxygen!

    The error logs didn’t return any error message so I don’t know how to fix this. And I can’t deactivate oxygen since it’s my builder.

    In case anyone wants to investigate this, here’s my setup:

    • WordPress 5.5.3
    • Oxygen 3.6.1
    • Pods 2.7.24
    • Panda Pods Repeater Field 1.4.7
    • Code Snippets 2.14.0

    Other functionalities are custom code in Code Snippets.

    For now, I will look for another free form that can handle the pods repeater or maybe just create my own form (I already have the code anyway).

    I will mark this as resolved, even though it’s not really resolved, since this needs further investigation on either Oxygen or Pods.

    Thread Starter jaceejoef

    (@jaceejoef)

    Did another test.

    If I manually use the wp_insert_post, the save_post hook is firing. If I use the pods form to create a new post, save_post hook is not firing.

    • This reply was modified 5 years, 4 months ago by jaceejoef.
    Thread Starter jaceejoef

    (@jaceejoef)

    Hi Jory,

    Thank you for your response. For some reason, it’s not firing. I’ve also been trying to use transition post status hooks but still nothing.

    add_action('save_post_orders', 'jja_save_me', 10, 3);
    add_action('save_post', 'jja_save_me', 10, 3);
    function jja_save_me($post_id, $post, $update) {
    	error_log('WATCH ME');
    	$date = new DateTime();
    	
    	// Gather post data.
    	$my_post = array(
    		'post_title'    => $date->getTimestamp(),
    		'post_content'  => 'This is my post.',
    		'post_status'   => 'publish'
    	);
    
    	// Insert the post into the database.
    	wp_insert_post( $my_post );
    }

    re:woocommerce
    I’m actually doing an inventory system. Just a side project for our mini retail business. I originally plan to use woocommerce but, so far, I only need its product list feature so I just choose to create my own CPT instead of using a bulky woocommerce. Our order transactions are face-to-face so I also don’t need the order online feature of woocommerce.

    Thread Starter jaceejoef

    (@jaceejoef)

    Hi,

    Thank you for responding. It’s working now. I accidentally use a different custom post type that’s why it’s not working. Stupid me!

    Thanks again!

    Thread Starter jaceejoef

    (@jaceejoef)

    it wasn’t indicated in the documentation that it’s only for premium. so what’s the shortcode for the free version?

Viewing 12 replies - 1 through 12 (of 12 total)